Configuring a tag graph writer

Configure a tag graph writer to assign a tag to a document based on a predicate.

In the following steps you will be creating and/or configuring Spring beans in a Spring context file. A basic knowledge of Spring and the Spring Framework is required.

  1. Open or create a new Spring context file.
  2. Create a Tag Graph Writer bean.
    The following example will tag documents with the value of the ts:tsResponseRoleLabel metadata that is extracted from the XML content.
    <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>
    Note: Unlike a category, a tag can be assigned to a document even if the tag does not yet exist in Alfresco.
  3. Restart the application server for your changes to take effect.