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

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

union {<br />

string [ "Sr.", "Jr.", "III" ];<br />

null;<br />

} suffix;<br />

B.3.11<br />

Any types<br />

"Any types" are represented in Orderly using the any type specifier:<br />

any notes;<br />

B.3.12<br />

Unions<br />

It is possible in JSONSchema to specify a property that may be of one of many different types. In Orderly<br />

this functionality is represented using the union type specifier:<br />

union {<br />

string;<br />

number;<br />

} myUnion;<br />

A key syntactic feature to note is the supported (required) omission of property names where they would<br />

be meaningless.<br />

B.3.13<br />

Maps<br />

Associative arrays are neither defined in Orderly nor in JSONSchema. The <strong>CMIS</strong> Browser Binding introduces<br />

associative arrays (“maps”) to describe a collection of unique keys and a collection of values.<br />

Maps describe JSON objects without fixing the property names and the number of properties. The keys<br />

become JSON object property names and have to be non-null strings. Keys can be restricted, for example,<br />

by defining a min and max length, regular expressions, an enum, etc. The values data type can be defined<br />

by any unnamed entry including null.<br />

Maps are specified using the map type specifier. Key and value types are defined within curly braces. The<br />

key type first, followed by “=>”, followed by the value type:<br />

For example:<br />

map { string => boolean } isAllowed;<br />

map { string{2,10} => union { string; integer; null; } } things;<br />

map { string [ "happy", "sad", "meh" ] => integer } intMapping;<br />

B.3.14<br />

Extensions or Extra Properties<br />

Orderly is capable of concisely representing a subset of JSONSchema, however at times it might be desirable<br />

to be able to represent properties in JSONSchema that are not supported natively in Orderly. For this<br />

reason the backtick operators will allow you to encode a JSON object as part of an Orderly schema.<br />

For example to attach a description to a schema entry one might generate something like:<br />

string `{"description": "The name of the service"}`;<br />

The author has full control over formatting, as whitespace is ignored:<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 322 of 331

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

Saved successfully!

Ooh no, something went wrong!