G'day John,
> In the reply thread is seems that the cm:taggable field should be set
> to the node being accessed, as per the following response in the
> thread:
>
> cm\:taggable=workspace://SpacesStore/3da6c395-3a4b-4a57-836d-8e5b4fdfc332
Actually the NodeRef(s) in the cm:taggable property are the NodeRef(s)
of the tag(s) you wish to associate the content with. In Alfresco
tags are stored as independent content objects (nodes) in the
repository, and (as with all nodes), they have their own globally
unique NodeRef. It's the tags' own NodeRefs that need to be placed
into the cm:taggable property in the shadow metadata file.
> What I wanted to understand is how to represent tagging data to be
> applied to that node reference in the shadow file?
>
> So for example if I wanted to add tags such as "English" "Programme_X"
> to the referenced node how would I represent that in the shadow file?
>
> Any examples would certainly assist me.
Let's say for example that you've already created the "English" and
"Programme_X" tags in your repository (a requirement if you wish to
tag content that is being bulk imported). Let's also say that these
two tags happen to have the following NodeRefs:
English -> workspace://SpacesStore/fda6c397-3a42-4ab7-836d-8ec74f86cd84
Programme_X -> workspace://SpacesStore/429e06a7-6478-418b-8194-9280060bd22b
(note: if you were to create these two tags in your own Alfresco
installation, the NodeRefs for the tags would be different to what I'm
showing here - these NodeRef values are for illustration purposes
only)
Furthermore, let's say that you want to tag a file called
"Shakespeare.txt" with both of these tags. In this case there would
also be a file called "Shakespeare.txt.metadata.properties.xml" in the
same directory as "Shakespeare.txt", and it would have at least the
following content:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE properties SYSTEM "
http://java.sun.com/dtd/
properties.dtd">
<properties>
<entry key="aspects">cm:taggable</entry>
<entry key="cm:taggable">workspace://SpacesStore/
fda6c397-3a42-4ab7-836d-8ec74f86cd84,workspace://SpacesStore/
429e06a7-6478-418b-8194-9280060bd22b</entry>
</properties>
In summary the key steps are:
1. You have to pre-create your tags prior to preparing your source
data or importing it. The bulk import tool does not create or
manipulate tags.
2. You need to find out the NodeRefs of all of the tags you wish to
associate with the imported content, since it's those NodeRefs that
need to be put into the shadow metadata files.
Cheers,
Peter