18.01.2015 Views

Content Management Interoperability Services (CMIS) Version 1.1

Content Management Interoperability Services (CMIS) Version 1.1

Content Management Interoperability Services (CMIS) Version 1.1

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

B.3.8<br />

Array Types<br />

Arrays are specified using the array type specifier. Schemas for arrays elements may be specified in one of<br />

two ways. First, we can specify a single schema that governs all array members, with the schema enclosed<br />

by square brackets:<br />

array [<br />

numbers{0.00, 1.00};<br />

] weights; # an array of floating point weights between 0 and 1.<br />

Alternately, "tuple typing" may be used to specify the allowable values for an array, in this case a list of<br />

schemas that apply to each member of the array in sequence:<br />

array {<br />

integer;<br />

string;<br />

number;<br />

} artificial;<br />

When tuple typing is used, the * operator may be used to allow additional elements at the end of an array.<br />

For instance, to specify an array where the first element is an integer and the remaining are of arbitrary<br />

number and type, one might use the following schema:<br />

array { integer; }* intFollowedByWhatever;<br />

Finally, array types also support range semantics, for min/max number of elements:<br />

array { integer; } {0,10} myArrayOfSmallInts;<br />

B.3.9<br />

Additional properties in arrays and objects<br />

JSONSchema provides the additionalProperties attribute, which allows a schema author to either:<br />

• specify that a valid instance object/array may not have any properties not in the schema<br />

• specify an additional schema that applies to any additional properties in the instance object or array<br />

that are not explicitly mentioned in the schema<br />

Orderly allows you to specify if additional properties SHOULD be allowed, but does not allow you to specify<br />

a schema which governs these additional properties. A trailing * in Orderly indicates additional properties<br />

are allowed, and occurs immediately after the definition of nested schemas (the closing curly brace) for both<br />

objects:<br />

object {<br />

string name;<br />

string title;<br />

}* employee;<br />

And for arrays:<br />

array { integer; string; }* myOpenTupleTypedArray<br />

B.3.10<br />

Null Types<br />

The null type in JSONSchema specifies a value that MUST be null. The null type specifier is Orderly's<br />

equivalent:<br />

null likeAir;<br />

As explained in the JSONSchema proposal, null is useful "mainly for purpose of being able use union types<br />

to define nullability". For example:<br />

<strong>CMIS</strong>-v<strong>1.1</strong>-csprd01<br />

Standards Track Work Product<br />

Copyright © OASIS Open 2012. All Rights Reserved.<br />

18 August 2012<br />

Page 321 of 331

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!