CMIS custom metadata

Hi all, i wanted to know how could someone instantiate a custom datamodel through cmis. i created a type named Book, with

book.xsd 

and all that stuff. but i can't figure what is the

Object_type_id

i have to put in order that nuxeo recognizes that type. Could you help, please ?

my code :

Map<String, Object> properties = new HashMap<String, Object>();
    properties.put(PropertyIds.OBJECT_TYPE_ID, "Book");
    properties.put(PropertyIds.NAME, filename);
    Document doc =theFolder.createDocument(properties, null, null);
0 votes

3 answers

4161 views

ANSWER



Any news here ? Someone can use cmis to create types ?

0 votes



Hi,

I don't have the exact answer but here are some directions:

0 votes



Thank you, Actually i created a Document type, called issue through nuxeo Studio.

It is working on my Nuxeo 5.6.

What i want to do is to create instances of that type through cmis. when i do that throug Java,

Map&lt;String, Object&gt; properties = new HashMap&lt;String, Object&gt;();
    properties.put(PropertyIds.OBJECT_TYPE_ID, &quot;issue&quot;);
    properties.put(PropertyIds.NAME, filename);
    Document doc =theFolder.createDocument(properties, null, null);

i got this exception :

Exception in thread &quot;main&quot; org.apache.chemistry.opencmis.commons.exceptions.CmisInvalidArgumentException: No such type: issue
at org.apache.chemistry.opencmis.client.bindings.spi.atompub.AbstractAtomPubService.convertStatusCode(AbstractAtomPubService.java:423)
at org.apache.chemistry.opencmis.client.bindings.spi.atompub.AbstractAtomPubService.read(AbstractAtomPubService.java:554)
at org.apache.chemistry.opencmis.client.bindings.spi.atompub.AbstractAtomPubService.getTypeDefinitionInternal(AbstractAtomPubService.java:821)
at org.apache.chemistry.opencmis.client.bindings.spi.atompub.RepositoryServiceImpl.getTypeDefinition(RepositoryServiceImpl.java:88)
at org.apache.chemistry.opencmis.client.bindings.impl.RepositoryServiceImpl.getTypeDefinition(RepositoryServiceImpl.java:137)
at org.apache.chemistry.opencmis.client.runtime.SessionImpl.getTypeDefinition(SessionImpl.java:518)
at org.apache.chemistry.opencmis.client.runtime.repository.ObjectFactoryImpl.convertProperties(ObjectFactoryImpl.java:294)
at org.apache.chemistry.opencmis.client.runtime.SessionImpl.createDocument(SessionImpl.java:726)
at org.apache.chemistry.opencmis.client.runtime.FolderImpl.createDocument(FolderImpl.java:88)
at org.apache.chemistry.opencmis.client.runtime.FolderImpl.createDocument(FolderImpl.java:443)
at com.alfresco.cmis.CmisService.createModelNuxeo(CmisService.java:114)
at com.alfresco.cmis.CmisService.main(CmisService.java:52)
07/16/2013

issue doesn't seem to exist. Replace issue by File and try it. Did you create the issue doc type ? Are you sure it's available ?
07/16/2013


Please could you help me !!!!

-1 votes



take it easy :) you asked the question only 3 hours before you sent this "answer". So many "!!!!" does not make us eager to answer :)
07/16/2013