<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Replacing the topic &amp; subtopic vocabularies in Nuxeo in Nuxeo Forum</title>
    <link>https://connect.hyland.com/t5/nuxeo-forum/replacing-the-topic-subtopic-vocabularies-in-nuxeo/m-p/315702#M2703</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I need to replace the subject field vocabularies by other domain specific tags. I want to do it in a plugin contribution so that it is easier for us to keep several environments in sync.&lt;/P&gt;
&lt;P&gt;I have found how to contribute new vocabularies, but I don't know what do I need to override to replace the vanilla topic/subtopic with a custom vocabulary (it will also have 2 level hierarchy).&lt;/P&gt;
&lt;P&gt;Anyone may point me in the right direction?&lt;/P&gt;
&lt;P&gt;Edit:
We are using Nuxeo CAP with DAM (5.6)&lt;/P&gt;
&lt;P&gt;Thanks.
Jose&lt;/P&gt;</description>
    <pubDate>Tue, 26 Mar 2013 09:35:37 GMT</pubDate>
    <dc:creator>jiyarza_Yarza</dc:creator>
    <dc:date>2013-03-26T09:35:37Z</dc:date>
    <item>
      <title>Replacing the topic &amp; subtopic vocabularies in Nuxeo</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/replacing-the-topic-subtopic-vocabularies-in-nuxeo/m-p/315702#M2703</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I need to replace the subject field vocabularies by other domain specific tags. I want to do it in a plugin contribution so that it is easier for us to keep several environments in sync.&lt;/P&gt;
&lt;P&gt;I have found how to contribute new vocabularies, but I don't know what do I need to override to replace the vanilla topic/subtopic with a custom vocabulary (it will also have 2 level hierarchy).&lt;/P&gt;
&lt;P&gt;Anyone may point me in the right direction?&lt;/P&gt;
&lt;P&gt;Edit:
We are using Nuxeo CAP with DAM (5.6)&lt;/P&gt;
&lt;P&gt;Thanks.
Jose&lt;/P&gt;</description>
      <pubDate>Tue, 26 Mar 2013 09:35:37 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/replacing-the-topic-subtopic-vocabularies-in-nuxeo/m-p/315702#M2703</guid>
      <dc:creator>jiyarza_Yarza</dc:creator>
      <dc:date>2013-03-26T09:35:37Z</dc:date>
    </item>
    <item>
      <title>Re: Replacing the topic &amp; subtopic vocabularies in Nuxeo</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/replacing-the-topic-subtopic-vocabularies-in-nuxeo/m-p/315703#M2704</link>
      <description>&lt;P&gt;Ok. This is what I have done in case it can be useful to someone:&lt;/P&gt;
&lt;P&gt;I have overriden the topic and subtopic directories defined in nuxeo-platform-default-config. Like this:&lt;/P&gt;
&lt;P&gt;In my plugin, I have created the csv files for topics and subtopics, with the same schemas than the originals (check the source!):&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;src/main/resources/directories/my-subtopic.csv
src/main/resources/directories/my-topic.csv
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Then I have created the contribution file:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;OSGI-INF/my-directories-contrib.xml
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;With this:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;&amp;lt;?xml version="1.0"?&amp;gt;
&amp;lt;component name="org.my.ecm.directories"&amp;gt; 
  &amp;lt;require&amp;gt;org.nuxeo.ecm.directories&amp;lt;/require&amp;gt;
  
  &amp;lt;extension target="org.nuxeo.ecm.directory.sql.SQLDirectoryFactory"
    point="directories"&amp;gt;

    &amp;lt;directory name="subtopic"&amp;gt;
      &amp;lt;schema&amp;gt;xvocabulary&amp;lt;/schema&amp;gt;
      &amp;lt;parentDirectory&amp;gt;topic&amp;lt;/parentDirectory&amp;gt;
      &amp;lt;dataSource&amp;gt;java:/nxsqldirectory&amp;lt;/dataSource&amp;gt;
      &amp;lt;cacheTimeout&amp;gt;3600&amp;lt;/cacheTimeout&amp;gt;
      &amp;lt;cacheMaxSize&amp;gt;1000&amp;lt;/cacheMaxSize&amp;gt;
      &amp;lt;table&amp;gt;my_subtopic&amp;lt;/table&amp;gt;
      &amp;lt;idField&amp;gt;id&amp;lt;/idField&amp;gt;
      &amp;lt;autoincrementIdField&amp;gt;false&amp;lt;/autoincrementIdField&amp;gt;
      &amp;lt;dataFile&amp;gt;directories/my-subtopic.csv&amp;lt;/dataFile&amp;gt;
      &amp;lt;createTablePolicy&amp;gt;on_missing_columns&amp;lt;/createTablePolicy&amp;gt;
    &amp;lt;/directory&amp;gt;

    &amp;lt;directory name="topic"&amp;gt;
      &amp;lt;schema&amp;gt;vocabulary&amp;lt;/schema&amp;gt;
      &amp;lt;dataSource&amp;gt;java:/nxsqldirectory&amp;lt;/dataSource&amp;gt;
      &amp;lt;cacheTimeout&amp;gt;3600&amp;lt;/cacheTimeout&amp;gt;
      &amp;lt;cacheMaxSize&amp;gt;1000&amp;lt;/cacheMaxSize&amp;gt;
      &amp;lt;table&amp;gt;my_topic&amp;lt;/table&amp;gt;
      &amp;lt;idField&amp;gt;id&amp;lt;/idField&amp;gt;
      &amp;lt;autoincrementIdField&amp;gt;false&amp;lt;/autoincrementIdField&amp;gt;
      &amp;lt;dataFile&amp;gt;directories/my-topic.csv&amp;lt;/dataFile&amp;gt;
      &amp;lt;createTablePolicy&amp;gt;on_missing_columns&amp;lt;/createTablePolicy&amp;gt;
    &amp;lt;/directory&amp;gt;
    
  &amp;lt;/extension&amp;gt;

