cancel
Showing results for 
Search instead for 
Did you mean: 

How can I create a new vocabulary?

nidhalhaddad_
Champ in-the-making
Champ in-the-making

Hello,
/> According to Nuxeo documentation: "Administrators and power users can only modify or delete vocabularies. They cannot create a new vocabulary from the user interface."
/> Link: http://doc.nuxeo.com/display/USERDOC/Managing+Vocabularies
/> Does anyone have an idea how to create a new vocabulary since it's not possible using the user interface?

And thanks in advance.

1 ACCEPTED ANSWER

Florent_Guillau
World-Class Innovator
World-Class Innovator

You have to provide an XML contribution for a new one.

See for instance the definition for the standard ones in the platform: http://explorer.nuxeo.org/nuxeo/site/distribution/current/viewContribution/org.nuxeo.ecm.directories...

View answer in original post

2 REPLIES 2

Florent_Guillau
World-Class Innovator
World-Class Innovator

You have to provide an XML contribution for a new one.

See for instance the definition for the standard ones in the platform: http://explorer.nuxeo.org/nuxeo/site/distribution/current/viewContribution/org.nuxeo.ecm.directories...

Pradeep_Bhat
Star Contributor
Star Contributor

Create a csv file with the values that you want to keep. Place that file in **directories **folder of resources. Create an extension, for example, directories-contrib.xml with following,

  <directory name="Your_Schema">
  <schema>Schema_name</schema>
  <dataSource>java:/nxsqldirectory</dataSource>
  <cacheTimeout>3600</cacheTimeout>
  <cacheMaxSize>1000</cacheMaxSize>
  <table>table_name</table>
  <idField>id</idField>
  <autoincrementIdField>false</autoincrementIdField>
  <dataFile>directories/your_csv_file.csv</dataFile>
  <createTablePolicy>always</createTablePolicy>
  </directory>

Now create Your_Schema.xsd as below.

 <xs:element name="id" type="xs:string"/>
 <xs:element name="label_en" type="xs:string"/>
    <xs:element name="obsolete" type="xs:integer" default="0"/>
    <xs:element name="ordering" type="xs:integer" default="10000000"/>
    

Don't forget to declare **Schema_name **as below in core-types-contrib.xml

<schema name="Schema_name" prefix="sn" src="schema/Your_Schema.xsd" />

Make sure that your schema gets stored in database with the values given in csv file. That table serves as vocabulary for you. Hope this helps you. Kindly revert for more clarifications.

Getting started

Find what you came for

We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.