Module: odata/metadata

odata/metadata

Methods

<inner> getChildSchema(parentSchema, candidateName) → {Object}

Gets the schema node for the specified element.
Parameters:
Name Type Description
parentSchema Object Schema of the parent XML node of 'element'.
candidateName XML element name to consider.
Source:
Returns:
The schema that describes the specified element; null if not found.
Type
Object

<inner> isEdmNamespace(nsURI) → {Boolean}

Checks whether the specifies namespace URI is one of the known CSDL namespace URIs.
Parameters:
Name Type Description
nsURI String Namespace URI to check.
Source:
Returns:
true if nsURI is a known CSDL namespace; false otherwise.
Type
Boolean

<inner> metadataParser(handler, text)

Parses a metadata document.
Parameters:
Name Type Description
handler This handler.
text String Metadata text.
Source:
Returns:
An object representation of the conceptual model.

<inner> parseConceptualModelElement(element) → {Object}

Parses a CSDL document.
Parameters:
Name Type Description
element DOM element to parse.
Source:
Returns:
An object describing the parsed element.
Type
Object

<inner> schemaElement(attributes, elements, text, ns) → {Object}

Creates an object that describes an element in an schema.
Parameters:
Name Type Description
attributes Array List containing the names of the attributes allowed for this element.
elements Array List containing the names of the child elements allowed for this element.
text Boolean Flag indicating if the element's text value is of interest or not.
ns String Namespace to which the element belongs to. If a child element name ends with * then it is understood by the schema that that child element can appear 0 or more times.
Source:
Returns:
Object with attributes, elements, text, and ns fields.
Type
Object

<inner> scriptCase(text) → {String}

Converts a Pascal-case identifier into a camel-case identifier.
Parameters:
Name Type Description
text String Text to convert.
Source:
Returns:
Converted text. If the text starts with multiple uppercase characters, it is left as-is.
Type
String