&amp;lt;/component&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;The table names must be different than the original ones.&lt;/P&gt;
&lt;P&gt;Then, in META-INF/MANIFEST.MF:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: my-plugin
Bundle-SymbolicName: org.my.video;singleton:=true
Bundle-Version: 1.0.0
Bundle-Vendor: Me
Bundle-Category: web
Bundle-Localization: plugin
Nuxeo-Component: OSGI-INF/my-directories-contrib.xml
Require-Bundle: org.nuxeo.ecm.default.config
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;In OSGI-INF/l10n/ I have created the desired l10n properties for the topics and subtopics (must match the keys defined in the csv files), for instance:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;OSGI-INF/l10n/messages.properties
OSGI-INF/l10n/messages_en.properties
OSGI-INF/l10n/messages_fr.properties
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;And finally in OSGI-INF/deployment-fragment.xml:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;&amp;lt;?xml version="1.0"?&amp;gt;
&amp;lt;fragment version="1"&amp;gt;
	&amp;lt;require&amp;gt;all&amp;lt;/require&amp;gt;	
	&amp;lt;install&amp;gt;\
		&amp;lt;unzip from="${bundle.fileName}" to="/" prefix="web"&amp;gt;
		    &amp;lt;include&amp;gt;/web/nuxeo.war/**&amp;lt;/include&amp;gt;
		&amp;lt;/unzip&amp;gt;
		&amp;lt;delete path="${bundle.fileName}.tmp" /&amp;gt;
		&amp;lt;mkdir path="${bundle.fileName}.tmp" /&amp;gt;
		&amp;lt;unzip from="${bundle.fileName}" to="${bundle.fileName}.tmp" /&amp;gt;
			
		&amp;lt;append from="${bundle.fileName}.tmp/OSGI-INF/l10n/messages.properties"
		  to="nuxeo.war/WEB-INF/classes/messages.properties" addNewLine="true" /&amp;gt;
		&amp;lt;append from="${bundle.fileName}.tmp/OSGI-INF/l10n/messages_en.properties"
		  to="nuxeo.war/WEB-INF/classes/messages_en.properties" addNewLine="true" /&amp;gt;
		&amp;lt;append from="${bundle.fileName}.tmp/OSGI-INF/l10n/messages_fr.properties"
		  to="nuxeo.war/WEB-INF/classes/messages_fr.properties" addNewLine="true" /&amp;gt;
		&amp;lt;delete path="${bundle.fileName}.tmp" /&amp;gt;
	&amp;lt;/install&amp;gt;
&amp;lt;/fragment&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Cheers.&lt;/P&gt;</description>
      <pubDate>Thu, 04 Apr 2013 19:19:53 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/replacing-the-topic-subtopic-vocabularies-in-nuxeo/m-p/315703#M2704</guid>
      <dc:creator>jiyarza_Yarza</dc:creator>
      <dc:date>2013-04-04T19:19:53Z</dc:date>
    </item>
  </channel>
</rss>

