IWriteMetadataAndBlobPlugin - BlobExtractMetadata
Copies the information found in the XML content (ExtractXPath parameter) towards the appropriate repository metadata fields (specified by the MetadataField and MetadataFieldLevel parameters).
Plugin Configuration
| Field Name | Field Level |
|---|---|
| The name of the field specified in the MetadataField parameter | The level of the field specified in the MetadataFieldLevel parameter |
| Parameter | Required | Default value | Allowed values | Description |
|---|---|---|---|---|
| ExtractXPath | Yes | XPath query syntax used to search and retrieve the information from within the supplied XML document | ||
| MetadataField | Yes | Yes, No | The metadata field which should be set by the information returned by the ExtractXPath query. Only string fields are support, number and date fields are not. | |
| MetadataFieldLevel | No | lng | logical, version, lng | The metadata field level |
| MetadataUpperCase | No | No, except when MetadataField=FISHLINKS and FISHIMAGELINKS then Yes | Yes, No | Convert the retrieved value(s) into uppercase characters before storing them in the repository |
| DocumentUpperCase | No | No, except when MetadataField=FISHLINKS and FISHIMAGELINKS then Yes | Yes, No | Convert the retrieved value(s) into uppercase characters and update the XML document appropriately |
| SubstrBeforeWhenPresent | No | Yes | Yes, No | This allows to only store the part of the retrieved value that is found before the given string in "SubstrBeforeWhenPresent". If the string is not found, the entire value is stored in metadata. E.g. when SubstrBeforeWhenPresent="#" and the value would be GUID-XYZ#BOOKMARK, only GUID-XYZ will be stored in metadata) |
| DuplicatesFound | No | Ignore | Ignore, Warn, Raise | Depending on the setting, an error will be thrown/raised or a warning will be logged when duplicate values are found in the content. If no error/warning should be reported, you can set the value to Ignore. |
| SkipEmptyValues | No | No | Yes, No | If you don't want to set the metadata property in case the ExtractXPath query doesn't return any value, set this parameter to Yes |
plugin name="FIELDTOMETADATA" example
<plugin name="FIELDTOMETADATA" handler="BlobExtractMetadata"
ishcondition=="CurrentAction in ('Create', 'Update', 'Checkin') and (EDT='EDTXML')">
<description>Find targets in document and put them on card</description>
<workingset>
<ishfields>
<ishfield name="FISHTARGETS" level="lng"/>
</ishfields>
</workingset>
<initialize>
<parameters>
<parameter name="ExtractXPath">
//*[not(ancestor-or-self::*[@varref])][not(ancestor::*[@conref])]/@id
</parameter>
<parameter name="MetadataField">FISHTARGETS</parameter>
<parameter name="MetadataFieldLevel">lng</parameter>
<parameter name="MetadataUpperCase">Yes</parameter>
<parameter name="DocumentUpperCase">Yes</parameter>
<parameter name="DuplicatesFound">Warn</parameter>
</parameters>
</initialize>
</plugin>
Plugin flow
The plugin will execute the defined ExtractXPath query to retrieve the value(s) to be stored in the metadata property.
If configured, the retrieved value(s) will be converted into uppercase in the document.
If configured, the retrieved value(s) will be converted into uppercase before storing them in the repository metadata property.
If configured, the plugin will check for duplicate values and report or ignore these cases.
If configured, the plugin will check the retrieved value(s) for actual content and skip the update/storing if no content was found.