AnsweredAssumed Answered

Creating new data types - data model

Question asked by jamen on Apr 5, 2006

I have posted this entry before under a different topic, but figured I should have posted it under something new…

I'm currently in the process of creating a new content model with new aspects and data types. In our specification we have the need to use a List object of sorts. I was just wondering whether anyone could help me with creating a custom data type for use with a new content type.

I have checked the wiki and it doesn't go beyond using existing data types (eg. String, date, boolean, etc). There is a type based on 'd:any'/java.lang.Object. However I am not sure whether I should use this to implement a 'List' type based on a java class that implements the List or Enumeration interface.

Alternatively would I extend the existing model (dictionaryModel) and create a new type based on a List? With this in mind, I assume I would have a model file (xml) like the one below? The main part I need verification on is actually the <data-types> section I added below. I haven't seen any examples of people customising their data types in a model file before. I have only seen custom models much like what is in the wiki already.

<?xml version="1.0" encoding="UTF-8"?>

<!– Definition of Model –>

<model name="sm:model" xmlns="">

<description>Lateral Minds Document Model</description>

<!– Imports are required to allow references to definitions in other models –>
<!– Import Alfresco Dictionary Definitions –>
<import uri="" prefix="d"/>
<!– Import Alfresco Content Domain Model Definitions –>
<import uri="" prefix="cm"/>
<import uri="" prefix="sys"/>

<namespace uri="example.samplemodel" prefix="sm"/>

DATA TYPES go here



Thanks in advanced