<?xml version="1.0"?>

 <!-- START SNIPPET: modello-model -->

<model>
  <id>bobberarchetype</id>
  <name>BobberArchetype</name>
  <description><![CDATA[Bobbers's model for the archetype descriptor.]]></description>
  <defaults>
    <default>
      <key>package</key>
      <value>com.javaforge.bobber.archetype.model</value>
    </default>
  </defaults>
  <classes>
    <class rootElement="true" xml.tagName="archetype">
      <name>BobberArchetype</name>
      <description>Describes the assembly layout and packaging.</description>
      <version>1.0.0</version>
      <fields>
        <field>
          <name>id</name>
          <version>1.0.0</version>
          <required>true</required>
          <type>String</type>
        </field>

        <field>
          <name>allowPartial</name>
          <version>1.0.0</version>
          <required>true</required>
          <type>boolean</type>
        </field>


        <field>
          <name>variables</name>
          <version>1.0.0</version>
      <description><![CDATA[
             variable expressions that will use the System.properties values to be used as input into the velocity template engine
          ]]></description>
           <association>
            <type>Variable</type>
            <multiplicity>*</multiplicity>
          </association>
        </field>

        <field>
          <name>templates</name>
          <version>1.0.0</version>
      <description><![CDATA[
            list of all the templates in the archetype that need to 
          ]]></description>
          <association>
            <type>Template</type>
            <multiplicity>*</multiplicity>
          </association>
        </field>
      </fields>
    </class>
    <class xml.tagName="variable">
      <name>Variable</name>
      <description><![CDATA[
             Represents system variable to be put in the Velocity Context
          ]]></description>
      <version>1.0.0</version>
      <fields>
        <!-- xml.attribute does not work as expected
          <field xml.attribute="true">
        -->
        <field>
          <name>name</name>
          <version>1.0.0</version>
          <required>true</required>
          <type>String</type>
        </field>
    <field>
          <name>description</name>
          <version>1.0.0</version>
          <type>String</type>
        </field>
     <field>
          <name>defvalue</name>
          <version>1.0.0</version>
          <required>true</required>
          <type>String</type>
        </field>

     <field>
          <name>variables</name>
          <version>1.0.0</version>
      <description><![CDATA[
            Variables that depend on their parent]]></description>
          <association>
            <type>Variable</type>
            <multiplicity>*</multiplicity>
          </association>
        </field>

      </fields>

    </class>

     <class xml.tagName="template">
      <name>Template</name>
      <description><![CDATA[
             Represents a template in the archetype to be processed
          ]]></description>
      <version>1.0.0</version>
      <fields>
        <field>
          <name>file</name>
          <version>1.0.0</version>
          <required>true</required>
          <type>String</type>
        </field>
        <field>
          <name>output</name>
          <version>1.0.0</version>
          <required>true</required>
          <type>String</type>
        </field>
        <field>
          <name>dependsOnVar</name>
          <description>If the specified variable is true, the template will be processed, otherwise skipped.</description>
          <version>1.0.0</version>
          <required>false</required>
          <type>String</type>
        </field>
      </fields>
    </class>
  </classes>
</model>

 <!-- END SNIPPET: modello-model -->

