in JSLib/src/odata-metadata.js [147:314]
EntitySet: schemaElement(
/*attributes*/["Name", "EntityType"],
/*elements*/["TypeAnnotation*", "ValueAnnotation*"]
),
EntityType: schemaElement(
/*attributes*/["Name", "BaseType", "Abstract", "OpenType"],
/*elements*/["Key", "Property*", "NavigationProperty*", "TypeAnnotation*", "ValueAnnotation*"]
),
EnumType: schemaElement(
/*attributes*/["Name", "UnderlyingType", "IsFlags"],
/*elements*/["Member*"]
),
Float: schemaElement(
/*attributes*/null,
/*elements*/null,
/*text*/true
),
Function: schemaElement(
/*attributes*/["Name", "ReturnType"],
/*elements*/["Parameter*", "DefiningExpression", "ReturnType", "TypeAnnotation*", "ValueAnnotation*"]
),
FunctionImport: schemaElement(
/*attributes*/["Name", "ReturnType", "EntitySet", "IsSideEffecting", "IsComposable", "IsBindable", "EntitySetPath"],
/*elements*/["Parameter*", "ReturnType", "TypeAnnotation*", "ValueAnnotation*"]
),
Guid: schemaElement(
/*attributes*/null,
/*elements*/null,
/*text*/true
),
Int: schemaElement(
/*attributes*/null,
/*elements*/null,
/*text*/true
),
Key: schemaElement(
/*attributes*/null,
/*elements*/["PropertyRef*"]
),
LabeledElement: schemaElement(
/*attributes*/["Name"],
/*elements*/["Path", "String", "Int", "Float", "Decimal", "Bool", "DateTime", "DateTimeOffset", "Guid", "Binary", "Time", "Collection", "Record", "LabeledElement", "Null"]
),
Member: schemaElement(
/*attributes*/["Name", "Value"]
),
NavigationProperty: schemaElement(
/*attributes*/["Name", "Relationship", "ToRole", "FromRole", "ContainsTarget"],
/*elements*/["TypeAnnotation*", "ValueAnnotation*"]
),
Null: schemaElement(
/*attributes*/null,
/*elements*/null
),
OnDelete: schemaElement(
/*attributes*/["Action"]
),
Path: schemaElement(
/*attributes*/null,
/*elements*/null,
/*text*/true
),
Parameter: schemaElement(
/*attributes*/["Name", "Type", "Mode", "Nullable", "DefaultValue", "MaxLength", "FixedLength", "Precision", "Scale", "Unicode", "Collation", "ConcurrencyMode", "SRID"],
/*elements*/["CollectionType", "ReferenceType", "RowType", "TypeRef", "TypeAnnotation*", "ValueAnnotation*"]
),
Principal: schemaElement(
/*attributes*/["Role"],
/*elements*/["PropertyRef*"]
),
Property: schemaElement(
/*attributes*/["Name", "Type", "Nullable", "DefaultValue", "MaxLength", "FixedLength", "Precision", "Scale", "Unicode", "Collation", "ConcurrencyMode", "CollectionKind", "SRID"],
/*elements*/["CollectionType", "ReferenceType", "RowType", "TypeAnnotation*", "ValueAnnotation*"]
),
PropertyRef: schemaElement(
/*attributes*/["Name"]
),
PropertyValue: schemaElement(
/*attributes*/["Property", "Path", "String", "Int", "Float", "Decimal", "Bool", "DateTime", "DateTimeOffset", "Guid", "Binary", "Time"],
/*Elements*/["Path", "String", "Int", "Float", "Decimal", "Bool", "DateTime", "DateTimeOffset", "Guid", "Binary", "Time", "Collection", "Record", "LabeledElement", "Null"]
),
ReferenceType: schemaElement(
/*attributes*/["Type"]
),
ReferentialConstraint: schemaElement(
/*attributes*/null,
/*elements*/["Principal", "Dependent"]
),
ReturnType: schemaElement(
/*attributes*/["ReturnType", "Type", "EntitySet"],
/*elements*/["CollectionType", "ReferenceType", "RowType"]
),
RowType: schemaElement(
/*elements*/["Property*"]
),
String: schemaElement(
/*attributes*/null,
/*elements*/null,
/*text*/true
),
Schema: schemaElement(
/*attributes*/["Namespace", "Alias"],
/*elements*/["Using*", "EntityContainer*", "EntityType*", "Association*", "ComplexType*", "Function*", "ValueTerm*", "Annotations*"]
),
Time: schemaElement(
/*attributes*/null,
/*elements*/null,
/*text*/true
),
TypeAnnotation: schemaElement(
/*attributes*/["Term", "Qualifier"],
/*elements*/["PropertyValue*"]
),
TypeRef: schemaElement(
/*attributes*/["Type", "Nullable", "DefaultValue", "MaxLength", "FixedLength", "Precision", "Scale", "Unicode", "Collation", "SRID"]
),
Using: schemaElement(
/*attributes*/["Namespace", "Alias"]
),
ValueAnnotation: schemaElement(
/*attributes*/["Term", "Qualifier", "Path", "String", "Int", "Float", "Decimal", "Bool", "DateTime", "DateTimeOffset", "Guid", "Binary", "Time"],
/*Elements*/["Path", "String", "Int", "Float", "Decimal", "Bool", "DateTime", "DateTimeOffset", "Guid", "Binary", "Time", "Collection", "Record", "LabeledElement", "Null"]
),
ValueTerm: schemaElement(
/*attributes*/["Name", "Type"],
/*elements*/["TypeAnnotation*", "ValueAnnotation*"]
),
// See http://msdn.microsoft.com/en-us/library/dd541238(v=prot.10) for an EDMX reference.
Edmx: schemaElement(
/*attributes*/["Version"],
/*elements*/["DataServices", "Reference*", "AnnotationsReference*"],
/*text*/false,
/*ns*/edmxNs
),
DataServices: schemaElement(
/*attributes*/null,
/*elements*/["Schema*"],
/*text*/false,
/*ns*/edmxNs
)
}
};
// See http://msdn.microsoft.com/en-us/library/ee373839.aspx for a feed customization reference.
var customizationAttributes = ["m:FC_ContentKind", "m:FC_KeepInContent", "m:FC_NsPrefix", "m:FC_NsUri", "m:FC_SourcePath", "m:FC_TargetPath"];
schema.elements.Property.attributes = schema.elements.Property.attributes.concat(customizationAttributes);
schema.elements.EntityType.attributes = schema.elements.EntityType.attributes.concat(customizationAttributes);
// See http://msdn.microsoft.com/en-us/library/dd541284(PROT.10).aspx for an EDMX reference.
schema.elements.Edmx = { attributes: ["Version"], elements: ["DataServices"], ns: edmxNs };
schema.elements.DataServices = { elements: ["Schema*"], ns: edmxNs };
// See http://msdn.microsoft.com/en-us/library/dd541233(v=PROT.10) for Conceptual Schema Definition Language Document for Data Services.
schema.elements.EntityContainer.attributes.push("m:IsDefaultEntityContainer");
schema.elements.Property.attributes.push("m:MimeType");
schema.elements.FunctionImport.attributes.push("m:HttpMethod");
schema.elements.FunctionImport.attributes.push("m:IsAlwaysBindable");
schema.elements.EntityType.attributes.push("m:HasStream");
schema.elements.DataServices.attributes = ["m:DataServiceVersion", "m:MaxDataServiceVersion"];
var scriptCase = function (text) {
/// <summary>Converts a Pascal-case identifier into a camel-case identifier.</summary>
/// <param name="text" type="String">Text to convert.</param>
/// <returns type="String">Converted text.</returns>
/// <remarks>If the text starts with multiple uppercase characters, it is left as-is.</remarks>
if (!text) {