Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Page Properties
hiddentrue

Status

Status
colourYellow
titleprogress

Priority
Note
AssigneeAntje

Resources

Remarks

  • Antje: page created as a copy of the schema tutorial
  • Inga - Review
    • Überschriften für Tutorials sind aktiv formuliert - was mache ich ... Using property definitions several times | Overwriting property attribute "required"
    • Einsortieren würde ich erst einmal vor dem Tagging in der Navigation 
    • "property type" (e.g. integer / date / string)  vs. "property definition"
    • "object type" vs "object type definitions" - siehe z.B. im excerpt
    • defined properties are "referenced" in an object type definition vs. "selected"
    • Heading "Overwriting by a Secondary Object Type Definition" - An alternative possibility is the usage of a secondary object type on which the object type definition can be based. => verstehe den Satz nicht - was meint hier "based" - "enhanced" und nicht die OTdefinition, sondern die Instanz selbst ...
    • "non-static" vs. "floating" - wenn dies dann zur Laufzeit oder direkt beim Import hinzugefügt wird ... fehlt mir noch als Info in dem Absatz
    • Ich fände es gut, wie property definition mit in jedem Beispiel aufzuführen - damit der Initalwert sichtbarer ist - sind zwar 6 Zeilen aber wäre mir leichter gefallen zu lesen
    • Heading "Handling of Multiple Property References"
      • specifying ... es wird nur das Attribut genannt - wäre es nicht sinnvoll dies mit propertyreference zu erwähnen
      • CODE - zweiter SOT ist ohne attribute - ist das richtig so? / initial ist es ebenfalls auf false gesetzt - wird dann überschrieben?


Excerpt

This tutorial shows how to use the same property type in different object types, in some of them as a required property type and in others as a non-required property type.

...

Overwriting the 'required' Attribute of Properties

Any property definition in the schema needs the specification of the required attribute. Its boolean value decides if the corresponding property is mandatory (true) or optional (false) for an object.  However, the value of the required attribute can be overwritten by a propertyReference in object type definitions or secondary object type definitions.

...

Code Block
languageyml
titleProperty definition
linenumberstrue
<propertyStringDefinition>
    <id>editor</id>
    <propertyType>string</propertyType>
    <cardinality>single</cardinality>
    <required>true</required>
</propertyStringDefinition>

...

Overwriting by an Object Type

...

Definition

In an object type definition, a propertyReference can be used to set a value for the required attribute for a property. This value can be different from the value specified in the property definition. In this case, the required attribute will have the value from the object type definition.

...

Code Block
languageyml
titleOverwriting of the required attribute by object type definition
linenumberstrue
<typeDocumentDefinition>
    <id>imported1</id>
    <baseId>system:document</baseId>
    <propertyReference required="false">editor</propertyReference>
    <contentStreamAllowed>allowed</contentStreamAllowed>
</typeDocumentDefinition>

Overwriting by a Secondary Object Type

...

Definition

An alternative possibility is the usage of a secondary object type on which the object type definition can be based. Also in the definition of the secondary object type, a propertyReference can be used to set a value for the required attribute for a property. The required attribute value specified in the original property definition is again overwritten.

...

If an object of type imported3 has non none of the two secondary object types, the property editor is optional.
If an object of type imported3 has the secondary object type noeditor, it does not change anything. The property editor is still optional.
But if an object of type imported3 has the secondary object type witheditor, the property editor is mandatory in this object.

...