Schema - Defining Object Types

Detailing the available schema, object type definitions as well as property definitions.

Table of Contents

Introduction

In yuuvis® Momentum, documents are stored as document objects. The business integrator defines one or more object types and their properties according to specific needs. Any document imported will need to be classified as exactly one of the object types defined in the schema of the system. 

The schema defines a set of object types and a set of properties. The object type classifies the object and defines the properties that the object must have or is allowed to have (properties may be optional). There are furthermore some metadata like 'system:versionNumber' or 'system:lastModificationDate', whose values are provided by the system.

A valid example schema
<schema xmlns="http://optimal-systems.org/ns/dmscloud/schema/v5.0/" 
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
        xsi:schemaLocation="http://optimal-systems.org/ns/dmscloud/schema/v5.0/ dmsCloud-schema.xsd">
        <propertyStringDefinition>
            <id>from</id>
            <propertyType>string</propertyType>
            <cardinality>single</cardinality>
            <required>true</required>
        </propertyStringDefinition>
        <propertyStringDefinition>
            <id>to</id>
            <propertyType>string</propertyType>
            <cardinality>multi</cardinality>
            <required>true</required>
        </propertyStringDefinition>
		<propertyStringDefinition>
            <id>subject</id>
            <propertyType>string</propertyType>
            <cardinality>single</cardinality>
            <required>true</required>
        	<defaultValue>hello</defaultValue>
        	<maxLength>20</maxLength>
	        <minLength>4</minLength>
		</propertyStringDefinition>
		<propertyDateTimeDefinition>
            <id>received</id>
            <propertyType>datetime</propertyType>
            <cardinality>single</cardinality>
            <required>true</required>
        </propertyDateTimeDefinition>
		<typeDocumentDefinition>
            <id>email</id>
            <baseId>system:document</baseId>
            <propertyReference>from</propertyReference>
            <propertyReference>to</propertyReference>
            <propertyReference>received</propertyReference>
			<contentStreamAllowed>required</contentStreamAllowed>
        </typeDocumentDefinition>
</schema>

By default, the maximum number of property definitions in a tenant-specific schema is 20. A system integrator can change this limit via the schema.tenant.properties.limit parameter in the system service. If you want to increase this limit, it is recommended to increase the maximum number of fields in your elasticsearch index as well.

Type IDs

In every property definition and every object type definition the id attribute is required. It is used to identify the object type or property. An ID is a string with a maximum of 63 characters and it must match the regular expression
([a...zA...Z][a...zA...Z0...9]*:)?[a...zA...Z][a...zA...Z0...9]*.

Type IDs are also used as the name of the type, e.g., in query operations. Hence, it is recommended to choose meaningful values for type IDs.

The part before the : character is the prefix. In tenant-specific (app-specific) types the prefix is always "ten"+<tenant name> ("app"+<app name>). In most cases, you can omit the prefix when designing a schema or importing objects or creating search queries. The prefix is added automatically.

An exception are column names in Table Property Definitions, where prefixes are prohibited as of version 2020 Winter.

Property Definitions

General Attributes

All property definitions have the following attributes:

AttributeTypeRequiredDescription
id
StringyesThe type ID of the property. It uniquely identifies the property in the schema.
localNamespace
URInoBy using namespaces, it is possible to form groups of properties and object types.
description
StringnoDescribes the property.
propertyType

EnumyesSpecifies the type of this property. The following types are supported:
  • boolean
  • integer
  • datetime
  • decimal
  • string
  • table
  • id
cardinality
 
Enumyes

Defines whether the property can have a maximum of one or an arbitrary number of values. Possible values are single and multi.

required
Booleanyes

If true, the object must have at least one value of this property. If a property is required and has no defaultValue, the application must provide a value during the create operation.

This attribute can be overwritten in the property references of object type definitions. Hence, the same property can be required in one object type and not required in another object type.
Following the concept of secondary object types, the same property can be referenced by multiple object type definitions. If these object type definitions have different required values for the same property, the value true always dominates over false.
Check out the tutorial "Overwriting the 'required' Property Attribute" for further examples.

queryable
 
BooleannoSpecifies whether or not the property may appear in the WHERE clause of a query statement. Default is true. false is only allowed for table properties.
classificationStringno

