Obsolete Pages{{Obsolete}}
The official documentation is at: http://docs.alfresco.com
Content Modeling
Back to Data Dictionary Guide
Introduction
This page describes how to create UML class diagrams based on the XML definitions for types and aspects. In the following section the different XML elements are described together with the rules that are used to create a mapping from the XML to the UML diagrams.
Mapping Rules
<type>
- <type> elements are modelled as classes with stereotype <type>>.
- The <parent> element is modelled as a generalization relationship.
- The name attribute is used to name the class. The prefix is not included in the name.
<type name='my:item'>
<description>Some thing.</description>
</type>
<type name='my:book'>
<description>Collection of pages containing a story</description>
<parent>my:item</parent>
</type>
example_uml_type.jpg
<aspect>
- <aspect> elements are modelled as classes with stereotype <aspect>>.
- The <parent> element is modelled as a generalization relationship.
- The name attribute is used to name the class. The prefix is not included in the name.
<aspect name='my:base'>
<description>Base aspect.</description>
</aspect>
<aspect name='my:rating'>
<description>Rating of the item</description>
<parent>my:base</parent>
</aspect>
example_uml_aspect.jpg
<property>
- <property> elements are modelled as attributes belonging to a class.
- The <type> element is used to model the attribute's type.
- The attribute is public(shown as '+') unless the element <protected> has a value of true, in which case the attribute is protected (shown as '#').
- The name attribute is used to name the property. The prefix is not included in the name.
<type name='my:book'>
<description>Collection of pages containing a story</description>
<properties>
<property name='my:title'>
<title>Title</title>
<type>d:text</type>
<protected>true</protected>
</property>
<property name='my:released'>
<title>Released</title>
<type>d:datetime</type>
</property>
</properties>
</type>
example_uml_property.jpg
<child-association>
- <child-association> elements are used to create an aggregation.
- To determine the cardinality of the association, the elements <mandatory> and <many> are used.
- The <role> elements are used to name the assocation ends.
- The name attribute is used to name the aggregation.
<association>
- <association> elements are used to create a directed association. The direction is from <source> to <target>.
- To determine the cardinality of the association, the elements <mandatory> and <many> are used.
- The <role> elements are used to name the assocation ends.
- The name attribute is used to name the association.
<mandatory-aspects>
- The element <mandatory-aspects> is modeled as an aggregation to each contained <aspect> element.
- The name attribute is used to name the aggregation.