All elements of a control file are optional, but it is necessary to define either a filepath
or an originId
.
The following lines show a self-documented template of the FluidTopicsControlFile.xml
file:
<?xml version="1.0" encoding="UTF-8"?>
<controlFile>
<resources>
<resource lang="${Language code for the resource}">
<originId>${unique identifier for the resource}</originId>
<filePath>${full path to the resource in the archive}</filePath>
<title>${title}</title>
<displayName>${displayName}</displayName>
<originUrl>${originUrl}</originUrl>
<filename>${filename}</filename>
<mimeType>${mimeType}</mimeType>
<description>${short description}</description>
<clusterId>${identifier of the cluster to which the resource should belong}</clusterId>
<editorialType>${book or article}</editorialType>
<lastEdition>${YYYY-MM-DD}</lastEdition>
<openMode>${external or FluidTopics}</openMode>
<publishStatus>${visible or deleted}</publishStatus>
<metas>
<meta key="${Metadata key 1}" inheritance="false">
<value>${value of metadata key 1}</value>
<value>${value of metadata key 1}</value>
<value>${value of metadata key 1}</value>
</meta>
<meta key="${Metadata key 2}" inheritance="true">
<value>${value of metadata key 2}</value>
</meta>
<meta key="${Metadata key 3}" type="stringTree">
<value>${first hierarchical value of metadata key 3}|${second hierarchical value of metadata key 3}|${third hierarchical value of metadata key 3}</value>
</meta>
<meta key="${Metadata key 4}" type="stringTree" separator="/">
<value>${first hierarchical value of metadata key 4}/${second hierarchical value of metadata key 4}/${third hierarchical value of metadata key 4}</value>
</meta>
</metas>
<attachments>
<attachment>
<originId>${originId of the resource to attach}</originId>
<khubId>${khubId of the resource to attach}</khubId>
<displayName>${name of the resource as it appears in the portal}</displayName>
<originUrl>${URL}</originUrl>
<sourceId>${sourceId}</sourceId>
<filePath>${attachment filepath}</filePath>
<filename>${filename}</filename>
<mimeType>${MIME type}</mimeType>
<isAttached>${true or false}</isAttached>
<insertAt>${position of the attachment in the list of attachments}</insertAt>
</attachment>
</attachments>
<topics>
<topic>
<selector>
<originId>${originId}</originId>
</selector>
<originId>${newOriginId}</originId>
<clusterId>${clusterId}</clusterId>
<title>${title}</title>
<displayName>${displayName}</displayName>
<originUrl>${originUrl}</originUrl>
<description>${description}</description>
<lastEdition>${lastEdition}</lastEdition>
<metas>
<meta key="${Metadata key 1}">
<value>${value of metadata key 1}</value>
</meta>
</metas>
</topic>
</topics>
<instances>
<instance>
<originId>${unique identifier for the resource}</originId>
<filePath>${full path to the resource in the archive}</filePath>
title>${title}</title>
<displayName>${displayName}</displayName>
<originUrl>${originUrl}</originUrl>
<filename>${filename}</filename>
<mimeType>${mimeType}</mimeType>
<description>${short description}</description>
<clusterId>${identifier of the cluster to which the resource should belong}</clusterId>
<editorialType>${book or article}</editorialType>
<lastEdition>${YYYY-MM-DD}</lastEdition>
<openMode>${external or FluidTopics}</openMode>
<publishStatus>${visible or deleted}</publishStatus>
<metas>
<meta key="${Metadata key 1}" inheritance="false">
<value>${value of metadata key 1}</value>
<value>${value of metadata key 1}</value>
</meta>
<meta key="${Metadata key 2}">
<value>${value of metadata key 2}</value>
</meta>
</metas>
<attachments>
<attachment>
<originId>${originId of the resource to attach}</originId>
<khubId>${khubId of the resource to attach}</khubId>
<displayName>${name of the resource as it appears in the portal}</displayName>
<originUrl>${URL}</originUrl>
<sourceId>${sourceId}</sourceId>
<filePath>${attachment filepath}</filePath>
<filename>${filename}</filename>
<mimeType>${MIME type}</mimeType>
<isAttached>${true or false}</isAttached>
<insertAt>${position of the attachment in the list of attachments}</insertAt>
</attachment>
</attachments>
<topics>
<topic>
<selector>
<originId>${originId}</originId>
</selector>
<originId>${newOriginId}</originId>
<clusterId>${clusterId}</clusterId>
<title>${title}</title>
<displayName>${displayName}</displayName>
<originUrl>${originUrl}</originUrl>
<description>${description}</description>
<lastEdition>${lastEdition}</lastEdition>
<metas>
<meta key="${Metadata key 1}">
<value>${value of metadata key 1}</value>
</meta>
</metas>
</topic>
</topics>
</instance>
</instances>
</resource>
</resources>
</controlFile>
Where:
Element | Attribute | Description |
---|---|---|
resources |
Lists the resource elements. | |
resource |
Provides information about a resource. | |
resource |
lang |
Defines the language of a resource. If unset, Fluid Topics tries to extract the language automatically. |
resource > originId |
Defines an identifier for the resource that Fluid Topics uses later to send new instructions. | |
resource > filePath |
The path of the file in the archive. | |
resource > title |
Sets the name of the resource as it appears in the portal. If unset, Fluid Topics determines the document's title based on the value of its ft:title metadata element. If Fluid Topics cannot determine the title of the document, it defaults to the filename. |
|
resource > displayName |
Does the same thing as resource > title but is overwritten if resource > title exists. |
|
resource > originUrl |
Optional element defining a value for the ft:originUrl metadata. |
|
resource > filename |
Defines a filename for the document. It is only use for unstructured documents. If set for a structured document, Fluid Topics ignores this field. | |
resource > mimeType |
Defines a MIME type for the document. It is only used for unstructured documents. If set for a structured document, Fluid Topics ignores this field. | |
resource > description |
Optional element defining a short description of the resource. | |
resource > clusterId |
Optional element defining the identifier of the cluster to which the resource belongs in the search results. | |
resource > editorialType |
Optional element defining an editorial type for the resource. Accepts book or article . |
|
resource > lastEdition |
Optional element defining the date when the resource was last modified. | |
resource > openMode |
Optional element defining whether to open external links in a new browser window. Accepts external or FluidTopics . |
|
resource > metas |
Sets the keys and values for the metadata associated with the document. Expects a meta element. |
|
metas |
action |
When updating metadata, it is possible to use action=append to add additional metadata or action=replace to replace existing metadata. |
metas > meta |
Sets the key and value of a metadata element to associate with the document. It is possible to repeat the meta node as many times as needed. |
|
meta |
key |
Sets the metadata key and the metadata name. |
meta |
inheritance |
Indicates whether topics should inherit the metadata. The default value is true . |
meta |
type |
Optional element defining whether the value of meta is a flat metadata key (string ), or a hierarchical one (stringTree ). By default, metadata keys are defined as string .All values of a metadata key must be of the same type . |
meta |
separator |
Optional element defining the separator used by the @type attribute of the meta element. By default, the separator is | . |
meta > value |
Sets the value of the metadata. It is possible to repeat the value node as many times as needed for multivalued metadata. |
|
resource > attachments |
Optional element to list resources to attach to a structured document. Expects at least one attachment element. |
|
resource > attachment |
Provides information about the attachment. | |
attachment > originId |
Targets a resource by its originId . Do not use with the khubId element. |
|
attachment > khubId |
Targets a resource by its khubId . Do not use with the originId element. |
|
attachment > displayName |
The name of the resource as it appears in the portal. | |
attachment > originUrl |
The URL to attach. | |
attachment > sourceId |
The ID of the source originally used to upload the attachment. It is mandatory only if it is not the source used to upload the map to which the map attachment is to be attached. | |
attachment > filePath |
The filepath of the file to attach in the uploaded archive. | |
attachment > filename |
The attachment filename wanted in Fluid Topics. | |
attachment > mimeType |
The MIME type of the resource to attach. | |
attachment > isAttached |
Accepts true or false . If false , removes the attachment from the document. |
|
attachment > insertAt |
The place of the attachment in the list of attachments. Accepts a consecutive numerical value starting at zero (0 , 1 , 2 , 3 , etc.). |
|
resource > publishStatus |
The default value of publishStatus (if unspecified) is visible . Setting the value to deleted removes the document from the portal. Setting the value to unlisted removes the document from search results. However, it is still available to ADMIN , KHUB_ADMIN , and CONTENT_PUBLISHER users, or anyone with a direct link. |
|
topics |
Modifies topic metadata. | |
topic |
Modifies topic metadata. | |
topic > selector |
Sets the topic to modify. | |
topic > selector>originId |
Use to select the topic to modify with the corresponding originId. | |
topic > originId |
The new value for the topic's originId . |
|
topic > clusterId |
The new value for the topic's clusterId . |
|
topic > title |
The topic's new title. | |
topic > displayName |
The topic's new title. Ignored if topic > title is also defined. |
|
topic > originUrl |
The new value for the topic's originUrl . |
|
topic > description |
The topic's new description. | |
topic > lastEdition |
The new value for the topic's lastEdition . |
|
topic > metas |
Same as resource > metas . |
|
instances > instance |
Use as resource node to modify an instance of the document targeted by the resource node. |