Versions Compared

Key

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

...

Wiki Markup
{multi-excerpt:name=service object type}
h5. ServiceObjectType

_ServiceObjctTypeServiceObjectType_ describes tenant specific meta data for each CollectionSpace entity served by a distinct service. This part of the binding is created by the tenant administrator. It contains the following elements.

# One or more tenant defined *properties*.
# One or more parts the object is made up of. For example, a collection object could consist of *parts* such as system data, common collection object data, museum domain specific collection object data and tenant specific collection object data.
# A *serviceHandler* is an application defined handler used to process the object data. This handler should implement the ServiceHandler interface (TBD) and follow the packaging instructions (TBD) to deploy it at runtime.
# Each service object is uniquely identified using *ID, name and version*.
# A tenant administrator could update the timestamp to indicate when this service binding was *updated*. A tenant provisioning service/tool (TBD) could update this field as well.

Following snippet shows the schema for the _ServiceObjectType_.

{newcode:language=xml|title=service object type|controls=true|linenumbers=true}    <xs:complexType name="ServiceObjectType">
        <xs:annotation>
            <xs:documentation/>
        </xs:annotation>
        <xs:sequence>
            <xs:element name="property" type="types:PropertyType" minOccurs="0" maxOccurs="unbounded"/>
            <xs:element name="part" type="ObjectPartType" minOccurs="0" maxOccurs="unbounded"/>
            <!-- a handler Java class to process the content of this service -->
            <xs:element name="serviceHandler" type="xs:string" minOccurs="0" maxOccurs="1"/>
        </xs:sequence>
        <xs:attribute name="id" type="xs:ID" use="required"/>
        <!-- the object name could be collectionobject|intake|location, etc. -->
        <xs:attribute name="name" type="xs:string" use="required"/>
        <xs:attribute name="version" type="types:VersionType" use="required"/>
        <xs:attribute name="updated" type="xs:dateTime" use="optional"/>
    </xs:complexType>{newcode}

h5. ObjectPartType

An _ObjectPartType_ represents the metadata for a part of a CollectionSpace entity. Following describes the elements of an object part metadata.

# Pre-defined *properties* (name value pairs) by the tenant. 
# *Content* meta data of the part as described by [_ObjectPartContentType_|#object_part_content]. Various types of content is possible. Examples are XML content, printed-quotable content, based 64-encoded content, etc. The binding only contains the meta data for the content that is marshalled or unmarshalled at runtime by the service.
# The *control group* indicates to the service where the content resides. This is similar to Fedora control group. Following are the control groups supported by CollectionSpace.
## *External* indicates to CollectionSpace that the content resides in a 3rd party data store, e.g. MediaVault or CalPhoto.
## *Managed* content is actively managed by CollectionSpace. A collection object stored in CollectionSpace repository is marked as managed content.
## *Inline* content is the content that is provided by the tenant at the time of provisioning of the service. This is a static content that is inserted by the service.
# If a part content is required to have version, it should be marked as such using the *versionable* attribute. By default a part is not versionable.
# A change in the part content could be auditable. While the global audit option would be available at the tenant level (TBD), at individual part level an audit could be turned on or off by using the *auditable* attribute.
# The *label* is an application defined lable to uniquely identify the part in service operations (CREATE, READ, UPDATE and INDEX). This label is used to identify and retrieve part content from a multi part MIME message exchanged with the consumer. 
# A tenant administrator could update the timestamp to indicate when this part metadata binding was *updated*. A tenant provisioning service/tool (TBD) could update this field as well.
# The *order* attribute indicates in what order this part should be processed by the CollectionSpace service. 

{newcode:language=xml|title=object part type"controls=true|linenumbers=true}    <xs:complexType name="ObjectPartType">
        <xs:annotation>
            <xs:documentation/>
        </xs:annotation>
        <xs:sequence>
            <xs:element name="properties" type="types:PropertyType" minOccurs="0" maxOccurs="unbounded"/>
            <xs:element name="content" type="ObjectPartContentType" minOccurs="1" maxOccurs="1"/>
        </xs:sequence>
        <xs:attribute name="id" type="xs:ID" use="required"/>
        <!-- control group indicates where the content resides -->
        <xs:attribute name="control_group" use="required">
            <xs:simpleType>
                <xs:restriction base="xs:string">
                    <!-- managed by an external repository such as MediaVault -->
                    <xs:enumeration value="External"/>
                    <!-- managed by CollectionSpace -->
                    <xs:enumeration value="Managed"/>
                    <!-- inlined from this binding -->
                    <xs:enumeration value="Inline"/>
                </xs:restriction>
            </xs:simpleType>
        </xs:attribute>
        <xs:attribute name="versionable" type="xs:boolean" use="optional" default="false"/>
        <xs:attribute name="auditable" type="xs:boolean" use="optional" default="false"/>
        <!-- application defined label to identify the part, e.g. collectionobject.ucmp.berkeley -->
        <xs:attribute name="label" type="xs:string" use="optional"/>
        <xs:attribute name="updated" type="xs:dateTime" use="optional"/>
        <!-- order in the sequence of one or more parts -->
        <xs:attribute name="order" type="xs:int" use="optional"/>
    </xs:complexType>{newcode}

{anchor:object_part_content}
h5. ObjectPartContentType

The _ObjectPartContentType_ describes the meta data for the object's content. Following consists of the part content meta data.

# An optional *content digest*. The digest could be created using any of the supported digest algorithms as shown in XML schema below in _ContentDigestType_.
# The *type of the content*. It could be XML content, base64 encoded binary content or a reference to the content found outside of the CollectionSpace. The XML data type called _XmlContentType_ shown below includes schemaLocation and namespace URI to be used while validating the XML content.
# A tenant administrator could implement the PartHandler interface (TBD) and configure it as *partHandler*. This handler would then be used by the CollectionSpace service to handle the processing of the part content at runtime. The packaging instructions (TBD) should be followed by the tenant administrator in order to successfully deploy the handler at runtime.
# The *contentType* indicates the [MIME media type|http://www.iana.org/assignments/media-types/] for the part content.


{newcode:language=xml|title=object part content type|controls=true|linenumbers=true}    <xs:complexType name="ObjectPartContentType">
        <xs:sequence>
            <xs:element name="contentDigest" type="ContentDigestType" minOccurs="0"/>
            <xs:choice>
                <xs:element name="xmlContent" type="XmlContentType"/>
                <xs:element name="contentLocation" type="ContentLocationType"/>
                <xs:element name="binaryContent" type="xs:base64Binary"/>
            </xs:choice>
            <!-- a handler Java class to process the content of this part -->
            <xs:element name="partHandler" type="xs:string" minOccurs="0" maxOccurs="1"/>
        </xs:sequence>
        <!-- MIME content type -->
        <xs:attribute name="contentType" type="xs:string" use="required"/>
    </xs:complexType>

    <xs:complexType name="ContentDigestType">
        <xs:attribute name="algorithm" use="required">
            <xs:simpleType>
                <xs:restriction base="xs:string">
                    <xs:enumeration value="MD5"/>
                    <xs:enumeration value="SHA-1"/>
                    <xs:enumeration value="SHA-256"/>
                    <xs:enumeration value="SHA-384"/>
                    <xs:enumeration value="SHA-512"/>
                </xs:restriction>
            </xs:simpleType>
        </xs:attribute>
        <xs:attribute name="value" type="xs:string" use="required"/>
    </xs:complexType>

    <xs:complexType name="XmlContentType">
        <xs:sequence>
            <xs:any namespace="##any" processContents="skip" minOccurs="0" maxOccurs="1"/>
        </xs:sequence>
        <!-- location to retrieve the schema from -->
        <!-- in fact, schema should be retrievable by the parser, validator -->
        <xs:attribute name="schemaLocation" type="xs:string" use="optional"/>
        <xs:attribute name="namespaceURI" type="xs:string" use="optional"/>
    </xs:complexType>

    <xs:complexType name="ContentLocationType">
        <xs:attribute name="type" use="required">
            <xs:simpleType>
                <xs:restriction base="xs:string">
                    <xs:enumeration value="internalId"/>
                    <xs:enumeration value="URL"/>
                </xs:restriction>
            </xs:simpleType>
        </xs:attribute>
        <xs:attribute name="ref" use="required">
            <xs:simpleType>
                <xs:restriction base="xs:anyURI">
                    <xs:minLength value="1"/>
                </xs:restriction>
            </xs:simpleType>
        </xs:attribute>
    </xs:complexType>
{newcode}
{multi-excerpt}

...