4.8 Simple Metadata Extensions Summary
SData schemas use a set of extensions defined by the SME (Simple Metadata Extension) standard, which is part of the SData specification. The SME attributes belong to the http://schemas.sage.com/sdata/sme/2007 namespace and are prefixed by sme: in the example schema.
These attributes are applied to XSD elements of SData schemas. The following table gives a complete list of the SME attributes, with pointers to the sections where they are described:
Attribute | Value | Applies to | Description |
---|---|---|---|
role | resourceKind serviceOperation query | First level elements | Describes the role that the XSD element plays in the contract. |
path | relative URL | Resource kind definition Service operation or named query definition | Relative URL to query resources or invoke the operation. |
pluralName | pluralized name | Resource kind definition | Name of the resource kind in plural form. For example, accounts. |
label | string | All definitions | A friendly name for the element (localized). |
canGet canPost canPut canDelete | true (default for canGet) false (default for others) | Resource kind definition Relationship definition | Does the resource kind or relationship property support GET (read and query), POST, PUT and DELETE operations? |
canPagePrevious canPageNext canPageIndex | true false (default) | Resource kind definition Relationship definition | The paging modes supported by the resource kind or relationship property. See Query Paging section. |
canSort | true false (default) | Property definition | Can the feed be sorted by this property? |
canFilter | true false (default) | Property definition | Can the feed be filtered by the property? |
canGroup | true false (default) | Property definition | Can feed entries be grouped by values of this property? |
canSearch | true false (default) | Resource kind definition | Does the resource kind support full-text search through the search query parameter? See Query Parameters section for details. |
hasUuid | true false (default) | Resource kind definition | Does the resource kind use UUIDs to identify resources? When this attribute is set, feeds payload MUST carry sdata:uuid attributes |
hasTemplate | true false (default) | Resource kind definitionService operation or named query definition | Does the resource kind, service operation or named query provide a $template URL? See Operation Template section for details. |
supportsETag | true false (default) | Resource kind definition | Does the resource kind support the ETag mechanism to control concurrent updates? |
relationship | parent child reference association | Relationship definition | Type of relationship. |
isCollection | true false (default) | Relationship definition | Does the property refer to a collection of resources or a single resource? |
isMandatory | true false (default) | Property definition | Is the property value mandatory when creating a new resource? |
isReadOnly | true false (default) | Property definition | Is the property read-only? For example, an ID set by the provider or a calculated property. |
isLocalized | true false (default) | Property definition | Does the property contain localized text? |
isUniqueKey | true false (default) | Property definition | Is the property a key that identifies a unique resource? |
precedence | integer | Property definition | Controls the visibility of properties on small screens. |
groupName | string | Property definition | A group (category) name to group related properties. |
maxLength | integer | Property definition | Maximum length of a string property value. This attribute is a hint for the user interface. A service consumer may pass a string which is longer than maxLength. In this case, the value will be truncated by the provider. A more sophisticated consumer may use this value to limit the size of its edit field and/or adjust its storage requirements so that they match what the provider uses. |
averageLength | integer | Property definition | Average length (number of characters) of a string property value. This attribute is a hint for the user interface. A service consumer can use it to set the visible size of edit fields in a form. |
totalDigits | integer | Property definition | Maximum overall number of digits for a decimal property value. This attribute is a hint for the user interface. A service consumer may ignore it and pass a decimal value with more digits. In this case the provider will round or truncate the value. |
fractionDigits | integer | Property definition | Maximum number of digits to the right of the decimal point for a decimal property value. This attribute is a hint for the user interface. A service consumer may ignore it and pass a decimal value with more decimal digits. In this case the provider will round or truncate the value. |
unsupported | true false (default) | All definitions | Is the element part of a global contract that it is not supported by this specific provider? |
tags (1.1) | comma separated string | All definitions | List of tags that apply to the definition. SData does not impose any predefined list of tags. Instead, each contract is free to define its own list of tags. This feature is an extensibility mechanism. It should be used when the information cannot be captured by one of the other SME attributes, not as a replacement for existing SME attributes. |
protocolFilters | comma separated string | Resource kind definition | List of protocol filter variables supported in where parameters and resource selectors. See [Query Language](2.12 Query Language "2.12 Query Language") section for details. |
compliance | may should must | All definitions | Applies to elements that are part of a global contract. Defines the compliance requirement for providers that implement the contract. |
batchingMode | none (default) sync async syncOrAsync | Resource kind definition | Does the resource kind support batching? If so, which invocation modes does it support? |
invocationMode | sync (default) async syncOrAsync | Service operation or named query definition | The supported invocation modes. |
isSyncSource | true false (default) | Resource kind definition | Can the resource kind be used as a source in a synchronization operation? See SData Synchronization for details. |
isSyncTarget | true false (default) | Resource kind definition | Can the resource kind be used as a target in a synchronization operation? See SData Synchronization for details. |
syncConflictPriority | integer | Resource kind definition | Priority to resolve conflicts in synchronization. See SData Synchronization for details. |
syncOrder (1.1) | integer | Resource kind definition | Order in which the resource kind should be processed in a synchronization pass. See SData Synchronization for details. |
The following table contains SME attributes that have been deprecated in version 1.0 of the SData protocol:
Attribute | Value | Applies to | Description |
---|---|---|---|
isGlobalId | true false (default) | Property definition | Is the property a global identifier for the resource? Deprecated. |
isIdentifier | true false (default) | Property definition | Is the property an identifier for the resource? Deprecated. |
isDescriptor | true false (default) | Property definition | Is the property a descriptor for the resource? Deprecated. |
copiedFrom | XPath expression | Property definition | Indicates that the property is dependent upon a related resource and gives the XPath expression for the corresponding property in the related resource. See Relationship definition section for details. Deprecated. |
Appendix A contains an XML Scheme Definition (XSD) specification for these schema extensions. This XSD schema can be used to validate SData schemas.