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 |
First level elements |
Describes the role that the XSD element plays in the contract. |
|
path |
relative URL |
Resource kind 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 |
true (default for canGet) |
Resource kind definition
|
Does the resource kind or relationship property support GET (read and query), POST, PUT and DELETE operations? |
|
canPagePrevious |
true |
Resource kind definition
|
The paging modes supported by the resource kind or relationship property. See Query Paging section. |
|
canSort |
true |
Property definition |
Can the feed be sorted by this property? |
|
canFilter |
true |
Property definition |
Can the feed be filtered by the property? |
|
canGroup |
true |
Property definition |
Can feed entries be grouped by values of this property? |
|
canSearch |
true |
Resource kind definition |
Does the resource kind support full-text search through the search query parameter? See Query Parameters section for details. |
|
hasUuid |
true |
Resource kind definition |
Does the resource kind use UUIDs to identify resources? |
|
hasTemplate |
true |
Resource kind definition Service operation or named query definition |
Does the resource kind, service operation or named query provide a $template
URL? |
|
supportsETag |
true |
Resource kind definition |
Does the resource kind support the ETag mechanism to control concurrent updates? |
|
relationship |
parent |
Relationship definition |
Type of relationship. |
|
isCollection |
true |
Relationship definition |
Does the property refer to a collection of resources or a single resource? |
|
isMandatory |
true |
Property definition |
Is the property value mandatory when creating a new resource? |
|
isReadOnly |
true |
Property definition |
Is the property read-only? For example, an ID set by the provider or a calculated property. |
|
isLocalized |
true |
Property definition |
Does the property contain localized text? |
|
isUniqueKey |
true |
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. |
|
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 |
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. 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 section for details. |
|
compliance |
may |
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) |
Resource kind definition |
Does the resource kind support batching? If so, which invocation modes does it support? |
|
invocationMode |
sync (default) |
Service operation or named query definition |
The supported invocation modes. |
|
isSyncSource |
true |
Resource kind definition |
Can the resource kind be used as a source in a synchronization operation?
|
|
isSyncTarget |
true |
Resource kind definition |
Can the resource kind be used as a target in a synchronization operation?
|
|
syncConflictPriority |
integer |
Resource kind definition |
Priority to resolve conflicts in synchronization. |
|
syncOrder (1.1) |
integer |
Resource kind definition |
Order in which the resource kind should be processed in a synchronization
pass. |
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 |
Property definition |
Is the property a global identifier for the resource? |
|
isIdentifier |
true |
Property definition |
Is the property an identifier for the resource? |
|
isDescriptor |
true |
Property definition |
Is the property a descriptor for the resource? |
|
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.
|
Appendix A contains an XML Scheme Definition (XSD) specification for these schema extensions. This XSD schema can be used to validate SData schemas.
SData Core Specification - version 1.1