Declares the classifications this property belongs to. There is no validation or use in the system itself. For example, string properties can be classified as 'email' or 'url' and a client can use this classification to present the property's content in an appropriate manner. This tag can be used several times and the corresponding values are delivered in an array.

Note: Make sure to validate the strings you set for the classification tags, so that your application will not fail if the string does not match the expected syntax.

defaultValue
depending on the
propertyType
no

The value that the system sets for the property if no value is provided during object creation. If the cardinality is multi, there can be more than one default value and a list of all default values is provided.

Specific Attributes

Depending on the property type a property can have specific attributes.

Integer Property Definitions

AttributeTypeRequiredDescriptionTechnical Limit used as Default
maxValue
IntegernoThe maximum value allowed for this property9223372036854775807
minValue
IntegernoThe minimum value allowed for this property.-9223372036854775808

DateTime Property Definitions

AttributeTypeRequiredDescription
resolution
EnumnoThe only supported value is date. If the resolution is set to date, the property can only store values without a time part and these values have the format yyyy-MM-dd.

Decimal Property Definitions

Decimal properties support values of 64-bit precision (IEEE 754). The values have to be specified in decimal notation. However in the table below, the technical limits are provided in base 2 scientific notation in order to display the values in a condensed and comfortable format. This format cannot be used to specify the value for a maxValue or minValue attribute in a decimal property definition.

AttributeTypeRequiredDescriptionTechnical Limit used as Default
maxValue
DecimalnoThe maximum value allowed for this property(2-2 -52 )·2 1023 
minValue
Decimalno The minimum value allowed for this property. -(2-2 -52 )·2 1023 

Please note the additional limit of precision: values of magnitude smaller than 2 -1074 will be rounded to 0.

String Property Definitions

AttributeTypeRequiredDescription
maxLength
IntegernoThe maximum length (in characters) allowed for a value of this property.
minLength
Integerno

The minimum length (in characters) allowed for a value of this property.

In general, the length of a string is limited to 8192. Hence, the maximum value for maxLength and minLength is 8192.

Table Property Definitions

The column types of a table property are defined by a list of property definitions inside the table property definition. Each column property definition has its own attributes, such as required or default value. The values are applied to each row entry. The cardinality of a column property definition must be single.

As of version 2020 Winter, the column names specified via <id>examplecolumn</id> must not contain a prefix. They have to follow the convention [a...zA...Z][a...zA...Z0...9]*. Otherwise, the schema containing the corresponding property definition will not pass the validation.

Table properties differ depending on the value of the property queryable. If queryable is false, the table must not appear in WHERE clauses in search queries. However, you can still find objects using full-text conditions on values stored in a table (query keyword 'CONTAINS'). If queryable is true, you can apply more precise search queries to a table, but you will need more disk space to store objects.

The number of rows and columns of a table property definition is limited to a maximum of 512 columns and 1024 rows.
An example schema with a table property
<schema xmlns="http://optimal-systems.org/ns/dmscloud/schema/v5.0/" 
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
        xsi:schemaLocation="http://optimal-systems.org/ns/dmscloud/schema/v5.0/ dmsCloud-schema.xsd">
        <propertyTableDefinition>
            <id>aTableProperty</id>
            <propertyType>table</propertyType>
            <cardinality>single</cardinality>
            <required>false</required>
            <propertyStringDefinition>
                <id>col0</id>
                <propertyType>string</propertyType>
                <cardinality>single</cardinality>
                <required>false</required>
            </propertyStringDefinition>
            <propertyIntegerDefinition>
                <id>col1</id>
                <propertyType>integer</propertyType>
                <cardinality>single</cardinality>
                <required>false</required>
            </propertyIntegerDefinition>
            <propertyDateTimeDefinition>
                <id>col2</id>
                <propertyType>datetime</propertyType>
                <cardinality>single</cardinality>
                <required>false</required>
            </propertyDateTimeDefinition>
            <propertyDecimalDefinition>
                <id>col3</id>
                <propertyType>decimal</propertyType>
                <cardinality>single</cardinality>
                <required>false</required>
            </propertyDecimalDefinition>
		</propertyTableDefinition>
</schema>

