!--a11y-->
Structured Content 
Applications dealing with the content of resources often need to know about the structure of the content. However, as mentioned earlier, the repository framework has no knowledge of the structure. It is only aware of unstructured content and its metadata. This awareness is adequate for bulk data contained in documents, but not for business objects. The framework therefore allows knowledge of the structure to be stored and accessed in properties. Using properties, applications can store and dynamically retrieve information about the content of business objects, without requiring any hard-coded knowledge of the objects.
Properties are name/value
pairs that are defined in the same way as WebDAV properties (see RFC 2518). Note that they are different to
java.util.Properties.
Properties have a:
● Name that adheres to namespace rules
● Type that defines the values which are permitted
● Behavior that can be live or dead
● Attributes that store metadata for the properties and also have a type
The sections that follow describe these aspects of properties in detail.
A property name uses the XML namespace for properties. It consists of a namespace and a local name.

A
property name comprised of the tuple (namespace, local
name) is displayed as follows:
{http://sapportals.com/xmlns/cm}displayname
The namespace part of the name, http://sapportals.com/xmlns/cm, is optional and can be left out.
Property names are not hierarchical. Therefore, if two properties have the names {x}A and {x}A/B, no child or parent relationship exists between them.
Like variables in a computer language, properties have a type that specifies which values they are allowed to hold. The following property types are defined:
Type |
Description |
String |
Any sequence of characters. The repository framework enforces no limit on the length of strings, but most repositories have a limit |
Integer |
An integer value |
Long |
A long integer value |
Dateonly |
A date value like java.sql.Date |
Timeonly |
A time value like java.sql.Time |
Datetime |
A timestamp value (with date and time) like java.sql.Timestamp |
Boolean |
A boolean value (either false or true). |
XML |
A character string that represents a valid XML fragment. The repository framework does not check XML values to see whether they are well-formed and treats them as large strings |
Similarly to properties defined for WebDAV, properties in the framework can be live or dead:
●
Live
properties are checked by the
repository. For example, when the property for content length is used,
{http://sapportals.com/xmlns/cm}contentlength), the
repository checks the value. The value must be a long integer and contain the
length of the content in bytes.
Live properties are usually system properties that are predefined for a
repository. Their values are computed by the repository and cannot be changed
by a client application. If a client changes them, it has side-effects on the
repository.
● Dead properties are not checked by the repository, except for their type. They are usually custom properties that are not predefined for the system.
Properties can have metadata which provides information about them. The metadata is referred to as an attribute of a property. Attributes have a type and like properties they can be either live or dead. The table shows attributes of properties that are predefined for repositories. Additional attributes can be defined, however, they are always dead and therefore not checked by the repository. Attributes are simple key/value pairs where both the key and value are strings as defined in java.util.properties.
Predefined Attributes
Type |
Explanation |
Live |
Multivalued |
true if the property value is a list of values of the given type. |
Yes |
Required |
true if the property value is required to remain, if set. That is, if the property was once set, it cannot be deleted, although its value can be changed and new resources might be created without the property being set |
Yes |
Readonly |
true if the property value can not be changed |
Yes |
Hidden |
true if the property is for system use only and not intended to be displayed to users. |
Yes |
Description |
a localized description of the property or at least the property’s name, if no description exists |
|
The properties display name and resource type play a central role within the framework.
Display
name is important for the user
interface because it provides a user-friendly name for a resource. Whereas a
RID is a technical name that identifies a resource uniquely within the system,
a display
name identifies the resource for end users. A news item can have the RID
/news/20030708/110907003.1.xml, but the display name
latest
news(11:09:07).
The property display name is optional and can depend on the language of the resource context. If the display name does not exist, the name part of the RID is displayed. Display names are not always unique.
Similarly to the MIME type that specifies the type of content, the resource type specifies the resource type as string value. Although it is an optional property, it influences the handling of resources in many significant ways. For example, it can determine the way in which a resource is rendered, the commands that are provided on the UI to manipulate it and the context in which it is presented. Within the framework, the type handling mechanism and the object type handler base their logic on the resource type property.
See also:
Creating, Retrieving and Updating Properties