During the lab, you will be configuring a tag graph writer to use the
ts:tsResponseRoleLabel property to tag your troubleshooting topics automatically.
You will be working in the same lab folder as the previous lab.
-
Open the
context.xml
file in your favorite editor.
-
Create a new Tag Graph Writer bean.
-
Add the following properties to the Tag Graph Writer bean as required:
Property |
Type |
Mandatory |
Description |
mappings
|
Map <QName,QName> |
Required |
Map defining how predicates should be mapped to Alfresco properties. Use a fully-qualified name with Clark notation as the key of the entry. |
Important: Use the following QName for the Alfresco property:
{http://www.alfresco.org/model/content/1.0}taggable
<bean id="samples.tagGraphWriter.mappings" parent="alfresco.rdf.tagGraphWriter.mappings.abstract">
<property name="mappings">
<map>
<entry key="{http://www.componize.com/model/samples/troubleshooting/1.0/}tsResponseRoleLabel" value="{http://www.alfresco.org/model/content/1.0}taggable" />
</map>
</property>
</bean>
-
Save your changes.
-
Test your Tag Graph Writer with the
com.componize.samples.lab08.TagGraphWriterTest unit test.
-
Deploy your files to the application server.
-
Once the application server has started, connect to the Alfresco Share
interface.
-
Open the
troubleshooting-sample.dita
file in your favorite editor.
-
Add the following element:
<tsResponseRoleLabel>KEYWORD_1</tsResponseRoleLabel>
-
Save your changes.
The sample file should have been tagged with the
keyword_1 tag.
Note: Tags are always
converted to and stored in lower case.