Installing The Change Log Daemon
If you want to make use of the Cxense Semantic plug-in's automated tagging functionality, then as well as installing the Cxense Semantic plug-in itself, you also need to install a change log daemon - a program that scans the Content Engine change logs looking for changed content items, and submits them to Cxense for tagging if necessary. You can configure it to only submit certain content types, and to only submit content items in certain states.
The instructions below should provide enough information for you to install and configure the autotagging daemon, but if you want to know more about how change log daemons in general work, then take a look at the Change Log Daemon documentation.
The Autotagging change log daemon checks for new and/or modified content items and submits them to Cxense for tagging. You can configure it to only submit certain content types, and to only submit content items in certain states. To install it:
-
Download the Change Log Daemon distribution from the Content Engine downloads page, and unpack it in an appropriate location (
/opt/escenic/semantic/autotagging
, for example). -
Change directory to the new folder you have created and start the daemon at least once with the following command:
$
java -jar changelog.jarThis creates a few required folders and configuration files.
-
Open
config/Daemon.properties
for editing and set the following properties:url
-
The URI of your publication's change log. For example:
url=http://editorial-host-ip-address/webservice/escenic/changelog/publication/publicationId
Where editorial-host-ip-address is the host name of IP address of your editorial-host, and publicationId is your publication's ID.
username
-
The username of the Content Engine user that will be used access the change log.
password
-
The password of the above user.
The change log daemon is now configured with sufficient information to read your publication's change log. You now need to add the agent that manages the tagging of new and changed content items. To do this:
-
Change directory to the autotagging daemon folder. For example:
$
cd /opt/escenic/semantic/autotagging/changelog-daemon -
Copy the content of
/opt/escenic/engine/plugin/semantic-cxense/misc/changlog/lib
to the emptylib
folder.$
cp /opt/escenic/engine/plugin/semantic-cxense/misc/changlog/lib/* lib -
Create a folder tree under the empty
classes
folder:$
mkdir -p classes classes/com/escenic/daemon/ -
Copy
/opt/escenic/engine/plugins/semantic-cxense/misc/example/SemanticAgent.properties
to theclasses/com/escenic/daemon/
folder you have created:$
cp /opt/escenic/engine/plugins/semantic-cxense/misc/example/SemanticAgent.properties \ classes/com/escenic/daemon/ -
Open the copied file for editing and set the following properties:
webserviceEndpoint
-
Set this property to the URI of your Content Engine web service:
webserviceEndpoint=https://host:port/webservice/
where host and port are the host name and port number of your Content Engine host.
keepLastModified
-
You can use this property to determine whether or not the autotagging daemon updates content items'
LastModified
property when it adds tags to them:-
true
:LastModified
is not updated when tags are added by the daemon -
false
:LastModified
is updated when tags are added by the daemon. This is the default setting.
-
-
Copy
/opt/escenic/engine/plugins/semantic-cxense/misc/example/SemanticConfiguration.properties
to the same folder:$
cp /opt/escenic/engine/plugins/semantic-cxense/misc/example/SemanticConfiguration.properties \ classes/com/escenic/daemon/ -
Open the copied file for editing and set the following properties:
endpoint
-
Set this property to the URI of your semantic web service:
endpoint=https://host:port/webservice-extensions/semantic/webservice
where host and port are the host name and port number of your Content Engine host.
state.draft
,state.approved
,state.submitted
-
Use these properties to specify the content type/state combinations that you want to be automatically tagged. For example:
state.draft=story,review state.approved=story state.submitted=
The above example specifies that new or changed
story
andreview
content items will be automatically tagged if they are in a draft state. In addition new or changedstory
content items will also be automatically tagged if they are in an approved state. No content items will be automatically tagged while they are in the submitted state.
Your tagging daemon is now fully configured and ready to use. You can start it with the following command:
$
java -jar changelog.jar
You should probably add this command to the start-up script of your server.