AnsweredAssumed Answered

set new aspect to a node

Question asked by rulo on Nov 2, 2007
I created a new content model…here are some lines of it:


<!–  Definition of new Model   –>
<model name="wd:mymodel" xmlns="">

<!–  This is the namespace uri   –>
  <namespace uri="extension.mymodel" prefix="wd" />

  <aspect name="wd:methodology">
     <property name="wd:type">

Then, using Alfresco Web Services Client, I want to set an aspect to an existing node. I got this:

[Java Code]

String uuid="6df5dc39-7e8d-11dc-a5ed-6378f37154ce";
Reference reference = new Reference(STORE, uuid, null);
// Setting a property
NamedValue[] specificationProps = new NamedValue[1];
// Is it possible to not set at all and still add aspect?
specificationProps[0] =
Utils.createNamedValue(MYPROPERTY,"DDD");           //<—-
CMLAddAspect addAspect = new
CMLAddAspect("{extension.mymodel}methodology",  //<—-
specificationProps,new Predicate(new
Reference[]{reference}, null, null), "1");
// Construct CML Block
CML aspect_cml = new CML();
aspect_cml.setAddAspect(new CMLAddAspect[] {addAspect});

So my questions are:
1. What goes in MYPROPERTY?, i know it goes the propertie defined in the aspect of my newmodel.xml, but what's the format ?
2. {extension.mymodel}methodology, is this the correct format to reference the aspect i created.
3. Is this the corretc way to add an aspect to a node?

I'll appreciate your help.