The Repository Loader includes an implementation of the TypeMapping interface named TypeMappingImpl. You can configure an instance of TypeMappingImpl for a particular item descriptor using the following properties:

Property

Description

Property Type

contentIsXML

Is the content of files assigned to this mapping XML?

boolean

parseContent

Should the content of files assigned to this mapping be parsed for property values?

boolean

itemDescriptorName

The name of the item descriptor handled by this TypeMapping.

String

contentHandler

The Nucleus address of the ContentHandler component that handles content for this mapping.

ContentHandler

contentRootPathProvider

The Nucleus address of the ContentRootPathProvider component used by this mapping, if any.

ContentRootPathProvider

encodingTyper

The Nucleus address of the encoding typer used by this mapping, if any.

PageEncodingTyper

pathPropertyName

If the item descriptor is not a content item descriptor, you need to use a repository item property to hold the file path of the items. This property is the name of that repository item property.

String

repository

The Nucleus address of the repository that contains the item descriptor handled by this TypeMapping.

MutableRepository

updatePropertyConfiguration

Sets a code that describes how this mapping uses ID and path properties for the purposes of item creation, update, and removal. See Setting Repository IDs.

Setting Repository IDs

When the Repository Loader creates a repository item from a file, it needs to know how to assign a repository item ID to the item. A TypeMapping includes a property named updatePropertyConfiguration. This property points to an enumeration (of a class named UpdatePropertyConfiguration) that describes how repository item IDs and path properties are used by the repository and the TypeMapping to set the repository item ID and locate the repository items for update. The enumeration can be set to one of the following values:

Value

Description

CONTENT_ITEM_DESCRIPTOR_ID_AND_PATH_PROP

For content item descriptor types only, use descriptor metadata to determine which properties should be used for assigning the repository item ID and path properties. IDs may still be assigned from content data.

CONTENT_DEFINED_ID_AND_NO_PATH_PROP

The repository item ID property is to be set as part of the file parsing process. Since the file’s content uniquely and persistently defines the repository item’s ID no path property need be assigned.

CONTENT_DEFINED_ID_AND_NAMED_PATH_PROP

The repository item ID property is to be set as part of the file parsing process. Set the repository item property specified by the pathPropertyName property of the TypeMapping with the file’s path.

GENERATED_ID_AND_NO_PATH_PROP

Use a value generated by the IdGenerator for the repository item ID, using the IdGenerator specified by the TypeMapping’s idGenerator property. If no idGenerator is specified, errors will result. No path property will be set. As a consequence, files assigned to this mapping cannot be updated or removed using the Repository Loader.

GENERATED_ID_AND_NAMED_PATH_PROP

Use a value generated by the IdGenerator for the repository item ID, using the IdGenerator specified by the TypeMapping’s idGenerator property. If no idGenerator is specified, errors will result. Set the repository item property specified by the TypeMapping’s pathPropertyName property with the file’s path.

ID_EQUALS_FILE_PATH

For non-content item descriptors. Use the file’s path as both its repository item ID and its path value.

Note that if a file includes a tag that corresponds to the ID property defined in an item descriptor, then the value in this tag will be used by the xml2repository function in setting the repository item ID, rather than the generated ID or the file path ID. Therefore, if you are using any of the following values for the updatePropertyConfiguration property, you need either to make sure your documents do not include an ID tag, or else set the parseContent property of the TypeMapping for these documents to false:

 
loading table of contents...