Object Type Definitions

There are different groups of object type definitions:

In a schema, all object type definitions must appear in this order. First all document object type definitions, then all folder object type definitions and so on.

All object type definitions have the following attributes:

AttributeTypeRequiredDescription
id
Stringyes

The type ID of the object type. It uniquely identifies the object type in the schema.

localNamespace
URInoBy using namespaces, it is possible to form groups of properties and object types.
description
StringnoDescribes the property definition.
baseId
Enumyes

Specifies the base type of this object type. The following object types are supported:

  • system:document
  • system:folder
  • system:secondary
propertyReference 

Stringno

Reference by ID to a property. An object type definition can have an arbitrary number of property references.

A tenant-specific object type can have references to both tenant-specific and global properties.

Document Object Type Definitions

Document object types are the elementary object types. To store objects with content, the objects' type must be a document type.

Document object type definitions have the following specific attributes:

AttributTypeRequiredDescription
contentStreamAllowed
Enumyes

Specifies whether objects of this type must, must not, or may have content.

Possible values are:

  • required
  • notallowed
  • allowed (default)

Note: The attribute is also available for secondary object type definitions. If a secondary object type with a specified contentStreamAllowed attribute is referenced in the document object type definition, it might influence the final value of contentStreamAllowed or even lead to contradictions. Conflict situations can occur and lead to an invalid schema or invalid documents. The schema is invalid if the conflict occurs between secondary object type definitions and document object type definitions. Conflict situations between referenced secondary object types are not detected in the schema validation process, but can also lead to invalid documents. Find more details in the section on secondary object type definitions.

secondaryObjectTypeId
Stringno

References to secondary object types (if there are several secondary object types, they are listed one below the other). Determines which secondary object types an instance of this object type receives upon creation (static="true") or can be added at runtime (static="false").
>> Secondary Object Type Definition

In contrast to the CMIS specification (Content Management Interoperability Services), in which the secondary object types can be determined freely for each object instance, the schema specifies which secondary object types an object instance must have.

Folder Object Type Definitions

You define folder object types as structuring elements either in your global, tenant-specific or application schema. They do not have their own content files in contrast to document object types. In yuuvis® Momentum versions 2020 Autumn and older, folders cannot be set up in a hierarchical structure  a folder inside a folder is not allowed. As of version 2020 Winter, a folder hierarchy is possible. Folders allow the grouping of multiple objects and have their own metadata which will not be inherited by the assigned objects. They act as object parent being referred to by its system:objectId property value in the individual metadata of the child objects as system:parentId and thus are also taken into account during the search. Similar to a document object type a folder can reference a secondary object type's property group. The properties can be used as regular properties on folder level. Folders with objects assigned to them cannot be deleted.

The following code block shows the example folder object type definition "dossier" that can be integrated into any given schema. Note that folder object type definitions need to be defined after all document type definitions, yet before any secondary object type definitions.

Schema containing a folder object type
<schema xmlns="http://optimal-systems.org/ns/dmscloud/schema/v5.0/" 
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
        xsi:schemaLocation="http://optimal-systems.org/ns/dmscloud/schema/v5.0/ dmsCloud-schema.xsd">

        <propertyStringDefinition>
            <id>str1</id>
            <propertyType>string</propertyType>
            <cardinality>single</cardinality>
            <required>true</required>
        </propertyStringDefinition>
      
        <typeDocumentDefinition>
            <id>documentType1</id>
            <baseId>system:document</baseId>
            <propertyReference>str1</propertyReference>
            <contentStreamAllowed>required</contentStreamAllowed>
            <secondaryObjectTypeId>secondaryA</secondaryObjectTypeId>
        </typeDocumentDefinition>
       
		<typeFolderDefinition>
        	<id>dossier</id>
       		<baseId>system:folder</baseId>
        	<propertyReference>title</propertyReference>
        	<propertyReference>type</propertyReference>
        	<propertyReference>description</propertyReference>
    	</typeFolderDefinition>
</schema>

