setting the cm:generalclassifiable aspect on import

331 views
Skip to first unread message

malcolm....@gmail.com

unread,
Aug 13, 2013, 9:34:58 PM8/13/13
to alfresco-bulk-f...@googlegroups.com
Hello,

I have had great success importing data into alfresco 4.2. Community, version 1.2.1 of the bulk filesystem importer.

I am now at the point where I would like to set a Category on a file using the classifiable aspect.

I am wondering if this is supported by the importer.

I have a meta data file that has enabled the classifiable aspect like:
<entry key="aspects">cm:versionable,cm:generalclassifiable</entry>

and a classifiable entry like:
<entry key="cm:categories"></entry>

I am at a loss as to how I specify the category I want to use.  Assuming it is supported (otherwise the rest of this question is mute:) ), if I wished to set the following category as shown by the Primary Path below, what syntax would I need to provide for the entry key cm:categories.

thanks
Malcolm

Node Browser: cm:Phase Plan

About

Reference:workspace://SpacesStore/52c870e7-fb48-4dc2-af9e-b26fbf26df64

Primary Path:/cm:categoryRoot/cm:generalclassifiable/cm:Software_x0020_Document_x0020_Classification/cm:Development_x0020_Plans/cm:Phase_x0020_Plan

Type:cm:category

Parent:workspace://SpacesStore/9aa269d5-c7f2-41e3-bdcf-0357349b3ad4

Properties

Name

Type

Value

Residual

cm:name

d:text

Phase Plan

false

sys:node-dbid

d:long

63

false

sys:store-identifier

d:text

SpacesStore

false

sys:locale

d:locale

en_AU

false

sys:node-uuid

d:text

52c870e7-fb48-4dc2-af9e-b26fbf26df64

false

cm:modified

d:datetime

13 Aug 2013 18:41:05 GMT+0800 (GMT+08:00)

false

cm:created

d:datetime

13 Aug 2013 18:41:05 GMT+0800 (GMT+08:00)

false

sys:store-protocol

d:text

workspace

false

cm:creator

d:text

System

false

cm:modifier

d:text

System

false

Aspects

cm:auditable
sys:referenceable
sys:localized

Children

Child Name

Child Type

Child Reference

Primary

Association Type

Index

No items found

Parents

Child Name

Parent Type

Parent Reference

Primary

Association Type

cm:Phase Plan

cm:category

workspace://SpacesStore/9aa269d5-c7f2-41e3-bdcf-0357349b3ad4

true

cm:subcategories

Associations

Association Type

Target Reference

Target Type

No items found

Source Associations

Association Type

Source Reference

Source Type

No items found

Permissions

Inherits:true

Owner:System

Permission

Authority

Access

Read

guest

ALLOWED

Read

GROUP_EVERYONE

ALLOWED

Store Permission

Authority

Access

All

All

Allowed



Peter Monks

unread,
Aug 14, 2013, 1:49:20 PM8/14/13
to alfresco-bulk-f...@googlegroups.com
G'day Malcolm,

Categories in the cm:generalclassifiable aspect are stored as a multi-valued property of type d:category - you can figure this out by looking at the content model definition for cm:generalclassifiable [1].  So for starters you'd need to comma-separate individual category values, as described here [2].

The next step is to figure out how d:category values are represented, and by looking at the dictionary model definition for d:category [3] we can see that d:category's are just NodeRefs (i.e. identical to the d:noderef data type).  So to store a reference to a category, we just need the NodeRef literals for the categories we wish to associate the node to.  Note that these literals will usually vary from install to install, so you shouldn't assume the NodeRefs for categories in a dev or test install are the same as those in a production install.

The upshot is that your XML file will look something like:

<entry key="aspects">cm:versionable,cm:generalclassifiable</entry>
--
You received this message because you are subscribed to the Google Groups "Alfresco Bulk Filesystem Import" group.
To unsubscribe from this group and stop receiving emails from it, send an email to alfresco-bulk-filesys...@googlegroups.com.
To post to this group, send email to alfresco-bulk-f...@googlegroups.com.
Visit this group at http://groups.google.com/group/alfresco-bulk-filesystem-import.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

malcolm....@gmail.com

unread,
Aug 15, 2013, 11:15:09 PM8/15/13
to alfresco-bulk-f...@googlegroups.com
Hi Peter,

thank your very much, worked as you described.

Much Appreciated
Malcolm
To unsubscribe from this group and stop receiving emails from it, send an email to alfresco-bulk-filesystem-import+unsubscribe@googlegroups.com.
To post to this group, send email to alfresco-bulk-filesystem-imp...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages