Attributes overview
For a clear terminological distinction, within this documentation the term “attribute” is always used to refer to the indexing metadata which is customizable by administrative means (i.e. by the ImageMaster AdminClient or the underlying system management services). From this perspective the supported query language RAQL is capable of operating on part of the overall ImageMaster document model which transcends mere handling of attributes, and which may involve content properties or document type properties. See chapter Query language RAQL for more information on the query language RAQL.
Attribute definition
Attributes may be associated with attribute definitions which only exist within the context of a document type. For an example of an attribute definition see Example – request for creating a document type, which illustrates the creation of a document type with two attributes. An attribute definition is generally characterized by its unique name, the key flag, a lower and upper bound for attribute occurrence (see “multi-value attributes” beneath) and a reference to an attribute type definition.
Key attributes
Multi-value attributes
From a technical perspective, the commonly known qualifications of an attribute being denoted as “optional” or as “required” actually present special cases of a multi-value attribute. The Integration Service generally allows for several values being assigned to one attribute. This conceptualization of a so called “multi-value attribute” is reflected by the definition of lower and upper bounds for attribute occurrence in the definition of an attribute:
-
A required attribute must occur at least once:
<attribute name="exampleRequiredAttribute" minOccurs="1" maxOccurs="1" …>
-
An optional attribute need not occur:
<attribute name="exampleOptionalAttribute" minOccurs="0" maxOccurs="1" …>
-
A multi-value attribute may occur more than once, in this example at most twice:
<attribute name="exampleMultivalueAttribute" minOccurs="0" maxOccurs="2" …>
-
More complex conditions may be defined, for example multi-value attributes which require a certain minimum and maximum number of values:
<attribute name="exampleComplexAttr" minOccurs="2" maxOccurs="4" …>
Attribute types vs. document types
In the document management system API, metadata is defined as a set consisting of pairs, where one pair is associated with an attribute. An attribute technically includes a reference to an attribute name and an attribute value represented as strings. Attribute types and document types are related as follows:
-
An attribute type defines the valid format of an attribute value, i.e. it determines which values are accepted by the system. Typical examples are an integer number, a string or a floating point number. Note that within the Web service interface all attribute values are represented as XML strings, that is, the attribute type guarantees that the string value follows a certain form and may be interpreted as, say, an integer or float number. For further details see XML Schema definition [XML Schema Types].
-
The document type defines which attributes must occur or may occur in a metadata set. Corresponding document type definitions must be provided as input for the system management services when defining a new document type (see chapter Role administration). For further details see XML Schema definition [XML Schema Types].
There is a fix list of valid basic attribute types (see Basic attribute types and type constraints) derived from common types such as string, text or Boolean or defined in terms of XML Schema.