The document object types are the elementary object types of your schema in which the "real" content is stored. During import or update of an object the object ID of the target folder is provided as the new object's parent ID (system:parentId). Actions such as assigning objects, moving them to or removing them from a folder can easily be carried out in this way. A validation takes place and checks whether the given ID is a folder and does exist. Furthermore, as of version 2020 Winter, folders in a folder will be allowed. The folder hierarchy will represent a tree structure where each folder cannot appear as a parent in different levels of the structure. Hierarchies that do not adher to this structure will not pass validation.

By assigning documents to a configured folder you set an exact filing location and ensure a "tidy" storage of documents within your repository – if needed for your use case.

After schema modification, a folder object can be created by importing the following metadata:

Metadata for a folder object according to schema above
{
	"objects": [
	{
		"properties": {
			"system:objectTypeId": {
				"value": "dossier"
			},
			"title": {
				"value": "My E-mail Folder #1"
			},
			"type": {
				"value": "E-mails"
			},
			"description": {
				"value": "This folder holds all the e-mails authored by me"
			}
		}
	}
	]
}

After extracting the object ID of the folder from the import response, you can start populating the folder with documents:

Metadata of a document destined for the folder
{
	"objects": [
	{
		"properties": {
			"system:objectTypeId": {
				"value": "documentType1"
			},
			"system:parentId": {
				"value": "<the Folder object ID from the import response"
			},
			"str1": {
				"value": "Some important business documents"
			},
			"description": {
				"value": "This folder holds all the e-mails authored by me"
			}
		}
	}
	]
}

Folder object type definitions have the following specific attributes:

AttributeTypeRequiredDescription
secondaryObjectTypeId
Stringno

References to secondary object types (if there are several secondary object types, they are listed one below the other). Determines which secondary object types an instance of this object type receives upon creation (static="true") or can be added at runtime (static="false").
>> Secondary Object Type Definition

In contrast to the CMIS specification (Content Management Interoperability Services), in which the secondary object types can be determined freely for each object instance, the schema specifies which secondary object types an object instance must have.

Secondary Object Type Definitions

Secondary object types are abstract. This means that they cannot be instantiated. They allow you to design a more complex schema. In a way the concept of secondary object types is similar to the concept of inheritance. 

Secondary object types can be used to group properties and then assign these property groups to object types (e.g., documents or folders). Like other object types, a secondary object type can have references to properties. They can also have no properties at all which can be understood as a way of categorizing document types (tagging). Document or folder object types can in turn reference secondary object types, which give them their properties. There are two ways for secondary object types to be referenced by an object in the schema definition: as static or as floating.

  • <secondaryObjectTypeId static="true">INV</secondaryObjectTypeId>.
  • <secondaryObjectTypeId static="false">INV</secondaryObjectTypeId>.

The property groups of static referenced secondary object types are automatically available in all instances of the object type. Floating secondary object types can be handled in a flexible way during the import (POST /api/dms/objects endpoint) or at runtime for already existing instances of an object type with an update (POST /api/dms/objects/{objectId}PATCH /api/dms/objects/{objectId}).  The keywords "add":, "value": or "remove": can be used in the "system:secondaryObjecttypeIds": property area of the metadata.json filecan.

Keyword

TypeDescriptionmetadata.json
"value":
array, comma-separated list

during import or update

adds one or multiple secondary object types to an object

Note that the list of "floating" secondary object types transferred will replace all existing ones. This includes the related properties and their metadata values. If you want to keep an existing "floating" secondary object type, you have to list it as well.

