Skip to content
Skip to breadcrumbs
Skip to header menu
Skip to action menu
Skip to quick search
Quick Search
Browse
Pages
Blog
Labels
Attachments
Mail
Advanced
What’s New
Space Directory
Feed Builder
Keyboard Shortcuts
Confluence Gadgets
Log In
Sign Up
Dashboard
ActiveIO
Copy Page
You are not logged in. Any changes you make will be marked as
anonymous
. You may want to
Log In
if you already have an account. You can also
Sign Up
for a new account.
This page is being edited by
.
Paragraph
Paragraph
Heading 1
Heading 2
Heading 3
Heading 4
Heading 5
Heading 6
Preformatted
Quote
Bold
Italic
Underline
More colours
Strikethrough
Subscript
Superscript
Monospace
Clear Formatting
Bullet list
Numbered list
Outdent
Indent
Align left
Align center
Align right
Link
Table
Insert
Insert Content
Image
Link
Attachment
Symbol
Emoticon
Wiki Markup
Horizontal rule
tinymce.confluence.insert_menu.macro_desc
Info
JIRA Issue
Status
Gallery
Tasklist
Table of Contents
Other Macros
Page Layout
No Layout
Two column (simple)
Two column (simple, left sidebar)
Two column (simple, right sidebar)
Three column (simple)
Two column
Two column (left sidebar)
Two column (right sidebar)
Three column
Three column (left and right sidebars)
Undo
Redo
Find/Replace
Keyboard Shortcuts Help
<h1>The Modello Data Model.</h1> <p>Staging site giving full modello's model (under construction) can be found here: <a class="external-link" href="http://dcabasson.developpez.com/maven/modello-metamodel.html" rel="nofollow">http://dcabasson.developpez.com/maven/modello-metamodel.html</a></p> <p>Here's an example of a modello data model.</p> <table class="wysiwyg-macro" data-macro-name="code" data-macro-default-parameter="xml" style="background-image: url(/plugins/servlet/confluence/placeholder/macro-heading?definition=e2NvZGU6eG1sfQ&locale=en_GB&version=2); background-repeat: no-repeat;" data-macro-body-type="PLAIN_TEXT"><tr><td class="wysiwyg-macro-body"><pre> <model> <id>myproject</id> <name>MyProject</name> <description>My Project's Data Model</description> <defaults> <default> <key>package</key> <value>org.codehaus.myproject.model</value> </default> </defaults> <classes> <class rootElement="true" xml.tagName="myproject"> <name>Model</name> <version>3.0.0+</version> <fields> <field> <name>myfield</name> <version>1.0.0</version> <description>The example of field.</description> <type>String</type> </field> </fields> </class> </classes> </model> </pre></td></tr></table> <h2>Top level <model></h2> <p>The top level <model> must contain an <id> <name> and at least 1 <classes><class> element.</p> <p>The optional <defaults> tag is commonly used to define properties that the various modello generators use.</p> <h2>The <classes> section.</h2> <p>You can have 1 or more <class> elements within this section.</p> <p>Each <class> represents a container for a set of <field>s.</p> <p>Every <field> is a component in the container.</p> <h3>Notes on the <field> section</h3> <p>XML Generator Notes about <field></p> <ol> <li>By default each <code><field></code> starts out life as an <code><element></code> with text content.</li> <li>A <code><field></code> can be set to be an attribute on the <code><class></code> element by using the <code><field xml.attribute="true"></code> syntax.</li> <li><code>field/name</code> becomes the name of the element (or attribute key). <ol> <li><code>field#xml.tagName</code> can be used to change the name of the element (or attribute key)</li> </ol> </li> <li><code>field/version</code> is unused.</li> <li><code>field/description</code> is unused.</li> <li><code>field/type</code> is one of the following <ul> <li>boolean</li> <li>char</li> <li>double</li> <li>int</li> <li>long</li> <li>short</li> <li>date</li> <li>String</li> <li>Boolean</li> <li>DOM (currently only supported by xpp3 generators)</li> <li>Another <code><class></code> <strong>this can only be achieved through an association tag</strong></li> </ul> </li> <li><code>field/association</code> allows linking to other classes of the model <ol> <li>generated readers and writers do not enforce the multiplicity rules (yet)</li> <li><code>field/association</code> must have at a minimum the <type> element defined.</li> <li><code>field/association/multiplicity</code> dictates the multiplicity of a field (1 or <code>*</code> : 0 to many so far)</li> <li><code>field/association/type</code> only refers to other <class> id's, no java primitives allowed here. <ol> <li><code>field/association/type</code> will be used to determine the name of the nested elements.</li> <li>singular form of the field tagname will be used for the nested element name. <ul> <li><code>s/(.*)ies$/\1y/g</code> - <code>"Properies"</code> becomes <code>"Property"</code></li> <li><code>s/(.*(ch)?)es$/\1/g</code> - <code>"Branches"</code> becomes <code>"Branch"</code></li> <li><code>s/(.*)s$/\1/g</code> - <code>"Reports"</code> becomes <code>"Report"</code></li> </ul> </li> <li><code>field/association#xml.associationTagName</code> can be used to specify an overridden nested element name.</li> <li>To learn more about tagName resolution, see <a class="confluence-link" href="/display/ACTIVEIO/TagName+resolution" data-linked-resource-id="59596" data-linked-resource-type="page" data-linked-resource-default-alias="TagName resolution" data-base-url="http://docs.codehaus.org">TagName resolution</a></li> </ol> </li> <li><code>field#xml.listStyle</code> defaults to "wrapped". <ol> <li>Example of <code>field#xml.listStyle="wrapped"</code> <table class="wysiwyg-macro" data-macro-name="code" data-macro-default-parameter="xml" style="background-image: url(/plugins/servlet/confluence/placeholder/macro-heading?definition=e2NvZGU6eG1sfQ&locale=en_GB&version=2); background-repeat: no-repeat;" data-macro-body-type="PLAIN_TEXT"><tr><td class="wysiwyg-macro-body"><pre> <!-- Model --> <class> <name>example</name> <fields> <field xml.listStyle="wrapped"> <name>components</name> <version>4.0.0</version> <association> <type>Component</type> <multiplicity>*</multiplicity> </association> </field> </fields> </class> <class> <name>Component</name> <version>4.0.0</version> <fields> <field> <name>name</name> <type>String</type> </field> </fields> </class> </pre></td></tr></table> <table class="wysiwyg-macro" data-macro-name="code" data-macro-default-parameter="xml" style="background-image: url(/plugins/servlet/confluence/placeholder/macro-heading?definition=e2NvZGU6eG1sfQ&locale=en_GB&version=2); background-repeat: no-repeat;" data-macro-body-type="PLAIN_TEXT"><tr><td class="wysiwyg-macro-body"><pre> <!-- xml --> <example> <components> <component> <name>foo</name> </component> <component> <name>bar</name> </component> </components> </example> </pre></td></tr></table></li> <li>Example of <code>field#xml.listStyle="flat"</code> <table class="wysiwyg-macro" data-macro-name="code" data-macro-default-parameter="xml" style="background-image: url(/plugins/servlet/confluence/placeholder/macro-heading?definition=e2NvZGU6eG1sfQ&locale=en_GB&version=2); background-repeat: no-repeat;" data-macro-body-type="PLAIN_TEXT"><tr><td class="wysiwyg-macro-body"><pre> <!-- Model --> <class> <name>example</name> <fields> <field xml.listStyle="flat"> <name>components</name> <version>4.0.0</version> <association> <type>Component</type> <multiplicity>*</multiplicity> </association> </field> </fields> </class> <class> <name>Component</name> <version>4.0.0</version> <fields> <field> <name>name</name> <type>String</type> </field> </fields> </class> </pre></td></tr></table> <table class="wysiwyg-macro" data-macro-name="code" data-macro-default-parameter="xml" style="background-image: url(/plugins/servlet/confluence/placeholder/macro-heading?definition=e2NvZGU6eG1sfQ&locale=en_GB&version=2); background-repeat: no-repeat;" data-macro-body-type="PLAIN_TEXT"><tr><td class="wysiwyg-macro-body"><pre> <!-- xml --> <example> <component> <name>foo</name> </component> <component> <name>bar</name> </component> </example> </pre></td></tr></table></li> </ol> </li> </ol> </li> </ol>
Please type the word appearing in the picture.
Attachments
Labels
Location
Watch this page
< Edit
Preview >
Loading…
Save
Cancel
Next hint
search
attachments
weblink
advanced