<?xml version="1.0"?>

<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements.  See the NOTICE file
distributed with this work for additional information
regarding copyright ownership.  The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License.  You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied.  See the License for the
specific language governing permissions and limitations
under the License.
-->

<model xmlns="http://modello.codehaus.org/MODELLO/1.1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://modello.codehaus.org/MODELLO/1.1.0 http://modello.codehaus.org/xsd/modello-1.1.0.xsd">
  <id>javadocoptions</id>
  <name>JavadocOptions</name>
  <description><![CDATA[Model for Javadoc Options.]]></description>
  <defaults>
    <default>
      <key>package</key>
      <value>org.apache.maven.plugin.javadoc.options</value>
    </default>
  </defaults>
  <classes>
    <class>
      <name>Group</name>
      <description>A Group parameter.</description>
      <version>1.0.0</version>
      <fields>
        <field>
          <name>title</name>
          <description>Title can be any text, and can include white space. This text is placed in the table heading for the group.</description>
          <version>1.0.0</version>
          <type>String</type>
          <identifier>true</identifier>
        </field>
        <field>
          <name>packages</name>
          <description>Packages can be any package name, or can be the start of any package name followed by an asterisk (*). The asterisk is a wildcard meaning "match any characters". This is the only wildcard allowed. Multiple patterns can be included in a group by separating them with colons (:).</description>
          <version>1.0.0</version>
          <type>String</type>
          <identifier>true</identifier>
        </field>
      </fields>
    </class>

    <class>
      <name>Tag</name>
      <description>A Tag parameter.</description>
      <version>1.0.0</version>
      <fields>
        <field>
          <name>name</name>
          <description>Name of the tag.</description>
          <version>1.0.0</version>
          <type>String</type>
          <identifier>true</identifier>
        </field>
        <field>
          <name>head</name>
          <description>Head of the tag.</description>
          <version>1.0.0</version>
          <type>String</type>
          <identifier>true</identifier>
        </field>
      </fields>
      <codeSegments>
        <codeSegment>
          <version>1.0.0</version>
            <code><![CDATA[
    /**
     * Field placement
     */
    private String placement;

    /**
     * Get the placement.
     */
    public String getPlacement()
    {
        return this.placement;
    }

    /**
     * Set a Placement. Should be a combinaison of the letters:
     * <ul>
     * <li> X (disable tag)</li>
     * <li> a (all)</li>
     * <li> o (overview)</li>
     * <li> p (packages)</li>
     * <li> t (types, that is classes and interfaces)</li>
     * <li> c (constructors)</li>
     * <li> m (methods)</li>
     * <li> f (fields)</li>
     * </ul>
     *
     * @param placement
     * @throws IllegalArgumentException  if not a valid combinaison of the letters
     */
    public void setPlacement(String placement)
      throws IllegalArgumentException
    {
        char[] chars = placement.toCharArray();
        for ( int i = 0; i < chars.length; i++ )
        {
            switch ( chars[i] )
            {
                case 'X':
                case 'a':
                case 'o':
                case 'p':
                case 't':
                case 'c':
                case 'm':
                case 'f':
                    break;
                default:
                    throw new IllegalArgumentException( "Placement should be a combinaison of the letters 'Xaoptcmf'." );
            }
        }
        this.placement = placement;
    }

          ]]></code>
        </codeSegment>
      </codeSegments>
    </class>

    <class>
      <name>JavadocPathArtifact</name>
      <description>An artifact object used by Javadoc path options like -docletpath or -tagletpath.</description>
      <version>1.0.0</version>
      <fields>
        <field>
          <name>groupId</name>
          <description>The id of the group of the artifact.</description>
          <version>1.0.0</version>
          <type>String</type>
          <identifier>true</identifier>
        </field>
        <field>
          <name>artifactId</name>
          <description>The id of the artifact.</description>
          <version>1.0.0</version>
          <type>String</type>
          <identifier>true</identifier>
        </field>
        <field>
          <name>version</name>
          <description>The version of the artifact.</description>
          <version>1.0.0</version>
          <type>String</type>
          <identifier>true</identifier>
        </field>
      </fields>
    </class>

    <class>
      <name>DocletArtifact</name>
      <description>A doclet parameter as artifact.</description>
      <version>1.0.0</version>
      <superClass>JavadocPathArtifact</superClass>
    </class>

    <class>
      <name>TagletArtifact</name>
      <description>A taglet parameter as artifact.</description>
      <version>1.0.0</version>
      <superClass>JavadocPathArtifact</superClass>
    </class>

    <class>
      <name>ResourcesArtifact</name>
      <description>A artifact containing resources.</description>
      <version>1.0.0</version>
      <superClass>JavadocPathArtifact</superClass>
    </class>

    <class>
      <name>BootclasspathArtifact</name>
      <description>A bootclasspath parameter as artifact.</description>
      <version>1.0.0</version>
      <superClass>JavadocPathArtifact</superClass>
    </class>

    <class>
      <name>Taglet</name>
      <description>A Taglet parameter.</description>
      <version>1.0.0</version>
      <fields>
        <field>
          <name>tagletClass</name>
          <description>tagletClass is the fully-qualified name for the taglet class.</description>
          <version>1.0.0</version>
          <type>String</type>
          <identifier>true</identifier>
        </field>
        <field>
          <name>tagletpath</name>
          <description>Specifies the search paths for finding taglet class files (.class).</description>
          <version>1.0.0</version>
          <type>String</type>
          <identifier>true</identifier>
        </field>
        <field>
          <name>tagletArtifact</name>
          <description>Specifies the taglet artifact to be included in the tagletpath option for finding taglet class files (.class).</description>
          <version>1.0.0</version>
          <association>
            <type>TagletArtifact</type>
          </association>
        </field>
      </fields>
    </class>

    <class>
      <name>OfflineLink</name>
      <description>An offline link parameter.</description>
      <version>1.0.0</version>
      <fields>
        <field>
          <name>url</name>
          <description>The url of the link.</description>
          <version>1.0.0</version>
          <type>String</type>
          <identifier>true</identifier>
        </field>
        <field>
          <name>location</name>
          <description>The location of the link.</description>
          <version>1.0.0</version>
          <type>String</type>
          <identifier>true</identifier>
        </field>
      </fields>
    </class>
  </classes>
</model>