{
    "objects": [{
        "properties": {
            "system:objectTypeId": {
                "value": "appSot:document"
            }
            "system:secondaryObjectTypeIds": {
                "value": ["INV","SUP"]
            }
...
"add":
string

during update

adds a single secondary object type to an object

{
    "objects": [{
        "properties": {
            "system:secondaryObjecttypeIds": {
                "add": "INV"
            },
...
"remove":
string

during update

removes a single secondary object type from an object

Note: The metadata assigned to the object by referencing the secondary object type will be deleted for the current object version!

{
    "objects": [{
        "properties": {
            "system:secondaryObjecttypeIds": {
                "remove": "INV"
            },
...

Document object types have a system:secondaryObjectTypeIds property that contains the secondary object types associated with the document object type in the schema. This allows secondary object types to be taken into account during the searchThe secondary object type must be explicitly specified in the FROM clause: select * from appSot:INV.

The system:secondaryObjectTypeIds property is set by the repository using the schema.

Schema containing secondary object types
<schema xmlns="http://optimal-systems.org/ns/dmscloud/schema/v5.0/"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation="http://optimal-systems.org/ns/dmscloud/schema/v5.0/ dmsCloud-schema.xsd">
 
        <propertyStringDefinition>
            <id>appSot:dateOfReceipt</id>
            <propertyType>date</propertyType>
            <cardinality>single</cardinality>
            <required>true</required>
        </propertyStringDefinition>
        <propertyStringDefinition>
            <id>appSot:comment</id>
            <propertyType>date</propertyType>
            <cardinality>single</cardinality>
            <required>true</required>
        </propertyStringDefinition>
        <propertyStringDefinition>
            <id>appSot:invoiceNo</id>
            <propertyType>string</propertyType>
            <cardinality>single</cardinality>
            <required>true</required>
        </propertyStringDefinition>
        <propertyStringDefinition>
            <id>appSot:paymentTerm</id>
            <propertyType>string</propertyType>
            <cardinality>single</cardinality>
            <required>true</required>
        </propertyStringDefinition>
         
        <typeDocumentDefinition>
            <id>appSot:document</id>
            <baseId>system:document</baseId>
            <propertyReference>appSot:dateOfReceipt</propertyReference>
            <contentStreamAllowed>required</contentStreamAllowed>
            <secondaryObjectTypeId>appSot:basicInfo</secondaryObjectTypeId>
        </typeDocumentDefinition>
         
        <typeSecondaryDefinition>
            <id>appSot:basicInfo</id>
            <baseId>system:secondary</baseId>
            <propertyReference>appSot:comment</propertyReference>
        </typeSecondaryDefinition>
        <typeSecondaryDefinition>
            <id>appSot:invoice</id>
            <baseId>system:secondary</baseId>
            <propertyReference>appSot:invoiceNo</propertyReference>
            <propertyReference>appSot:paymentTerm</propertyReference>
        </typeSecondaryDefinition>
</schema>

Consider the example schema. If a document of the type appSot:document is created, it may have values for the properties appSot:dateOfReceipt and appSot:comment. For the appSot:dateOfReceipt property definition this is obvious, because there is a direct reference in the document type definition of appSot:document

The appSot:comment property definition is not directly referenced but the definition of appSot:document has a reference to the secondary object type appSot:basicInfo which references the appSot:comment property definition. Thus, both properties are available for creating documents.

Furthermore, properties passed on by secondary object types are treated like "regular" properties in a document. The attributes of a property are taken into account. For example, a document of the type appSot:document not only may have a value for appSot:comment, it must have a value, because it is a required property. It makes no difference, whether a document type references the property definitions directly or indirectly via a secondary object type reference.

You cannot tell from the metadata of a document any longer if a property is referenced directly or indirectly in the schema. All properties are plain in the properties list. For example, the metadata of a document based on the appSot:document document type definition may look like this:

Metadata of appSot:document
{
    "objects": [
        {
            "properties": {
                "system:objectId": {
                    "value": "7bce6618-2b0e-4abf-af26-e4137e6b0461"
                },
                "system:baseTypeId": {
                    "value": "system:document"
                },
                "system:objectTypeId": {
                    "value": "appSot:document"
                },
                "system:secondaryObjectTypeIds": {
                    "value": [
                        " appSot:basicInfo"
                    ]
                },
                <...>
                " appSot:dateOfReceipt": {
                    "value": "2020-02-20T02:02:20.220Z"
                },
                "appSot:comment": {
                    "value": "Yearly invoice - payment 1 out of 12 monthly payments."
                }
            },
            "contentStreams": [
                <...>
            ]
        }
    ]
}

Secondary object type definitions have the following attributes:

Attribute

TypeRequiredDescription

contentStreamAllowed
(As of product version 2020 Autumn)

Enumno

Can substantiate the contentStreamAllowed attribute of document type definitions. Possible values are analogous to document object type definitions: required, notallowedallowed.

For the final document, content will be allowed if only allowed values occur in the document type definition and included secondary object type definitions for this attribute.

For the final document, content will be required (notallowed) if the value is required (notallowed) in at least one object type definition  either document type definition or included secondary object type definition.

Conflict situation leading to invalid documents: any combination of at least once required and at least once notallowed in included secondary object type definitions or the document object type definition itself.

  • If the conflict occurs between the document object type definition and a secondary object type definition, the whole schema is invalid.
  • If the conflict occurs between secondary object type definitions with at least one of them referenced as static, the schema is valid but the document validation will fail (instantiated documents will be invalid).
  • If the conflict occurs exclusively between secondary object type definitions referenced as floating, a document cannot have conflicting secondary object types at the same time. If a secondary object type with the value required (notallowed) is added to the document, all secondary object types with the value notallowed (required) must be removed by means of the keyword "remove":.

If contentStreamAllowed is specified in a secondary object type definition, this secondary object type cannot be referenced in folder object type definitions. The schema would be invalid.

System Properties

General Metadata Properties

In addition to the properties assigned to the object types in the schema, each instantiated object has a set of general system properties. Some system properties are set by the system and some system properties can be set by the user.

PropertyTypeDescriptionSet by
system:objectIdstringIdentifies the object in the database.system
system:baseTypeIdstringIdentifies the object type the object instantiates. Secondary object types are not allowed.system
system:objectTypeId

string

Required during an import and cannot be changed lateron.

Identifies the object's type.

user

system:secondaryObjectTypeIds

JSON list of stringsContains the secondaryObjectTypeId for each secondary object type associated with the document object type in the schema.user
system:createdBystringuserId of the user that has initially created the object.system
system:creationDatestringDate of the object's creation in format yyyy-MM-ddTHH:mm:ss.fffZ.system
system:lastModifiedBystringuserId of the user that sent the last successful POST request on the object.system
system:lastModificationDatestringDate of the last successful POST request on the object as a string in format yyyy-MM-ddTHH:mm:ss.fffZ.system

system:parentId

string

system:objectId of the parent folder. Available for documents and as of version 2020 Winter, also for folders.

During an import or update operation, the object can be assigned to an existing folder by referencing its system:objectId in the system:parentId of the target document or folder object. The existence of the parent folder is validated by means of the specified system:parentId. Furthermore, circles in the folder hierarchy are forbidden and do not pass the validation.

user
system:parentObjectTypeId

string

Identifies the folder object type of the parent folder that is specified by system:parentId.

Available for document object types and as of version 2020 Winter, also for folder object types.

system
system:versionNumberintegerInteger object version number. Corresponds to the number of POST requests on the object starting with the initial creation.system
system:tenantstringIdentifies the tenant the object belongs to.system
system:traceIdstringThe traceid of the import operation or last update operation.

Unique process number of any operation. If not specified in the request, a random string value will be set.

system

system:tags

JSON table of strings and integers

Contains the properties of the tags assigned to the object.

>> Tagging

user

system:rmExpirationDate

string

Only available for documents. Secondary object type system:rmDestructionRetention is required.

The binary content of the object cannot be changed or deleted before this date, but metadata updates are allowed. In an update request, the system:rmExpirationDate cannot be replaced by an earlier date.

>> Document Retention

user

system:rmStartOfRetention

string

Only available for documents. Secondary object type system:rmDestructionRetention and a non-null value for system:rmDestructionRetention is required.

This date defines the start of the retention time. It has to be earlier in time than the system:rmExpirationDate.

user

system:rmDestructionDate

string

Only available for documents. Secondary object type system:rmDestructionRetention and a non-null value for system:rmDestructionRetention is required.

If system:rmDestructionRetention is set, it must either be equal to or later in time than system:rmExpirationDate.

user

Content Stream Properties

The contentStreams group of properties comprises system properties of document objects containing a binary content. Thus, their contentStreamAllowed attribute has to be required or allowed. The properties in contentStreams contain all information necessary to be able to handle binary content. Depending on the type of operation, different properties are required for import/update requests or are displayed in a response.

PropertyTypeDescriptionIn an Import/Update RequestIn a Response
contentStreamIdString

Points to existing content within a repository.

Required only for pointing to existing content. If not specified, the system generates a UID.

displayed
lengthIntegerLength of the binary content, determined by the system.-displayed
mimeTypeString

Mime type of the content file.

Determined by the content analysis, but can be overwritten by user specification in the import body.displayed
fileNameString

Name of the content file.

Can be set in the request body. If not specified, fileName will be determined automatically depending on the operation type:

During an import, fileName is automatically determined from the multipart information.

In case of a pure content update, fileName will be determined from the content disposition.

displayed
digestStringSHA-256, automatically determined from the binary content.-displayed
repositoryIdString

ID of the repository that will be used for storage of the binary data.

Required only for pointing to existing content. If not specified, the default repository defined in the repository service configuration will be set.displayed
archivePathString

Additional and optional path structure of the stored object.

Required only for pointing to existing content if reconstruction is not possible with metadata informationdisplayed only if  it was set
rangeString

Applies to Compound Documents only. Defines a certain segment from compound documents that should be provided for content retrievals.


Optional in the request body and only available for compound documents.displayed only if it was set
cidStringAssign the corresponding multipart content.Required in the import request body. Not needed later on and therefore not stored in the system.-

Prefixes

The IDs of many object type and property definitions have prefixes. System types have the prefix system. Types defined in a tenant schema have the prefix ten followed by the name of the tenant. Types defined in an app schema have the prefix app followed by the name of the app. If you post a tenant schema or an app schema, all IDs in the schema must either match these rules or be missing altogether. If they are missing, the prefix is added to the IDs for the applied schema.

IDs of types defined in the global schema can have any prefix, as long as they do not start with ten or app or equal system. Alternatively, they can also have no prefix.

App Schemata


In the multi-tenant landscape of yuuvis® Momentum, any object types or properties that need to be available for multiple or all tenants, need to be introduced to the system schema using the system schema endpoints. To prevent cluttering the system schema, avoid dependencies and allow for duplicate names, the system schema can be structured into applications, which provide a namespace for properties and object types pertaining to a particular use case.

Applications are defined as smaller schema files that are integrated into the global schema to be available for every tenant. This allows modular usage of application schemata across multiple yuuvis® systems.

Within the schema, applications are defined by a prefix followed by the application's name:  app<app name>. The app name is case insensitive when used as a path parameter to interact with the application schema or within the search engine.

Depending on the situation, the prefix can be omitted, for example to broaden a search query across multiple application schemata.

The app schema endpoints are:

When uploading an app schema, all properties that do not specify a prefix will have that prefix generated as app<app name> where <app name> is equal to the path parameter {app}.

It is allowed to specify this prefix ahead of time, meaning that both "<property name>" and "app<app name>:<property name>" are acceptable names for a property within a schema posted to {base URL}/api/system/apps/<App name>/schema. Uploading a schema using prefixes that do not match the {app} path parameter or any other known apps or tenants will result in a validation error message.

Resolve conflicts that result from multiple similar app/property combinations will also lead to schema validation errors.

Tenant Schemata

Each tenant can define tenant-specific object types in a separate tenant schema. The object types defined in a tenant schema are only available for the corresponding tenant.

Each tenant can define exactly one tenant schema. It can be customized via the following endpoints:

Each object type ID and property type ID has the prefix ten + <tenant name>. Thus, the same object type name can occur in multiple tenant schemata.

If any prefix is used not equal to ten + <tenant name>, the tenant schema will not pass the validation.

If the prefix is missing in the request body for a tenant schema update, it will be added automatically in the applied schema that is used in use cases like search, import or update of objects.

Summary

In this article, you have reviewed the tools available for creating yuuvis® Momentum schemata. Now you can get started implementing your own custom schema to solve your information management problems. 


Read on

Managing the Schema 

This tutorial shows how to use the Core API to get the tenant-specific schema of the system, how to validate a schema, and how to bring in a new schema. Keep reading

Importing Documents 

This tutorial shows how documents can be imported into a yuuvis® API system via the Core API. During this tutorial, a short Java application will be developed that implements the HTTP requests for importing documents. We additionally provide a JavaScript version of this tutorial.  Keep reading

Changing Schema Structures

This tutorial shows how to change your basic schema for individual instances of an object type during the entire lifecycle of a document. Classify objects at a later point in time, add or remove property groups at runtime by defining and referencing "floating" secondary object types. Keep reading