02-19-2008 07:48 PM
02-20-2008 03:38 AM
02-20-2008 09:53 AM
You might consider reading following resourcesThanks for your reply.
http://wiki.alfresco.com/wiki/Developer_Guide#Creating_new_Content_Models
http://ecmarchitect.com/images/articles/alfresco-content/content-article.pdf
Kind regards,
Denis
02-20-2008 10:26 AM
M2Model model = M2Model.createModel("test:mymodel");
model.createNamespace("mynamespace", "test");
model.createImport(NamespaceService.DICTIONARY_MODEL_1_0_URI, NamespaceService.DICTIONARY_MODEL_PREFIX);
model.createImport(NamespaceService.CONTENT_MODEL_1_0_URI, NamespaceService.CONTENT_MODEL_PREFIX);
02-20-2008 12:27 PM
If you must create a model via Java you can take the following approach…
Use the class org.alfresco.repo.dictionary.M2Model to create a model…M2Model model = M2Model.createModel("test:mymodel");
model.createNamespace("mynamespace", "test");
model.createImport(NamespaceService.DICTIONARY_MODEL_1_0_URI, NamespaceService.DICTIONARY_MODEL_PREFIX);
model.createImport(NamespaceService.CONTENT_MODEL_1_0_URI, NamespaceService.CONTENT_MODEL_PREFIX);
You can also create a model from an existing XML file, allowing you to edit the model via code.
Then you can compile the model using…
dictionaryDAO.putModel(model);
where dictionaryDAO is a reference to bean id "dictionaryDAO". This validates the model and makes it available for use by the other services.
02-20-2008 09:57 PM
If you must create a model via Java you can take the following approach…
Use the class org.alfresco.repo.dictionary.M2Model to create a model…M2Model model = M2Model.createModel("test:mymodel");
model.createNamespace("mynamespace", "test");
model.createImport(NamespaceService.DICTIONARY_MODEL_1_0_URI, NamespaceService.DICTIONARY_MODEL_PREFIX);
model.createImport(NamespaceService.CONTENT_MODEL_1_0_URI, NamespaceService.CONTENT_MODEL_PREFIX);
You can also create a model from an existing XML file, allowing you to edit the model via code.
Then you can compile the model using…
dictionaryDAO.putModel(model);
where dictionaryDAO is a reference to bean id "dictionaryDAO". This validates the model and makes it available for use by the other services.
If you must create a model via Java you can take the following approach…thanks davidc
Use the class org.alfresco.repo.dictionary.M2Model to create a model…M2Model model = M2Model.createModel("test:mymodel");
model.createNamespace("mynamespace", "test");
model.createImport(NamespaceService.DICTIONARY_MODEL_1_0_URI, NamespaceService.DICTIONARY_MODEL_PREFIX);
model.createImport(NamespaceService.CONTENT_MODEL_1_0_URI, NamespaceService.CONTENT_MODEL_PREFIX);
You can also create a model from an existing XML file, allowing you to edit the model via code.
Then you can compile the model using…
dictionaryDAO.putModel(model);
where dictionaryDAO is a reference to bean id "dictionaryDAO". This validates the model and makes it available for use by the other services.
02-21-2008 05:30 AM
Tags
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.