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 | String |
contentHandler | The Nucleus address of the |
|
contentRootPathProvider | The Nucleus address of the |
|
encodingTyper | The Nucleus address of the encoding typer used by this mapping, if any. |
|
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. |
|
repository | The Nucleus address of the repository that contains the item descriptor handled by this |
|
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 |
GENERATED_ID_AND_NO_PATH_PROP | Use a value generated by the |
GENERATED_ID_AND_NAMED_PATH_PROP | Use a value generated by the |
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
:
CONTENT_ITEM_DESCRIPTOR_ID_AND_PATH_PROP
ID_EQUALS_FILE_PATH