| <?xml version="1.0" encoding="UTF-8"?> |
| <!-- |
| ~ Copyright 2006 The Apache Software Foundation. |
| ~ |
| ~ Licensed 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> |
| <id>archetype-registry</id> |
| <name>ArchetypeRegistry</name> |
| |
| <defaults> |
| <default> |
| <key>package</key> |
| <value>org.codehaus.mojo.archetypeng.registry</value> |
| </default> |
| </defaults> |
| |
| <classes> |
| <class rootElement="true" xml.tagName="archetype-registry" > |
| <name>ArchetypeRegistry</name> |
| <fields> |
| <field> |
| <name>ArchetypeGroups</name> |
| <association> |
| <type>String</type> |
| <multiplicity>*</multiplicity> |
| </association> |
| </field> |
| <field> |
| <name>ArchetypeRepositories</name> |
| <association> |
| <type>ArchetypeRepository</type> |
| <multiplicity>*</multiplicity> |
| </association> |
| </field> |
| <field> |
| <name>Languages</name> |
| <association> |
| <type>String</type> |
| <multiplicity>*</multiplicity> |
| </association> |
| </field> |
| <field> |
| <name>FilteredExtensions</name> |
| <association> |
| <type>String</type> |
| <multiplicity>*</multiplicity> |
| </association> |
| </field> |
| </fields> |
| </class> |
| |
| <class> |
| <name>ArchetypeRepository</name> |
| <fields> |
| <field xml.attribute="true" > |
| <name>id</name> |
| <type>String</type> |
| <required>true</required> |
| </field> |
| <field> |
| <name>url</name> |
| <type>String</type> |
| <required>true</required> |
| </field> |
| </fields> |
| <codeSegments> |
| <codeSegment> |
| <code><![CDATA[ |
| public String toString () |
| { |
| return getId () + " (" + getUrl () + ")"; |
| |
| } |
| |
| public int hashCode () |
| { |
| return getId ().hashCode (); |
| } |
| |
| public boolean equals (Object other) |
| { |
| if ( other == null || |
| !(other instanceof ArchetypeRepository ) ) |
| { |
| return false; |
| } |
| |
| return getId ().equals ( ((ArchetypeRepository) other).getId () ); |
| } |
| ]]></code> |
| </codeSegment> |
| </codeSegments> |
| </class> |
| </classes> |
| </model> |