sequence mappings and DbRef mapping objects unified and source binding for castor...
authorjprocter <jprocter@compbio.dundee.ac.uk>
Thu, 28 Jun 2007 13:51:44 +0000 (13:51 +0000)
committerjprocter <jprocter@compbio.dundee.ac.uk>
Thu, 28 Jun 2007 13:51:44 +0000 (13:51 +0000)
git-svn-id: https://svn.lifesci.dundee.ac.uk/svn/repository/trunk@407 be28352e-c001-0410-b1a7-c7978e42abec

91 files changed:
schemas/vamsas.xsd
src/uk/ac/vamsas/objects/EmptyDocumentUpdater.java
src/uk/ac/vamsas/objects/IDocumentUpdater.java
src/uk/ac/vamsas/objects/core/.castor.cdr
src/uk/ac/vamsas/objects/core/Alignment.java
src/uk/ac/vamsas/objects/core/AlignmentAnnotation.java
src/uk/ac/vamsas/objects/core/AlignmentSequence.java
src/uk/ac/vamsas/objects/core/AlignmentSequenceAnnotation.java
src/uk/ac/vamsas/objects/core/AnnotationElement.java
src/uk/ac/vamsas/objects/core/AppData.java
src/uk/ac/vamsas/objects/core/ApplicationData.java
src/uk/ac/vamsas/objects/core/Attachment.java
src/uk/ac/vamsas/objects/core/DataSet.java
src/uk/ac/vamsas/objects/core/DataSetAnnotations.java
src/uk/ac/vamsas/objects/core/DbRef.java
src/uk/ac/vamsas/objects/core/Entry.java
src/uk/ac/vamsas/objects/core/Glyph.java
src/uk/ac/vamsas/objects/core/Input.java
src/uk/ac/vamsas/objects/core/Instance.java
src/uk/ac/vamsas/objects/core/Link.java
src/uk/ac/vamsas/objects/core/Local.java [new file with mode: 0644]
src/uk/ac/vamsas/objects/core/LockFile.java
src/uk/ac/vamsas/objects/core/Map.java
src/uk/ac/vamsas/objects/core/MapRangeType.java [new file with mode: 0644]
src/uk/ac/vamsas/objects/core/MapType.java [new file with mode: 0644]
src/uk/ac/vamsas/objects/core/Mapped.java [new file with mode: 0644]
src/uk/ac/vamsas/objects/core/Newick.java
src/uk/ac/vamsas/objects/core/NodeType.java
src/uk/ac/vamsas/objects/core/Param.java
src/uk/ac/vamsas/objects/core/Pos.java
src/uk/ac/vamsas/objects/core/Property.java
src/uk/ac/vamsas/objects/core/Provenance.java
src/uk/ac/vamsas/objects/core/RangeAnnotation.java
src/uk/ac/vamsas/objects/core/RangeType.java
src/uk/ac/vamsas/objects/core/ReferenceType.java
src/uk/ac/vamsas/objects/core/Score.java
src/uk/ac/vamsas/objects/core/Seg.java
src/uk/ac/vamsas/objects/core/Sequence.java
src/uk/ac/vamsas/objects/core/SequenceMapping.java
src/uk/ac/vamsas/objects/core/SequenceType.java
src/uk/ac/vamsas/objects/core/Tree.java
src/uk/ac/vamsas/objects/core/Treenode.java
src/uk/ac/vamsas/objects/core/User.java
src/uk/ac/vamsas/objects/core/VAMSAS.java
src/uk/ac/vamsas/objects/core/VamsasDocument.java
src/uk/ac/vamsas/objects/core/Vref.java
src/uk/ac/vamsas/objects/core/Vxref.java
src/uk/ac/vamsas/objects/core/descriptors/AlignmentAnnotationDescriptor.java
src/uk/ac/vamsas/objects/core/descriptors/AlignmentDescriptor.java
src/uk/ac/vamsas/objects/core/descriptors/AlignmentSequenceAnnotationDescriptor.java
src/uk/ac/vamsas/objects/core/descriptors/AlignmentSequenceDescriptor.java
src/uk/ac/vamsas/objects/core/descriptors/AnnotationElementDescriptor.java
src/uk/ac/vamsas/objects/core/descriptors/AppDataDescriptor.java
src/uk/ac/vamsas/objects/core/descriptors/ApplicationDataDescriptor.java
src/uk/ac/vamsas/objects/core/descriptors/AttachmentDescriptor.java
src/uk/ac/vamsas/objects/core/descriptors/CommonDescriptor.java
src/uk/ac/vamsas/objects/core/descriptors/DataSetAnnotationsDescriptor.java
src/uk/ac/vamsas/objects/core/descriptors/DataSetDescriptor.java
src/uk/ac/vamsas/objects/core/descriptors/DbRefDescriptor.java
src/uk/ac/vamsas/objects/core/descriptors/EntryDescriptor.java
src/uk/ac/vamsas/objects/core/descriptors/GlyphDescriptor.java
src/uk/ac/vamsas/objects/core/descriptors/InputDescriptor.java
src/uk/ac/vamsas/objects/core/descriptors/InstanceDescriptor.java
src/uk/ac/vamsas/objects/core/descriptors/LinkDescriptor.java
src/uk/ac/vamsas/objects/core/descriptors/LocalDescriptor.java [new file with mode: 0644]
src/uk/ac/vamsas/objects/core/descriptors/LockFileDescriptor.java
src/uk/ac/vamsas/objects/core/descriptors/MapDescriptor.java
src/uk/ac/vamsas/objects/core/descriptors/MapRangeTypeDescriptor.java [new file with mode: 0644]
src/uk/ac/vamsas/objects/core/descriptors/MapTypeDescriptor.java [new file with mode: 0644]
src/uk/ac/vamsas/objects/core/descriptors/MappedDescriptor.java [new file with mode: 0644]
src/uk/ac/vamsas/objects/core/descriptors/NewickDescriptor.java
src/uk/ac/vamsas/objects/core/descriptors/NodeTypeDescriptor.java
src/uk/ac/vamsas/objects/core/descriptors/ParamDescriptor.java
src/uk/ac/vamsas/objects/core/descriptors/PosDescriptor.java
src/uk/ac/vamsas/objects/core/descriptors/PropertyDescriptor.java
src/uk/ac/vamsas/objects/core/descriptors/ProvenanceDescriptor.java
src/uk/ac/vamsas/objects/core/descriptors/RangeAnnotationDescriptor.java
src/uk/ac/vamsas/objects/core/descriptors/RangeTypeDescriptor.java
src/uk/ac/vamsas/objects/core/descriptors/ReferenceTypeDescriptor.java
src/uk/ac/vamsas/objects/core/descriptors/ScoreDescriptor.java
src/uk/ac/vamsas/objects/core/descriptors/SegDescriptor.java
src/uk/ac/vamsas/objects/core/descriptors/SequenceDescriptor.java
src/uk/ac/vamsas/objects/core/descriptors/SequenceMappingDescriptor.java
src/uk/ac/vamsas/objects/core/descriptors/SequenceTypeDescriptor.java
src/uk/ac/vamsas/objects/core/descriptors/TreeDescriptor.java
src/uk/ac/vamsas/objects/core/descriptors/TreenodeDescriptor.java
src/uk/ac/vamsas/objects/core/descriptors/UserDescriptor.java
src/uk/ac/vamsas/objects/core/descriptors/VAMSASDescriptor.java
src/uk/ac/vamsas/objects/core/descriptors/VamsasDocumentDescriptor.java
src/uk/ac/vamsas/objects/core/descriptors/VrefDescriptor.java
src/uk/ac/vamsas/objects/core/descriptors/VxrefDescriptor.java

index cdbc003..946b609 100644 (file)
@@ -1,7 +1,10 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!-- edited with XMLSPY v5 rel. 4 U (http://www.xmlspy.com) by MSD (EMBL OUTSTATION THE EBI WELLCOME TRUST GENOME CAMPUS) -->
 <!-- edited with XMLSpy v2006 sp1 U (http://www.altova.com) by ioh[ (o[ih[oh) -->
-<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:vamsas="http://www.vamsas.ac.uk/schemas/1.0/vamsasTypes" targetNamespace="http://www.vamsas.ac.uk/schemas/1.0/vamsasTypes" elementFormDefault="qualified" attributeFormDefault="unqualified">
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
+       xmlns:vamsas="http://www.vamsas.ac.uk/schemas/1.0/vamsasTypes"
+       targetNamespace="http://www.vamsas.ac.uk/schemas/1.0/vamsasTypes" elementFormDefault="qualified"
+       attributeFormDefault="unqualified">
        <xs:annotation>
                <xs:documentation> Vorba ID - Vamsas Object Request Broker Address ID (name needs to be
                        worked on): Suggest it could be of the form documentRoot/datasetName/SequenceUID for a
                                </xs:element>
                                <xs:element name="treenode" minOccurs="0" maxOccurs="unbounded">
                                        <xs:annotation>
-                                               <xs:documentation>
-                                                       node identity and mapping data between tree representations and vamsas document objects
-                                               </xs:documentation>
+                                               <xs:documentation> node identity and mapping data between tree
+                                                       representations and vamsas document objects </xs:documentation>
                                        </xs:annotation>
                                        <xs:complexType>
                                                <xs:complexContent>
                                                        <xs:extension base="vamsas:nodeType">
                                                                <xs:attribute name="treeId" type="xs:IDREFS">
                                                                        <xs:annotation>
-                                                                               <xs:documentation>
-                                                                                       reference to one or more trees containing the node being described.
-                                                                               </xs:documentation>
+                                                                               <xs:documentation> reference to one or more trees containing
+                                                                                       the node being described. </xs:documentation>
                                                                        </xs:annotation>
                                                                </xs:attribute>
                                                                <xs:attribute name="nodespec" type="xs:string">
                                                                        <xs:annotation>
-                                                                               <xs:documentation>
-                                                                                       String uniquely identifying a particular node in the referenced tree according to the format of the tree representation that is referenced.
+                                                                               <xs:documentation> String uniquely identifying a particular
+                                                                                       node in the referenced tree according to the format of
+                                                                                       the tree representation that is referenced.
                                                                                </xs:documentation>
                                                                        </xs:annotation>
                                                                </xs:attribute>
-                                                               
+
                                                        </xs:extension>
                                                </xs:complexContent>
                                        </xs:complexType>
        </xs:element>
        <xs:complexType name="referenceType">
                <xs:annotation>
-                       <xs:documentation>
-                               base type for citing arbitrary links between vamsas objects
+                       <xs:documentation> base type for citing arbitrary links between vamsas objects
                        </xs:documentation>
                </xs:annotation>
                <xs:simpleContent>
                        <xs:extension base="xs:string">
                                <xs:annotation>
-                                       <xs:documentation>
-                                               Optional human readable description of the relationship
+                                       <xs:documentation> Optional human readable description of the relationship
                                        </xs:documentation>
                                </xs:annotation>
                                <xs:attribute name="id" type="xs:ID" use="optional">
                                        <xs:annotation>
-                                               <xs:documentation> Primary Key for vamsas object referencing </xs:documentation>
+                                               <xs:documentation> Primary Key for vamsas object referencing
+                                               </xs:documentation>
                                        </xs:annotation>
                                </xs:attribute>
                                <xs:attribute name="refs" type="xs:IDREFS">
                                        <xs:annotation>
-                                               <xs:documentation>List of one or more vamsas object references</xs:documentation>
+                                               <xs:documentation>List of one or more vamsas object
+                                               references</xs:documentation>
                                        </xs:annotation>
                                </xs:attribute>
                        </xs:extension>
                        </xs:element>
                        <xs:element name="vref" type="vamsas:referenceType" minOccurs="0" maxOccurs="unbounded">
                                <xs:annotation>
-                                       <xs:documentation>Direct associations between this node and any vamsas objects</xs:documentation>
+                                       <xs:documentation>Direct associations between this node and any vamsas
+                                       objects</xs:documentation>
                                </xs:annotation>
                        </xs:element>
                        <xs:element ref="vamsas:property" minOccurs="0" maxOccurs="unbounded"/>
                                                <xs:complexType>
                                                        <xs:simpleContent>
                                                                <xs:extension base="xs:float">
-                                                                       <xs:attribute name="name" type="xs:string" use="optional" default="score"/>
+                                                                       <xs:attribute name="name" type="xs:string" use="optional"
+                                                                               default="score"/>
                                                                </xs:extension>
                                                        </xs:simpleContent>
                                                </xs:complexType>
                                                                        <xs:documentation> Did what </xs:documentation>
                                                                </xs:annotation>
                                                        </xs:element>
-                                                       <xs:element name="Date" type="xs:dateTime"> 
+                                                       <xs:element name="Date" type="xs:dateTime">
                                                                <xs:annotation>
                                                                        <xs:documentation> When</xs:documentation>
                                                                </xs:annotation>
        <xs:element name="DataSet">
                <xs:complexType>
                        <xs:annotation>
-                               <xs:documentation> A collection of sequences, alignments, trees and other things.
+                               <xs:documentation> A collection of sequences, alignments, trees and other things. </xs:documentation>
+                               <xs:documentation> TODO: Add a title field and properties for programs that can
+                                       present the user with different distinct datasets For the moment, the program
+                                       just presents them as a list and perhaps lets the user work out which dataset it
+                                       wants based on the alignments that it contains. (Dominik and Jim 7th June 2007)
                                </xs:documentation>
                        </xs:annotation>
                        <xs:sequence>
                                                                                </xs:annotation>
                                                                                <xs:complexType>
                                                                                        <xs:sequence>
-                                                                                               <xs:element name="map" minOccurs="0" maxOccurs="unbounded">
-                                                                                                       <xs:annotation>
-                                                                                                               <xs:documentation> From: Offset to first
-                                                                                                               position in dataset sequence record that
-                                                                                                               this database entry maps to To: Offset
-                                                                                                               to last position in dataset sequence
-                                                                                                               record that this database entry maps to
-                                                                                                               Start: Offset to first last position in
-                                                                                                               database entry that first (or offset)
-                                                                                                               position in sequence maps to End: Offset
-                                                                                                               to last position in database entry that
-                                                                                                               last (offset) position in sequence maps
-                                                                                                               to </xs:documentation>
-                                                                                                       </xs:annotation>
-                                                                                                       <xs:complexType>
-                                                                                                               <xs:complexContent>
-                                                                                                                       <xs:extension base="vamsas:mapList"/>
-                                                                                                               </xs:complexContent>
-                                                                                                       </xs:complexType>
+                                                                                               <xs:element name="map" minOccurs="0"
+                                                                                               maxOccurs="1">
+                                                                                               <xs:annotation>
+                                                                                               <xs:documentation>
+                                                                                                       the local mapType maps from the parent
+                                                                                                       sequence coordinate frame to the reference
+                                                                                                       frame defined by the dbRef element.
+                                                                                                       The mapped mapType is the mapped range defined
+                                                                                                       on the dbRef element's reference frame.
+                                                                                                       Conventionally, the unit attribute defaults to 1, or
+                                                                                                       will be inferred from the local sequence's
+                                                                                                       dictionary type and any dictionary type associated
+                                                                                                       with the database being mapped to. 
+                                                                                                       However, it may be used to avoid ambiguity.
+                                                                                               </xs:documentation>
+                                                                                               </xs:annotation>
+                                                                                               <xs:complexType>
+                                                                                               <xs:complexContent>
+                                                                                                       <xs:extension base="vamsas:mapType">
+                                                                                                               <xs:attribute name="id" type="xs:ID"/>
+                                                                                                       </xs:extension>
+                                                                                               </xs:complexContent>
+                                                                                               </xs:complexType>
                                                                                                </xs:element>
-                                                                                               <xs:element ref="vamsas:link" minOccurs="0" maxOccurs="unbounded"/>
-                                                                                               <xs:element ref="vamsas:property" minOccurs="0" maxOccurs="unbounded"/>
+                                                                                               <xs:element ref="vamsas:link" minOccurs="0"
+                                                                                               maxOccurs="unbounded"/>
+                                                                                               <xs:element ref="vamsas:property" minOccurs="0"
+                                                                                               maxOccurs="unbounded"/>
                                                                                        </xs:sequence>
-                                                                                       <xs:attribute name="source" type="xs:string" use="required">
+                                                                                       <xs:attribute name="source" type="xs:string"
+                                                                                               use="required">
                                                                                                <xs:annotation>
-                                                                                                       <xs:documentation> TODO Database Naming
+                                                                                               <xs:documentation> TODO Database Naming
                                                                                                Convention: either start using LSID (so
                                                                                                change type to URI) or leave this as an
                                                                                                uncontrolled/unspecified string ID
                                                                                                </xs:documentation>
                                                                                                </xs:annotation>
                                                                                        </xs:attribute>
-                                                                                       <xs:attribute name="version" type="xs:string" use="required">
+                                                                                       <xs:attribute name="version" type="xs:string"
+                                                                                               use="required">
                                                                                                <xs:annotation>
-                                                                                                       <xs:documentation> Version must be specified -
+                                                                                               <xs:documentation> Version must be specified -
                                                                                                </xs:documentation>
                                                                                                </xs:annotation>
                                                                                        </xs:attribute>
-                                                                                       <xs:attribute name="accessionId" type="xs:string" use="required">
+                                                                                       <xs:attribute name="accessionId" type="xs:string"
+                                                                                               use="required">
                                                                                                <xs:annotation>
-                                                                                                       <xs:documentation> TODO: make some specification
+                                                                                               <xs:documentation> TODO: make some specification
                                                                                                of the database field from which this
                                                                                                accessionId is taken from - should that be a
                                                                                                special property of the dbRef object ?
                                                                                        </xs:attribute>
                                                                                        <xs:attribute name="id" type="xs:ID" use="optional">
                                                                                                <xs:annotation>
-                                                                                                       <xs:documentation> Primary Key for vamsas object
+                                                                                               <xs:documentation> Primary Key for vamsas object
                                                                                                referencing </xs:documentation>
                                                                                                </xs:annotation>
                                                                                        </xs:attribute>
                                                                                </xs:complexType>
                                                                        </xs:element>
-                                                                       <xs:element name="vxref" type="vamsas:referenceType" minOccurs="0" maxOccurs="unbounded">
+                                                                       <xs:element name="vxref" type="vamsas:referenceType"
+                                                                               minOccurs="0" maxOccurs="unbounded">
                                                                                <xs:annotation>
-                                                                                       <xs:documentation>
-                                                                                               explicitly named cross reference to other objects in the document.
-                                                                                       </xs:documentation>
+                                                                                       <xs:documentation> explicitly named cross reference to
+                                                                                               other objects in the document. </xs:documentation>
                                                                                </xs:annotation>
                                                                        </xs:element>
                                                                </xs:sequence>
                                </xs:element>
                                <xs:element name="sequenceMapping" minOccurs="0" maxOccurs="unbounded">
                                        <xs:complexType>
-                                               <xs:sequence>
-                                                       <xs:element name="range" maxOccurs="unbounded">
-                                                               <xs:complexType>
-                                                                       <xs:attribute name="seqAStart" type="xs:int"/>
-                                                                       <xs:attribute name="seqAEnd" type="xs:int"/>
-                                                                       <xs:attribute name="seqBStart" type="xs:int"/>
-                                                                       <xs:attribute name="seqBEnd" type="xs:int"/>
-                                                               </xs:complexType>
-                                                       </xs:element>
-                                                       <xs:element ref="vamsas:Provenance"/>
-                                               </xs:sequence>
-                                               <xs:attribute name="sequenceA" type="xs:IDREF" use="required"/>
-                                               <xs:attribute name="sequenceB" type="xs:IDREF" use="required"/>
-                                               <xs:attribute name="id" type="xs:ID" use="optional"/>
+                                               <xs:annotation>
+                                                       <xs:documentation> 
+                                                               A mapping between the specified 'local' and 'mapped' sequence coordinate frames. 
+                                                               The step size between each coordinate frame depends on the sequence
+                                                               dictionary types, or alternatively specified in the optional unit
+                                                               attribute on each range element. </xs:documentation>
+                                               </xs:annotation>
+                                               <xs:complexContent>
+                                                       <xs:extension base="vamsas:mapType">
+                                                               <xs:sequence>
+                                                                       <xs:element ref="vamsas:Provenance"/>
+                                                               </xs:sequence>
+                                                               <xs:attribute name="loc" type="xs:IDREF" use="required">
+                                                                       <xs:annotation>
+                                                                               <xs:documentation> Object on which the local
+                                                                                       range is defined. </xs:documentation>
+                                                                       </xs:annotation>
+                                                               </xs:attribute>
+                                                               <xs:attribute name="map" type="xs:IDREF" use="required">
+                                                                       <xs:annotation>
+                                                                               <xs:documentation>Object on which the mapped
+                                                                                       range is defined. </xs:documentation>
+                                                                       </xs:annotation>
+                                                               </xs:attribute>
+                                                               <xs:attribute name="id" type="xs:ID" use="optional"/>
+                                                       </xs:extension>
+                                               </xs:complexContent>
                                        </xs:complexType>
                                </xs:element>
                                <xs:element name="DataSetAnnotations" minOccurs="0" maxOccurs="unbounded">
                                <xs:element name="Alignment" minOccurs="0" maxOccurs="unbounded">
                                        <xs:complexType>
                                                <xs:sequence>
-                                                       <xs:element name="AlignmentAnnotation" minOccurs="0" maxOccurs="unbounded">
+                                                       <xs:element name="AlignmentAnnotation" minOccurs="0"
+                                                               maxOccurs="unbounded">
                                                                <xs:annotation>
                                                                        <xs:documentation> This is annotation over the coordinate frame
                                                                                defined by all the columns in the alignment.
                                                                                        <xs:sequence>
                                                                                                <xs:element ref="vamsas:Provenance"/>
                                                                                        </xs:sequence>
-                                                                                       <xs:attribute name="graph" type="xs:boolean" use="required">
+                                                                                       <xs:attribute name="graph" type="xs:boolean"
+                                                                                               use="required">
                                                                                                <xs:annotation>
-                                                                                                       <xs:documentation> TODO: decide if this flag is
+                                                                                               <xs:documentation> TODO: decide if this flag is
                                                                                                redundant - when true it would suggest that
                                                                                                the annotationElement values together form a
                                                                                                graph </xs:documentation>
                                                                                                </xs:annotation>
                                                                                        </xs:attribute>
-                                                                                       <xs:attribute name="seqrefs" type="xs:IDREFS" use="optional">
+                                                                                       <xs:attribute name="seqrefs" type="xs:IDREFS"
+                                                                                               use="optional">
                                                                                                <xs:annotation>
-                                                                                                       <xs:documentation> annotation is associated with a
-                                                                                                               range on a particular group of alignment sequences</xs:documentation>
+                                                                                               <xs:documentation> annotation is associated with
+                                                                                               a range on a particular group of alignment
+                                                                                               sequences</xs:documentation>
                                                                                                </xs:annotation>
                                                                                        </xs:attribute>
-                                                                                       
+
                                                                                </xs:extension>
                                                                        </xs:complexContent>
                                                                </xs:complexType>
                                                                        <xs:complexContent>
                                                                                <xs:extension base="vamsas:SequenceType">
                                                                                        <xs:sequence>
-                                                                                               <xs:element name="AlignmentSequenceAnnotation" minOccurs="0" maxOccurs="unbounded">
-                                                                                                       <xs:complexType>
-                                                                                                               <xs:annotation>
-                                                                                                                       <xs:documentation> Annotate over
+                                                                                               <xs:element name="AlignmentSequenceAnnotation"
+                                                                                               minOccurs="0" maxOccurs="unbounded">
+                                                                                               <xs:complexType>
+                                                                                               <xs:annotation>
+                                                                                               <xs:documentation> Annotate over
                                                                                                positions and regions of the
                                                                                                ungapped sequence in the context of
                                                                                                the alignment </xs:documentation>
-                                                                                                                       <xs:documentation/>
-                                                                                                               </xs:annotation>
-                                                                                                               <xs:complexContent>
-                                                                                                                       <xs:extension base="vamsas:rangeAnnotation">
-                                                                                                                               <xs:sequence>
-                                                                                                                                       <xs:element ref="vamsas:Provenance"/>
-                                                                                                                               </xs:sequence>
-                                                                                                                               <xs:attribute name="graph" type="xs:boolean" use="required">
-                                                                                                                                       <xs:annotation>
-                                                                                                                                               <xs:documentation> TODO:
+                                                                                               <xs:documentation/>
+                                                                                               </xs:annotation>
+                                                                                               <xs:complexContent>
+                                                                                               <xs:extension
+                                                                                               base="vamsas:rangeAnnotation">
+                                                                                               <xs:sequence>
+                                                                                               <xs:element
+                                                                                               ref="vamsas:Provenance"/>
+                                                                                               </xs:sequence>
+                                                                                               <xs:attribute name="graph"
+                                                                                               type="xs:boolean" use="required">
+                                                                                               <xs:annotation>
+                                                                                               <xs:documentation> TODO:
                                                                                                decide if this flag is
                                                                                                redundant - when true it
                                                                                                would suggest that the
                                                                                                annotationElement values
                                                                                                together form a graph
                                                                                                </xs:documentation>
-                                                                                                                                       </xs:annotation>
-                                                                                                                               </xs:attribute>
-                                                                                                                       </xs:extension>
-                                                                                                               </xs:complexContent>
-                                                                                                               <!--                                                            
+                                                                                               </xs:annotation>
+                                                                                               </xs:attribute>
+                                                                                               </xs:extension>
+                                                                                               </xs:complexContent>
+                                                                                               <!--                                                            
                                                                                                                        This replaces the flat list of sequenceFeatures.
                                                                                                                        <xs:element name="AlignmentFeatures" minOccurs="0" maxOccurs="unbounded"><xs:complexType><xs:annotation>
                                                                                                                        <xs:documentation>Annotate over positions and regions of the alignment</xs:documentation>
                                                                                                                        </xs:attribute>
                                                                                                                        </xs:extension>
                                                                                                                        </xs:complexContent></xs:complexType></xs:element> -->
-                                                                                                       </xs:complexType>
+                                                                                               </xs:complexType>
                                                                                                </xs:element>
                                                                                        </xs:sequence>
                                                                                        <xs:attribute name="id" type="xs:ID" use="optional">
                                                                                                <xs:annotation>
-                                                                                                       <xs:documentation> Primary Key for vamsas object
+                                                                                               <xs:documentation> Primary Key for vamsas object
                                                                                                referencing </xs:documentation>
                                                                                                </xs:annotation>
                                                                                        </xs:attribute>
-                                                                                       <xs:attribute name="refid" type="xs:IDREF" use="required">
+                                                                                       <xs:attribute name="refid" type="xs:IDREF"
+                                                                                               use="required">
                                                                                                <xs:annotation>
-                                                                                                       <xs:documentation> Dataset Sequence from which
+                                                                                               <xs:documentation> Dataset Sequence from which
                                                                                                this alignment sequence is taken from
                                                                                                </xs:documentation>
                                                                                                </xs:annotation>
                                        <xs:complexType>
                                                <xs:simpleContent>
                                                        <xs:extension base="xs:string">
-                                                               <xs:attribute name="dict" type="xs:string" use="optional" default="utf8">
+                                                               <xs:attribute name="dict" type="xs:string" use="optional"
+                                                                       default="utf8">
                                                                        <xs:annotation>
                                                                                <xs:documentation> specifies the symbol dictionary for this
                                                                                        glyph - eg utf8 (the default), aasecstr_3 or
                                                                                        <xs:documentation> Data available to just a particular
                                                                                                user </xs:documentation>
                                                                                </xs:annotation>
-                                                                               <xs:attribute name="fullname" type="xs:string" use="required"/>
-                                                                               <xs:attribute name="organization" type="xs:string" use="required"/>
+                                                                               <xs:attribute name="fullname" type="xs:string"
+                                                                                       use="required"/>
+                                                                               <xs:attribute name="organization" type="xs:string"
+                                                                                       use="required"/>
                                                                        </xs:extension>
                                                                </xs:complexContent>
                                                        </xs:complexType>
                        <xs:element name="dataReference" type="xs:string"/>
                </xs:choice>
        </xs:complexType>
-       <xs:complexType name="mapList">
-               <xs:attribute name="from" type="xs:integer" use="optional" default="0">
-                       <xs:annotation>
-                               <xs:documentation> Offset to first position in dataset sequence record that start
-                                       position on 'onto' maps to </xs:documentation>
-                       </xs:annotation>
-               </xs:attribute>
-               <xs:attribute name="to" type="xs:integer" use="optional" default="0">
-                       <xs:annotation>
-                               <xs:documentation> Offset to last position in dataset sequence record that end
-                                       position on 'onto' maps to </xs:documentation>
-                       </xs:annotation>
-               </xs:attribute>
-               <xs:attribute name="start" type="xs:integer" use="required">
-                       <xs:annotation>
-                               <xs:documentation> Offset to first position in database entry that first (or offset)
-                                       position in sequence maps to </xs:documentation>
-                       </xs:annotation>
-               </xs:attribute>
-               <xs:attribute name="end" type="xs:integer" use="required">
-                       <xs:annotation>
-                               <xs:documentation> Offset to last position in database entry that last (offset)
-                                       position in sequence maps to </xs:documentation>
-                       </xs:annotation>
-               </xs:attribute>
+       <xs:complexType name="mapType">
+               <xs:annotation>
+                       <xs:documentation> Two sets of ranges defined between objects - usually sequences, indicating which
+                               regions on each are mapped. </xs:documentation>
+               </xs:annotation>
+               <xs:sequence>
+                       <xs:element name="local" type="vamsas:mapRangeType">
+                               <xs:annotation>
+                                       <xs:documentation>
+                                               
+                                       </xs:documentation>
+                               </xs:annotation>
+                       </xs:element>
+                       <xs:element name="mapped" type="vamsas:mapRangeType">
+                               <xs:annotation>
+                                       <xs:documentation>
+                                               
+                                       </xs:documentation>
+                               </xs:annotation>
+                       </xs:element>
+               </xs:sequence>
+               </xs:complexType>
+       
+       <xs:complexType name="mapRangeType">
+               <xs:complexContent>
+                       <xs:extension base="vamsas:rangeType">
+                               <xs:attribute name="unit" type="xs:positiveInteger" use="optional">
+                                       <xs:annotation>
+                                               <xs:documentation> number of dictionary symbol widths involved in each
+                                                       mapped position on this sequence (for example, 3 for a dna sequence exon
+                                                       region that is being mapped to a protein sequence). This is optional,
+                                                       since the unit can be usually be inferred from the dictionary type of
+                                                       each sequence involved in the mapping. </xs:documentation>
+                                       </xs:annotation>
+                               </xs:attribute>
+                       </xs:extension>
+               </xs:complexContent>    
        </xs:complexType>
+
        <xs:simpleType name="locks">
                <xs:annotation>
-                       <xs:documentation>
-                               Contains lock information:
-                               locktype:ApplicationHandle
-                               locktype is 'local' or 'full'
-                               A lock is only valid if the ApplicationHandle resolves to a living application in the vamsas session.
-                               A local lock means that the application has locked changes to all local properties on the object.
-                               A full lock means that the application has locked changes to all properties on the object, and any objects that it holds references to.
-                       </xs:documentation>
+                       <xs:documentation> Contains lock information: locktype:ApplicationHandle locktype is
+                               'local' or 'full' A lock is only valid if the ApplicationHandle resolves to a living
+                               application in the vamsas session. A local lock means that the application has
+                               locked changes to all local properties on the object. A full lock means that the
+                               application has locked changes to all properties on the object, and any objects that
+                               it holds references to. </xs:documentation>
                </xs:annotation>
                <xs:restriction base="xs:string"/>
        </xs:simpleType>
index b5a7168..fdcb297 100644 (file)
@@ -40,7 +40,7 @@ public class EmptyDocumentUpdater implements IDocumentUpdater
        \r
        public void update(Map vobj) {}\r
        \r
-       public void update(MapList vobj) {}\r
+       // TODO: replace with mapRangeType handler public void update(MapList vobj) {}\r
        \r
        public void update(SequenceMapping vobj) {}\r
        \r
index 579e4b5..bb8e2ae 100644 (file)
@@ -40,7 +40,7 @@ public interface IDocumentUpdater
        \r
        public void update(Map vobj);\r
        \r
-       public void update(MapList vobj);\r
+  // TODO: replace with mapRangeType handler public void update(MapList vobj) {}\r
        \r
        public void update(SequenceMapping vobj);\r
        \r
index e9fc12e..6847de4 100644 (file)
@@ -1,4 +1,4 @@
-#Tue May 22 14:53:59 BST 2007\r
+#Thu Jun 21 15:41:21 BST 2007\r
 uk.ac.vamsas.objects.core.Vref=uk.ac.vamsas.objects.core.descriptors.VrefDescriptor\r
 uk.ac.vamsas.objects.core.ReferenceType=uk.ac.vamsas.objects.core.descriptors.ReferenceTypeDescriptor\r
 uk.ac.vamsas.objects.core.SequenceType=uk.ac.vamsas.objects.core.descriptors.SequenceTypeDescriptor\r
@@ -6,6 +6,7 @@ uk.ac.vamsas.objects.core.DbRef=uk.ac.vamsas.objects.core.descriptors.DbRefDescr
 uk.ac.vamsas.objects.core.Tree=uk.ac.vamsas.objects.core.descriptors.TreeDescriptor\r
 uk.ac.vamsas.objects.core.VAMSAS=uk.ac.vamsas.objects.core.descriptors.VAMSASDescriptor\r
 uk.ac.vamsas.objects.core.Mapping=uk.ac.vamsas.objects.core.descriptors.MappingDescriptor\r
+uk.ac.vamsas.objects.core.MapType=uk.ac.vamsas.objects.core.descriptors.MapTypeDescriptor\r
 uk.ac.vamsas.objects.core.Treenode=uk.ac.vamsas.objects.core.descriptors.TreenodeDescriptor\r
 uk.ac.vamsas.objects.core.Glyph=uk.ac.vamsas.objects.core.descriptors.GlyphDescriptor\r
 uk.ac.vamsas.objects.core.DataSet=uk.ac.vamsas.objects.core.descriptors.DataSetDescriptor\r
@@ -16,6 +17,7 @@ uk.ac.vamsas.objects.core.User=uk.ac.vamsas.objects.core.descriptors.UserDescrip
 uk.ac.vamsas.objects.core.Provenance=uk.ac.vamsas.objects.core.descriptors.ProvenanceDescriptor\r
 uk.ac.vamsas.objects.core.RangeType=uk.ac.vamsas.objects.core.descriptors.RangeTypeDescriptor\r
 uk.ac.vamsas.objects.core.Vxref=uk.ac.vamsas.objects.core.descriptors.VxrefDescriptor\r
+uk.ac.vamsas.objects.core.Local=uk.ac.vamsas.objects.core.descriptors.LocalDescriptor\r
 uk.ac.vamsas.objects.core.NodeType=uk.ac.vamsas.objects.core.descriptors.NodeTypeDescriptor\r
 uk.ac.vamsas.objects.core.SequenceMapping=uk.ac.vamsas.objects.core.descriptors.SequenceMappingDescriptor\r
 uk.ac.vamsas.objects.core.Newick=uk.ac.vamsas.objects.core.descriptors.NewickDescriptor\r
@@ -31,6 +33,7 @@ uk.ac.vamsas.objects.core.MapList=uk.ac.vamsas.objects.core.descriptors.MapListD
 uk.ac.vamsas.objects.core.Sequence=uk.ac.vamsas.objects.core.descriptors.SequenceDescriptor\r
 uk.ac.vamsas.objects.core.Pos=uk.ac.vamsas.objects.core.descriptors.PosDescriptor\r
 uk.ac.vamsas.objects.core.Alignment=uk.ac.vamsas.objects.core.descriptors.AlignmentDescriptor\r
+uk.ac.vamsas.objects.core.MapRangeType=uk.ac.vamsas.objects.core.descriptors.MapRangeTypeDescriptor\r
 uk.ac.vamsas.objects.core.Seg=uk.ac.vamsas.objects.core.descriptors.SegDescriptor\r
 uk.ac.vamsas.objects.core.Docxrefs=uk.ac.vamsas.objects.core.descriptors.DocxrefsDescriptor\r
 uk.ac.vamsas.objects.core.AlignmentSequenceAnnotation=uk.ac.vamsas.objects.core.descriptors.AlignmentSequenceAnnotationDescriptor\r
@@ -39,6 +42,7 @@ uk.ac.vamsas.objects.core.DataSetAnnotations=uk.ac.vamsas.objects.core.descripto
 uk.ac.vamsas.objects.core.Score=uk.ac.vamsas.objects.core.descriptors.ScoreDescriptor\r
 uk.ac.vamsas.objects.core.VamsasDocument=uk.ac.vamsas.objects.core.descriptors.VamsasDocumentDescriptor\r
 --=listing properties --\r
+uk.ac.vamsas.objects.core.Mapped=uk.ac.vamsas.objects.core.descriptors.MappedDescriptor\r
 uk.ac.vamsas.objects.core.AppData=uk.ac.vamsas.objects.core.descriptors.AppDataDescriptor\r
 uk.ac.vamsas.objects.core.Param=uk.ac.vamsas.objects.core.descriptors.ParamDescriptor\r
 uk.ac.vamsas.objects.core.AlignmentSequence=uk.ac.vamsas.objects.core.descriptors.AlignmentSequenceDescriptor\r
index 277be27..ffafc47 100644 (file)
@@ -280,12 +280,29 @@ implements java.io.Serializable
         if (obj instanceof Alignment) {
         
             Alignment temp = (Alignment)obj;
+            boolean thcycle;
+            boolean tmcycle;
             if (this._gapChar != null) {
                 if (temp._gapChar == null) return false;
-                else if (!(this._gapChar.equals(temp._gapChar))) 
-                    return false;
-            }
-            else if (temp._gapChar != null)
+                if (this._gapChar != temp._gapChar) {
+                    thcycle=org.castor.util.CycleBreaker.startingToCycle(this._gapChar);
+                    tmcycle=org.castor.util.CycleBreaker.startingToCycle(temp._gapChar);
+                    if (thcycle!=tmcycle) {
+                        if (!thcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(this._gapChar); };
+                        if (!tmcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(temp._gapChar); };
+                        return false;
+                    }
+                    if (!thcycle) {
+                        if (!this._gapChar.equals(temp._gapChar)) {
+                            org.castor.util.CycleBreaker.releaseCycleHandle(this._gapChar);
+                            org.castor.util.CycleBreaker.releaseCycleHandle(temp._gapChar);
+                            return false;
+                        }
+                        org.castor.util.CycleBreaker.releaseCycleHandle(this._gapChar);
+                        org.castor.util.CycleBreaker.releaseCycleHandle(temp._gapChar);
+                    }
+                }
+            } else if (temp._gapChar != null)
                 return false;
             if (this._aligned != temp._aligned)
                 return false;
@@ -293,52 +310,157 @@ implements java.io.Serializable
                 return false;
             if (this._id != null) {
                 if (temp._id == null) return false;
-                else if (!(this._id.equals(temp._id))) 
-                    return false;
-            }
-            else if (temp._id != null)
+                if (this._id != temp._id) {
+                    thcycle=org.castor.util.CycleBreaker.startingToCycle(this._id);
+                    tmcycle=org.castor.util.CycleBreaker.startingToCycle(temp._id);
+                    if (thcycle!=tmcycle) {
+                        if (!thcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(this._id); };
+                        if (!tmcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(temp._id); };
+                        return false;
+                    }
+                    if (!thcycle) {
+                        if (!this._id.equals(temp._id)) {
+                            org.castor.util.CycleBreaker.releaseCycleHandle(this._id);
+                            org.castor.util.CycleBreaker.releaseCycleHandle(temp._id);
+                            return false;
+                        }
+                        org.castor.util.CycleBreaker.releaseCycleHandle(this._id);
+                        org.castor.util.CycleBreaker.releaseCycleHandle(temp._id);
+                    }
+                }
+            } else if (temp._id != null)
                 return false;
             if (this._modifiable != null) {
                 if (temp._modifiable == null) return false;
-                else if (!(this._modifiable.equals(temp._modifiable))) 
-                    return false;
-            }
-            else if (temp._modifiable != null)
+                if (this._modifiable != temp._modifiable) {
+                    thcycle=org.castor.util.CycleBreaker.startingToCycle(this._modifiable);
+                    tmcycle=org.castor.util.CycleBreaker.startingToCycle(temp._modifiable);
+                    if (thcycle!=tmcycle) {
+                        if (!thcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(this._modifiable); };
+                        if (!tmcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(temp._modifiable); };
+                        return false;
+                    }
+                    if (!thcycle) {
+                        if (!this._modifiable.equals(temp._modifiable)) {
+                            org.castor.util.CycleBreaker.releaseCycleHandle(this._modifiable);
+                            org.castor.util.CycleBreaker.releaseCycleHandle(temp._modifiable);
+                            return false;
+                        }
+                        org.castor.util.CycleBreaker.releaseCycleHandle(this._modifiable);
+                        org.castor.util.CycleBreaker.releaseCycleHandle(temp._modifiable);
+                    }
+                }
+            } else if (temp._modifiable != null)
                 return false;
             if (this._alignmentAnnotationList != null) {
                 if (temp._alignmentAnnotationList == null) return false;
-                else if (!(this._alignmentAnnotationList.equals(temp._alignmentAnnotationList))) 
-                    return false;
-            }
-            else if (temp._alignmentAnnotationList != null)
+                if (this._alignmentAnnotationList != temp._alignmentAnnotationList) {
+                    thcycle=org.castor.util.CycleBreaker.startingToCycle(this._alignmentAnnotationList);
+                    tmcycle=org.castor.util.CycleBreaker.startingToCycle(temp._alignmentAnnotationList);
+                    if (thcycle!=tmcycle) {
+                        if (!thcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(this._alignmentAnnotationList); };
+                        if (!tmcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(temp._alignmentAnnotationList); };
+                        return false;
+                    }
+                    if (!thcycle) {
+                        if (!this._alignmentAnnotationList.equals(temp._alignmentAnnotationList)) {
+                            org.castor.util.CycleBreaker.releaseCycleHandle(this._alignmentAnnotationList);
+                            org.castor.util.CycleBreaker.releaseCycleHandle(temp._alignmentAnnotationList);
+                            return false;
+                        }
+                        org.castor.util.CycleBreaker.releaseCycleHandle(this._alignmentAnnotationList);
+                        org.castor.util.CycleBreaker.releaseCycleHandle(temp._alignmentAnnotationList);
+                    }
+                }
+            } else if (temp._alignmentAnnotationList != null)
                 return false;
             if (this._treeList != null) {
                 if (temp._treeList == null) return false;
-                else if (!(this._treeList.equals(temp._treeList))) 
-                    return false;
-            }
-            else if (temp._treeList != null)
+                if (this._treeList != temp._treeList) {
+                    thcycle=org.castor.util.CycleBreaker.startingToCycle(this._treeList);
+                    tmcycle=org.castor.util.CycleBreaker.startingToCycle(temp._treeList);
+                    if (thcycle!=tmcycle) {
+                        if (!thcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(this._treeList); };
+                        if (!tmcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(temp._treeList); };
+                        return false;
+                    }
+                    if (!thcycle) {
+                        if (!this._treeList.equals(temp._treeList)) {
+                            org.castor.util.CycleBreaker.releaseCycleHandle(this._treeList);
+                            org.castor.util.CycleBreaker.releaseCycleHandle(temp._treeList);
+                            return false;
+                        }
+                        org.castor.util.CycleBreaker.releaseCycleHandle(this._treeList);
+                        org.castor.util.CycleBreaker.releaseCycleHandle(temp._treeList);
+                    }
+                }
+            } else if (temp._treeList != null)
                 return false;
             if (this._alignmentSequenceList != null) {
                 if (temp._alignmentSequenceList == null) return false;
-                else if (!(this._alignmentSequenceList.equals(temp._alignmentSequenceList))) 
-                    return false;
-            }
-            else if (temp._alignmentSequenceList != null)
+                if (this._alignmentSequenceList != temp._alignmentSequenceList) {
+                    thcycle=org.castor.util.CycleBreaker.startingToCycle(this._alignmentSequenceList);
+                    tmcycle=org.castor.util.CycleBreaker.startingToCycle(temp._alignmentSequenceList);
+                    if (thcycle!=tmcycle) {
+                        if (!thcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(this._alignmentSequenceList); };
+                        if (!tmcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(temp._alignmentSequenceList); };
+                        return false;
+                    }
+                    if (!thcycle) {
+                        if (!this._alignmentSequenceList.equals(temp._alignmentSequenceList)) {
+                            org.castor.util.CycleBreaker.releaseCycleHandle(this._alignmentSequenceList);
+                            org.castor.util.CycleBreaker.releaseCycleHandle(temp._alignmentSequenceList);
+                            return false;
+                        }
+                        org.castor.util.CycleBreaker.releaseCycleHandle(this._alignmentSequenceList);
+                        org.castor.util.CycleBreaker.releaseCycleHandle(temp._alignmentSequenceList);
+                    }
+                }
+            } else if (temp._alignmentSequenceList != null)
                 return false;
             if (this._propertyList != null) {
                 if (temp._propertyList == null) return false;
-                else if (!(this._propertyList.equals(temp._propertyList))) 
-                    return false;
-            }
-            else if (temp._propertyList != null)
+                if (this._propertyList != temp._propertyList) {
+                    thcycle=org.castor.util.CycleBreaker.startingToCycle(this._propertyList);
+                    tmcycle=org.castor.util.CycleBreaker.startingToCycle(temp._propertyList);
+                    if (thcycle!=tmcycle) {
+                        if (!thcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(this._propertyList); };
+                        if (!tmcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(temp._propertyList); };
+                        return false;
+                    }
+                    if (!thcycle) {
+                        if (!this._propertyList.equals(temp._propertyList)) {
+                            org.castor.util.CycleBreaker.releaseCycleHandle(this._propertyList);
+                            org.castor.util.CycleBreaker.releaseCycleHandle(temp._propertyList);
+                            return false;
+                        }
+                        org.castor.util.CycleBreaker.releaseCycleHandle(this._propertyList);
+                        org.castor.util.CycleBreaker.releaseCycleHandle(temp._propertyList);
+                    }
+                }
+            } else if (temp._propertyList != null)
                 return false;
             if (this._provenance != null) {
                 if (temp._provenance == null) return false;
-                else if (!(this._provenance.equals(temp._provenance))) 
-                    return false;
-            }
-            else if (temp._provenance != null)
+                if (this._provenance != temp._provenance) {
+                    thcycle=org.castor.util.CycleBreaker.startingToCycle(this._provenance);
+                    tmcycle=org.castor.util.CycleBreaker.startingToCycle(temp._provenance);
+                    if (thcycle!=tmcycle) {
+                        if (!thcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(this._provenance); };
+                        if (!tmcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(temp._provenance); };
+                        return false;
+                    }
+                    if (!thcycle) {
+                        if (!this._provenance.equals(temp._provenance)) {
+                            org.castor.util.CycleBreaker.releaseCycleHandle(this._provenance);
+                            org.castor.util.CycleBreaker.releaseCycleHandle(temp._provenance);
+                            return false;
+                        }
+                        org.castor.util.CycleBreaker.releaseCycleHandle(this._provenance);
+                        org.castor.util.CycleBreaker.releaseCycleHandle(temp._provenance);
+                    }
+                }
+            } else if (temp._provenance != null)
                 return false;
             return true;
         }
@@ -652,30 +774,46 @@ implements java.io.Serializable
         int result = super.hashCode();
         
         long tmp;
-        if (_gapChar != null) {
+        if (_gapChar != null
+            && !org.castor.util.CycleBreaker.startingToCycle(_gapChar)) {
            result = 37 * result + _gapChar.hashCode();
+           org.castor.util.CycleBreaker.releaseCycleHandle(_gapChar);
         }
         result = 37 * result + (_aligned?0:1);
-        if (_id != null) {
+        if (_id != null
+            && !org.castor.util.CycleBreaker.startingToCycle(_id)) {
            result = 37 * result + _id.hashCode();
+           org.castor.util.CycleBreaker.releaseCycleHandle(_id);
         }
-        if (_modifiable != null) {
+        if (_modifiable != null
+            && !org.castor.util.CycleBreaker.startingToCycle(_modifiable)) {
            result = 37 * result + _modifiable.hashCode();
+           org.castor.util.CycleBreaker.releaseCycleHandle(_modifiable);
         }
-        if (_alignmentAnnotationList != null) {
+        if (_alignmentAnnotationList != null
+            && !org.castor.util.CycleBreaker.startingToCycle(_alignmentAnnotationList)) {
            result = 37 * result + _alignmentAnnotationList.hashCode();
+           org.castor.util.CycleBreaker.releaseCycleHandle(_alignmentAnnotationList);
         }
-        if (_treeList != null) {
+        if (_treeList != null
+            && !org.castor.util.CycleBreaker.startingToCycle(_treeList)) {
            result = 37 * result + _treeList.hashCode();
+           org.castor.util.CycleBreaker.releaseCycleHandle(_treeList);
         }
-        if (_alignmentSequenceList != null) {
+        if (_alignmentSequenceList != null
+            && !org.castor.util.CycleBreaker.startingToCycle(_alignmentSequenceList)) {
            result = 37 * result + _alignmentSequenceList.hashCode();
+           org.castor.util.CycleBreaker.releaseCycleHandle(_alignmentSequenceList);
         }
-        if (_propertyList != null) {
+        if (_propertyList != null
+            && !org.castor.util.CycleBreaker.startingToCycle(_propertyList)) {
            result = 37 * result + _propertyList.hashCode();
+           org.castor.util.CycleBreaker.releaseCycleHandle(_propertyList);
         }
-        if (_provenance != null) {
+        if (_provenance != null
+            && !org.castor.util.CycleBreaker.startingToCycle(_provenance)) {
            result = 37 * result + _provenance.hashCode();
+           org.castor.util.CycleBreaker.releaseCycleHandle(_provenance);
         }
         
         return result;
index 0ffea12..b6c544c 100644 (file)
@@ -44,8 +44,9 @@ implements java.io.Serializable
     private boolean _has_graph;\r
 \r
     /**\r
-     * annotation is associated with a\r
-     *  range on a particular group of alignment sequences\r
+     * annotation is associated with\r
+     *  a range on a particular group of alignment\r
+     *  sequences\r
      */\r
     private java.util.Vector _seqrefs;\r
 \r
@@ -131,23 +132,55 @@ implements java.io.Serializable
         if (obj instanceof AlignmentAnnotation) {\r
         \r
             AlignmentAnnotation temp = (AlignmentAnnotation)obj;\r
+            boolean thcycle;\r
+            boolean tmcycle;\r
             if (this._graph != temp._graph)\r
                 return false;\r
             if (this._has_graph != temp._has_graph)\r
                 return false;\r
             if (this._seqrefs != null) {\r
                 if (temp._seqrefs == null) return false;\r
-                else if (!(this._seqrefs.equals(temp._seqrefs))) \r
-                    return false;\r
-            }\r
-            else if (temp._seqrefs != null)\r
+                if (this._seqrefs != temp._seqrefs) {\r
+                    thcycle=org.castor.util.CycleBreaker.startingToCycle(this._seqrefs);\r
+                    tmcycle=org.castor.util.CycleBreaker.startingToCycle(temp._seqrefs);\r
+                    if (thcycle!=tmcycle) {\r
+                        if (!thcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(this._seqrefs); };\r
+                        if (!tmcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(temp._seqrefs); };\r
+                        return false;\r
+                    }\r
+                    if (!thcycle) {\r
+                        if (!this._seqrefs.equals(temp._seqrefs)) {\r
+                            org.castor.util.CycleBreaker.releaseCycleHandle(this._seqrefs);\r
+                            org.castor.util.CycleBreaker.releaseCycleHandle(temp._seqrefs);\r
+                            return false;\r
+                        }\r
+                        org.castor.util.CycleBreaker.releaseCycleHandle(this._seqrefs);\r
+                        org.castor.util.CycleBreaker.releaseCycleHandle(temp._seqrefs);\r
+                    }\r
+                }\r
+            } else if (temp._seqrefs != null)\r
                 return false;\r
             if (this._provenance != null) {\r
                 if (temp._provenance == null) return false;\r
-                else if (!(this._provenance.equals(temp._provenance))) \r
-                    return false;\r
-            }\r
-            else if (temp._provenance != null)\r
+                if (this._provenance != temp._provenance) {\r
+                    thcycle=org.castor.util.CycleBreaker.startingToCycle(this._provenance);\r
+                    tmcycle=org.castor.util.CycleBreaker.startingToCycle(temp._provenance);\r
+                    if (thcycle!=tmcycle) {\r
+                        if (!thcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(this._provenance); };\r
+                        if (!tmcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(temp._provenance); };\r
+                        return false;\r
+                    }\r
+                    if (!thcycle) {\r
+                        if (!this._provenance.equals(temp._provenance)) {\r
+                            org.castor.util.CycleBreaker.releaseCycleHandle(this._provenance);\r
+                            org.castor.util.CycleBreaker.releaseCycleHandle(temp._provenance);\r
+                            return false;\r
+                        }\r
+                        org.castor.util.CycleBreaker.releaseCycleHandle(this._provenance);\r
+                        org.castor.util.CycleBreaker.releaseCycleHandle(temp._provenance);\r
+                    }\r
+                }\r
+            } else if (temp._provenance != null)\r
                 return false;\r
             return true;\r
         }\r
@@ -258,11 +291,15 @@ implements java.io.Serializable
         \r
         long tmp;\r
         result = 37 * result + (_graph?0:1);\r
-        if (_seqrefs != null) {\r
+        if (_seqrefs != null\r
+            && !org.castor.util.CycleBreaker.startingToCycle(_seqrefs)) {\r
            result = 37 * result + _seqrefs.hashCode();\r
+           org.castor.util.CycleBreaker.releaseCycleHandle(_seqrefs);\r
         }\r
-        if (_provenance != null) {\r
+        if (_provenance != null\r
+            && !org.castor.util.CycleBreaker.startingToCycle(_provenance)) {\r
            result = 37 * result + _provenance.hashCode();\r
+           org.castor.util.CycleBreaker.releaseCycleHandle(_provenance);\r
         }\r
         \r
         return result;\r
index a476961..8192795 100644 (file)
@@ -117,26 +117,73 @@ implements java.io.Serializable
         if (obj instanceof AlignmentSequence) {
         
             AlignmentSequence temp = (AlignmentSequence)obj;
+            boolean thcycle;
+            boolean tmcycle;
             if (this._id != null) {
                 if (temp._id == null) return false;
-                else if (!(this._id.equals(temp._id))) 
-                    return false;
-            }
-            else if (temp._id != null)
+                if (this._id != temp._id) {
+                    thcycle=org.castor.util.CycleBreaker.startingToCycle(this._id);
+                    tmcycle=org.castor.util.CycleBreaker.startingToCycle(temp._id);
+                    if (thcycle!=tmcycle) {
+                        if (!thcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(this._id); };
+                        if (!tmcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(temp._id); };
+                        return false;
+                    }
+                    if (!thcycle) {
+                        if (!this._id.equals(temp._id)) {
+                            org.castor.util.CycleBreaker.releaseCycleHandle(this._id);
+                            org.castor.util.CycleBreaker.releaseCycleHandle(temp._id);
+                            return false;
+                        }
+                        org.castor.util.CycleBreaker.releaseCycleHandle(this._id);
+                        org.castor.util.CycleBreaker.releaseCycleHandle(temp._id);
+                    }
+                }
+            } else if (temp._id != null)
                 return false;
             if (this._refid != null) {
                 if (temp._refid == null) return false;
-                else if (!(this._refid.equals(temp._refid))) 
-                    return false;
-            }
-            else if (temp._refid != null)
+                if (this._refid != temp._refid) {
+                    thcycle=org.castor.util.CycleBreaker.startingToCycle(this._refid);
+                    tmcycle=org.castor.util.CycleBreaker.startingToCycle(temp._refid);
+                    if (thcycle!=tmcycle) {
+                        if (!thcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(this._refid); };
+                        if (!tmcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(temp._refid); };
+                        return false;
+                    }
+                    if (!thcycle) {
+                        if (!this._refid.equals(temp._refid)) {
+                            org.castor.util.CycleBreaker.releaseCycleHandle(this._refid);
+                            org.castor.util.CycleBreaker.releaseCycleHandle(temp._refid);
+                            return false;
+                        }
+                        org.castor.util.CycleBreaker.releaseCycleHandle(this._refid);
+                        org.castor.util.CycleBreaker.releaseCycleHandle(temp._refid);
+                    }
+                }
+            } else if (temp._refid != null)
                 return false;
             if (this._alignmentSequenceAnnotationList != null) {
                 if (temp._alignmentSequenceAnnotationList == null) return false;
-                else if (!(this._alignmentSequenceAnnotationList.equals(temp._alignmentSequenceAnnotationList))) 
-                    return false;
-            }
-            else if (temp._alignmentSequenceAnnotationList != null)
+                if (this._alignmentSequenceAnnotationList != temp._alignmentSequenceAnnotationList) {
+                    thcycle=org.castor.util.CycleBreaker.startingToCycle(this._alignmentSequenceAnnotationList);
+                    tmcycle=org.castor.util.CycleBreaker.startingToCycle(temp._alignmentSequenceAnnotationList);
+                    if (thcycle!=tmcycle) {
+                        if (!thcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(this._alignmentSequenceAnnotationList); };
+                        if (!tmcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(temp._alignmentSequenceAnnotationList); };
+                        return false;
+                    }
+                    if (!thcycle) {
+                        if (!this._alignmentSequenceAnnotationList.equals(temp._alignmentSequenceAnnotationList)) {
+                            org.castor.util.CycleBreaker.releaseCycleHandle(this._alignmentSequenceAnnotationList);
+                            org.castor.util.CycleBreaker.releaseCycleHandle(temp._alignmentSequenceAnnotationList);
+                            return false;
+                        }
+                        org.castor.util.CycleBreaker.releaseCycleHandle(this._alignmentSequenceAnnotationList);
+                        org.castor.util.CycleBreaker.releaseCycleHandle(temp._alignmentSequenceAnnotationList);
+                    }
+                }
+            } else if (temp._alignmentSequenceAnnotationList != null)
                 return false;
             return true;
         }
@@ -240,14 +287,20 @@ implements java.io.Serializable
         int result = super.hashCode();
         
         long tmp;
-        if (_id != null) {
+        if (_id != null
+            && !org.castor.util.CycleBreaker.startingToCycle(_id)) {
            result = 37 * result + _id.hashCode();
+           org.castor.util.CycleBreaker.releaseCycleHandle(_id);
         }
-        if (_refid != null) {
+        if (_refid != null
+            && !org.castor.util.CycleBreaker.startingToCycle(_refid)) {
            result = 37 * result + _refid.hashCode();
+           org.castor.util.CycleBreaker.releaseCycleHandle(_refid);
         }
-        if (_alignmentSequenceAnnotationList != null) {
+        if (_alignmentSequenceAnnotationList != null
+            && !org.castor.util.CycleBreaker.startingToCycle(_alignmentSequenceAnnotationList)) {
            result = 37 * result + _alignmentSequenceAnnotationList.hashCode();
+           org.castor.util.CycleBreaker.releaseCycleHandle(_alignmentSequenceAnnotationList);
         }
         
         return result;
index 64417fe..7494819 100644 (file)
@@ -87,16 +87,33 @@ implements java.io.Serializable
         if (obj instanceof AlignmentSequenceAnnotation) {\r
         \r
             AlignmentSequenceAnnotation temp = (AlignmentSequenceAnnotation)obj;\r
+            boolean thcycle;\r
+            boolean tmcycle;\r
             if (this._graph != temp._graph)\r
                 return false;\r
             if (this._has_graph != temp._has_graph)\r
                 return false;\r
             if (this._provenance != null) {\r
                 if (temp._provenance == null) return false;\r
-                else if (!(this._provenance.equals(temp._provenance))) \r
-                    return false;\r
-            }\r
-            else if (temp._provenance != null)\r
+                if (this._provenance != temp._provenance) {\r
+                    thcycle=org.castor.util.CycleBreaker.startingToCycle(this._provenance);\r
+                    tmcycle=org.castor.util.CycleBreaker.startingToCycle(temp._provenance);\r
+                    if (thcycle!=tmcycle) {\r
+                        if (!thcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(this._provenance); };\r
+                        if (!tmcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(temp._provenance); };\r
+                        return false;\r
+                    }\r
+                    if (!thcycle) {\r
+                        if (!this._provenance.equals(temp._provenance)) {\r
+                            org.castor.util.CycleBreaker.releaseCycleHandle(this._provenance);\r
+                            org.castor.util.CycleBreaker.releaseCycleHandle(temp._provenance);\r
+                            return false;\r
+                        }\r
+                        org.castor.util.CycleBreaker.releaseCycleHandle(this._provenance);\r
+                        org.castor.util.CycleBreaker.releaseCycleHandle(temp._provenance);\r
+                    }\r
+                }\r
+            } else if (temp._provenance != null)\r
                 return false;\r
             return true;\r
         }\r
@@ -154,8 +171,10 @@ implements java.io.Serializable
         \r
         long tmp;\r
         result = 37 * result + (_graph?0:1);\r
-        if (_provenance != null) {\r
+        if (_provenance != null\r
+            && !org.castor.util.CycleBreaker.startingToCycle(_provenance)) {\r
            result = 37 * result + _provenance.hashCode();\r
+           org.castor.util.CycleBreaker.releaseCycleHandle(_provenance);\r
         }\r
         \r
         return result;\r
index a53f1ee..05aec77 100644 (file)
@@ -201,6 +201,8 @@ implements java.io.Serializable
         if (obj instanceof AnnotationElement) {
         
             AnnotationElement temp = (AnnotationElement)obj;
+            boolean thcycle;
+            boolean tmcycle;
             if (this._position != temp._position)
                 return false;
             if (this._has_position != temp._has_position)
@@ -211,31 +213,91 @@ implements java.io.Serializable
                 return false;
             if (this._id != null) {
                 if (temp._id == null) return false;
-                else if (!(this._id.equals(temp._id))) 
-                    return false;
-            }
-            else if (temp._id != null)
+                if (this._id != temp._id) {
+                    thcycle=org.castor.util.CycleBreaker.startingToCycle(this._id);
+                    tmcycle=org.castor.util.CycleBreaker.startingToCycle(temp._id);
+                    if (thcycle!=tmcycle) {
+                        if (!thcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(this._id); };
+                        if (!tmcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(temp._id); };
+                        return false;
+                    }
+                    if (!thcycle) {
+                        if (!this._id.equals(temp._id)) {
+                            org.castor.util.CycleBreaker.releaseCycleHandle(this._id);
+                            org.castor.util.CycleBreaker.releaseCycleHandle(temp._id);
+                            return false;
+                        }
+                        org.castor.util.CycleBreaker.releaseCycleHandle(this._id);
+                        org.castor.util.CycleBreaker.releaseCycleHandle(temp._id);
+                    }
+                }
+            } else if (temp._id != null)
                 return false;
             if (this._description != null) {
                 if (temp._description == null) return false;
-                else if (!(this._description.equals(temp._description))) 
-                    return false;
-            }
-            else if (temp._description != null)
+                if (this._description != temp._description) {
+                    thcycle=org.castor.util.CycleBreaker.startingToCycle(this._description);
+                    tmcycle=org.castor.util.CycleBreaker.startingToCycle(temp._description);
+                    if (thcycle!=tmcycle) {
+                        if (!thcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(this._description); };
+                        if (!tmcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(temp._description); };
+                        return false;
+                    }
+                    if (!thcycle) {
+                        if (!this._description.equals(temp._description)) {
+                            org.castor.util.CycleBreaker.releaseCycleHandle(this._description);
+                            org.castor.util.CycleBreaker.releaseCycleHandle(temp._description);
+                            return false;
+                        }
+                        org.castor.util.CycleBreaker.releaseCycleHandle(this._description);
+                        org.castor.util.CycleBreaker.releaseCycleHandle(temp._description);
+                    }
+                }
+            } else if (temp._description != null)
                 return false;
             if (this._glyphList != null) {
                 if (temp._glyphList == null) return false;
-                else if (!(this._glyphList.equals(temp._glyphList))) 
-                    return false;
-            }
-            else if (temp._glyphList != null)
+                if (this._glyphList != temp._glyphList) {
+                    thcycle=org.castor.util.CycleBreaker.startingToCycle(this._glyphList);
+                    tmcycle=org.castor.util.CycleBreaker.startingToCycle(temp._glyphList);
+                    if (thcycle!=tmcycle) {
+                        if (!thcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(this._glyphList); };
+                        if (!tmcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(temp._glyphList); };
+                        return false;
+                    }
+                    if (!thcycle) {
+                        if (!this._glyphList.equals(temp._glyphList)) {
+                            org.castor.util.CycleBreaker.releaseCycleHandle(this._glyphList);
+                            org.castor.util.CycleBreaker.releaseCycleHandle(temp._glyphList);
+                            return false;
+                        }
+                        org.castor.util.CycleBreaker.releaseCycleHandle(this._glyphList);
+                        org.castor.util.CycleBreaker.releaseCycleHandle(temp._glyphList);
+                    }
+                }
+            } else if (temp._glyphList != null)
                 return false;
             if (this._valueList != null) {
                 if (temp._valueList == null) return false;
-                else if (!(this._valueList.equals(temp._valueList))) 
-                    return false;
-            }
-            else if (temp._valueList != null)
+                if (this._valueList != temp._valueList) {
+                    thcycle=org.castor.util.CycleBreaker.startingToCycle(this._valueList);
+                    tmcycle=org.castor.util.CycleBreaker.startingToCycle(temp._valueList);
+                    if (thcycle!=tmcycle) {
+                        if (!thcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(this._valueList); };
+                        if (!tmcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(temp._valueList); };
+                        return false;
+                    }
+                    if (!thcycle) {
+                        if (!this._valueList.equals(temp._valueList)) {
+                            org.castor.util.CycleBreaker.releaseCycleHandle(this._valueList);
+                            org.castor.util.CycleBreaker.releaseCycleHandle(temp._valueList);
+                            return false;
+                        }
+                        org.castor.util.CycleBreaker.releaseCycleHandle(this._valueList);
+                        org.castor.util.CycleBreaker.releaseCycleHandle(temp._valueList);
+                    }
+                }
+            } else if (temp._valueList != null)
                 return false;
             return true;
         }
@@ -442,17 +504,25 @@ implements java.io.Serializable
         long tmp;
         result = 37 * result + (int)(_position^(_position>>>32));
         result = 37 * result + (_after?0:1);
-        if (_id != null) {
+        if (_id != null
+            && !org.castor.util.CycleBreaker.startingToCycle(_id)) {
            result = 37 * result + _id.hashCode();
+           org.castor.util.CycleBreaker.releaseCycleHandle(_id);
         }
-        if (_description != null) {
+        if (_description != null
+            && !org.castor.util.CycleBreaker.startingToCycle(_description)) {
            result = 37 * result + _description.hashCode();
+           org.castor.util.CycleBreaker.releaseCycleHandle(_description);
         }
-        if (_glyphList != null) {
+        if (_glyphList != null
+            && !org.castor.util.CycleBreaker.startingToCycle(_glyphList)) {
            result = 37 * result + _glyphList.hashCode();
+           org.castor.util.CycleBreaker.releaseCycleHandle(_glyphList);
         }
-        if (_valueList != null) {
+        if (_valueList != null
+            && !org.castor.util.CycleBreaker.startingToCycle(_valueList)) {
            result = 37 * result + _valueList.hashCode();
+           org.castor.util.CycleBreaker.releaseCycleHandle(_valueList);
         }
         
         return result;
index 90235c3..d54bca7 100644 (file)
@@ -74,26 +74,73 @@ implements java.io.Serializable
         if (obj instanceof AppData) {\r
         \r
             AppData temp = (AppData)obj;\r
+            boolean thcycle;\r
+            boolean tmcycle;\r
             if (this._choiceValue != null) {\r
                 if (temp._choiceValue == null) return false;\r
-                else if (!(this._choiceValue.equals(temp._choiceValue))) \r
-                    return false;\r
-            }\r
-            else if (temp._choiceValue != null)\r
+                if (this._choiceValue != temp._choiceValue) {\r
+                    thcycle=org.castor.util.CycleBreaker.startingToCycle(this._choiceValue);\r
+                    tmcycle=org.castor.util.CycleBreaker.startingToCycle(temp._choiceValue);\r
+                    if (thcycle!=tmcycle) {\r
+                        if (!thcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(this._choiceValue); };\r
+                        if (!tmcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(temp._choiceValue); };\r
+                        return false;\r
+                    }\r
+                    if (!thcycle) {\r
+                        if (!this._choiceValue.equals(temp._choiceValue)) {\r
+                            org.castor.util.CycleBreaker.releaseCycleHandle(this._choiceValue);\r
+                            org.castor.util.CycleBreaker.releaseCycleHandle(temp._choiceValue);\r
+                            return false;\r
+                        }\r
+                        org.castor.util.CycleBreaker.releaseCycleHandle(this._choiceValue);\r
+                        org.castor.util.CycleBreaker.releaseCycleHandle(temp._choiceValue);\r
+                    }\r
+                }\r
+            } else if (temp._choiceValue != null)\r
                 return false;\r
             if (this._data != null) {\r
                 if (temp._data == null) return false;\r
-                else if (!(java.util.Arrays.equals(this._data, temp._data))) \r
-                    return false;\r
-            }\r
-            else if (temp._data != null)\r
+                if (this._data != temp._data) {\r
+                    thcycle=org.castor.util.CycleBreaker.startingToCycle(this._data);\r
+                    tmcycle=org.castor.util.CycleBreaker.startingToCycle(temp._data);\r
+                    if (thcycle!=tmcycle) {\r
+                        if (!thcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(this._data); };\r
+                        if (!tmcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(temp._data); };\r
+                        return false;\r
+                    }\r
+                    if (!thcycle) {\r
+                        if (!java.util.Arrays.equals(this._data, temp._data)) {\r
+                            org.castor.util.CycleBreaker.releaseCycleHandle(this._data);\r
+                            org.castor.util.CycleBreaker.releaseCycleHandle(temp._data);\r
+                            return false;\r
+                        }\r
+                        org.castor.util.CycleBreaker.releaseCycleHandle(this._data);\r
+                        org.castor.util.CycleBreaker.releaseCycleHandle(temp._data);\r
+                    }\r
+                }\r
+            } else if (temp._data != null)\r
                 return false;\r
             if (this._dataReference != null) {\r
                 if (temp._dataReference == null) return false;\r
-                else if (!(this._dataReference.equals(temp._dataReference))) \r
-                    return false;\r
-            }\r
-            else if (temp._dataReference != null)\r
+                if (this._dataReference != temp._dataReference) {\r
+                    thcycle=org.castor.util.CycleBreaker.startingToCycle(this._dataReference);\r
+                    tmcycle=org.castor.util.CycleBreaker.startingToCycle(temp._dataReference);\r
+                    if (thcycle!=tmcycle) {\r
+                        if (!thcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(this._dataReference); };\r
+                        if (!tmcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(temp._dataReference); };\r
+                        return false;\r
+                    }\r
+                    if (!thcycle) {\r
+                        if (!this._dataReference.equals(temp._dataReference)) {\r
+                            org.castor.util.CycleBreaker.releaseCycleHandle(this._dataReference);\r
+                            org.castor.util.CycleBreaker.releaseCycleHandle(temp._dataReference);\r
+                            return false;\r
+                        }\r
+                        org.castor.util.CycleBreaker.releaseCycleHandle(this._dataReference);\r
+                        org.castor.util.CycleBreaker.releaseCycleHandle(temp._dataReference);\r
+                    }\r
+                }\r
+            } else if (temp._dataReference != null)\r
                 return false;\r
             return true;\r
         }\r
@@ -145,14 +192,20 @@ implements java.io.Serializable
         int result = super.hashCode();\r
         \r
         long tmp;\r
-        if (_choiceValue != null) {\r
+        if (_choiceValue != null\r
+            && !org.castor.util.CycleBreaker.startingToCycle(_choiceValue)) {\r
            result = 37 * result + _choiceValue.hashCode();\r
+           org.castor.util.CycleBreaker.releaseCycleHandle(_choiceValue);\r
         }\r
-        if (_data != null) {\r
+        if (_data != null\r
+            && !org.castor.util.CycleBreaker.startingToCycle(_data)) {\r
            result = 37 * result + _data.hashCode();\r
+           org.castor.util.CycleBreaker.releaseCycleHandle(_data);\r
         }\r
-        if (_dataReference != null) {\r
+        if (_dataReference != null\r
+            && !org.castor.util.CycleBreaker.startingToCycle(_dataReference)) {\r
            result = 37 * result + _dataReference.hashCode();\r
+           org.castor.util.CycleBreaker.releaseCycleHandle(_dataReference);\r
         }\r
         \r
         return result;\r
index ff0b5d0..ea61bca 100644 (file)
@@ -165,40 +165,117 @@ implements java.io.Serializable
         if (obj instanceof ApplicationData) {
         
             ApplicationData temp = (ApplicationData)obj;
+            boolean thcycle;
+            boolean tmcycle;
             if (this._version != null) {
                 if (temp._version == null) return false;
-                else if (!(this._version.equals(temp._version))) 
-                    return false;
-            }
-            else if (temp._version != null)
+                if (this._version != temp._version) {
+                    thcycle=org.castor.util.CycleBreaker.startingToCycle(this._version);
+                    tmcycle=org.castor.util.CycleBreaker.startingToCycle(temp._version);
+                    if (thcycle!=tmcycle) {
+                        if (!thcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(this._version); };
+                        if (!tmcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(temp._version); };
+                        return false;
+                    }
+                    if (!thcycle) {
+                        if (!this._version.equals(temp._version)) {
+                            org.castor.util.CycleBreaker.releaseCycleHandle(this._version);
+                            org.castor.util.CycleBreaker.releaseCycleHandle(temp._version);
+                            return false;
+                        }
+                        org.castor.util.CycleBreaker.releaseCycleHandle(this._version);
+                        org.castor.util.CycleBreaker.releaseCycleHandle(temp._version);
+                    }
+                }
+            } else if (temp._version != null)
                 return false;
             if (this._name != null) {
                 if (temp._name == null) return false;
-                else if (!(this._name.equals(temp._name))) 
-                    return false;
-            }
-            else if (temp._name != null)
+                if (this._name != temp._name) {
+                    thcycle=org.castor.util.CycleBreaker.startingToCycle(this._name);
+                    tmcycle=org.castor.util.CycleBreaker.startingToCycle(temp._name);
+                    if (thcycle!=tmcycle) {
+                        if (!thcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(this._name); };
+                        if (!tmcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(temp._name); };
+                        return false;
+                    }
+                    if (!thcycle) {
+                        if (!this._name.equals(temp._name)) {
+                            org.castor.util.CycleBreaker.releaseCycleHandle(this._name);
+                            org.castor.util.CycleBreaker.releaseCycleHandle(temp._name);
+                            return false;
+                        }
+                        org.castor.util.CycleBreaker.releaseCycleHandle(this._name);
+                        org.castor.util.CycleBreaker.releaseCycleHandle(temp._name);
+                    }
+                }
+            } else if (temp._name != null)
                 return false;
             if (this._userList != null) {
                 if (temp._userList == null) return false;
-                else if (!(this._userList.equals(temp._userList))) 
-                    return false;
-            }
-            else if (temp._userList != null)
+                if (this._userList != temp._userList) {
+                    thcycle=org.castor.util.CycleBreaker.startingToCycle(this._userList);
+                    tmcycle=org.castor.util.CycleBreaker.startingToCycle(temp._userList);
+                    if (thcycle!=tmcycle) {
+                        if (!thcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(this._userList); };
+                        if (!tmcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(temp._userList); };
+                        return false;
+                    }
+                    if (!thcycle) {
+                        if (!this._userList.equals(temp._userList)) {
+                            org.castor.util.CycleBreaker.releaseCycleHandle(this._userList);
+                            org.castor.util.CycleBreaker.releaseCycleHandle(temp._userList);
+                            return false;
+                        }
+                        org.castor.util.CycleBreaker.releaseCycleHandle(this._userList);
+                        org.castor.util.CycleBreaker.releaseCycleHandle(temp._userList);
+                    }
+                }
+            } else if (temp._userList != null)
                 return false;
             if (this._common != null) {
                 if (temp._common == null) return false;
-                else if (!(this._common.equals(temp._common))) 
-                    return false;
-            }
-            else if (temp._common != null)
+                if (this._common != temp._common) {
+                    thcycle=org.castor.util.CycleBreaker.startingToCycle(this._common);
+                    tmcycle=org.castor.util.CycleBreaker.startingToCycle(temp._common);
+                    if (thcycle!=tmcycle) {
+                        if (!thcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(this._common); };
+                        if (!tmcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(temp._common); };
+                        return false;
+                    }
+                    if (!thcycle) {
+                        if (!this._common.equals(temp._common)) {
+                            org.castor.util.CycleBreaker.releaseCycleHandle(this._common);
+                            org.castor.util.CycleBreaker.releaseCycleHandle(temp._common);
+                            return false;
+                        }
+                        org.castor.util.CycleBreaker.releaseCycleHandle(this._common);
+                        org.castor.util.CycleBreaker.releaseCycleHandle(temp._common);
+                    }
+                }
+            } else if (temp._common != null)
                 return false;
             if (this._instanceList != null) {
                 if (temp._instanceList == null) return false;
-                else if (!(this._instanceList.equals(temp._instanceList))) 
-                    return false;
-            }
-            else if (temp._instanceList != null)
+                if (this._instanceList != temp._instanceList) {
+                    thcycle=org.castor.util.CycleBreaker.startingToCycle(this._instanceList);
+                    tmcycle=org.castor.util.CycleBreaker.startingToCycle(temp._instanceList);
+                    if (thcycle!=tmcycle) {
+                        if (!thcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(this._instanceList); };
+                        if (!tmcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(temp._instanceList); };
+                        return false;
+                    }
+                    if (!thcycle) {
+                        if (!this._instanceList.equals(temp._instanceList)) {
+                            org.castor.util.CycleBreaker.releaseCycleHandle(this._instanceList);
+                            org.castor.util.CycleBreaker.releaseCycleHandle(temp._instanceList);
+                            return false;
+                        }
+                        org.castor.util.CycleBreaker.releaseCycleHandle(this._instanceList);
+                        org.castor.util.CycleBreaker.releaseCycleHandle(temp._instanceList);
+                    }
+                }
+            } else if (temp._instanceList != null)
                 return false;
             return true;
         }
@@ -366,20 +443,30 @@ implements java.io.Serializable
         int result = super.hashCode();
         
         long tmp;
-        if (_version != null) {
+        if (_version != null
+            && !org.castor.util.CycleBreaker.startingToCycle(_version)) {
            result = 37 * result + _version.hashCode();
+           org.castor.util.CycleBreaker.releaseCycleHandle(_version);
         }
-        if (_name != null) {
+        if (_name != null
+            && !org.castor.util.CycleBreaker.startingToCycle(_name)) {
            result = 37 * result + _name.hashCode();
+           org.castor.util.CycleBreaker.releaseCycleHandle(_name);
         }
-        if (_userList != null) {
+        if (_userList != null
+            && !org.castor.util.CycleBreaker.startingToCycle(_userList)) {
            result = 37 * result + _userList.hashCode();
+           org.castor.util.CycleBreaker.releaseCycleHandle(_userList);
         }
-        if (_common != null) {
+        if (_common != null
+            && !org.castor.util.CycleBreaker.startingToCycle(_common)) {
            result = 37 * result + _common.hashCode();
+           org.castor.util.CycleBreaker.releaseCycleHandle(_common);
         }
-        if (_instanceList != null) {
+        if (_instanceList != null
+            && !org.castor.util.CycleBreaker.startingToCycle(_instanceList)) {
            result = 37 * result + _instanceList.hashCode();
+           org.castor.util.CycleBreaker.releaseCycleHandle(_instanceList);
         }
         
         return result;
index 7b6fcc4..b7c741f 100644 (file)
@@ -95,30 +95,77 @@ implements java.io.Serializable
         if (obj instanceof Attachment) {\r
         \r
             Attachment temp = (Attachment)obj;\r
+            boolean thcycle;\r
+            boolean tmcycle;\r
             if (this._compressed != temp._compressed)\r
                 return false;\r
             if (this._has_compressed != temp._has_compressed)\r
                 return false;\r
             if (this._type != null) {\r
                 if (temp._type == null) return false;\r
-                else if (!(this._type.equals(temp._type))) \r
-                    return false;\r
-            }\r
-            else if (temp._type != null)\r
+                if (this._type != temp._type) {\r
+                    thcycle=org.castor.util.CycleBreaker.startingToCycle(this._type);\r
+                    tmcycle=org.castor.util.CycleBreaker.startingToCycle(temp._type);\r
+                    if (thcycle!=tmcycle) {\r
+                        if (!thcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(this._type); };\r
+                        if (!tmcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(temp._type); };\r
+                        return false;\r
+                    }\r
+                    if (!thcycle) {\r
+                        if (!this._type.equals(temp._type)) {\r
+                            org.castor.util.CycleBreaker.releaseCycleHandle(this._type);\r
+                            org.castor.util.CycleBreaker.releaseCycleHandle(temp._type);\r
+                            return false;\r
+                        }\r
+                        org.castor.util.CycleBreaker.releaseCycleHandle(this._type);\r
+                        org.castor.util.CycleBreaker.releaseCycleHandle(temp._type);\r
+                    }\r
+                }\r
+            } else if (temp._type != null)\r
                 return false;\r
             if (this._objectref != null) {\r
                 if (temp._objectref == null) return false;\r
-                else if (!(this._objectref.equals(temp._objectref))) \r
-                    return false;\r
-            }\r
-            else if (temp._objectref != null)\r
+                if (this._objectref != temp._objectref) {\r
+                    thcycle=org.castor.util.CycleBreaker.startingToCycle(this._objectref);\r
+                    tmcycle=org.castor.util.CycleBreaker.startingToCycle(temp._objectref);\r
+                    if (thcycle!=tmcycle) {\r
+                        if (!thcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(this._objectref); };\r
+                        if (!tmcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(temp._objectref); };\r
+                        return false;\r
+                    }\r
+                    if (!thcycle) {\r
+                        if (!this._objectref.equals(temp._objectref)) {\r
+                            org.castor.util.CycleBreaker.releaseCycleHandle(this._objectref);\r
+                            org.castor.util.CycleBreaker.releaseCycleHandle(temp._objectref);\r
+                            return false;\r
+                        }\r
+                        org.castor.util.CycleBreaker.releaseCycleHandle(this._objectref);\r
+                        org.castor.util.CycleBreaker.releaseCycleHandle(temp._objectref);\r
+                    }\r
+                }\r
+            } else if (temp._objectref != null)\r
                 return false;\r
             if (this._id != null) {\r
                 if (temp._id == null) return false;\r
-                else if (!(this._id.equals(temp._id))) \r
-                    return false;\r
-            }\r
-            else if (temp._id != null)\r
+                if (this._id != temp._id) {\r
+                    thcycle=org.castor.util.CycleBreaker.startingToCycle(this._id);\r
+                    tmcycle=org.castor.util.CycleBreaker.startingToCycle(temp._id);\r
+                    if (thcycle!=tmcycle) {\r
+                        if (!thcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(this._id); };\r
+                        if (!tmcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(temp._id); };\r
+                        return false;\r
+                    }\r
+                    if (!thcycle) {\r
+                        if (!this._id.equals(temp._id)) {\r
+                            org.castor.util.CycleBreaker.releaseCycleHandle(this._id);\r
+                            org.castor.util.CycleBreaker.releaseCycleHandle(temp._id);\r
+                            return false;\r
+                        }\r
+                        org.castor.util.CycleBreaker.releaseCycleHandle(this._id);\r
+                        org.castor.util.CycleBreaker.releaseCycleHandle(temp._id);\r
+                    }\r
+                }\r
+            } else if (temp._id != null)\r
                 return false;\r
             return true;\r
         }\r
@@ -201,14 +248,20 @@ implements java.io.Serializable
         \r
         long tmp;\r
         result = 37 * result + (_compressed?0:1);\r
-        if (_type != null) {\r
+        if (_type != null\r
+            && !org.castor.util.CycleBreaker.startingToCycle(_type)) {\r
            result = 37 * result + _type.hashCode();\r
+           org.castor.util.CycleBreaker.releaseCycleHandle(_type);\r
         }\r
-        if (_objectref != null) {\r
+        if (_objectref != null\r
+            && !org.castor.util.CycleBreaker.startingToCycle(_objectref)) {\r
            result = 37 * result + _objectref.hashCode();\r
+           org.castor.util.CycleBreaker.releaseCycleHandle(_objectref);\r
         }\r
-        if (_id != null) {\r
+        if (_id != null\r
+            && !org.castor.util.CycleBreaker.startingToCycle(_id)) {\r
            result = 37 * result + _id.hashCode();\r
+           org.castor.util.CycleBreaker.releaseCycleHandle(_id);\r
         }\r
         \r
         return result;\r
index cdc1dc1..ae4506b 100644 (file)
@@ -294,54 +294,161 @@ implements java.io.Serializable
         if (obj instanceof DataSet) {
         
             DataSet temp = (DataSet)obj;
+            boolean thcycle;
+            boolean tmcycle;
             if (this._id != null) {
                 if (temp._id == null) return false;
-                else if (!(this._id.equals(temp._id))) 
-                    return false;
-            }
-            else if (temp._id != null)
+                if (this._id != temp._id) {
+                    thcycle=org.castor.util.CycleBreaker.startingToCycle(this._id);
+                    tmcycle=org.castor.util.CycleBreaker.startingToCycle(temp._id);
+                    if (thcycle!=tmcycle) {
+                        if (!thcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(this._id); };
+                        if (!tmcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(temp._id); };
+                        return false;
+                    }
+                    if (!thcycle) {
+                        if (!this._id.equals(temp._id)) {
+                            org.castor.util.CycleBreaker.releaseCycleHandle(this._id);
+                            org.castor.util.CycleBreaker.releaseCycleHandle(temp._id);
+                            return false;
+                        }
+                        org.castor.util.CycleBreaker.releaseCycleHandle(this._id);
+                        org.castor.util.CycleBreaker.releaseCycleHandle(temp._id);
+                    }
+                }
+            } else if (temp._id != null)
                 return false;
             if (this._sequenceList != null) {
                 if (temp._sequenceList == null) return false;
-                else if (!(this._sequenceList.equals(temp._sequenceList))) 
-                    return false;
-            }
-            else if (temp._sequenceList != null)
+                if (this._sequenceList != temp._sequenceList) {
+                    thcycle=org.castor.util.CycleBreaker.startingToCycle(this._sequenceList);
+                    tmcycle=org.castor.util.CycleBreaker.startingToCycle(temp._sequenceList);
+                    if (thcycle!=tmcycle) {
+                        if (!thcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(this._sequenceList); };
+                        if (!tmcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(temp._sequenceList); };
+                        return false;
+                    }
+                    if (!thcycle) {
+                        if (!this._sequenceList.equals(temp._sequenceList)) {
+                            org.castor.util.CycleBreaker.releaseCycleHandle(this._sequenceList);
+                            org.castor.util.CycleBreaker.releaseCycleHandle(temp._sequenceList);
+                            return false;
+                        }
+                        org.castor.util.CycleBreaker.releaseCycleHandle(this._sequenceList);
+                        org.castor.util.CycleBreaker.releaseCycleHandle(temp._sequenceList);
+                    }
+                }
+            } else if (temp._sequenceList != null)
                 return false;
             if (this._sequenceMappingList != null) {
                 if (temp._sequenceMappingList == null) return false;
-                else if (!(this._sequenceMappingList.equals(temp._sequenceMappingList))) 
-                    return false;
-            }
-            else if (temp._sequenceMappingList != null)
+                if (this._sequenceMappingList != temp._sequenceMappingList) {
+                    thcycle=org.castor.util.CycleBreaker.startingToCycle(this._sequenceMappingList);
+                    tmcycle=org.castor.util.CycleBreaker.startingToCycle(temp._sequenceMappingList);
+                    if (thcycle!=tmcycle) {
+                        if (!thcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(this._sequenceMappingList); };
+                        if (!tmcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(temp._sequenceMappingList); };
+                        return false;
+                    }
+                    if (!thcycle) {
+                        if (!this._sequenceMappingList.equals(temp._sequenceMappingList)) {
+                            org.castor.util.CycleBreaker.releaseCycleHandle(this._sequenceMappingList);
+                            org.castor.util.CycleBreaker.releaseCycleHandle(temp._sequenceMappingList);
+                            return false;
+                        }
+                        org.castor.util.CycleBreaker.releaseCycleHandle(this._sequenceMappingList);
+                        org.castor.util.CycleBreaker.releaseCycleHandle(temp._sequenceMappingList);
+                    }
+                }
+            } else if (temp._sequenceMappingList != null)
                 return false;
             if (this._dataSetAnnotationsList != null) {
                 if (temp._dataSetAnnotationsList == null) return false;
-                else if (!(this._dataSetAnnotationsList.equals(temp._dataSetAnnotationsList))) 
-                    return false;
-            }
-            else if (temp._dataSetAnnotationsList != null)
+                if (this._dataSetAnnotationsList != temp._dataSetAnnotationsList) {
+                    thcycle=org.castor.util.CycleBreaker.startingToCycle(this._dataSetAnnotationsList);
+                    tmcycle=org.castor.util.CycleBreaker.startingToCycle(temp._dataSetAnnotationsList);
+                    if (thcycle!=tmcycle) {
+                        if (!thcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(this._dataSetAnnotationsList); };
+                        if (!tmcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(temp._dataSetAnnotationsList); };
+                        return false;
+                    }
+                    if (!thcycle) {
+                        if (!this._dataSetAnnotationsList.equals(temp._dataSetAnnotationsList)) {
+                            org.castor.util.CycleBreaker.releaseCycleHandle(this._dataSetAnnotationsList);
+                            org.castor.util.CycleBreaker.releaseCycleHandle(temp._dataSetAnnotationsList);
+                            return false;
+                        }
+                        org.castor.util.CycleBreaker.releaseCycleHandle(this._dataSetAnnotationsList);
+                        org.castor.util.CycleBreaker.releaseCycleHandle(temp._dataSetAnnotationsList);
+                    }
+                }
+            } else if (temp._dataSetAnnotationsList != null)
                 return false;
             if (this._alignmentList != null) {
                 if (temp._alignmentList == null) return false;
-                else if (!(this._alignmentList.equals(temp._alignmentList))) 
-                    return false;
-            }
-            else if (temp._alignmentList != null)
+                if (this._alignmentList != temp._alignmentList) {
+                    thcycle=org.castor.util.CycleBreaker.startingToCycle(this._alignmentList);
+                    tmcycle=org.castor.util.CycleBreaker.startingToCycle(temp._alignmentList);
+                    if (thcycle!=tmcycle) {
+                        if (!thcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(this._alignmentList); };
+                        if (!tmcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(temp._alignmentList); };
+                        return false;
+                    }
+                    if (!thcycle) {
+                        if (!this._alignmentList.equals(temp._alignmentList)) {
+                            org.castor.util.CycleBreaker.releaseCycleHandle(this._alignmentList);
+                            org.castor.util.CycleBreaker.releaseCycleHandle(temp._alignmentList);
+                            return false;
+                        }
+                        org.castor.util.CycleBreaker.releaseCycleHandle(this._alignmentList);
+                        org.castor.util.CycleBreaker.releaseCycleHandle(temp._alignmentList);
+                    }
+                }
+            } else if (temp._alignmentList != null)
                 return false;
             if (this._treeList != null) {
                 if (temp._treeList == null) return false;
-                else if (!(this._treeList.equals(temp._treeList))) 
-                    return false;
-            }
-            else if (temp._treeList != null)
+                if (this._treeList != temp._treeList) {
+                    thcycle=org.castor.util.CycleBreaker.startingToCycle(this._treeList);
+                    tmcycle=org.castor.util.CycleBreaker.startingToCycle(temp._treeList);
+                    if (thcycle!=tmcycle) {
+                        if (!thcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(this._treeList); };
+                        if (!tmcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(temp._treeList); };
+                        return false;
+                    }
+                    if (!thcycle) {
+                        if (!this._treeList.equals(temp._treeList)) {
+                            org.castor.util.CycleBreaker.releaseCycleHandle(this._treeList);
+                            org.castor.util.CycleBreaker.releaseCycleHandle(temp._treeList);
+                            return false;
+                        }
+                        org.castor.util.CycleBreaker.releaseCycleHandle(this._treeList);
+                        org.castor.util.CycleBreaker.releaseCycleHandle(temp._treeList);
+                    }
+                }
+            } else if (temp._treeList != null)
                 return false;
             if (this._provenance != null) {
                 if (temp._provenance == null) return false;
-                else if (!(this._provenance.equals(temp._provenance))) 
-                    return false;
-            }
-            else if (temp._provenance != null)
+                if (this._provenance != temp._provenance) {
+                    thcycle=org.castor.util.CycleBreaker.startingToCycle(this._provenance);
+                    tmcycle=org.castor.util.CycleBreaker.startingToCycle(temp._provenance);
+                    if (thcycle!=tmcycle) {
+                        if (!thcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(this._provenance); };
+                        if (!tmcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(temp._provenance); };
+                        return false;
+                    }
+                    if (!thcycle) {
+                        if (!this._provenance.equals(temp._provenance)) {
+                            org.castor.util.CycleBreaker.releaseCycleHandle(this._provenance);
+                            org.castor.util.CycleBreaker.releaseCycleHandle(temp._provenance);
+                            return false;
+                        }
+                        org.castor.util.CycleBreaker.releaseCycleHandle(this._provenance);
+                        org.castor.util.CycleBreaker.releaseCycleHandle(temp._provenance);
+                    }
+                }
+            } else if (temp._provenance != null)
                 return false;
             return true;
         }
@@ -671,26 +778,40 @@ implements java.io.Serializable
         int result = super.hashCode();
         
         long tmp;
-        if (_id != null) {
+        if (_id != null
+            && !org.castor.util.CycleBreaker.startingToCycle(_id)) {
            result = 37 * result + _id.hashCode();
+           org.castor.util.CycleBreaker.releaseCycleHandle(_id);
         }
-        if (_sequenceList != null) {
+        if (_sequenceList != null
+            && !org.castor.util.CycleBreaker.startingToCycle(_sequenceList)) {
            result = 37 * result + _sequenceList.hashCode();
+           org.castor.util.CycleBreaker.releaseCycleHandle(_sequenceList);
         }
-        if (_sequenceMappingList != null) {
+        if (_sequenceMappingList != null
+            && !org.castor.util.CycleBreaker.startingToCycle(_sequenceMappingList)) {
            result = 37 * result + _sequenceMappingList.hashCode();
+           org.castor.util.CycleBreaker.releaseCycleHandle(_sequenceMappingList);
         }
-        if (_dataSetAnnotationsList != null) {
+        if (_dataSetAnnotationsList != null
+            && !org.castor.util.CycleBreaker.startingToCycle(_dataSetAnnotationsList)) {
            result = 37 * result + _dataSetAnnotationsList.hashCode();
+           org.castor.util.CycleBreaker.releaseCycleHandle(_dataSetAnnotationsList);
         }
-        if (_alignmentList != null) {
+        if (_alignmentList != null
+            && !org.castor.util.CycleBreaker.startingToCycle(_alignmentList)) {
            result = 37 * result + _alignmentList.hashCode();
+           org.castor.util.CycleBreaker.releaseCycleHandle(_alignmentList);
         }
-        if (_treeList != null) {
+        if (_treeList != null
+            && !org.castor.util.CycleBreaker.startingToCycle(_treeList)) {
            result = 37 * result + _treeList.hashCode();
+           org.castor.util.CycleBreaker.releaseCycleHandle(_treeList);
         }
-        if (_provenance != null) {
+        if (_provenance != null
+            && !org.castor.util.CycleBreaker.startingToCycle(_provenance)) {
            result = 37 * result + _provenance.hashCode();
+           org.castor.util.CycleBreaker.releaseCycleHandle(_provenance);
         }
         
         return result;
index 39aa939..861f0fe 100644 (file)
@@ -109,19 +109,51 @@ implements java.io.Serializable
         if (obj instanceof DataSetAnnotations) {
         
             DataSetAnnotations temp = (DataSetAnnotations)obj;
+            boolean thcycle;
+            boolean tmcycle;
             if (this._seqRef != null) {
                 if (temp._seqRef == null) return false;
-                else if (!(this._seqRef.equals(temp._seqRef))) 
-                    return false;
-            }
-            else if (temp._seqRef != null)
+                if (this._seqRef != temp._seqRef) {
+                    thcycle=org.castor.util.CycleBreaker.startingToCycle(this._seqRef);
+                    tmcycle=org.castor.util.CycleBreaker.startingToCycle(temp._seqRef);
+                    if (thcycle!=tmcycle) {
+                        if (!thcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(this._seqRef); };
+                        if (!tmcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(temp._seqRef); };
+                        return false;
+                    }
+                    if (!thcycle) {
+                        if (!this._seqRef.equals(temp._seqRef)) {
+                            org.castor.util.CycleBreaker.releaseCycleHandle(this._seqRef);
+                            org.castor.util.CycleBreaker.releaseCycleHandle(temp._seqRef);
+                            return false;
+                        }
+                        org.castor.util.CycleBreaker.releaseCycleHandle(this._seqRef);
+                        org.castor.util.CycleBreaker.releaseCycleHandle(temp._seqRef);
+                    }
+                }
+            } else if (temp._seqRef != null)
                 return false;
             if (this._provenance != null) {
                 if (temp._provenance == null) return false;
-                else if (!(this._provenance.equals(temp._provenance))) 
-                    return false;
-            }
-            else if (temp._provenance != null)
+                if (this._provenance != temp._provenance) {
+                    thcycle=org.castor.util.CycleBreaker.startingToCycle(this._provenance);
+                    tmcycle=org.castor.util.CycleBreaker.startingToCycle(temp._provenance);
+                    if (thcycle!=tmcycle) {
+                        if (!thcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(this._provenance); };
+                        if (!tmcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(temp._provenance); };
+                        return false;
+                    }
+                    if (!thcycle) {
+                        if (!this._provenance.equals(temp._provenance)) {
+                            org.castor.util.CycleBreaker.releaseCycleHandle(this._provenance);
+                            org.castor.util.CycleBreaker.releaseCycleHandle(temp._provenance);
+                            return false;
+                        }
+                        org.castor.util.CycleBreaker.releaseCycleHandle(this._provenance);
+                        org.castor.util.CycleBreaker.releaseCycleHandle(temp._provenance);
+                    }
+                }
+            } else if (temp._provenance != null)
                 return false;
             return true;
         }
@@ -207,11 +239,15 @@ implements java.io.Serializable
         int result = super.hashCode();
         
         long tmp;
-        if (_seqRef != null) {
+        if (_seqRef != null
+            && !org.castor.util.CycleBreaker.startingToCycle(_seqRef)) {
            result = 37 * result + _seqRef.hashCode();
+           org.castor.util.CycleBreaker.releaseCycleHandle(_seqRef);
         }
-        if (_provenance != null) {
+        if (_provenance != null
+            && !org.castor.util.CycleBreaker.startingToCycle(_provenance)) {
            result = 37 * result + _provenance.hashCode();
+           org.castor.util.CycleBreaker.releaseCycleHandle(_provenance);
         }
         
         return result;
index a228591..54dfa2c 100644 (file)
@@ -61,19 +61,19 @@ implements java.io.Serializable
     private java.lang.String _id;
 
     /**
-     * From: Offset to first
-     *  position in dataset sequence record that
-     *  this database entry maps to To: Offset
-     *  to last position in dataset sequence
-     *  record that this database entry maps to
-     *  Start: Offset to first last position in
-     *  database entry that first (or offset)
-     *  position in sequence maps to End: Offset
-     *  to last position in database entry that
-     *  last (offset) position in sequence maps
-     *  to 
+     * the local mapType maps from the parent
+     *  sequence coordinate frame to the reference
+     *  frame defined by the dbRef element.
+     *  The mapped mapType is the mapped range defined
+     *  on the dbRef element's reference frame.
+     *  Conventionally, the unit attribute defaults to 1, or
+     *  will be inferred from the local sequence's
+     *  dictionary type and any dictionary type associated
+     *  with the database being mapped to. 
+     *  However, it may be used to avoid ambiguity.
+     *  
      */
-    private java.util.Vector _mapList;
+    private uk.ac.vamsas.objects.core.Map _map;
 
     /**
      * Field _linkList.
@@ -92,7 +92,6 @@ implements java.io.Serializable
 
     public DbRef() {
         super();
-        this._mapList = new java.util.Vector();
         this._linkList = new java.util.Vector();
         this._propertyList = new java.util.Vector();
     }
@@ -133,34 +132,6 @@ implements java.io.Serializable
     /**
      * 
      * 
-     * @param vMap
-     * @throws java.lang.IndexOutOfBoundsException if the index
-     * given is outside the bounds of the collection
-     */
-    public void addMap(
-            final uk.ac.vamsas.objects.core.Map vMap)
-    throws java.lang.IndexOutOfBoundsException {
-        this._mapList.addElement(vMap);
-    }
-
-    /**
-     * 
-     * 
-     * @param index
-     * @param vMap
-     * @throws java.lang.IndexOutOfBoundsException if the index
-     * given is outside the bounds of the collection
-     */
-    public void addMap(
-            final int index,
-            final uk.ac.vamsas.objects.core.Map vMap)
-    throws java.lang.IndexOutOfBoundsException {
-        this._mapList.add(index, vMap);
-    }
-
-    /**
-     * 
-     * 
      * @param vProperty
      * @throws java.lang.IndexOutOfBoundsException if the index
      * given is outside the bounds of the collection
@@ -198,17 +169,6 @@ implements java.io.Serializable
     }
 
     /**
-     * Method enumerateMap.
-     * 
-     * @return an Enumeration over all
-     * uk.ac.vamsas.objects.core.Map elements
-     */
-    public java.util.Enumeration enumerateMap(
-    ) {
-        return this._mapList.elements();
-    }
-
-    /**
      * Method enumerateProperty.
      * 
      * @return an Enumeration over all
@@ -236,54 +196,161 @@ implements java.io.Serializable
         if (obj instanceof DbRef) {
         
             DbRef temp = (DbRef)obj;
+            boolean thcycle;
+            boolean tmcycle;
             if (this._source != null) {
                 if (temp._source == null) return false;
-                else if (!(this._source.equals(temp._source))) 
-                    return false;
-            }
-            else if (temp._source != null)
+                if (this._source != temp._source) {
+                    thcycle=org.castor.util.CycleBreaker.startingToCycle(this._source);
+                    tmcycle=org.castor.util.CycleBreaker.startingToCycle(temp._source);
+                    if (thcycle!=tmcycle) {
+                        if (!thcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(this._source); };
+                        if (!tmcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(temp._source); };
+                        return false;
+                    }
+                    if (!thcycle) {
+                        if (!this._source.equals(temp._source)) {
+                            org.castor.util.CycleBreaker.releaseCycleHandle(this._source);
+                            org.castor.util.CycleBreaker.releaseCycleHandle(temp._source);
+                            return false;
+                        }
+                        org.castor.util.CycleBreaker.releaseCycleHandle(this._source);
+                        org.castor.util.CycleBreaker.releaseCycleHandle(temp._source);
+                    }
+                }
+            } else if (temp._source != null)
                 return false;
             if (this._version != null) {
                 if (temp._version == null) return false;
-                else if (!(this._version.equals(temp._version))) 
-                    return false;
-            }
-            else if (temp._version != null)
+                if (this._version != temp._version) {
+                    thcycle=org.castor.util.CycleBreaker.startingToCycle(this._version);
+                    tmcycle=org.castor.util.CycleBreaker.startingToCycle(temp._version);
+                    if (thcycle!=tmcycle) {
+                        if (!thcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(this._version); };
+                        if (!tmcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(temp._version); };
+                        return false;
+                    }
+                    if (!thcycle) {
+                        if (!this._version.equals(temp._version)) {
+                            org.castor.util.CycleBreaker.releaseCycleHandle(this._version);
+                            org.castor.util.CycleBreaker.releaseCycleHandle(temp._version);
+                            return false;
+                        }
+                        org.castor.util.CycleBreaker.releaseCycleHandle(this._version);
+                        org.castor.util.CycleBreaker.releaseCycleHandle(temp._version);
+                    }
+                }
+            } else if (temp._version != null)
                 return false;
             if (this._accessionId != null) {
                 if (temp._accessionId == null) return false;
-                else if (!(this._accessionId.equals(temp._accessionId))) 
-                    return false;
-            }
-            else if (temp._accessionId != null)
+                if (this._accessionId != temp._accessionId) {
+                    thcycle=org.castor.util.CycleBreaker.startingToCycle(this._accessionId);
+                    tmcycle=org.castor.util.CycleBreaker.startingToCycle(temp._accessionId);
+                    if (thcycle!=tmcycle) {
+                        if (!thcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(this._accessionId); };
+                        if (!tmcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(temp._accessionId); };
+                        return false;
+                    }
+                    if (!thcycle) {
+                        if (!this._accessionId.equals(temp._accessionId)) {
+                            org.castor.util.CycleBreaker.releaseCycleHandle(this._accessionId);
+                            org.castor.util.CycleBreaker.releaseCycleHandle(temp._accessionId);
+                            return false;
+                        }
+                        org.castor.util.CycleBreaker.releaseCycleHandle(this._accessionId);
+                        org.castor.util.CycleBreaker.releaseCycleHandle(temp._accessionId);
+                    }
+                }
+            } else if (temp._accessionId != null)
                 return false;
             if (this._id != null) {
                 if (temp._id == null) return false;
-                else if (!(this._id.equals(temp._id))) 
-                    return false;
-            }
-            else if (temp._id != null)
+                if (this._id != temp._id) {
+                    thcycle=org.castor.util.CycleBreaker.startingToCycle(this._id);
+                    tmcycle=org.castor.util.CycleBreaker.startingToCycle(temp._id);
+                    if (thcycle!=tmcycle) {
+                        if (!thcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(this._id); };
+                        if (!tmcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(temp._id); };
+                        return false;
+                    }
+                    if (!thcycle) {
+                        if (!this._id.equals(temp._id)) {
+                            org.castor.util.CycleBreaker.releaseCycleHandle(this._id);
+                            org.castor.util.CycleBreaker.releaseCycleHandle(temp._id);
+                            return false;
+                        }
+                        org.castor.util.CycleBreaker.releaseCycleHandle(this._id);
+                        org.castor.util.CycleBreaker.releaseCycleHandle(temp._id);
+                    }
+                }
+            } else if (temp._id != null)
                 return false;
-            if (this._mapList != null) {
-                if (temp._mapList == null) return false;
-                else if (!(this._mapList.equals(temp._mapList))) 
-                    return false;
-            }
-            else if (temp._mapList != null)
+            if (this._map != null) {
+                if (temp._map == null) return false;
+                if (this._map != temp._map) {
+                    thcycle=org.castor.util.CycleBreaker.startingToCycle(this._map);
+                    tmcycle=org.castor.util.CycleBreaker.startingToCycle(temp._map);
+                    if (thcycle!=tmcycle) {
+                        if (!thcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(this._map); };
+                        if (!tmcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(temp._map); };
+                        return false;
+                    }
+                    if (!thcycle) {
+                        if (!this._map.equals(temp._map)) {
+                            org.castor.util.CycleBreaker.releaseCycleHandle(this._map);
+                            org.castor.util.CycleBreaker.releaseCycleHandle(temp._map);
+                            return false;
+                        }
+                        org.castor.util.CycleBreaker.releaseCycleHandle(this._map);
+                        org.castor.util.CycleBreaker.releaseCycleHandle(temp._map);
+                    }
+                }
+            } else if (temp._map != null)
                 return false;
             if (this._linkList != null) {
                 if (temp._linkList == null) return false;
-                else if (!(this._linkList.equals(temp._linkList))) 
-                    return false;
-            }
-            else if (temp._linkList != null)
+                if (this._linkList != temp._linkList) {
+                    thcycle=org.castor.util.CycleBreaker.startingToCycle(this._linkList);
+                    tmcycle=org.castor.util.CycleBreaker.startingToCycle(temp._linkList);
+                    if (thcycle!=tmcycle) {
+                        if (!thcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(this._linkList); };
+                        if (!tmcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(temp._linkList); };
+                        return false;
+                    }
+                    if (!thcycle) {
+                        if (!this._linkList.equals(temp._linkList)) {
+                            org.castor.util.CycleBreaker.releaseCycleHandle(this._linkList);
+                            org.castor.util.CycleBreaker.releaseCycleHandle(temp._linkList);
+                            return false;
+                        }
+                        org.castor.util.CycleBreaker.releaseCycleHandle(this._linkList);
+                        org.castor.util.CycleBreaker.releaseCycleHandle(temp._linkList);
+                    }
+                }
+            } else if (temp._linkList != null)
                 return false;
             if (this._propertyList != null) {
                 if (temp._propertyList == null) return false;
-                else if (!(this._propertyList.equals(temp._propertyList))) 
-                    return false;
-            }
-            else if (temp._propertyList != null)
+                if (this._propertyList != temp._propertyList) {
+                    thcycle=org.castor.util.CycleBreaker.startingToCycle(this._propertyList);
+                    tmcycle=org.castor.util.CycleBreaker.startingToCycle(temp._propertyList);
+                    if (thcycle!=tmcycle) {
+                        if (!thcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(this._propertyList); };
+                        if (!tmcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(temp._propertyList); };
+                        return false;
+                    }
+                    if (!thcycle) {
+                        if (!this._propertyList.equals(temp._propertyList)) {
+                            org.castor.util.CycleBreaker.releaseCycleHandle(this._propertyList);
+                            org.castor.util.CycleBreaker.releaseCycleHandle(temp._propertyList);
+                            return false;
+                        }
+                        org.castor.util.CycleBreaker.releaseCycleHandle(this._propertyList);
+                        org.castor.util.CycleBreaker.releaseCycleHandle(temp._propertyList);
+                    }
+                }
+            } else if (temp._propertyList != null)
                 return false;
             return true;
         }
@@ -376,60 +443,25 @@ implements java.io.Serializable
     }
 
     /**
-     * Method getMap.
+     * Returns the value of field 'map'. The field 'map' has the
+     * following description: the local mapType maps from the
+     * parent
+     *  sequence coordinate frame to the reference
+     *  frame defined by the dbRef element.
+     *  The mapped mapType is the mapped range defined
+     *  on the dbRef element's reference frame.
+     *  Conventionally, the unit attribute defaults to 1, or
+     *  will be inferred from the local sequence's
+     *  dictionary type and any dictionary type associated
+     *  with the database being mapped to. 
+     *  However, it may be used to avoid ambiguity.
+     *  
      * 
-     * @param index
-     * @throws java.lang.IndexOutOfBoundsException if the index
-     * given is outside the bounds of the collection
-     * @return the value of the uk.ac.vamsas.objects.core.Map at
-     * the given index
+     * @return the value of field 'Map'.
      */
     public uk.ac.vamsas.objects.core.Map getMap(
-            final int index)
-    throws java.lang.IndexOutOfBoundsException {
-        // check bounds for index
-        if (index < 0 || index >= this._mapList.size()) {
-            throw new IndexOutOfBoundsException("getMap: Index value '" + index + "' not in range [0.." + (this._mapList.size() - 1) + "]");
-        }
-        
-        return (uk.ac.vamsas.objects.core.Map) _mapList.get(index);
-    }
-
-    /**
-     * Method getMap.Returns the contents of the collection in an
-     * Array.  <p>Note:  Just in case the collection contents are
-     * changing in another thread, we pass a 0-length Array of the
-     * correct type into the API call.  This way we <i>know</i>
-     * that the Array returned is of exactly the correct length.
-     * 
-     * @return this collection as an Array
-     */
-    public uk.ac.vamsas.objects.core.Map[] getMap(
-    ) {
-        uk.ac.vamsas.objects.core.Map[] array = new uk.ac.vamsas.objects.core.Map[0];
-        return (uk.ac.vamsas.objects.core.Map[]) this._mapList.toArray(array);
-    }
-
-    /**
-     * Method getMapAsReference.Returns a reference to '_mapList'.
-     * No type checking is performed on any modifications to the
-     * Vector.
-     * 
-     * @return a reference to the Vector backing this class
-     */
-    public java.util.Vector getMapAsReference(
-    ) {
-        return this._mapList;
-    }
-
-    /**
-     * Method getMapCount.
-     * 
-     * @return the size of this collection
-     */
-    public int getMapCount(
     ) {
-        return this._mapList.size();
+        return this._map;
     }
 
     /**
@@ -529,26 +561,40 @@ implements java.io.Serializable
         int result = super.hashCode();
         
         long tmp;
-        if (_source != null) {
+        if (_source != null
+            && !org.castor.util.CycleBreaker.startingToCycle(_source)) {
            result = 37 * result + _source.hashCode();
+           org.castor.util.CycleBreaker.releaseCycleHandle(_source);
         }
-        if (_version != null) {
+        if (_version != null
+            && !org.castor.util.CycleBreaker.startingToCycle(_version)) {
            result = 37 * result + _version.hashCode();
+           org.castor.util.CycleBreaker.releaseCycleHandle(_version);
         }
-        if (_accessionId != null) {
+        if (_accessionId != null
+            && !org.castor.util.CycleBreaker.startingToCycle(_accessionId)) {
            result = 37 * result + _accessionId.hashCode();
+           org.castor.util.CycleBreaker.releaseCycleHandle(_accessionId);
         }
-        if (_id != null) {
+        if (_id != null
+            && !org.castor.util.CycleBreaker.startingToCycle(_id)) {
            result = 37 * result + _id.hashCode();
+           org.castor.util.CycleBreaker.releaseCycleHandle(_id);
         }
-        if (_mapList != null) {
-           result = 37 * result + _mapList.hashCode();
+        if (_map != null
+            && !org.castor.util.CycleBreaker.startingToCycle(_map)) {
+           result = 37 * result + _map.hashCode();
+           org.castor.util.CycleBreaker.releaseCycleHandle(_map);
         }
-        if (_linkList != null) {
+        if (_linkList != null
+            && !org.castor.util.CycleBreaker.startingToCycle(_linkList)) {
            result = 37 * result + _linkList.hashCode();
+           org.castor.util.CycleBreaker.releaseCycleHandle(_linkList);
         }
-        if (_propertyList != null) {
+        if (_propertyList != null
+            && !org.castor.util.CycleBreaker.startingToCycle(_propertyList)) {
            result = 37 * result + _propertyList.hashCode();
+           org.castor.util.CycleBreaker.releaseCycleHandle(_propertyList);
         }
         
         return result;
@@ -610,13 +656,6 @@ implements java.io.Serializable
 
     /**
      */
-    public void removeAllMap(
-    ) {
-        this._mapList.clear();
-    }
-
-    /**
-     */
     public void removeAllProperty(
     ) {
         this._propertyList.clear();
@@ -647,30 +686,6 @@ implements java.io.Serializable
     }
 
     /**
-     * Method removeMap.
-     * 
-     * @param vMap
-     * @return true if the object was removed from the collection.
-     */
-    public boolean removeMap(
-            final uk.ac.vamsas.objects.core.Map vMap) {
-        boolean removed = _mapList.remove(vMap);
-        return removed;
-    }
-
-    /**
-     * Method removeMapAt.
-     * 
-     * @param index
-     * @return the element removed from the collection
-     */
-    public uk.ac.vamsas.objects.core.Map removeMapAt(
-            final int index) {
-        java.lang.Object obj = this._mapList.remove(index);
-        return (uk.ac.vamsas.objects.core.Map) obj;
-    }
-
-    /**
      * Method removeProperty.
      * 
      * @param vProperty
@@ -784,64 +799,25 @@ implements java.io.Serializable
     }
 
     /**
+     * Sets the value of field 'map'. The field 'map' has the
+     * following description: the local mapType maps from the
+     * parent
+     *  sequence coordinate frame to the reference
+     *  frame defined by the dbRef element.
+     *  The mapped mapType is the mapped range defined
+     *  on the dbRef element's reference frame.
+     *  Conventionally, the unit attribute defaults to 1, or
+     *  will be inferred from the local sequence's
+     *  dictionary type and any dictionary type associated
+     *  with the database being mapped to. 
+     *  However, it may be used to avoid ambiguity.
+     *  
      * 
-     * 
-     * @param index
-     * @param vMap
-     * @throws java.lang.IndexOutOfBoundsException if the index
-     * given is outside the bounds of the collection
-     */
-    public void setMap(
-            final int index,
-            final uk.ac.vamsas.objects.core.Map vMap)
-    throws java.lang.IndexOutOfBoundsException {
-        // check bounds for index
-        if (index < 0 || index >= this._mapList.size()) {
-            throw new IndexOutOfBoundsException("setMap: Index value '" + index + "' not in range [0.." + (this._mapList.size() - 1) + "]");
-        }
-        
-        this._mapList.set(index, vMap);
-    }
-
-    /**
-     * 
-     * 
-     * @param vMapArray
-     */
-    public void setMap(
-            final uk.ac.vamsas.objects.core.Map[] vMapArray) {
-        //-- copy array
-        _mapList.clear();
-        
-        for (int i = 0; i < vMapArray.length; i++) {
-                this._mapList.add(vMapArray[i]);
-        }
-    }
-
-    /**
-     * Sets the value of '_mapList' by copying the given Vector.
-     * All elements will be checked for type safety.
-     * 
-     * @param vMapList the Vector to copy.
+     * @param map the value of field 'map'.
      */
     public void setMap(
-            final java.util.Vector vMapList) {
-        // copy vector
-        this._mapList.clear();
-        
-        this._mapList.addAll(vMapList);
-    }
-
-    /**
-     * Sets the value of '_mapList' by setting it to the given
-     * Vector. No type checking is performed.
-     * @deprecated
-     * 
-     * @param mapVector the Vector to set.
-     */
-    public void setMapAsReference(
-            final java.util.Vector mapVector) {
-        this._mapList = mapVector;
+            final uk.ac.vamsas.objects.core.Map map) {
+        this._map = map;
     }
 
     /**
index 8cdd864..3415765 100644 (file)
@@ -221,61 +221,183 @@ implements java.io.Serializable
         if (obj instanceof Entry) {
         
             Entry temp = (Entry)obj;
+            boolean thcycle;
+            boolean tmcycle;
             if (this._id != null) {
                 if (temp._id == null) return false;
-                else if (!(this._id.equals(temp._id))) 
-                    return false;
-            }
-            else if (temp._id != null)
+                if (this._id != temp._id) {
+                    thcycle=org.castor.util.CycleBreaker.startingToCycle(this._id);
+                    tmcycle=org.castor.util.CycleBreaker.startingToCycle(temp._id);
+                    if (thcycle!=tmcycle) {
+                        if (!thcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(this._id); };
+                        if (!tmcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(temp._id); };
+                        return false;
+                    }
+                    if (!thcycle) {
+                        if (!this._id.equals(temp._id)) {
+                            org.castor.util.CycleBreaker.releaseCycleHandle(this._id);
+                            org.castor.util.CycleBreaker.releaseCycleHandle(temp._id);
+                            return false;
+                        }
+                        org.castor.util.CycleBreaker.releaseCycleHandle(this._id);
+                        org.castor.util.CycleBreaker.releaseCycleHandle(temp._id);
+                    }
+                }
+            } else if (temp._id != null)
                 return false;
             if (this._user != null) {
                 if (temp._user == null) return false;
-                else if (!(this._user.equals(temp._user))) 
-                    return false;
-            }
-            else if (temp._user != null)
+                if (this._user != temp._user) {
+                    thcycle=org.castor.util.CycleBreaker.startingToCycle(this._user);
+                    tmcycle=org.castor.util.CycleBreaker.startingToCycle(temp._user);
+                    if (thcycle!=tmcycle) {
+                        if (!thcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(this._user); };
+                        if (!tmcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(temp._user); };
+                        return false;
+                    }
+                    if (!thcycle) {
+                        if (!this._user.equals(temp._user)) {
+                            org.castor.util.CycleBreaker.releaseCycleHandle(this._user);
+                            org.castor.util.CycleBreaker.releaseCycleHandle(temp._user);
+                            return false;
+                        }
+                        org.castor.util.CycleBreaker.releaseCycleHandle(this._user);
+                        org.castor.util.CycleBreaker.releaseCycleHandle(temp._user);
+                    }
+                }
+            } else if (temp._user != null)
                 return false;
             if (this._app != null) {
                 if (temp._app == null) return false;
-                else if (!(this._app.equals(temp._app))) 
-                    return false;
-            }
-            else if (temp._app != null)
+                if (this._app != temp._app) {
+                    thcycle=org.castor.util.CycleBreaker.startingToCycle(this._app);
+                    tmcycle=org.castor.util.CycleBreaker.startingToCycle(temp._app);
+                    if (thcycle!=tmcycle) {
+                        if (!thcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(this._app); };
+                        if (!tmcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(temp._app); };
+                        return false;
+                    }
+                    if (!thcycle) {
+                        if (!this._app.equals(temp._app)) {
+                            org.castor.util.CycleBreaker.releaseCycleHandle(this._app);
+                            org.castor.util.CycleBreaker.releaseCycleHandle(temp._app);
+                            return false;
+                        }
+                        org.castor.util.CycleBreaker.releaseCycleHandle(this._app);
+                        org.castor.util.CycleBreaker.releaseCycleHandle(temp._app);
+                    }
+                }
+            } else if (temp._app != null)
                 return false;
             if (this._action != null) {
                 if (temp._action == null) return false;
-                else if (!(this._action.equals(temp._action))) 
-                    return false;
-            }
-            else if (temp._action != null)
+                if (this._action != temp._action) {
+                    thcycle=org.castor.util.CycleBreaker.startingToCycle(this._action);
+                    tmcycle=org.castor.util.CycleBreaker.startingToCycle(temp._action);
+                    if (thcycle!=tmcycle) {
+                        if (!thcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(this._action); };
+                        if (!tmcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(temp._action); };
+                        return false;
+                    }
+                    if (!thcycle) {
+                        if (!this._action.equals(temp._action)) {
+                            org.castor.util.CycleBreaker.releaseCycleHandle(this._action);
+                            org.castor.util.CycleBreaker.releaseCycleHandle(temp._action);
+                            return false;
+                        }
+                        org.castor.util.CycleBreaker.releaseCycleHandle(this._action);
+                        org.castor.util.CycleBreaker.releaseCycleHandle(temp._action);
+                    }
+                }
+            } else if (temp._action != null)
                 return false;
             if (this._date != null) {
                 if (temp._date == null) return false;
-                else if (!(this._date.equals(temp._date))) 
-                    return false;
-            }
-            else if (temp._date != null)
+                if (this._date != temp._date) {
+                    thcycle=org.castor.util.CycleBreaker.startingToCycle(this._date);
+                    tmcycle=org.castor.util.CycleBreaker.startingToCycle(temp._date);
+                    if (thcycle!=tmcycle) {
+                        if (!thcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(this._date); };
+                        if (!tmcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(temp._date); };
+                        return false;
+                    }
+                    if (!thcycle) {
+                        if (!this._date.equals(temp._date)) {
+                            org.castor.util.CycleBreaker.releaseCycleHandle(this._date);
+                            org.castor.util.CycleBreaker.releaseCycleHandle(temp._date);
+                            return false;
+                        }
+                        org.castor.util.CycleBreaker.releaseCycleHandle(this._date);
+                        org.castor.util.CycleBreaker.releaseCycleHandle(temp._date);
+                    }
+                }
+            } else if (temp._date != null)
                 return false;
             if (this._propertyList != null) {
                 if (temp._propertyList == null) return false;
-                else if (!(this._propertyList.equals(temp._propertyList))) 
-                    return false;
-            }
-            else if (temp._propertyList != null)
+                if (this._propertyList != temp._propertyList) {
+                    thcycle=org.castor.util.CycleBreaker.startingToCycle(this._propertyList);
+                    tmcycle=org.castor.util.CycleBreaker.startingToCycle(temp._propertyList);
+                    if (thcycle!=tmcycle) {
+                        if (!thcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(this._propertyList); };
+                        if (!tmcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(temp._propertyList); };
+                        return false;
+                    }
+                    if (!thcycle) {
+                        if (!this._propertyList.equals(temp._propertyList)) {
+                            org.castor.util.CycleBreaker.releaseCycleHandle(this._propertyList);
+                            org.castor.util.CycleBreaker.releaseCycleHandle(temp._propertyList);
+                            return false;
+                        }
+                        org.castor.util.CycleBreaker.releaseCycleHandle(this._propertyList);
+                        org.castor.util.CycleBreaker.releaseCycleHandle(temp._propertyList);
+                    }
+                }
+            } else if (temp._propertyList != null)
                 return false;
             if (this._paramList != null) {
                 if (temp._paramList == null) return false;
-                else if (!(this._paramList.equals(temp._paramList))) 
-                    return false;
-            }
-            else if (temp._paramList != null)
+                if (this._paramList != temp._paramList) {
+                    thcycle=org.castor.util.CycleBreaker.startingToCycle(this._paramList);
+                    tmcycle=org.castor.util.CycleBreaker.startingToCycle(temp._paramList);
+                    if (thcycle!=tmcycle) {
+                        if (!thcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(this._paramList); };
+                        if (!tmcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(temp._paramList); };
+                        return false;
+                    }
+                    if (!thcycle) {
+                        if (!this._paramList.equals(temp._paramList)) {
+                            org.castor.util.CycleBreaker.releaseCycleHandle(this._paramList);
+                            org.castor.util.CycleBreaker.releaseCycleHandle(temp._paramList);
+                            return false;
+                        }
+                        org.castor.util.CycleBreaker.releaseCycleHandle(this._paramList);
+                        org.castor.util.CycleBreaker.releaseCycleHandle(temp._paramList);
+                    }
+                }
+            } else if (temp._paramList != null)
                 return false;
             if (this._inputList != null) {
                 if (temp._inputList == null) return false;
-                else if (!(this._inputList.equals(temp._inputList))) 
-                    return false;
-            }
-            else if (temp._inputList != null)
+                if (this._inputList != temp._inputList) {
+                    thcycle=org.castor.util.CycleBreaker.startingToCycle(this._inputList);
+                    tmcycle=org.castor.util.CycleBreaker.startingToCycle(temp._inputList);
+                    if (thcycle!=tmcycle) {
+                        if (!thcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(this._inputList); };
+                        if (!tmcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(temp._inputList); };
+                        return false;
+                    }
+                    if (!thcycle) {
+                        if (!this._inputList.equals(temp._inputList)) {
+                            org.castor.util.CycleBreaker.releaseCycleHandle(this._inputList);
+                            org.castor.util.CycleBreaker.releaseCycleHandle(temp._inputList);
+                            return false;
+                        }
+                        org.castor.util.CycleBreaker.releaseCycleHandle(this._inputList);
+                        org.castor.util.CycleBreaker.releaseCycleHandle(temp._inputList);
+                    }
+                }
+            } else if (temp._inputList != null)
                 return false;
             return true;
         }
@@ -523,29 +645,45 @@ implements java.io.Serializable
         int result = super.hashCode();
         
         long tmp;
-        if (_id != null) {
+        if (_id != null
+            && !org.castor.util.CycleBreaker.startingToCycle(_id)) {
            result = 37 * result + _id.hashCode();
+           org.castor.util.CycleBreaker.releaseCycleHandle(_id);
         }
-        if (_user != null) {
+        if (_user != null
+            && !org.castor.util.CycleBreaker.startingToCycle(_user)) {
            result = 37 * result + _user.hashCode();
+           org.castor.util.CycleBreaker.releaseCycleHandle(_user);
         }
-        if (_app != null) {
+        if (_app != null
+            && !org.castor.util.CycleBreaker.startingToCycle(_app)) {
            result = 37 * result + _app.hashCode();
+           org.castor.util.CycleBreaker.releaseCycleHandle(_app);
         }
-        if (_action != null) {
+        if (_action != null
+            && !org.castor.util.CycleBreaker.startingToCycle(_action)) {
            result = 37 * result + _action.hashCode();
+           org.castor.util.CycleBreaker.releaseCycleHandle(_action);
         }
-        if (_date != null) {
+        if (_date != null
+            && !org.castor.util.CycleBreaker.startingToCycle(_date)) {
            result = 37 * result + _date.hashCode();
+           org.castor.util.CycleBreaker.releaseCycleHandle(_date);
         }
-        if (_propertyList != null) {
+        if (_propertyList != null
+            && !org.castor.util.CycleBreaker.startingToCycle(_propertyList)) {
            result = 37 * result + _propertyList.hashCode();
+           org.castor.util.CycleBreaker.releaseCycleHandle(_propertyList);
         }
-        if (_paramList != null) {
+        if (_paramList != null
+            && !org.castor.util.CycleBreaker.startingToCycle(_paramList)) {
            result = 37 * result + _paramList.hashCode();
+           org.castor.util.CycleBreaker.releaseCycleHandle(_paramList);
         }
-        if (_inputList != null) {
+        if (_inputList != null
+            && !org.castor.util.CycleBreaker.startingToCycle(_inputList)) {
            result = 37 * result + _inputList.hashCode();
+           org.castor.util.CycleBreaker.releaseCycleHandle(_inputList);
         }
         
         return result;
index ae91252..e96b4fd 100644 (file)
@@ -76,19 +76,51 @@ implements java.io.Serializable
         if (obj instanceof Glyph) {\r
         \r
             Glyph temp = (Glyph)obj;\r
+            boolean thcycle;\r
+            boolean tmcycle;\r
             if (this._content != null) {\r
                 if (temp._content == null) return false;\r
-                else if (!(this._content.equals(temp._content))) \r
-                    return false;\r
-            }\r
-            else if (temp._content != null)\r
+                if (this._content != temp._content) {\r
+                    thcycle=org.castor.util.CycleBreaker.startingToCycle(this._content);\r
+                    tmcycle=org.castor.util.CycleBreaker.startingToCycle(temp._content);\r
+                    if (thcycle!=tmcycle) {\r
+                        if (!thcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(this._content); };\r
+                        if (!tmcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(temp._content); };\r
+                        return false;\r
+                    }\r
+                    if (!thcycle) {\r
+                        if (!this._content.equals(temp._content)) {\r
+                            org.castor.util.CycleBreaker.releaseCycleHandle(this._content);\r
+                            org.castor.util.CycleBreaker.releaseCycleHandle(temp._content);\r
+                            return false;\r
+                        }\r
+                        org.castor.util.CycleBreaker.releaseCycleHandle(this._content);\r
+                        org.castor.util.CycleBreaker.releaseCycleHandle(temp._content);\r
+                    }\r
+                }\r
+            } else if (temp._content != null)\r
                 return false;\r
             if (this._dict != null) {\r
                 if (temp._dict == null) return false;\r
-                else if (!(this._dict.equals(temp._dict))) \r
-                    return false;\r
-            }\r
-            else if (temp._dict != null)\r
+                if (this._dict != temp._dict) {\r
+                    thcycle=org.castor.util.CycleBreaker.startingToCycle(this._dict);\r
+                    tmcycle=org.castor.util.CycleBreaker.startingToCycle(temp._dict);\r
+                    if (thcycle!=tmcycle) {\r
+                        if (!thcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(this._dict); };\r
+                        if (!tmcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(temp._dict); };\r
+                        return false;\r
+                    }\r
+                    if (!thcycle) {\r
+                        if (!this._dict.equals(temp._dict)) {\r
+                            org.castor.util.CycleBreaker.releaseCycleHandle(this._dict);\r
+                            org.castor.util.CycleBreaker.releaseCycleHandle(temp._dict);\r
+                            return false;\r
+                        }\r
+                        org.castor.util.CycleBreaker.releaseCycleHandle(this._dict);\r
+                        org.castor.util.CycleBreaker.releaseCycleHandle(temp._dict);\r
+                    }\r
+                }\r
+            } else if (temp._dict != null)\r
                 return false;\r
             return true;\r
         }\r
@@ -135,11 +167,15 @@ implements java.io.Serializable
         int result = super.hashCode();\r
         \r
         long tmp;\r
-        if (_content != null) {\r
+        if (_content != null\r
+            && !org.castor.util.CycleBreaker.startingToCycle(_content)) {\r
            result = 37 * result + _content.hashCode();\r
+           org.castor.util.CycleBreaker.releaseCycleHandle(_content);\r
         }\r
-        if (_dict != null) {\r
+        if (_dict != null\r
+            && !org.castor.util.CycleBreaker.startingToCycle(_dict)) {\r
            result = 37 * result + _dict.hashCode();\r
+           org.castor.util.CycleBreaker.releaseCycleHandle(_dict);\r
         }\r
         \r
         return result;\r
index 3ad7a8e..b5b2de9 100644 (file)
@@ -109,19 +109,51 @@ implements java.io.Serializable
         if (obj instanceof Input) {\r
         \r
             Input temp = (Input)obj;\r
+            boolean thcycle;\r
+            boolean tmcycle;\r
             if (this._name != null) {\r
                 if (temp._name == null) return false;\r
-                else if (!(this._name.equals(temp._name))) \r
-                    return false;\r
-            }\r
-            else if (temp._name != null)\r
+                if (this._name != temp._name) {\r
+                    thcycle=org.castor.util.CycleBreaker.startingToCycle(this._name);\r
+                    tmcycle=org.castor.util.CycleBreaker.startingToCycle(temp._name);\r
+                    if (thcycle!=tmcycle) {\r
+                        if (!thcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(this._name); };\r
+                        if (!tmcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(temp._name); };\r
+                        return false;\r
+                    }\r
+                    if (!thcycle) {\r
+                        if (!this._name.equals(temp._name)) {\r
+                            org.castor.util.CycleBreaker.releaseCycleHandle(this._name);\r
+                            org.castor.util.CycleBreaker.releaseCycleHandle(temp._name);\r
+                            return false;\r
+                        }\r
+                        org.castor.util.CycleBreaker.releaseCycleHandle(this._name);\r
+                        org.castor.util.CycleBreaker.releaseCycleHandle(temp._name);\r
+                    }\r
+                }\r
+            } else if (temp._name != null)\r
                 return false;\r
             if (this._objRef != null) {\r
                 if (temp._objRef == null) return false;\r
-                else if (!(this._objRef.equals(temp._objRef))) \r
-                    return false;\r
-            }\r
-            else if (temp._objRef != null)\r
+                if (this._objRef != temp._objRef) {\r
+                    thcycle=org.castor.util.CycleBreaker.startingToCycle(this._objRef);\r
+                    tmcycle=org.castor.util.CycleBreaker.startingToCycle(temp._objRef);\r
+                    if (thcycle!=tmcycle) {\r
+                        if (!thcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(this._objRef); };\r
+                        if (!tmcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(temp._objRef); };\r
+                        return false;\r
+                    }\r
+                    if (!thcycle) {\r
+                        if (!this._objRef.equals(temp._objRef)) {\r
+                            org.castor.util.CycleBreaker.releaseCycleHandle(this._objRef);\r
+                            org.castor.util.CycleBreaker.releaseCycleHandle(temp._objRef);\r
+                            return false;\r
+                        }\r
+                        org.castor.util.CycleBreaker.releaseCycleHandle(this._objRef);\r
+                        org.castor.util.CycleBreaker.releaseCycleHandle(temp._objRef);\r
+                    }\r
+                }\r
+            } else if (temp._objRef != null)\r
                 return false;\r
             return true;\r
         }\r
@@ -207,11 +239,15 @@ implements java.io.Serializable
         int result = super.hashCode();\r
         \r
         long tmp;\r
-        if (_name != null) {\r
+        if (_name != null\r
+            && !org.castor.util.CycleBreaker.startingToCycle(_name)) {\r
            result = 37 * result + _name.hashCode();\r
+           org.castor.util.CycleBreaker.releaseCycleHandle(_name);\r
         }\r
-        if (_objRef != null) {\r
+        if (_objRef != null\r
+            && !org.castor.util.CycleBreaker.startingToCycle(_objRef)) {\r
            result = 37 * result + _objRef.hashCode();\r
+           org.castor.util.CycleBreaker.releaseCycleHandle(_objRef);\r
         }\r
         \r
         return result;\r
index 6cfeec0..9ffd596 100644 (file)
@@ -64,12 +64,29 @@ implements java.io.Serializable
         if (obj instanceof Instance) {\r
         \r
             Instance temp = (Instance)obj;\r
+            boolean thcycle;\r
+            boolean tmcycle;\r
             if (this._urn != null) {\r
                 if (temp._urn == null) return false;\r
-                else if (!(this._urn.equals(temp._urn))) \r
-                    return false;\r
-            }\r
-            else if (temp._urn != null)\r
+                if (this._urn != temp._urn) {\r
+                    thcycle=org.castor.util.CycleBreaker.startingToCycle(this._urn);\r
+                    tmcycle=org.castor.util.CycleBreaker.startingToCycle(temp._urn);\r
+                    if (thcycle!=tmcycle) {\r
+                        if (!thcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(this._urn); };\r
+                        if (!tmcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(temp._urn); };\r
+                        return false;\r
+                    }\r
+                    if (!thcycle) {\r
+                        if (!this._urn.equals(temp._urn)) {\r
+                            org.castor.util.CycleBreaker.releaseCycleHandle(this._urn);\r
+                            org.castor.util.CycleBreaker.releaseCycleHandle(temp._urn);\r
+                            return false;\r
+                        }\r
+                        org.castor.util.CycleBreaker.releaseCycleHandle(this._urn);\r
+                        org.castor.util.CycleBreaker.releaseCycleHandle(temp._urn);\r
+                    }\r
+                }\r
+            } else if (temp._urn != null)\r
                 return false;\r
             return true;\r
         }\r
@@ -99,8 +116,10 @@ implements java.io.Serializable
         int result = super.hashCode();\r
         \r
         long tmp;\r
-        if (_urn != null) {\r
+        if (_urn != null\r
+            && !org.castor.util.CycleBreaker.startingToCycle(_urn)) {\r
            result = 37 * result + _urn.hashCode();\r
+           org.castor.util.CycleBreaker.releaseCycleHandle(_urn);\r
         }\r
         \r
         return result;\r
index aea537d..17633cf 100644 (file)
@@ -70,19 +70,51 @@ implements java.io.Serializable
         if (obj instanceof Link) {\r
         \r
             Link temp = (Link)obj;\r
+            boolean thcycle;\r
+            boolean tmcycle;\r
             if (this._content != null) {\r
                 if (temp._content == null) return false;\r
-                else if (!(this._content.equals(temp._content))) \r
-                    return false;\r
-            }\r
-            else if (temp._content != null)\r
+                if (this._content != temp._content) {\r
+                    thcycle=org.castor.util.CycleBreaker.startingToCycle(this._content);\r
+                    tmcycle=org.castor.util.CycleBreaker.startingToCycle(temp._content);\r
+                    if (thcycle!=tmcycle) {\r
+                        if (!thcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(this._content); };\r
+                        if (!tmcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(temp._content); };\r
+                        return false;\r
+                    }\r
+                    if (!thcycle) {\r
+                        if (!this._content.equals(temp._content)) {\r
+                            org.castor.util.CycleBreaker.releaseCycleHandle(this._content);\r
+                            org.castor.util.CycleBreaker.releaseCycleHandle(temp._content);\r
+                            return false;\r
+                        }\r
+                        org.castor.util.CycleBreaker.releaseCycleHandle(this._content);\r
+                        org.castor.util.CycleBreaker.releaseCycleHandle(temp._content);\r
+                    }\r
+                }\r
+            } else if (temp._content != null)\r
                 return false;\r
             if (this._href != null) {\r
                 if (temp._href == null) return false;\r
-                else if (!(this._href.equals(temp._href))) \r
-                    return false;\r
-            }\r
-            else if (temp._href != null)\r
+                if (this._href != temp._href) {\r
+                    thcycle=org.castor.util.CycleBreaker.startingToCycle(this._href);\r
+                    tmcycle=org.castor.util.CycleBreaker.startingToCycle(temp._href);\r
+                    if (thcycle!=tmcycle) {\r
+                        if (!thcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(this._href); };\r
+                        if (!tmcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(temp._href); };\r
+                        return false;\r
+                    }\r
+                    if (!thcycle) {\r
+                        if (!this._href.equals(temp._href)) {\r
+                            org.castor.util.CycleBreaker.releaseCycleHandle(this._href);\r
+                            org.castor.util.CycleBreaker.releaseCycleHandle(temp._href);\r
+                            return false;\r
+                        }\r
+                        org.castor.util.CycleBreaker.releaseCycleHandle(this._href);\r
+                        org.castor.util.CycleBreaker.releaseCycleHandle(temp._href);\r
+                    }\r
+                }\r
+            } else if (temp._href != null)\r
                 return false;\r
             return true;\r
         }\r
@@ -124,11 +156,15 @@ implements java.io.Serializable
         int result = super.hashCode();\r
         \r
         long tmp;\r
-        if (_content != null) {\r
+        if (_content != null\r
+            && !org.castor.util.CycleBreaker.startingToCycle(_content)) {\r
            result = 37 * result + _content.hashCode();\r
+           org.castor.util.CycleBreaker.releaseCycleHandle(_content);\r
         }\r
-        if (_href != null) {\r
+        if (_href != null\r
+            && !org.castor.util.CycleBreaker.startingToCycle(_href)) {\r
            result = 37 * result + _href.hashCode();\r
+           org.castor.util.CycleBreaker.releaseCycleHandle(_href);\r
         }\r
         \r
         return result;\r
diff --git a/src/uk/ac/vamsas/objects/core/Local.java b/src/uk/ac/vamsas/objects/core/Local.java
new file mode 100644 (file)
index 0000000..8b58b7c
--- /dev/null
@@ -0,0 +1,154 @@
+/*\r
+ * This class was automatically generated with \r
+ * <a href="http://www.castor.org">Castor 1.1</a>, using an XML\r
+ * Schema.\r
+ * $Id$\r
+ */\r
+\r
+package uk.ac.vamsas.objects.core;\r
+\r
+  //---------------------------------/\r
+ //- Imported classes and packages -/\r
+//---------------------------------/\r
+\r
+import org.exolab.castor.xml.Marshaller;\r
+import org.exolab.castor.xml.Unmarshaller;\r
+\r
+/**\r
+ * \r
+ * \r
+ * @version $Revision$ $Date$\r
+ */\r
+public class Local extends MapRangeType \r
+implements java.io.Serializable\r
+{\r
+\r
+\r
+      //----------------/\r
+     //- Constructors -/\r
+    //----------------/\r
+\r
+    public Local() {\r
+        super();\r
+    }\r
+\r
+\r
+      //-----------/\r
+     //- Methods -/\r
+    //-----------/\r
+\r
+    /**\r
+     * Overrides the java.lang.Object.equals method.\r
+     * \r
+     * @param obj\r
+     * @return true if the objects are equal.\r
+     */\r
+    public boolean equals(\r
+            final java.lang.Object obj) {\r
+        if ( this == obj )\r
+            return true;\r
+        \r
+        if (super.equals(obj)==false)\r
+            return false;\r
+        \r
+        if (obj instanceof Local) {\r
+        \r
+        return true;\r
+    }\r
+    return false;\r
+    }\r
+\r
+    /**\r
+     * Overrides the java.lang.Object.hashCode method.\r
+     * <p>\r
+     * The following steps came from <b>Effective Java Programming\r
+     * Language Guide</b> by Joshua Bloch, Chapter 3\r
+     * \r
+     * @return a hash code value for the object.\r
+     */\r
+    public int hashCode(\r
+    ) {\r
+        int result = super.hashCode();\r
+        \r
+        long tmp;\r
+        \r
+        return result;\r
+    }\r
+\r
+    /**\r
+     * Method isValid.\r
+     * \r
+     * @return true if this object is valid according to the schema\r
+     */\r
+    public boolean isValid(\r
+    ) {\r
+        try {\r
+            validate();\r
+        } catch (org.exolab.castor.xml.ValidationException vex) {\r
+            return false;\r
+        }\r
+        return true;\r
+    }\r
+\r
+    /**\r
+     * \r
+     * \r
+     * @param out\r
+     * @throws org.exolab.castor.xml.MarshalException if object is\r
+     * null or if any SAXException is thrown during marshaling\r
+     * @throws org.exolab.castor.xml.ValidationException if this\r
+     * object is an invalid instance according to the schema\r
+     */\r
+    public void marshal(\r
+            final java.io.Writer out)\r
+    throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {\r
+        Marshaller.marshal(this, out);\r
+    }\r
+\r
+    /**\r
+     * \r
+     * \r
+     * @param handler\r
+     * @throws java.io.IOException if an IOException occurs during\r
+     * marshaling\r
+     * @throws org.exolab.castor.xml.ValidationException if this\r
+     * object is an invalid instance according to the schema\r
+     * @throws org.exolab.castor.xml.MarshalException if object is\r
+     * null or if any SAXException is thrown during marshaling\r
+     */\r
+    public void marshal(\r
+            final org.xml.sax.ContentHandler handler)\r
+    throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {\r
+        Marshaller.marshal(this, handler);\r
+    }\r
+\r
+    /**\r
+     * Method unmarshal.\r
+     * \r
+     * @param reader\r
+     * @throws org.exolab.castor.xml.MarshalException if object is\r
+     * null or if any SAXException is thrown during marshaling\r
+     * @throws org.exolab.castor.xml.ValidationException if this\r
+     * object is an invalid instance according to the schema\r
+     * @return the unmarshaled uk.ac.vamsas.objects.core.RangeType\r
+     */\r
+    public static uk.ac.vamsas.objects.core.RangeType unmarshal(\r
+            final java.io.Reader reader)\r
+    throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {\r
+        return (uk.ac.vamsas.objects.core.RangeType) Unmarshaller.unmarshal(uk.ac.vamsas.objects.core.Local.class, reader);\r
+    }\r
+\r
+    /**\r
+     * \r
+     * \r
+     * @throws org.exolab.castor.xml.ValidationException if this\r
+     * object is an invalid instance according to the schema\r
+     */\r
+    public void validate(\r
+    )\r
+    throws org.exolab.castor.xml.ValidationException {\r
+        org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();\r
+        validator.validate(this);\r
+    }\r
+\r
+}\r
index 915bd07..cb41ef9 100644 (file)
@@ -65,12 +65,29 @@ implements java.io.Serializable
         if (obj instanceof LockFile) {
         
             LockFile temp = (LockFile)obj;
+            boolean thcycle;
+            boolean tmcycle;
             if (this._content != null) {
                 if (temp._content == null) return false;
-                else if (!(this._content.equals(temp._content))) 
-                    return false;
-            }
-            else if (temp._content != null)
+                if (this._content != temp._content) {
+                    thcycle=org.castor.util.CycleBreaker.startingToCycle(this._content);
+                    tmcycle=org.castor.util.CycleBreaker.startingToCycle(temp._content);
+                    if (thcycle!=tmcycle) {
+                        if (!thcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(this._content); };
+                        if (!tmcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(temp._content); };
+                        return false;
+                    }
+                    if (!thcycle) {
+                        if (!this._content.equals(temp._content)) {
+                            org.castor.util.CycleBreaker.releaseCycleHandle(this._content);
+                            org.castor.util.CycleBreaker.releaseCycleHandle(temp._content);
+                            return false;
+                        }
+                        org.castor.util.CycleBreaker.releaseCycleHandle(this._content);
+                        org.castor.util.CycleBreaker.releaseCycleHandle(temp._content);
+                    }
+                }
+            } else if (temp._content != null)
                 return false;
             return true;
         }
@@ -101,8 +118,10 @@ implements java.io.Serializable
         int result = super.hashCode();
         
         long tmp;
-        if (_content != null) {
+        if (_content != null
+            && !org.castor.util.CycleBreaker.startingToCycle(_content)) {
            result = 37 * result + _content.hashCode();
+           org.castor.util.CycleBreaker.releaseCycleHandle(_content);
         }
         
         return result;
index 5d5668d..561589c 100644 (file)
@@ -15,25 +15,35 @@ import org.exolab.castor.xml.Marshaller;
 import org.exolab.castor.xml.Unmarshaller;\r
 \r
 /**\r
- * From: Offset to first\r
- *  position in dataset sequence record that\r
- *  this database entry maps to To: Offset\r
- *  to last position in dataset sequence\r
- *  record that this database entry maps to\r
- *  Start: Offset to first last position in\r
- *  database entry that first (or offset)\r
- *  position in sequence maps to End: Offset\r
- *  to last position in database entry that\r
- *  last (offset) position in sequence maps\r
- *  to \r
+ * the local mapType maps from the parent\r
+ *  sequence coordinate frame to the reference\r
+ *  frame defined by the dbRef element.\r
+ *  The mapped mapType is the mapped range defined\r
+ *  on the dbRef element's reference frame.\r
+ *  Conventionally, the unit attribute defaults to 1, or\r
+ *  will be inferred from the local sequence's\r
+ *  dictionary type and any dictionary type associated\r
+ *  with the database being mapped to. \r
+ *  However, it may be used to avoid ambiguity.\r
+ *  \r
  * \r
  * @version $Revision$ $Date$\r
  */\r
-public class Map extends uk.ac.vamsas.objects.core.MapList \r
+public class Map extends uk.ac.vamsas.objects.core.MapType \r
 implements java.io.Serializable\r
 {\r
 \r
 \r
+      //--------------------------/\r
+     //- Class/Member Variables -/\r
+    //--------------------------/\r
+\r
+    /**\r
+     * Field _id.\r
+     */\r
+    private java.lang.String _id;\r
+\r
+\r
       //----------------/\r
      //- Constructors -/\r
     //----------------/\r
@@ -63,9 +73,44 @@ implements java.io.Serializable
         \r
         if (obj instanceof Map) {\r
         \r
-        return true;\r
+            Map temp = (Map)obj;\r
+            boolean thcycle;\r
+            boolean tmcycle;\r
+            if (this._id != null) {\r
+                if (temp._id == null) return false;\r
+                if (this._id != temp._id) {\r
+                    thcycle=org.castor.util.CycleBreaker.startingToCycle(this._id);\r
+                    tmcycle=org.castor.util.CycleBreaker.startingToCycle(temp._id);\r
+                    if (thcycle!=tmcycle) {\r
+                        if (!thcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(this._id); };\r
+                        if (!tmcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(temp._id); };\r
+                        return false;\r
+                    }\r
+                    if (!thcycle) {\r
+                        if (!this._id.equals(temp._id)) {\r
+                            org.castor.util.CycleBreaker.releaseCycleHandle(this._id);\r
+                            org.castor.util.CycleBreaker.releaseCycleHandle(temp._id);\r
+                            return false;\r
+                        }\r
+                        org.castor.util.CycleBreaker.releaseCycleHandle(this._id);\r
+                        org.castor.util.CycleBreaker.releaseCycleHandle(temp._id);\r
+                    }\r
+                }\r
+            } else if (temp._id != null)\r
+                return false;\r
+            return true;\r
+        }\r
+        return false;\r
     }\r
-    return false;\r
+\r
+    /**\r
+     * Returns the value of field 'id'.\r
+     * \r
+     * @return the value of field 'Id'.\r
+     */\r
+    public java.lang.String getId(\r
+    ) {\r
+        return this._id;\r
     }\r
 \r
     /**\r
@@ -81,6 +126,11 @@ implements java.io.Serializable
         int result = super.hashCode();\r
         \r
         long tmp;\r
+        if (_id != null\r
+            && !org.castor.util.CycleBreaker.startingToCycle(_id)) {\r
+           result = 37 * result + _id.hashCode();\r
+           org.castor.util.CycleBreaker.releaseCycleHandle(_id);\r
+        }\r
         \r
         return result;\r
     }\r
@@ -133,6 +183,16 @@ implements java.io.Serializable
     }\r
 \r
     /**\r
+     * Sets the value of field 'id'.\r
+     * \r
+     * @param id the value of field 'id'.\r
+     */\r
+    public void setId(\r
+            final java.lang.String id) {\r
+        this._id = id;\r
+    }\r
+\r
+    /**\r
      * Method unmarshal.\r
      * \r
      * @param reader\r
@@ -140,12 +200,12 @@ implements java.io.Serializable
      * null or if any SAXException is thrown during marshaling\r
      * @throws org.exolab.castor.xml.ValidationException if this\r
      * object is an invalid instance according to the schema\r
-     * @return the unmarshaled uk.ac.vamsas.objects.core.MapList\r
+     * @return the unmarshaled uk.ac.vamsas.objects.core.MapType\r
      */\r
-    public static uk.ac.vamsas.objects.core.MapList unmarshal(\r
+    public static uk.ac.vamsas.objects.core.MapType unmarshal(\r
             final java.io.Reader reader)\r
     throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {\r
-        return (uk.ac.vamsas.objects.core.MapList) Unmarshaller.unmarshal(uk.ac.vamsas.objects.core.Map.class, reader);\r
+        return (uk.ac.vamsas.objects.core.MapType) Unmarshaller.unmarshal(uk.ac.vamsas.objects.core.Map.class, reader);\r
     }\r
 \r
     /**\r
diff --git a/src/uk/ac/vamsas/objects/core/MapRangeType.java b/src/uk/ac/vamsas/objects/core/MapRangeType.java
new file mode 100644 (file)
index 0000000..c390687
--- /dev/null
@@ -0,0 +1,240 @@
+/*\r
+ * This class was automatically generated with \r
+ * <a href="http://www.castor.org">Castor 1.1</a>, using an XML\r
+ * Schema.\r
+ * $Id$\r
+ */\r
+\r
+package uk.ac.vamsas.objects.core;\r
+\r
+  //---------------------------------/\r
+ //- Imported classes and packages -/\r
+//---------------------------------/\r
+\r
+import org.exolab.castor.xml.Marshaller;\r
+import org.exolab.castor.xml.Unmarshaller;\r
+\r
+/**\r
+ * Class MapRangeType.\r
+ * \r
+ * @version $Revision$ $Date$\r
+ */\r
+public class MapRangeType extends uk.ac.vamsas.objects.core.RangeType \r
+implements java.io.Serializable\r
+{\r
+\r
+\r
+      //--------------------------/\r
+     //- Class/Member Variables -/\r
+    //--------------------------/\r
+\r
+    /**\r
+     * number of dictionary symbol widths involved in each\r
+     *  mapped position on this sequence (for example, 3 for a dna\r
+     * sequence exon\r
+     *  region that is being mapped to a protein sequence). This is\r
+     * optional,\r
+     *  since the unit can be usually be inferred from the\r
+     * dictionary type of\r
+     *  each sequence involved in the mapping. \r
+     */\r
+    private long _unit;\r
+\r
+    /**\r
+     * keeps track of state for field: _unit\r
+     */\r
+    private boolean _has_unit;\r
+\r
+\r
+      //----------------/\r
+     //- Constructors -/\r
+    //----------------/\r
+\r
+    public MapRangeType() {\r
+        super();\r
+    }\r
+\r
+\r
+      //-----------/\r
+     //- Methods -/\r
+    //-----------/\r
+\r
+    /**\r
+     */\r
+    public void deleteUnit(\r
+    ) {\r
+        this._has_unit= false;\r
+    }\r
+\r
+    /**\r
+     * Overrides the java.lang.Object.equals method.\r
+     * \r
+     * @param obj\r
+     * @return true if the objects are equal.\r
+     */\r
+    public boolean equals(\r
+            final java.lang.Object obj) {\r
+        if ( this == obj )\r
+            return true;\r
+        \r
+        if (super.equals(obj)==false)\r
+            return false;\r
+        \r
+        if (obj instanceof MapRangeType) {\r
+        \r
+            MapRangeType temp = (MapRangeType)obj;\r
+            boolean thcycle;\r
+            boolean tmcycle;\r
+            if (this._unit != temp._unit)\r
+                return false;\r
+            if (this._has_unit != temp._has_unit)\r
+                return false;\r
+            return true;\r
+        }\r
+        return false;\r
+    }\r
+\r
+    /**\r
+     * Returns the value of field 'unit'. The field 'unit' has the\r
+     * following description: number of dictionary symbol widths\r
+     * involved in each\r
+     *  mapped position on this sequence (for example, 3 for a dna\r
+     * sequence exon\r
+     *  region that is being mapped to a protein sequence). This is\r
+     * optional,\r
+     *  since the unit can be usually be inferred from the\r
+     * dictionary type of\r
+     *  each sequence involved in the mapping. \r
+     * \r
+     * @return the value of field 'Unit'.\r
+     */\r
+    public long getUnit(\r
+    ) {\r
+        return this._unit;\r
+    }\r
+\r
+    /**\r
+     * Method hasUnit.\r
+     * \r
+     * @return true if at least one Unit has been added\r
+     */\r
+    public boolean hasUnit(\r
+    ) {\r
+        return this._has_unit;\r
+    }\r
+\r
+    /**\r
+     * Overrides the java.lang.Object.hashCode method.\r
+     * <p>\r
+     * The following steps came from <b>Effective Java Programming\r
+     * Language Guide</b> by Joshua Bloch, Chapter 3\r
+     * \r
+     * @return a hash code value for the object.\r
+     */\r
+    public int hashCode(\r
+    ) {\r
+        int result = super.hashCode();\r
+        \r
+        long tmp;\r
+        result = 37 * result + (int)(_unit^(_unit>>>32));\r
+        \r
+        return result;\r
+    }\r
+\r
+    /**\r
+     * Method isValid.\r
+     * \r
+     * @return true if this object is valid according to the schema\r
+     */\r
+    public boolean isValid(\r
+    ) {\r
+        try {\r
+            validate();\r
+        } catch (org.exolab.castor.xml.ValidationException vex) {\r
+            return false;\r
+        }\r
+        return true;\r
+    }\r
+\r
+    /**\r
+     * \r
+     * \r
+     * @param out\r
+     * @throws org.exolab.castor.xml.MarshalException if object is\r
+     * null or if any SAXException is thrown during marshaling\r
+     * @throws org.exolab.castor.xml.ValidationException if this\r
+     * object is an invalid instance according to the schema\r
+     */\r
+    public void marshal(\r
+            final java.io.Writer out)\r
+    throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {\r
+        Marshaller.marshal(this, out);\r
+    }\r
+\r
+    /**\r
+     * \r
+     * \r
+     * @param handler\r
+     * @throws java.io.IOException if an IOException occurs during\r
+     * marshaling\r
+     * @throws org.exolab.castor.xml.ValidationException if this\r
+     * object is an invalid instance according to the schema\r
+     * @throws org.exolab.castor.xml.MarshalException if object is\r
+     * null or if any SAXException is thrown during marshaling\r
+     */\r
+    public void marshal(\r
+            final org.xml.sax.ContentHandler handler)\r
+    throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {\r
+        Marshaller.marshal(this, handler);\r
+    }\r
+\r
+    /**\r
+     * Sets the value of field 'unit'. The field 'unit' has the\r
+     * following description: number of dictionary symbol widths\r
+     * involved in each\r
+     *  mapped position on this sequence (for example, 3 for a dna\r
+     * sequence exon\r
+     *  region that is being mapped to a protein sequence). This is\r
+     * optional,\r
+     *  since the unit can be usually be inferred from the\r
+     * dictionary type of\r
+     *  each sequence involved in the mapping. \r
+     * \r
+     * @param unit the value of field 'unit'.\r
+     */\r
+    public void setUnit(\r
+            final long unit) {\r
+        this._unit = unit;\r
+        this._has_unit = true;\r
+    }\r
+\r
+    /**\r
+     * Method unmarshal.\r
+     * \r
+     * @param reader\r
+     * @throws org.exolab.castor.xml.MarshalException if object is\r
+     * null or if any SAXException is thrown during marshaling\r
+     * @throws org.exolab.castor.xml.ValidationException if this\r
+     * object is an invalid instance according to the schema\r
+     * @return the unmarshaled uk.ac.vamsas.objects.core.RangeType\r
+     */\r
+    public static uk.ac.vamsas.objects.core.RangeType unmarshal(\r
+            final java.io.Reader reader)\r
+    throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {\r
+        return (uk.ac.vamsas.objects.core.RangeType) Unmarshaller.unmarshal(uk.ac.vamsas.objects.core.MapRangeType.class, reader);\r
+    }\r
+\r
+    /**\r
+     * \r
+     * \r
+     * @throws org.exolab.castor.xml.ValidationException if this\r
+     * object is an invalid instance according to the schema\r
+     */\r
+    public void validate(\r
+    )\r
+    throws org.exolab.castor.xml.ValidationException {\r
+        org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();\r
+        validator.validate(this);\r
+    }\r
+\r
+}\r
diff --git a/src/uk/ac/vamsas/objects/core/MapType.java b/src/uk/ac/vamsas/objects/core/MapType.java
new file mode 100644 (file)
index 0000000..130f17d
--- /dev/null
@@ -0,0 +1,266 @@
+/*\r
+ * This class was automatically generated with \r
+ * <a href="http://www.castor.org">Castor 1.1</a>, using an XML\r
+ * Schema.\r
+ * $Id$\r
+ */\r
+\r
+package uk.ac.vamsas.objects.core;\r
+\r
+  //---------------------------------/\r
+ //- Imported classes and packages -/\r
+//---------------------------------/\r
+\r
+import org.exolab.castor.xml.Marshaller;\r
+import org.exolab.castor.xml.Unmarshaller;\r
+\r
+/**\r
+ * Two sets of ranges defined between objects - usually sequences,\r
+ * indicating which\r
+ *  regions on each are mapped. \r
+ * \r
+ * @version $Revision$ $Date$\r
+ */\r
+public class MapType extends uk.ac.vamsas.client.Vobject \r
+implements java.io.Serializable\r
+{\r
+\r
+\r
+      //--------------------------/\r
+     //- Class/Member Variables -/\r
+    //--------------------------/\r
+\r
+    /**\r
+     */\r
+    private uk.ac.vamsas.objects.core.Local _local;\r
+\r
+    /**\r
+     */\r
+    private uk.ac.vamsas.objects.core.Mapped _mapped;\r
+\r
+\r
+      //----------------/\r
+     //- Constructors -/\r
+    //----------------/\r
+\r
+    public MapType() {\r
+        super();\r
+    }\r
+\r
+\r
+      //-----------/\r
+     //- Methods -/\r
+    //-----------/\r
+\r
+    /**\r
+     * Overrides the java.lang.Object.equals method.\r
+     * \r
+     * @param obj\r
+     * @return true if the objects are equal.\r
+     */\r
+    public boolean equals(\r
+            final java.lang.Object obj) {\r
+        if ( this == obj )\r
+            return true;\r
+        \r
+        if (super.equals(obj)==false)\r
+            return false;\r
+        \r
+        if (obj instanceof MapType) {\r
+        \r
+            MapType temp = (MapType)obj;\r
+            boolean thcycle;\r
+            boolean tmcycle;\r
+            if (this._local != null) {\r
+                if (temp._local == null) return false;\r
+                if (this._local != temp._local) {\r
+                    thcycle=org.castor.util.CycleBreaker.startingToCycle(this._local);\r
+                    tmcycle=org.castor.util.CycleBreaker.startingToCycle(temp._local);\r
+                    if (thcycle!=tmcycle) {\r
+                        if (!thcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(this._local); };\r
+                        if (!tmcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(temp._local); };\r
+                        return false;\r
+                    }\r
+                    if (!thcycle) {\r
+                        if (!this._local.equals(temp._local)) {\r
+                            org.castor.util.CycleBreaker.releaseCycleHandle(this._local);\r
+                            org.castor.util.CycleBreaker.releaseCycleHandle(temp._local);\r
+                            return false;\r
+                        }\r
+                        org.castor.util.CycleBreaker.releaseCycleHandle(this._local);\r
+                        org.castor.util.CycleBreaker.releaseCycleHandle(temp._local);\r
+                    }\r
+                }\r
+            } else if (temp._local != null)\r
+                return false;\r
+            if (this._mapped != null) {\r
+                if (temp._mapped == null) return false;\r
+                if (this._mapped != temp._mapped) {\r
+                    thcycle=org.castor.util.CycleBreaker.startingToCycle(this._mapped);\r
+                    tmcycle=org.castor.util.CycleBreaker.startingToCycle(temp._mapped);\r
+                    if (thcycle!=tmcycle) {\r
+                        if (!thcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(this._mapped); };\r
+                        if (!tmcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(temp._mapped); };\r
+                        return false;\r
+                    }\r
+                    if (!thcycle) {\r
+                        if (!this._mapped.equals(temp._mapped)) {\r
+                            org.castor.util.CycleBreaker.releaseCycleHandle(this._mapped);\r
+                            org.castor.util.CycleBreaker.releaseCycleHandle(temp._mapped);\r
+                            return false;\r
+                        }\r
+                        org.castor.util.CycleBreaker.releaseCycleHandle(this._mapped);\r
+                        org.castor.util.CycleBreaker.releaseCycleHandle(temp._mapped);\r
+                    }\r
+                }\r
+            } else if (temp._mapped != null)\r
+                return false;\r
+            return true;\r
+        }\r
+        return false;\r
+    }\r
+\r
+    /**\r
+     * Returns the value of field 'local'.\r
+     * \r
+     * @return the value of field 'Local'.\r
+     */\r
+    public uk.ac.vamsas.objects.core.Local getLocal(\r
+    ) {\r
+        return this._local;\r
+    }\r
+\r
+    /**\r
+     * Returns the value of field 'mapped'.\r
+     * \r
+     * @return the value of field 'Mapped'.\r
+     */\r
+    public uk.ac.vamsas.objects.core.Mapped getMapped(\r
+    ) {\r
+        return this._mapped;\r
+    }\r
+\r
+    /**\r
+     * Overrides the java.lang.Object.hashCode method.\r
+     * <p>\r
+     * The following steps came from <b>Effective Java Programming\r
+     * Language Guide</b> by Joshua Bloch, Chapter 3\r
+     * \r
+     * @return a hash code value for the object.\r
+     */\r
+    public int hashCode(\r
+    ) {\r
+        int result = super.hashCode();\r
+        \r
+        long tmp;\r
+        if (_local != null\r
+            && !org.castor.util.CycleBreaker.startingToCycle(_local)) {\r
+           result = 37 * result + _local.hashCode();\r
+           org.castor.util.CycleBreaker.releaseCycleHandle(_local);\r
+        }\r
+        if (_mapped != null\r
+            && !org.castor.util.CycleBreaker.startingToCycle(_mapped)) {\r
+           result = 37 * result + _mapped.hashCode();\r
+           org.castor.util.CycleBreaker.releaseCycleHandle(_mapped);\r
+        }\r
+        \r
+        return result;\r
+    }\r
+\r
+    /**\r
+     * Method isValid.\r
+     * \r
+     * @return true if this object is valid according to the schema\r
+     */\r
+    public boolean isValid(\r
+    ) {\r
+        try {\r
+            validate();\r
+        } catch (org.exolab.castor.xml.ValidationException vex) {\r
+            return false;\r
+        }\r
+        return true;\r
+    }\r
+\r
+    /**\r
+     * \r
+     * \r
+     * @param out\r
+     * @throws org.exolab.castor.xml.MarshalException if object is\r
+     * null or if any SAXException is thrown during marshaling\r
+     * @throws org.exolab.castor.xml.ValidationException if this\r
+     * object is an invalid instance according to the schema\r
+     */\r
+    public void marshal(\r
+            final java.io.Writer out)\r
+    throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {\r
+        Marshaller.marshal(this, out);\r
+    }\r
+\r
+    /**\r
+     * \r
+     * \r
+     * @param handler\r
+     * @throws java.io.IOException if an IOException occurs during\r
+     * marshaling\r
+     * @throws org.exolab.castor.xml.ValidationException if this\r
+     * object is an invalid instance according to the schema\r
+     * @throws org.exolab.castor.xml.MarshalException if object is\r
+     * null or if any SAXException is thrown during marshaling\r
+     */\r
+    public void marshal(\r
+            final org.xml.sax.ContentHandler handler)\r
+    throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {\r
+        Marshaller.marshal(this, handler);\r
+    }\r
+\r
+    /**\r
+     * Sets the value of field 'local'.\r
+     * \r
+     * @param local the value of field 'local'.\r
+     */\r
+    public void setLocal(\r
+            final uk.ac.vamsas.objects.core.Local local) {\r
+        this._local = local;\r
+    }\r
+\r
+    /**\r
+     * Sets the value of field 'mapped'.\r
+     * \r
+     * @param mapped the value of field 'mapped'.\r
+     */\r
+    public void setMapped(\r
+            final uk.ac.vamsas.objects.core.Mapped mapped) {\r
+        this._mapped = mapped;\r
+    }\r
+\r
+    /**\r
+     * Method unmarshal.\r
+     * \r
+     * @param reader\r
+     * @throws org.exolab.castor.xml.MarshalException if object is\r
+     * null or if any SAXException is thrown during marshaling\r
+     * @throws org.exolab.castor.xml.ValidationException if this\r
+     * object is an invalid instance according to the schema\r
+     * @return the unmarshaled uk.ac.vamsas.objects.core.MapType\r
+     */\r
+    public static uk.ac.vamsas.objects.core.MapType unmarshal(\r
+            final java.io.Reader reader)\r
+    throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {\r
+        return (uk.ac.vamsas.objects.core.MapType) Unmarshaller.unmarshal(uk.ac.vamsas.objects.core.MapType.class, reader);\r
+    }\r
+\r
+    /**\r
+     * \r
+     * \r
+     * @throws org.exolab.castor.xml.ValidationException if this\r
+     * object is an invalid instance according to the schema\r
+     */\r
+    public void validate(\r
+    )\r
+    throws org.exolab.castor.xml.ValidationException {\r
+        org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();\r
+        validator.validate(this);\r
+    }\r
+\r
+}\r
diff --git a/src/uk/ac/vamsas/objects/core/Mapped.java b/src/uk/ac/vamsas/objects/core/Mapped.java
new file mode 100644 (file)
index 0000000..4d3161f
--- /dev/null
@@ -0,0 +1,154 @@
+/*\r
+ * This class was automatically generated with \r
+ * <a href="http://www.castor.org">Castor 1.1</a>, using an XML\r
+ * Schema.\r
+ * $Id$\r
+ */\r
+\r
+package uk.ac.vamsas.objects.core;\r
+\r
+  //---------------------------------/\r
+ //- Imported classes and packages -/\r
+//---------------------------------/\r
+\r
+import org.exolab.castor.xml.Marshaller;\r
+import org.exolab.castor.xml.Unmarshaller;\r
+\r
+/**\r
+ * \r
+ * \r
+ * @version $Revision$ $Date$\r
+ */\r
+public class Mapped extends MapRangeType \r
+implements java.io.Serializable\r
+{\r
+\r
+\r
+      //----------------/\r
+     //- Constructors -/\r
+    //----------------/\r
+\r
+    public Mapped() {\r
+        super();\r
+    }\r
+\r
+\r
+      //-----------/\r
+     //- Methods -/\r
+    //-----------/\r
+\r
+    /**\r
+     * Overrides the java.lang.Object.equals method.\r
+     * \r
+     * @param obj\r
+     * @return true if the objects are equal.\r
+     */\r
+    public boolean equals(\r
+            final java.lang.Object obj) {\r
+        if ( this == obj )\r
+            return true;\r
+        \r
+        if (super.equals(obj)==false)\r
+            return false;\r
+        \r
+        if (obj instanceof Mapped) {\r
+        \r
+        return true;\r
+    }\r
+    return false;\r
+    }\r
+\r
+    /**\r
+     * Overrides the java.lang.Object.hashCode method.\r
+     * <p>\r
+     * The following steps came from <b>Effective Java Programming\r
+     * Language Guide</b> by Joshua Bloch, Chapter 3\r
+     * \r
+     * @return a hash code value for the object.\r
+     */\r
+    public int hashCode(\r
+    ) {\r
+        int result = super.hashCode();\r
+        \r
+        long tmp;\r
+        \r
+        return result;\r
+    }\r
+\r
+    /**\r
+     * Method isValid.\r
+     * \r
+     * @return true if this object is valid according to the schema\r
+     */\r
+    public boolean isValid(\r
+    ) {\r
+        try {\r
+            validate();\r
+        } catch (org.exolab.castor.xml.ValidationException vex) {\r
+            return false;\r
+        }\r
+        return true;\r
+    }\r
+\r
+    /**\r
+     * \r
+     * \r
+     * @param out\r
+     * @throws org.exolab.castor.xml.MarshalException if object is\r
+     * null or if any SAXException is thrown during marshaling\r
+     * @throws org.exolab.castor.xml.ValidationException if this\r
+     * object is an invalid instance according to the schema\r
+     */\r
+    public void marshal(\r
+            final java.io.Writer out)\r
+    throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {\r
+        Marshaller.marshal(this, out);\r
+    }\r
+\r
+    /**\r
+     * \r
+     * \r
+     * @param handler\r
+     * @throws java.io.IOException if an IOException occurs during\r
+     * marshaling\r
+     * @throws org.exolab.castor.xml.ValidationException if this\r
+     * object is an invalid instance according to the schema\r
+     * @throws org.exolab.castor.xml.MarshalException if object is\r
+     * null or if any SAXException is thrown during marshaling\r
+     */\r
+    public void marshal(\r
+            final org.xml.sax.ContentHandler handler)\r
+    throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {\r
+        Marshaller.marshal(this, handler);\r
+    }\r
+\r
+    /**\r
+     * Method unmarshal.\r
+     * \r
+     * @param reader\r
+     * @throws org.exolab.castor.xml.MarshalException if object is\r
+     * null or if any SAXException is thrown during marshaling\r
+     * @throws org.exolab.castor.xml.ValidationException if this\r
+     * object is an invalid instance according to the schema\r
+     * @return the unmarshaled uk.ac.vamsas.objects.core.RangeType\r
+     */\r
+    public static uk.ac.vamsas.objects.core.RangeType unmarshal(\r
+            final java.io.Reader reader)\r
+    throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {\r
+        return (uk.ac.vamsas.objects.core.RangeType) Unmarshaller.unmarshal(uk.ac.vamsas.objects.core.Mapped.class, reader);\r
+    }\r
+\r
+    /**\r
+     * \r
+     * \r
+     * @throws org.exolab.castor.xml.ValidationException if this\r
+     * object is an invalid instance according to the schema\r
+     */\r
+    public void validate(\r
+    )\r
+    throws org.exolab.castor.xml.ValidationException {\r
+        org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();\r
+        validator.validate(this);\r
+    }\r
+\r
+}\r
index 23d4f82..2813c56 100644 (file)
@@ -81,33 +81,95 @@ implements java.io.Serializable
         if (obj instanceof Newick) {
         
             Newick temp = (Newick)obj;
+            boolean thcycle;
+            boolean tmcycle;
             if (this._content != null) {
                 if (temp._content == null) return false;
-                else if (!(this._content.equals(temp._content))) 
-                    return false;
-            }
-            else if (temp._content != null)
+                if (this._content != temp._content) {
+                    thcycle=org.castor.util.CycleBreaker.startingToCycle(this._content);
+                    tmcycle=org.castor.util.CycleBreaker.startingToCycle(temp._content);
+                    if (thcycle!=tmcycle) {
+                        if (!thcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(this._content); };
+                        if (!tmcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(temp._content); };
+                        return false;
+                    }
+                    if (!thcycle) {
+                        if (!this._content.equals(temp._content)) {
+                            org.castor.util.CycleBreaker.releaseCycleHandle(this._content);
+                            org.castor.util.CycleBreaker.releaseCycleHandle(temp._content);
+                            return false;
+                        }
+                        org.castor.util.CycleBreaker.releaseCycleHandle(this._content);
+                        org.castor.util.CycleBreaker.releaseCycleHandle(temp._content);
+                    }
+                }
+            } else if (temp._content != null)
                 return false;
             if (this._title != null) {
                 if (temp._title == null) return false;
-                else if (!(this._title.equals(temp._title))) 
-                    return false;
-            }
-            else if (temp._title != null)
+                if (this._title != temp._title) {
+                    thcycle=org.castor.util.CycleBreaker.startingToCycle(this._title);
+                    tmcycle=org.castor.util.CycleBreaker.startingToCycle(temp._title);
+                    if (thcycle!=tmcycle) {
+                        if (!thcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(this._title); };
+                        if (!tmcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(temp._title); };
+                        return false;
+                    }
+                    if (!thcycle) {
+                        if (!this._title.equals(temp._title)) {
+                            org.castor.util.CycleBreaker.releaseCycleHandle(this._title);
+                            org.castor.util.CycleBreaker.releaseCycleHandle(temp._title);
+                            return false;
+                        }
+                        org.castor.util.CycleBreaker.releaseCycleHandle(this._title);
+                        org.castor.util.CycleBreaker.releaseCycleHandle(temp._title);
+                    }
+                }
+            } else if (temp._title != null)
                 return false;
             if (this._id != null) {
                 if (temp._id == null) return false;
-                else if (!(this._id.equals(temp._id))) 
-                    return false;
-            }
-            else if (temp._id != null)
+                if (this._id != temp._id) {
+                    thcycle=org.castor.util.CycleBreaker.startingToCycle(this._id);
+                    tmcycle=org.castor.util.CycleBreaker.startingToCycle(temp._id);
+                    if (thcycle!=tmcycle) {
+                        if (!thcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(this._id); };
+                        if (!tmcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(temp._id); };
+                        return false;
+                    }
+                    if (!thcycle) {
+                        if (!this._id.equals(temp._id)) {
+                            org.castor.util.CycleBreaker.releaseCycleHandle(this._id);
+                            org.castor.util.CycleBreaker.releaseCycleHandle(temp._id);
+                            return false;
+                        }
+                        org.castor.util.CycleBreaker.releaseCycleHandle(this._id);
+                        org.castor.util.CycleBreaker.releaseCycleHandle(temp._id);
+                    }
+                }
+            } else if (temp._id != null)
                 return false;
             if (this._modifiable != null) {
                 if (temp._modifiable == null) return false;
-                else if (!(this._modifiable.equals(temp._modifiable))) 
-                    return false;
-            }
-            else if (temp._modifiable != null)
+                if (this._modifiable != temp._modifiable) {
+                    thcycle=org.castor.util.CycleBreaker.startingToCycle(this._modifiable);
+                    tmcycle=org.castor.util.CycleBreaker.startingToCycle(temp._modifiable);
+                    if (thcycle!=tmcycle) {
+                        if (!thcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(this._modifiable); };
+                        if (!tmcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(temp._modifiable); };
+                        return false;
+                    }
+                    if (!thcycle) {
+                        if (!this._modifiable.equals(temp._modifiable)) {
+                            org.castor.util.CycleBreaker.releaseCycleHandle(this._modifiable);
+                            org.castor.util.CycleBreaker.releaseCycleHandle(temp._modifiable);
+                            return false;
+                        }
+                        org.castor.util.CycleBreaker.releaseCycleHandle(this._modifiable);
+                        org.castor.util.CycleBreaker.releaseCycleHandle(temp._modifiable);
+                    }
+                }
+            } else if (temp._modifiable != null)
                 return false;
             return true;
         }
@@ -171,17 +233,25 @@ implements java.io.Serializable
         int result = super.hashCode();
         
         long tmp;
-        if (_content != null) {
+        if (_content != null
+            && !org.castor.util.CycleBreaker.startingToCycle(_content)) {
            result = 37 * result + _content.hashCode();
+           org.castor.util.CycleBreaker.releaseCycleHandle(_content);
         }
-        if (_title != null) {
+        if (_title != null
+            && !org.castor.util.CycleBreaker.startingToCycle(_title)) {
            result = 37 * result + _title.hashCode();
+           org.castor.util.CycleBreaker.releaseCycleHandle(_title);
         }
-        if (_id != null) {
+        if (_id != null
+            && !org.castor.util.CycleBreaker.startingToCycle(_id)) {
            result = 37 * result + _id.hashCode();
+           org.castor.util.CycleBreaker.releaseCycleHandle(_id);
         }
-        if (_modifiable != null) {
+        if (_modifiable != null
+            && !org.castor.util.CycleBreaker.startingToCycle(_modifiable)) {
            result = 37 * result + _modifiable.hashCode();
+           org.castor.util.CycleBreaker.releaseCycleHandle(_modifiable);
         }
         
         return result;
index 7f480d1..488c0ee 100644 (file)
@@ -49,7 +49,8 @@ implements java.io.Serializable
     private java.lang.String _description;\r
 \r
     /**\r
-     * Direct associations between this node and any vamsas objects\r
+     * Direct associations between this node and any vamsas\r
+     *  objects\r
      */\r
     private java.util.Vector _vrefList;\r
 \r
@@ -169,47 +170,139 @@ implements java.io.Serializable
         if (obj instanceof NodeType) {\r
         \r
             NodeType temp = (NodeType)obj;\r
+            boolean thcycle;\r
+            boolean tmcycle;\r
             if (this._id != null) {\r
                 if (temp._id == null) return false;\r
-                else if (!(this._id.equals(temp._id))) \r
-                    return false;\r
-            }\r
-            else if (temp._id != null)\r
+                if (this._id != temp._id) {\r
+                    thcycle=org.castor.util.CycleBreaker.startingToCycle(this._id);\r
+                    tmcycle=org.castor.util.CycleBreaker.startingToCycle(temp._id);\r
+                    if (thcycle!=tmcycle) {\r
+                        if (!thcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(this._id); };\r
+                        if (!tmcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(temp._id); };\r
+                        return false;\r
+                    }\r
+                    if (!thcycle) {\r
+                        if (!this._id.equals(temp._id)) {\r
+                            org.castor.util.CycleBreaker.releaseCycleHandle(this._id);\r
+                            org.castor.util.CycleBreaker.releaseCycleHandle(temp._id);\r
+                            return false;\r
+                        }\r
+                        org.castor.util.CycleBreaker.releaseCycleHandle(this._id);\r
+                        org.castor.util.CycleBreaker.releaseCycleHandle(temp._id);\r
+                    }\r
+                }\r
+            } else if (temp._id != null)\r
                 return false;\r
             if (this._modifiable != null) {\r
                 if (temp._modifiable == null) return false;\r
-                else if (!(this._modifiable.equals(temp._modifiable))) \r
-                    return false;\r
-            }\r
-            else if (temp._modifiable != null)\r
+                if (this._modifiable != temp._modifiable) {\r
+                    thcycle=org.castor.util.CycleBreaker.startingToCycle(this._modifiable);\r
+                    tmcycle=org.castor.util.CycleBreaker.startingToCycle(temp._modifiable);\r
+                    if (thcycle!=tmcycle) {\r
+                        if (!thcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(this._modifiable); };\r
+                        if (!tmcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(temp._modifiable); };\r
+                        return false;\r
+                    }\r
+                    if (!thcycle) {\r
+                        if (!this._modifiable.equals(temp._modifiable)) {\r
+                            org.castor.util.CycleBreaker.releaseCycleHandle(this._modifiable);\r
+                            org.castor.util.CycleBreaker.releaseCycleHandle(temp._modifiable);\r
+                            return false;\r
+                        }\r
+                        org.castor.util.CycleBreaker.releaseCycleHandle(this._modifiable);\r
+                        org.castor.util.CycleBreaker.releaseCycleHandle(temp._modifiable);\r
+                    }\r
+                }\r
+            } else if (temp._modifiable != null)\r
                 return false;\r
             if (this._name != null) {\r
                 if (temp._name == null) return false;\r
-                else if (!(this._name.equals(temp._name))) \r
-                    return false;\r
-            }\r
-            else if (temp._name != null)\r
+                if (this._name != temp._name) {\r
+                    thcycle=org.castor.util.CycleBreaker.startingToCycle(this._name);\r
+                    tmcycle=org.castor.util.CycleBreaker.startingToCycle(temp._name);\r
+                    if (thcycle!=tmcycle) {\r
+                        if (!thcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(this._name); };\r
+                        if (!tmcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(temp._name); };\r
+                        return false;\r
+                    }\r
+                    if (!thcycle) {\r
+                        if (!this._name.equals(temp._name)) {\r
+                            org.castor.util.CycleBreaker.releaseCycleHandle(this._name);\r
+                            org.castor.util.CycleBreaker.releaseCycleHandle(temp._name);\r
+                            return false;\r
+                        }\r
+                        org.castor.util.CycleBreaker.releaseCycleHandle(this._name);\r
+                        org.castor.util.CycleBreaker.releaseCycleHandle(temp._name);\r
+                    }\r
+                }\r
+            } else if (temp._name != null)\r
                 return false;\r
             if (this._description != null) {\r
                 if (temp._description == null) return false;\r
-                else if (!(this._description.equals(temp._description))) \r
-                    return false;\r
-            }\r
-            else if (temp._description != null)\r
+                if (this._description != temp._description) {\r
+                    thcycle=org.castor.util.CycleBreaker.startingToCycle(this._description);\r
+                    tmcycle=org.castor.util.CycleBreaker.startingToCycle(temp._description);\r
+                    if (thcycle!=tmcycle) {\r
+                        if (!thcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(this._description); };\r
+                        if (!tmcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(temp._description); };\r
+                        return false;\r
+                    }\r
+                    if (!thcycle) {\r
+                        if (!this._description.equals(temp._description)) {\r
+                            org.castor.util.CycleBreaker.releaseCycleHandle(this._description);\r
+                            org.castor.util.CycleBreaker.releaseCycleHandle(temp._description);\r
+                            return false;\r
+                        }\r
+                        org.castor.util.CycleBreaker.releaseCycleHandle(this._description);\r
+                        org.castor.util.CycleBreaker.releaseCycleHandle(temp._description);\r
+                    }\r
+                }\r
+            } else if (temp._description != null)\r
                 return false;\r
             if (this._vrefList != null) {\r
                 if (temp._vrefList == null) return false;\r
-                else if (!(this._vrefList.equals(temp._vrefList))) \r
-                    return false;\r
-            }\r
-            else if (temp._vrefList != null)\r
+                if (this._vrefList != temp._vrefList) {\r
+                    thcycle=org.castor.util.CycleBreaker.startingToCycle(this._vrefList);\r
+                    tmcycle=org.castor.util.CycleBreaker.startingToCycle(temp._vrefList);\r
+                    if (thcycle!=tmcycle) {\r
+                        if (!thcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(this._vrefList); };\r
+                        if (!tmcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(temp._vrefList); };\r
+                        return false;\r
+                    }\r
+                    if (!thcycle) {\r
+                        if (!this._vrefList.equals(temp._vrefList)) {\r
+                            org.castor.util.CycleBreaker.releaseCycleHandle(this._vrefList);\r
+                            org.castor.util.CycleBreaker.releaseCycleHandle(temp._vrefList);\r
+                            return false;\r
+                        }\r
+                        org.castor.util.CycleBreaker.releaseCycleHandle(this._vrefList);\r
+                        org.castor.util.CycleBreaker.releaseCycleHandle(temp._vrefList);\r
+                    }\r
+                }\r
+            } else if (temp._vrefList != null)\r
                 return false;\r
             if (this._propertyList != null) {\r
                 if (temp._propertyList == null) return false;\r
-                else if (!(this._propertyList.equals(temp._propertyList))) \r
-                    return false;\r
-            }\r
-            else if (temp._propertyList != null)\r
+                if (this._propertyList != temp._propertyList) {\r
+                    thcycle=org.castor.util.CycleBreaker.startingToCycle(this._propertyList);\r
+                    tmcycle=org.castor.util.CycleBreaker.startingToCycle(temp._propertyList);\r
+                    if (thcycle!=tmcycle) {\r
+                        if (!thcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(this._propertyList); };\r
+                        if (!tmcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(temp._propertyList); };\r
+                        return false;\r
+                    }\r
+                    if (!thcycle) {\r
+                        if (!this._propertyList.equals(temp._propertyList)) {\r
+                            org.castor.util.CycleBreaker.releaseCycleHandle(this._propertyList);\r
+                            org.castor.util.CycleBreaker.releaseCycleHandle(temp._propertyList);\r
+                            return false;\r
+                        }\r
+                        org.castor.util.CycleBreaker.releaseCycleHandle(this._propertyList);\r
+                        org.castor.util.CycleBreaker.releaseCycleHandle(temp._propertyList);\r
+                    }\r
+                }\r
+            } else if (temp._propertyList != null)\r
                 return false;\r
             return true;\r
         }\r
@@ -388,23 +481,35 @@ implements java.io.Serializable
         int result = super.hashCode();\r
         \r
         long tmp;\r
-        if (_id != null) {\r
+        if (_id != null\r
+            && !org.castor.util.CycleBreaker.startingToCycle(_id)) {\r
            result = 37 * result + _id.hashCode();\r
+           org.castor.util.CycleBreaker.releaseCycleHandle(_id);\r
         }\r
-        if (_modifiable != null) {\r
+        if (_modifiable != null\r
+            && !org.castor.util.CycleBreaker.startingToCycle(_modifiable)) {\r
            result = 37 * result + _modifiable.hashCode();\r
+           org.castor.util.CycleBreaker.releaseCycleHandle(_modifiable);\r
         }\r
-        if (_name != null) {\r
+        if (_name != null\r
+            && !org.castor.util.CycleBreaker.startingToCycle(_name)) {\r
            result = 37 * result + _name.hashCode();\r
+           org.castor.util.CycleBreaker.releaseCycleHandle(_name);\r
         }\r
-        if (_description != null) {\r
+        if (_description != null\r
+            && !org.castor.util.CycleBreaker.startingToCycle(_description)) {\r
            result = 37 * result + _description.hashCode();\r
+           org.castor.util.CycleBreaker.releaseCycleHandle(_description);\r
         }\r
-        if (_vrefList != null) {\r
+        if (_vrefList != null\r
+            && !org.castor.util.CycleBreaker.startingToCycle(_vrefList)) {\r
            result = 37 * result + _vrefList.hashCode();\r
+           org.castor.util.CycleBreaker.releaseCycleHandle(_vrefList);\r
         }\r
-        if (_propertyList != null) {\r
+        if (_propertyList != null\r
+            && !org.castor.util.CycleBreaker.startingToCycle(_propertyList)) {\r
            result = 37 * result + _propertyList.hashCode();\r
+           org.castor.util.CycleBreaker.releaseCycleHandle(_propertyList);\r
         }\r
         \r
         return result;\r
index 744dba5..e9cece2 100644 (file)
@@ -78,26 +78,73 @@ implements java.io.Serializable
         if (obj instanceof Param) {\r
         \r
             Param temp = (Param)obj;\r
+            boolean thcycle;\r
+            boolean tmcycle;\r
             if (this._content != null) {\r
                 if (temp._content == null) return false;\r
-                else if (!(this._content.equals(temp._content))) \r
-                    return false;\r
-            }\r
-            else if (temp._content != null)\r
+                if (this._content != temp._content) {\r
+                    thcycle=org.castor.util.CycleBreaker.startingToCycle(this._content);\r
+                    tmcycle=org.castor.util.CycleBreaker.startingToCycle(temp._content);\r
+                    if (thcycle!=tmcycle) {\r
+                        if (!thcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(this._content); };\r
+                        if (!tmcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(temp._content); };\r
+                        return false;\r
+                    }\r
+                    if (!thcycle) {\r
+                        if (!this._content.equals(temp._content)) {\r
+                            org.castor.util.CycleBreaker.releaseCycleHandle(this._content);\r
+                            org.castor.util.CycleBreaker.releaseCycleHandle(temp._content);\r
+                            return false;\r
+                        }\r
+                        org.castor.util.CycleBreaker.releaseCycleHandle(this._content);\r
+                        org.castor.util.CycleBreaker.releaseCycleHandle(temp._content);\r
+                    }\r
+                }\r
+            } else if (temp._content != null)\r
                 return false;\r
             if (this._name != null) {\r
                 if (temp._name == null) return false;\r
-                else if (!(this._name.equals(temp._name))) \r
-                    return false;\r
-            }\r
-            else if (temp._name != null)\r
+                if (this._name != temp._name) {\r
+                    thcycle=org.castor.util.CycleBreaker.startingToCycle(this._name);\r
+                    tmcycle=org.castor.util.CycleBreaker.startingToCycle(temp._name);\r
+                    if (thcycle!=tmcycle) {\r
+                        if (!thcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(this._name); };\r
+                        if (!tmcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(temp._name); };\r
+                        return false;\r
+                    }\r
+                    if (!thcycle) {\r
+                        if (!this._name.equals(temp._name)) {\r
+                            org.castor.util.CycleBreaker.releaseCycleHandle(this._name);\r
+                            org.castor.util.CycleBreaker.releaseCycleHandle(temp._name);\r
+                            return false;\r
+                        }\r
+                        org.castor.util.CycleBreaker.releaseCycleHandle(this._name);\r
+                        org.castor.util.CycleBreaker.releaseCycleHandle(temp._name);\r
+                    }\r
+                }\r
+            } else if (temp._name != null)\r
                 return false;\r
             if (this._type != null) {\r
                 if (temp._type == null) return false;\r
-                else if (!(this._type.equals(temp._type))) \r
-                    return false;\r
-            }\r
-            else if (temp._type != null)\r
+                if (this._type != temp._type) {\r
+                    thcycle=org.castor.util.CycleBreaker.startingToCycle(this._type);\r
+                    tmcycle=org.castor.util.CycleBreaker.startingToCycle(temp._type);\r
+                    if (thcycle!=tmcycle) {\r
+                        if (!thcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(this._type); };\r
+                        if (!tmcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(temp._type); };\r
+                        return false;\r
+                    }\r
+                    if (!thcycle) {\r
+                        if (!this._type.equals(temp._type)) {\r
+                            org.castor.util.CycleBreaker.releaseCycleHandle(this._type);\r
+                            org.castor.util.CycleBreaker.releaseCycleHandle(temp._type);\r
+                            return false;\r
+                        }\r
+                        org.castor.util.CycleBreaker.releaseCycleHandle(this._type);\r
+                        org.castor.util.CycleBreaker.releaseCycleHandle(temp._type);\r
+                    }\r
+                }\r
+            } else if (temp._type != null)\r
                 return false;\r
             return true;\r
         }\r
@@ -153,14 +200,20 @@ implements java.io.Serializable
         int result = super.hashCode();\r
         \r
         long tmp;\r
-        if (_content != null) {\r
+        if (_content != null\r
+            && !org.castor.util.CycleBreaker.startingToCycle(_content)) {\r
            result = 37 * result + _content.hashCode();\r
+           org.castor.util.CycleBreaker.releaseCycleHandle(_content);\r
         }\r
-        if (_name != null) {\r
+        if (_name != null\r
+            && !org.castor.util.CycleBreaker.startingToCycle(_name)) {\r
            result = 37 * result + _name.hashCode();\r
+           org.castor.util.CycleBreaker.releaseCycleHandle(_name);\r
         }\r
-        if (_type != null) {\r
+        if (_type != null\r
+            && !org.castor.util.CycleBreaker.startingToCycle(_type)) {\r
            result = 37 * result + _type.hashCode();\r
+           org.castor.util.CycleBreaker.releaseCycleHandle(_type);\r
         }\r
         \r
         return result;\r
index 7a98276..3877be5 100644 (file)
@@ -77,6 +77,8 @@ implements java.io.Serializable
         if (obj instanceof Pos) {\r
         \r
             Pos temp = (Pos)obj;\r
+            boolean thcycle;\r
+            boolean tmcycle;\r
             if (this._i != temp._i)\r
                 return false;\r
             if (this._has_i != temp._has_i)\r
index 8161092..bccf4bd 100644 (file)
@@ -78,26 +78,73 @@ implements java.io.Serializable
         if (obj instanceof Property) {\r
         \r
             Property temp = (Property)obj;\r
+            boolean thcycle;\r
+            boolean tmcycle;\r
             if (this._content != null) {\r
                 if (temp._content == null) return false;\r
-                else if (!(this._content.equals(temp._content))) \r
-                    return false;\r
-            }\r
-            else if (temp._content != null)\r
+                if (this._content != temp._content) {\r
+                    thcycle=org.castor.util.CycleBreaker.startingToCycle(this._content);\r
+                    tmcycle=org.castor.util.CycleBreaker.startingToCycle(temp._content);\r
+                    if (thcycle!=tmcycle) {\r
+                        if (!thcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(this._content); };\r
+                        if (!tmcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(temp._content); };\r
+                        return false;\r
+                    }\r
+                    if (!thcycle) {\r
+                        if (!this._content.equals(temp._content)) {\r
+                            org.castor.util.CycleBreaker.releaseCycleHandle(this._content);\r
+                            org.castor.util.CycleBreaker.releaseCycleHandle(temp._content);\r
+                            return false;\r
+                        }\r
+                        org.castor.util.CycleBreaker.releaseCycleHandle(this._content);\r
+                        org.castor.util.CycleBreaker.releaseCycleHandle(temp._content);\r
+                    }\r
+                }\r
+            } else if (temp._content != null)\r
                 return false;\r
             if (this._name != null) {\r
                 if (temp._name == null) return false;\r
-                else if (!(this._name.equals(temp._name))) \r
-                    return false;\r
-            }\r
-            else if (temp._name != null)\r
+                if (this._name != temp._name) {\r
+                    thcycle=org.castor.util.CycleBreaker.startingToCycle(this._name);\r
+                    tmcycle=org.castor.util.CycleBreaker.startingToCycle(temp._name);\r
+                    if (thcycle!=tmcycle) {\r
+                        if (!thcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(this._name); };\r
+                        if (!tmcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(temp._name); };\r
+                        return false;\r
+                    }\r
+                    if (!thcycle) {\r
+                        if (!this._name.equals(temp._name)) {\r
+                            org.castor.util.CycleBreaker.releaseCycleHandle(this._name);\r
+                            org.castor.util.CycleBreaker.releaseCycleHandle(temp._name);\r
+                            return false;\r
+                        }\r
+                        org.castor.util.CycleBreaker.releaseCycleHandle(this._name);\r
+                        org.castor.util.CycleBreaker.releaseCycleHandle(temp._name);\r
+                    }\r
+                }\r
+            } else if (temp._name != null)\r
                 return false;\r
             if (this._type != null) {\r
                 if (temp._type == null) return false;\r
-                else if (!(this._type.equals(temp._type))) \r
-                    return false;\r
-            }\r
-            else if (temp._type != null)\r
+                if (this._type != temp._type) {\r
+                    thcycle=org.castor.util.CycleBreaker.startingToCycle(this._type);\r
+                    tmcycle=org.castor.util.CycleBreaker.startingToCycle(temp._type);\r
+                    if (thcycle!=tmcycle) {\r
+                        if (!thcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(this._type); };\r
+                        if (!tmcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(temp._type); };\r
+                        return false;\r
+                    }\r
+                    if (!thcycle) {\r
+                        if (!this._type.equals(temp._type)) {\r
+                            org.castor.util.CycleBreaker.releaseCycleHandle(this._type);\r
+                            org.castor.util.CycleBreaker.releaseCycleHandle(temp._type);\r
+                            return false;\r
+                        }\r
+                        org.castor.util.CycleBreaker.releaseCycleHandle(this._type);\r
+                        org.castor.util.CycleBreaker.releaseCycleHandle(temp._type);\r
+                    }\r
+                }\r
+            } else if (temp._type != null)\r
                 return false;\r
             return true;\r
         }\r
@@ -153,14 +200,20 @@ implements java.io.Serializable
         int result = super.hashCode();\r
         \r
         long tmp;\r
-        if (_content != null) {\r
+        if (_content != null\r
+            && !org.castor.util.CycleBreaker.startingToCycle(_content)) {\r
            result = 37 * result + _content.hashCode();\r
+           org.castor.util.CycleBreaker.releaseCycleHandle(_content);\r
         }\r
-        if (_name != null) {\r
+        if (_name != null\r
+            && !org.castor.util.CycleBreaker.startingToCycle(_name)) {\r
            result = 37 * result + _name.hashCode();\r
+           org.castor.util.CycleBreaker.releaseCycleHandle(_name);\r
         }\r
-        if (_type != null) {\r
+        if (_type != null\r
+            && !org.castor.util.CycleBreaker.startingToCycle(_type)) {\r
            result = 37 * result + _type.hashCode();\r
+           org.castor.util.CycleBreaker.releaseCycleHandle(_type);\r
         }\r
         \r
         return result;\r
index 3477b22..12dc17b 100644 (file)
@@ -104,12 +104,29 @@ implements java.io.Serializable
         if (obj instanceof Provenance) {
         
             Provenance temp = (Provenance)obj;
+            boolean thcycle;
+            boolean tmcycle;
             if (this._entryList != null) {
                 if (temp._entryList == null) return false;
-                else if (!(this._entryList.equals(temp._entryList))) 
-                    return false;
-            }
-            else if (temp._entryList != null)
+                if (this._entryList != temp._entryList) {
+                    thcycle=org.castor.util.CycleBreaker.startingToCycle(this._entryList);
+                    tmcycle=org.castor.util.CycleBreaker.startingToCycle(temp._entryList);
+                    if (thcycle!=tmcycle) {
+                        if (!thcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(this._entryList); };
+                        if (!tmcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(temp._entryList); };
+                        return false;
+                    }
+                    if (!thcycle) {
+                        if (!this._entryList.equals(temp._entryList)) {
+                            org.castor.util.CycleBreaker.releaseCycleHandle(this._entryList);
+                            org.castor.util.CycleBreaker.releaseCycleHandle(temp._entryList);
+                            return false;
+                        }
+                        org.castor.util.CycleBreaker.releaseCycleHandle(this._entryList);
+                        org.castor.util.CycleBreaker.releaseCycleHandle(temp._entryList);
+                    }
+                }
+            } else if (temp._entryList != null)
                 return false;
             return true;
         }
@@ -186,8 +203,10 @@ implements java.io.Serializable
         int result = super.hashCode();
         
         long tmp;
-        if (_entryList != null) {
+        if (_entryList != null
+            && !org.castor.util.CycleBreaker.startingToCycle(_entryList)) {
            result = 37 * result + _entryList.hashCode();
+           org.castor.util.CycleBreaker.releaseCycleHandle(_entryList);
         }
         
         return result;
index 869c4f5..2a2adda 100644 (file)
@@ -300,82 +300,249 @@ implements java.io.Serializable
         if (obj instanceof RangeAnnotation) {\r
         \r
             RangeAnnotation temp = (RangeAnnotation)obj;\r
+            boolean thcycle;\r
+            boolean tmcycle;\r
             if (this._id != null) {\r
                 if (temp._id == null) return false;\r
-                else if (!(this._id.equals(temp._id))) \r
-                    return false;\r
-            }\r
-            else if (temp._id != null)\r
+                if (this._id != temp._id) {\r
+                    thcycle=org.castor.util.CycleBreaker.startingToCycle(this._id);\r
+                    tmcycle=org.castor.util.CycleBreaker.startingToCycle(temp._id);\r
+                    if (thcycle!=tmcycle) {\r
+                        if (!thcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(this._id); };\r
+                        if (!tmcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(temp._id); };\r
+                        return false;\r
+                    }\r
+                    if (!thcycle) {\r
+                        if (!this._id.equals(temp._id)) {\r
+                            org.castor.util.CycleBreaker.releaseCycleHandle(this._id);\r
+                            org.castor.util.CycleBreaker.releaseCycleHandle(temp._id);\r
+                            return false;\r
+                        }\r
+                        org.castor.util.CycleBreaker.releaseCycleHandle(this._id);\r
+                        org.castor.util.CycleBreaker.releaseCycleHandle(temp._id);\r
+                    }\r
+                }\r
+            } else if (temp._id != null)\r
                 return false;\r
             if (this._modifiable != null) {\r
                 if (temp._modifiable == null) return false;\r
-                else if (!(this._modifiable.equals(temp._modifiable))) \r
-                    return false;\r
-            }\r
-            else if (temp._modifiable != null)\r
+                if (this._modifiable != temp._modifiable) {\r
+                    thcycle=org.castor.util.CycleBreaker.startingToCycle(this._modifiable);\r
+                    tmcycle=org.castor.util.CycleBreaker.startingToCycle(temp._modifiable);\r
+                    if (thcycle!=tmcycle) {\r
+                        if (!thcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(this._modifiable); };\r
+                        if (!tmcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(temp._modifiable); };\r
+                        return false;\r
+                    }\r
+                    if (!thcycle) {\r
+                        if (!this._modifiable.equals(temp._modifiable)) {\r
+                            org.castor.util.CycleBreaker.releaseCycleHandle(this._modifiable);\r
+                            org.castor.util.CycleBreaker.releaseCycleHandle(temp._modifiable);\r
+                            return false;\r
+                        }\r
+                        org.castor.util.CycleBreaker.releaseCycleHandle(this._modifiable);\r
+                        org.castor.util.CycleBreaker.releaseCycleHandle(temp._modifiable);\r
+                    }\r
+                }\r
+            } else if (temp._modifiable != null)\r
                 return false;\r
             if (this._group != null) {\r
                 if (temp._group == null) return false;\r
-                else if (!(this._group.equals(temp._group))) \r
-                    return false;\r
-            }\r
-            else if (temp._group != null)\r
+                if (this._group != temp._group) {\r
+                    thcycle=org.castor.util.CycleBreaker.startingToCycle(this._group);\r
+                    tmcycle=org.castor.util.CycleBreaker.startingToCycle(temp._group);\r
+                    if (thcycle!=tmcycle) {\r
+                        if (!thcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(this._group); };\r
+                        if (!tmcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(temp._group); };\r
+                        return false;\r
+                    }\r
+                    if (!thcycle) {\r
+                        if (!this._group.equals(temp._group)) {\r
+                            org.castor.util.CycleBreaker.releaseCycleHandle(this._group);\r
+                            org.castor.util.CycleBreaker.releaseCycleHandle(temp._group);\r
+                            return false;\r
+                        }\r
+                        org.castor.util.CycleBreaker.releaseCycleHandle(this._group);\r
+                        org.castor.util.CycleBreaker.releaseCycleHandle(temp._group);\r
+                    }\r
+                }\r
+            } else if (temp._group != null)\r
                 return false;\r
             if (this._type != null) {\r
                 if (temp._type == null) return false;\r
-                else if (!(this._type.equals(temp._type))) \r
-                    return false;\r
-            }\r
-            else if (temp._type != null)\r
+                if (this._type != temp._type) {\r
+                    thcycle=org.castor.util.CycleBreaker.startingToCycle(this._type);\r
+                    tmcycle=org.castor.util.CycleBreaker.startingToCycle(temp._type);\r
+                    if (thcycle!=tmcycle) {\r
+                        if (!thcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(this._type); };\r
+                        if (!tmcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(temp._type); };\r
+                        return false;\r
+                    }\r
+                    if (!thcycle) {\r
+                        if (!this._type.equals(temp._type)) {\r
+                            org.castor.util.CycleBreaker.releaseCycleHandle(this._type);\r
+                            org.castor.util.CycleBreaker.releaseCycleHandle(temp._type);\r
+                            return false;\r
+                        }\r
+                        org.castor.util.CycleBreaker.releaseCycleHandle(this._type);\r
+                        org.castor.util.CycleBreaker.releaseCycleHandle(temp._type);\r
+                    }\r
+                }\r
+            } else if (temp._type != null)\r
                 return false;\r
             if (this._label != null) {\r
                 if (temp._label == null) return false;\r
-                else if (!(this._label.equals(temp._label))) \r
-                    return false;\r
-            }\r
-            else if (temp._label != null)\r
+                if (this._label != temp._label) {\r
+                    thcycle=org.castor.util.CycleBreaker.startingToCycle(this._label);\r
+                    tmcycle=org.castor.util.CycleBreaker.startingToCycle(temp._label);\r
+                    if (thcycle!=tmcycle) {\r
+                        if (!thcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(this._label); };\r
+                        if (!tmcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(temp._label); };\r
+                        return false;\r
+                    }\r
+                    if (!thcycle) {\r
+                        if (!this._label.equals(temp._label)) {\r
+                            org.castor.util.CycleBreaker.releaseCycleHandle(this._label);\r
+                            org.castor.util.CycleBreaker.releaseCycleHandle(temp._label);\r
+                            return false;\r
+                        }\r
+                        org.castor.util.CycleBreaker.releaseCycleHandle(this._label);\r
+                        org.castor.util.CycleBreaker.releaseCycleHandle(temp._label);\r
+                    }\r
+                }\r
+            } else if (temp._label != null)\r
                 return false;\r
             if (this._description != null) {\r
                 if (temp._description == null) return false;\r
-                else if (!(this._description.equals(temp._description))) \r
-                    return false;\r
-            }\r
-            else if (temp._description != null)\r
+                if (this._description != temp._description) {\r
+                    thcycle=org.castor.util.CycleBreaker.startingToCycle(this._description);\r
+                    tmcycle=org.castor.util.CycleBreaker.startingToCycle(temp._description);\r
+                    if (thcycle!=tmcycle) {\r
+                        if (!thcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(this._description); };\r
+                        if (!tmcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(temp._description); };\r
+                        return false;\r
+                    }\r
+                    if (!thcycle) {\r
+                        if (!this._description.equals(temp._description)) {\r
+                            org.castor.util.CycleBreaker.releaseCycleHandle(this._description);\r
+                            org.castor.util.CycleBreaker.releaseCycleHandle(temp._description);\r
+                            return false;\r
+                        }\r
+                        org.castor.util.CycleBreaker.releaseCycleHandle(this._description);\r
+                        org.castor.util.CycleBreaker.releaseCycleHandle(temp._description);\r
+                    }\r
+                }\r
+            } else if (temp._description != null)\r
                 return false;\r
             if (this._status != null) {\r
                 if (temp._status == null) return false;\r
-                else if (!(this._status.equals(temp._status))) \r
-                    return false;\r
-            }\r
-            else if (temp._status != null)\r
+                if (this._status != temp._status) {\r
+                    thcycle=org.castor.util.CycleBreaker.startingToCycle(this._status);\r
+                    tmcycle=org.castor.util.CycleBreaker.startingToCycle(temp._status);\r
+                    if (thcycle!=tmcycle) {\r
+                        if (!thcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(this._status); };\r
+                        if (!tmcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(temp._status); };\r
+                        return false;\r
+                    }\r
+                    if (!thcycle) {\r
+                        if (!this._status.equals(temp._status)) {\r
+                            org.castor.util.CycleBreaker.releaseCycleHandle(this._status);\r
+                            org.castor.util.CycleBreaker.releaseCycleHandle(temp._status);\r
+                            return false;\r
+                        }\r
+                        org.castor.util.CycleBreaker.releaseCycleHandle(this._status);\r
+                        org.castor.util.CycleBreaker.releaseCycleHandle(temp._status);\r
+                    }\r
+                }\r
+            } else if (temp._status != null)\r
                 return false;\r
             if (this._annotationElementList != null) {\r
                 if (temp._annotationElementList == null) return false;\r
-                else if (!(this._annotationElementList.equals(temp._annotationElementList))) \r
-                    return false;\r
-            }\r
-            else if (temp._annotationElementList != null)\r
+                if (this._annotationElementList != temp._annotationElementList) {\r
+                    thcycle=org.castor.util.CycleBreaker.startingToCycle(this._annotationElementList);\r
+                    tmcycle=org.castor.util.CycleBreaker.startingToCycle(temp._annotationElementList);\r
+                    if (thcycle!=tmcycle) {\r
+                        if (!thcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(this._annotationElementList); };\r
+                        if (!tmcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(temp._annotationElementList); };\r
+                        return false;\r
+                    }\r
+                    if (!thcycle) {\r
+                        if (!this._annotationElementList.equals(temp._annotationElementList)) {\r
+                            org.castor.util.CycleBreaker.releaseCycleHandle(this._annotationElementList);\r
+                            org.castor.util.CycleBreaker.releaseCycleHandle(temp._annotationElementList);\r
+                            return false;\r
+                        }\r
+                        org.castor.util.CycleBreaker.releaseCycleHandle(this._annotationElementList);\r
+                        org.castor.util.CycleBreaker.releaseCycleHandle(temp._annotationElementList);\r
+                    }\r
+                }\r
+            } else if (temp._annotationElementList != null)\r
                 return false;\r
             if (this._scoreList != null) {\r
                 if (temp._scoreList == null) return false;\r
-                else if (!(this._scoreList.equals(temp._scoreList))) \r
-                    return false;\r
-            }\r
-            else if (temp._scoreList != null)\r
+                if (this._scoreList != temp._scoreList) {\r
+                    thcycle=org.castor.util.CycleBreaker.startingToCycle(this._scoreList);\r
+                    tmcycle=org.castor.util.CycleBreaker.startingToCycle(temp._scoreList);\r
+                    if (thcycle!=tmcycle) {\r
+                        if (!thcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(this._scoreList); };\r
+                        if (!tmcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(temp._scoreList); };\r
+                        return false;\r
+                    }\r
+                    if (!thcycle) {\r
+                        if (!this._scoreList.equals(temp._scoreList)) {\r
+                            org.castor.util.CycleBreaker.releaseCycleHandle(this._scoreList);\r
+                            org.castor.util.CycleBreaker.releaseCycleHandle(temp._scoreList);\r
+                            return false;\r
+                        }\r
+                        org.castor.util.CycleBreaker.releaseCycleHandle(this._scoreList);\r
+                        org.castor.util.CycleBreaker.releaseCycleHandle(temp._scoreList);\r
+                    }\r
+                }\r
+            } else if (temp._scoreList != null)\r
                 return false;\r
             if (this._linkList != null) {\r
                 if (temp._linkList == null) return false;\r
-                else if (!(this._linkList.equals(temp._linkList))) \r
-                    return false;\r
-            }\r
-            else if (temp._linkList != null)\r
+                if (this._linkList != temp._linkList) {\r
+                    thcycle=org.castor.util.CycleBreaker.startingToCycle(this._linkList);\r
+                    tmcycle=org.castor.util.CycleBreaker.startingToCycle(temp._linkList);\r
+                    if (thcycle!=tmcycle) {\r
+                        if (!thcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(this._linkList); };\r
+                        if (!tmcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(temp._linkList); };\r
+                        return false;\r
+                    }\r
+                    if (!thcycle) {\r
+                        if (!this._linkList.equals(temp._linkList)) {\r
+                            org.castor.util.CycleBreaker.releaseCycleHandle(this._linkList);\r
+                            org.castor.util.CycleBreaker.releaseCycleHandle(temp._linkList);\r
+                            return false;\r
+                        }\r
+                        org.castor.util.CycleBreaker.releaseCycleHandle(this._linkList);\r
+                        org.castor.util.CycleBreaker.releaseCycleHandle(temp._linkList);\r
+                    }\r
+                }\r
+            } else if (temp._linkList != null)\r
                 return false;\r
             if (this._propertyList != null) {\r
                 if (temp._propertyList == null) return false;\r
-                else if (!(this._propertyList.equals(temp._propertyList))) \r
-                    return false;\r
-            }\r
-            else if (temp._propertyList != null)\r
+                if (this._propertyList != temp._propertyList) {\r
+                    thcycle=org.castor.util.CycleBreaker.startingToCycle(this._propertyList);\r
+                    tmcycle=org.castor.util.CycleBreaker.startingToCycle(temp._propertyList);\r
+                    if (thcycle!=tmcycle) {\r
+                        if (!thcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(this._propertyList); };\r
+                        if (!tmcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(temp._propertyList); };\r
+                        return false;\r
+                    }\r
+                    if (!thcycle) {\r
+                        if (!this._propertyList.equals(temp._propertyList)) {\r
+                            org.castor.util.CycleBreaker.releaseCycleHandle(this._propertyList);\r
+                            org.castor.util.CycleBreaker.releaseCycleHandle(temp._propertyList);\r
+                            return false;\r
+                        }\r
+                        org.castor.util.CycleBreaker.releaseCycleHandle(this._propertyList);\r
+                        org.castor.util.CycleBreaker.releaseCycleHandle(temp._propertyList);\r
+                    }\r
+                }\r
+            } else if (temp._propertyList != null)\r
                 return false;\r
             return true;\r
         }\r
@@ -722,38 +889,60 @@ implements java.io.Serializable
         int result = super.hashCode();\r
         \r
         long tmp;\r
-        if (_id != null) {\r
+        if (_id != null\r
+            && !org.castor.util.CycleBreaker.startingToCycle(_id)) {\r
            result = 37 * result + _id.hashCode();\r
+           org.castor.util.CycleBreaker.releaseCycleHandle(_id);\r
         }\r
-        if (_modifiable != null) {\r
+        if (_modifiable != null\r
+            && !org.castor.util.CycleBreaker.startingToCycle(_modifiable)) {\r
            result = 37 * result + _modifiable.hashCode();\r
+           org.castor.util.CycleBreaker.releaseCycleHandle(_modifiable);\r
         }\r
-        if (_group != null) {\r
+        if (_group != null\r
+            && !org.castor.util.CycleBreaker.startingToCycle(_group)) {\r
            result = 37 * result + _group.hashCode();\r
+           org.castor.util.CycleBreaker.releaseCycleHandle(_group);\r
         }\r
-        if (_type != null) {\r
+        if (_type != null\r
+            && !org.castor.util.CycleBreaker.startingToCycle(_type)) {\r
            result = 37 * result + _type.hashCode();\r
+           org.castor.util.CycleBreaker.releaseCycleHandle(_type);\r
         }\r
-        if (_label != null) {\r
+        if (_label != null\r
+            && !org.castor.util.CycleBreaker.startingToCycle(_label)) {\r
            result = 37 * result + _label.hashCode();\r
+           org.castor.util.CycleBreaker.releaseCycleHandle(_label);\r
         }\r
-        if (_description != null) {\r
+        if (_description != null\r
+            && !org.castor.util.CycleBreaker.startingToCycle(_description)) {\r
            result = 37 * result + _description.hashCode();\r
+           org.castor.util.CycleBreaker.releaseCycleHandle(_description);\r
         }\r
-        if (_status != null) {\r
+        if (_status != null\r
+            && !org.castor.util.CycleBreaker.startingToCycle(_status)) {\r
            result = 37 * result + _status.hashCode();\r
+           org.castor.util.CycleBreaker.releaseCycleHandle(_status);\r
         }\r
-        if (_annotationElementList != null) {\r
+        if (_annotationElementList != null\r
+            && !org.castor.util.CycleBreaker.startingToCycle(_annotationElementList)) {\r
            result = 37 * result + _annotationElementList.hashCode();\r
+           org.castor.util.CycleBreaker.releaseCycleHandle(_annotationElementList);\r
         }\r
-        if (_scoreList != null) {\r
+        if (_scoreList != null\r
+            && !org.castor.util.CycleBreaker.startingToCycle(_scoreList)) {\r
            result = 37 * result + _scoreList.hashCode();\r
+           org.castor.util.CycleBreaker.releaseCycleHandle(_scoreList);\r
         }\r
-        if (_linkList != null) {\r
+        if (_linkList != null\r
+            && !org.castor.util.CycleBreaker.startingToCycle(_linkList)) {\r
            result = 37 * result + _linkList.hashCode();\r
+           org.castor.util.CycleBreaker.releaseCycleHandle(_linkList);\r
         }\r
-        if (_propertyList != null) {\r
+        if (_propertyList != null\r
+            && !org.castor.util.CycleBreaker.startingToCycle(_propertyList)) {\r
            result = 37 * result + _propertyList.hashCode();\r
+           org.castor.util.CycleBreaker.releaseCycleHandle(_propertyList);\r
         }\r
         \r
         return result;\r
index 91338e2..3e1f6da 100644 (file)
@@ -155,26 +155,73 @@ implements java.io.Serializable
         if (obj instanceof RangeType) {\r
         \r
             RangeType temp = (RangeType)obj;\r
+            boolean thcycle;\r
+            boolean tmcycle;\r
             if (this._choiceValue != null) {\r
                 if (temp._choiceValue == null) return false;\r
-                else if (!(this._choiceValue.equals(temp._choiceValue))) \r
-                    return false;\r
-            }\r
-            else if (temp._choiceValue != null)\r
+                if (this._choiceValue != temp._choiceValue) {\r
+                    thcycle=org.castor.util.CycleBreaker.startingToCycle(this._choiceValue);\r
+                    tmcycle=org.castor.util.CycleBreaker.startingToCycle(temp._choiceValue);\r
+                    if (thcycle!=tmcycle) {\r
+                        if (!thcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(this._choiceValue); };\r
+                        if (!tmcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(temp._choiceValue); };\r
+                        return false;\r
+                    }\r
+                    if (!thcycle) {\r
+                        if (!this._choiceValue.equals(temp._choiceValue)) {\r
+                            org.castor.util.CycleBreaker.releaseCycleHandle(this._choiceValue);\r
+                            org.castor.util.CycleBreaker.releaseCycleHandle(temp._choiceValue);\r
+                            return false;\r
+                        }\r
+                        org.castor.util.CycleBreaker.releaseCycleHandle(this._choiceValue);\r
+                        org.castor.util.CycleBreaker.releaseCycleHandle(temp._choiceValue);\r
+                    }\r
+                }\r
+            } else if (temp._choiceValue != null)\r
                 return false;\r
             if (this._posList != null) {\r
                 if (temp._posList == null) return false;\r
-                else if (!(this._posList.equals(temp._posList))) \r
-                    return false;\r
-            }\r
-            else if (temp._posList != null)\r
+                if (this._posList != temp._posList) {\r
+                    thcycle=org.castor.util.CycleBreaker.startingToCycle(this._posList);\r
+                    tmcycle=org.castor.util.CycleBreaker.startingToCycle(temp._posList);\r
+                    if (thcycle!=tmcycle) {\r
+                        if (!thcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(this._posList); };\r
+                        if (!tmcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(temp._posList); };\r
+                        return false;\r
+                    }\r
+                    if (!thcycle) {\r
+                        if (!this._posList.equals(temp._posList)) {\r
+                            org.castor.util.CycleBreaker.releaseCycleHandle(this._posList);\r
+                            org.castor.util.CycleBreaker.releaseCycleHandle(temp._posList);\r
+                            return false;\r
+                        }\r
+                        org.castor.util.CycleBreaker.releaseCycleHandle(this._posList);\r
+                        org.castor.util.CycleBreaker.releaseCycleHandle(temp._posList);\r
+                    }\r
+                }\r
+            } else if (temp._posList != null)\r
                 return false;\r
             if (this._segList != null) {\r
                 if (temp._segList == null) return false;\r
-                else if (!(this._segList.equals(temp._segList))) \r
-                    return false;\r
-            }\r
-            else if (temp._segList != null)\r
+                if (this._segList != temp._segList) {\r
+                    thcycle=org.castor.util.CycleBreaker.startingToCycle(this._segList);\r
+                    tmcycle=org.castor.util.CycleBreaker.startingToCycle(temp._segList);\r
+                    if (thcycle!=tmcycle) {\r
+                        if (!thcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(this._segList); };\r
+                        if (!tmcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(temp._segList); };\r
+                        return false;\r
+                    }\r
+                    if (!thcycle) {\r
+                        if (!this._segList.equals(temp._segList)) {\r
+                            org.castor.util.CycleBreaker.releaseCycleHandle(this._segList);\r
+                            org.castor.util.CycleBreaker.releaseCycleHandle(temp._segList);\r
+                            return false;\r
+                        }\r
+                        org.castor.util.CycleBreaker.releaseCycleHandle(this._segList);\r
+                        org.castor.util.CycleBreaker.releaseCycleHandle(temp._segList);\r
+                    }\r
+                }\r
+            } else if (temp._segList != null)\r
                 return false;\r
             return true;\r
         }\r
@@ -320,14 +367,20 @@ implements java.io.Serializable
         int result = super.hashCode();\r
         \r
         long tmp;\r
-        if (_choiceValue != null) {\r
+        if (_choiceValue != null\r
+            && !org.castor.util.CycleBreaker.startingToCycle(_choiceValue)) {\r
            result = 37 * result + _choiceValue.hashCode();\r
+           org.castor.util.CycleBreaker.releaseCycleHandle(_choiceValue);\r
         }\r
-        if (_posList != null) {\r
+        if (_posList != null\r
+            && !org.castor.util.CycleBreaker.startingToCycle(_posList)) {\r
            result = 37 * result + _posList.hashCode();\r
+           org.castor.util.CycleBreaker.releaseCycleHandle(_posList);\r
         }\r
-        if (_segList != null) {\r
+        if (_segList != null\r
+            && !org.castor.util.CycleBreaker.startingToCycle(_segList)) {\r
            result = 37 * result + _segList.hashCode();\r
+           org.castor.util.CycleBreaker.releaseCycleHandle(_segList);\r
         }\r
         \r
         return result;\r
index d25aea9..6c06137 100644 (file)
@@ -16,7 +16,6 @@ import org.exolab.castor.xml.Unmarshaller;
 \r
 /**\r
  * base type for citing arbitrary links between vamsas objects\r
- *  \r
  *  Optional human readable description of the relationship\r
  *  \r
  * \r
@@ -37,12 +36,14 @@ implements java.io.Serializable
     private java.lang.String _content = "";\r
 \r
     /**\r
-     * Primary Key for vamsas object referencing \r
+     * Primary Key for vamsas object referencing\r
+     *  \r
      */\r
     private java.lang.String _id;\r
 \r
     /**\r
-     * List of one or more vamsas object references\r
+     * List of one or more vamsas object\r
+     *  references\r
      */\r
     private java.util.Vector _refs;\r
 \r
@@ -117,26 +118,73 @@ implements java.io.Serializable
         if (obj instanceof ReferenceType) {\r
         \r
             ReferenceType temp = (ReferenceType)obj;\r
+            boolean thcycle;\r
+            boolean tmcycle;\r
             if (this._content != null) {\r
                 if (temp._content == null) return false;\r
-                else if (!(this._content.equals(temp._content))) \r
-                    return false;\r
-            }\r
-            else if (temp._content != null)\r
+                if (this._content != temp._content) {\r
+                    thcycle=org.castor.util.CycleBreaker.startingToCycle(this._content);\r
+                    tmcycle=org.castor.util.CycleBreaker.startingToCycle(temp._content);\r
+                    if (thcycle!=tmcycle) {\r
+                        if (!thcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(this._content); };\r
+                        if (!tmcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(temp._content); };\r
+                        return false;\r
+                    }\r
+                    if (!thcycle) {\r
+                        if (!this._content.equals(temp._content)) {\r
+                            org.castor.util.CycleBreaker.releaseCycleHandle(this._content);\r
+                            org.castor.util.CycleBreaker.releaseCycleHandle(temp._content);\r
+                            return false;\r
+                        }\r
+                        org.castor.util.CycleBreaker.releaseCycleHandle(this._content);\r
+                        org.castor.util.CycleBreaker.releaseCycleHandle(temp._content);\r
+                    }\r
+                }\r
+            } else if (temp._content != null)\r
                 return false;\r
             if (this._id != null) {\r
                 if (temp._id == null) return false;\r
-                else if (!(this._id.equals(temp._id))) \r
-                    return false;\r
-            }\r
-            else if (temp._id != null)\r
+                if (this._id != temp._id) {\r
+                    thcycle=org.castor.util.CycleBreaker.startingToCycle(this._id);\r
+                    tmcycle=org.castor.util.CycleBreaker.startingToCycle(temp._id);\r
+                    if (thcycle!=tmcycle) {\r
+                        if (!thcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(this._id); };\r
+                        if (!tmcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(temp._id); };\r
+                        return false;\r
+                    }\r
+                    if (!thcycle) {\r
+                        if (!this._id.equals(temp._id)) {\r
+                            org.castor.util.CycleBreaker.releaseCycleHandle(this._id);\r
+                            org.castor.util.CycleBreaker.releaseCycleHandle(temp._id);\r
+                            return false;\r
+                        }\r
+                        org.castor.util.CycleBreaker.releaseCycleHandle(this._id);\r
+                        org.castor.util.CycleBreaker.releaseCycleHandle(temp._id);\r
+                    }\r
+                }\r
+            } else if (temp._id != null)\r
                 return false;\r
             if (this._refs != null) {\r
                 if (temp._refs == null) return false;\r
-                else if (!(this._refs.equals(temp._refs))) \r
-                    return false;\r
-            }\r
-            else if (temp._refs != null)\r
+                if (this._refs != temp._refs) {\r
+                    thcycle=org.castor.util.CycleBreaker.startingToCycle(this._refs);\r
+                    tmcycle=org.castor.util.CycleBreaker.startingToCycle(temp._refs);\r
+                    if (thcycle!=tmcycle) {\r
+                        if (!thcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(this._refs); };\r
+                        if (!tmcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(temp._refs); };\r
+                        return false;\r
+                    }\r
+                    if (!thcycle) {\r
+                        if (!this._refs.equals(temp._refs)) {\r
+                            org.castor.util.CycleBreaker.releaseCycleHandle(this._refs);\r
+                            org.castor.util.CycleBreaker.releaseCycleHandle(temp._refs);\r
+                            return false;\r
+                        }\r
+                        org.castor.util.CycleBreaker.releaseCycleHandle(this._refs);\r
+                        org.castor.util.CycleBreaker.releaseCycleHandle(temp._refs);\r
+                    }\r
+                }\r
+            } else if (temp._refs != null)\r
                 return false;\r
             return true;\r
         }\r
@@ -157,7 +205,8 @@ implements java.io.Serializable
     /**\r
      * Returns the value of field 'id'. The field 'id' has the\r
      * following description: Primary Key for vamsas object\r
-     * referencing \r
+     * referencing\r
+     *  \r
      * \r
      * @return the value of field 'Id'.\r
      */\r
@@ -235,14 +284,20 @@ implements java.io.Serializable
         int result = super.hashCode();\r
         \r
         long tmp;\r
-        if (_content != null) {\r
+        if (_content != null\r
+            && !org.castor.util.CycleBreaker.startingToCycle(_content)) {\r
            result = 37 * result + _content.hashCode();\r
+           org.castor.util.CycleBreaker.releaseCycleHandle(_content);\r
         }\r
-        if (_id != null) {\r
+        if (_id != null\r
+            && !org.castor.util.CycleBreaker.startingToCycle(_id)) {\r
            result = 37 * result + _id.hashCode();\r
+           org.castor.util.CycleBreaker.releaseCycleHandle(_id);\r
         }\r
-        if (_refs != null) {\r
+        if (_refs != null\r
+            && !org.castor.util.CycleBreaker.startingToCycle(_refs)) {\r
            result = 37 * result + _refs.hashCode();\r
+           org.castor.util.CycleBreaker.releaseCycleHandle(_refs);\r
         }\r
         \r
         return result;\r
@@ -340,7 +395,8 @@ implements java.io.Serializable
     /**\r
      * Sets the value of field 'id'. The field 'id' has the\r
      * following description: Primary Key for vamsas object\r
-     * referencing \r
+     * referencing\r
+     *  \r
      * \r
      * @param id the value of field 'id'.\r
      */\r
index 8448198..357deb2 100644 (file)
@@ -83,16 +83,33 @@ implements java.io.Serializable
         if (obj instanceof Score) {\r
         \r
             Score temp = (Score)obj;\r
+            boolean thcycle;\r
+            boolean tmcycle;\r
             if (this._content != temp._content)\r
                 return false;\r
             if (this._has_content != temp._has_content)\r
                 return false;\r
             if (this._name != null) {\r
                 if (temp._name == null) return false;\r
-                else if (!(this._name.equals(temp._name))) \r
-                    return false;\r
-            }\r
-            else if (temp._name != null)\r
+                if (this._name != temp._name) {\r
+                    thcycle=org.castor.util.CycleBreaker.startingToCycle(this._name);\r
+                    tmcycle=org.castor.util.CycleBreaker.startingToCycle(temp._name);\r
+                    if (thcycle!=tmcycle) {\r
+                        if (!thcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(this._name); };\r
+                        if (!tmcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(temp._name); };\r
+                        return false;\r
+                    }\r
+                    if (!thcycle) {\r
+                        if (!this._name.equals(temp._name)) {\r
+                            org.castor.util.CycleBreaker.releaseCycleHandle(this._name);\r
+                            org.castor.util.CycleBreaker.releaseCycleHandle(temp._name);\r
+                            return false;\r
+                        }\r
+                        org.castor.util.CycleBreaker.releaseCycleHandle(this._name);\r
+                        org.castor.util.CycleBreaker.releaseCycleHandle(temp._name);\r
+                    }\r
+                }\r
+            } else if (temp._name != null)\r
                 return false;\r
             return true;\r
         }\r
@@ -144,8 +161,10 @@ implements java.io.Serializable
         \r
         long tmp;\r
         result = 37 * result + java.lang.Float.floatToIntBits(_content);\r
-        if (_name != null) {\r
+        if (_name != null\r
+            && !org.castor.util.CycleBreaker.startingToCycle(_name)) {\r
            result = 37 * result + _name.hashCode();\r
+           org.castor.util.CycleBreaker.releaseCycleHandle(_name);\r
         }\r
         \r
         return result;\r
index 4a7c031..5174b80 100644 (file)
@@ -114,6 +114,8 @@ implements java.io.Serializable
         if (obj instanceof Seg) {\r
         \r
             Seg temp = (Seg)obj;\r
+            boolean thcycle;\r
+            boolean tmcycle;\r
             if (this._start != temp._start)\r
                 return false;\r
             if (this._has_start != temp._has_start)\r
index 03ea13a..519f57a 100644 (file)
@@ -48,9 +48,8 @@ implements java.io.Serializable
     private java.util.Vector _dbRefList;
 
     /**
-     * explicitly named cross reference to other objects in the
-     * document.
-     *  
+     * explicitly named cross reference to
+     *  other objects in the document. 
      */
     private java.util.Vector _vxrefList;
 
@@ -165,33 +164,95 @@ implements java.io.Serializable
         if (obj instanceof Sequence) {
         
             Sequence temp = (Sequence)obj;
+            boolean thcycle;
+            boolean tmcycle;
             if (this._id != null) {
                 if (temp._id == null) return false;
-                else if (!(this._id.equals(temp._id))) 
-                    return false;
-            }
-            else if (temp._id != null)
+                if (this._id != temp._id) {
+                    thcycle=org.castor.util.CycleBreaker.startingToCycle(this._id);
+                    tmcycle=org.castor.util.CycleBreaker.startingToCycle(temp._id);
+                    if (thcycle!=tmcycle) {
+                        if (!thcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(this._id); };
+                        if (!tmcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(temp._id); };
+                        return false;
+                    }
+                    if (!thcycle) {
+                        if (!this._id.equals(temp._id)) {
+                            org.castor.util.CycleBreaker.releaseCycleHandle(this._id);
+                            org.castor.util.CycleBreaker.releaseCycleHandle(temp._id);
+                            return false;
+                        }
+                        org.castor.util.CycleBreaker.releaseCycleHandle(this._id);
+                        org.castor.util.CycleBreaker.releaseCycleHandle(temp._id);
+                    }
+                }
+            } else if (temp._id != null)
                 return false;
             if (this._dictionary != null) {
                 if (temp._dictionary == null) return false;
-                else if (!(this._dictionary.equals(temp._dictionary))) 
-                    return false;
-            }
-            else if (temp._dictionary != null)
+                if (this._dictionary != temp._dictionary) {
+                    thcycle=org.castor.util.CycleBreaker.startingToCycle(this._dictionary);
+                    tmcycle=org.castor.util.CycleBreaker.startingToCycle(temp._dictionary);
+                    if (thcycle!=tmcycle) {
+                        if (!thcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(this._dictionary); };
+                        if (!tmcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(temp._dictionary); };
+                        return false;
+                    }
+                    if (!thcycle) {
+                        if (!this._dictionary.equals(temp._dictionary)) {
+                            org.castor.util.CycleBreaker.releaseCycleHandle(this._dictionary);
+                            org.castor.util.CycleBreaker.releaseCycleHandle(temp._dictionary);
+                            return false;
+                        }
+                        org.castor.util.CycleBreaker.releaseCycleHandle(this._dictionary);
+                        org.castor.util.CycleBreaker.releaseCycleHandle(temp._dictionary);
+                    }
+                }
+            } else if (temp._dictionary != null)
                 return false;
             if (this._dbRefList != null) {
                 if (temp._dbRefList == null) return false;
-                else if (!(this._dbRefList.equals(temp._dbRefList))) 
-                    return false;
-            }
-            else if (temp._dbRefList != null)
+                if (this._dbRefList != temp._dbRefList) {
+                    thcycle=org.castor.util.CycleBreaker.startingToCycle(this._dbRefList);
+                    tmcycle=org.castor.util.CycleBreaker.startingToCycle(temp._dbRefList);
+                    if (thcycle!=tmcycle) {
+                        if (!thcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(this._dbRefList); };
+                        if (!tmcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(temp._dbRefList); };
+                        return false;
+                    }
+                    if (!thcycle) {
+                        if (!this._dbRefList.equals(temp._dbRefList)) {
+                            org.castor.util.CycleBreaker.releaseCycleHandle(this._dbRefList);
+                            org.castor.util.CycleBreaker.releaseCycleHandle(temp._dbRefList);
+                            return false;
+                        }
+                        org.castor.util.CycleBreaker.releaseCycleHandle(this._dbRefList);
+                        org.castor.util.CycleBreaker.releaseCycleHandle(temp._dbRefList);
+                    }
+                }
+            } else if (temp._dbRefList != null)
                 return false;
             if (this._vxrefList != null) {
                 if (temp._vxrefList == null) return false;
-                else if (!(this._vxrefList.equals(temp._vxrefList))) 
-                    return false;
-            }
-            else if (temp._vxrefList != null)
+                if (this._vxrefList != temp._vxrefList) {
+                    thcycle=org.castor.util.CycleBreaker.startingToCycle(this._vxrefList);
+                    tmcycle=org.castor.util.CycleBreaker.startingToCycle(temp._vxrefList);
+                    if (thcycle!=tmcycle) {
+                        if (!thcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(this._vxrefList); };
+                        if (!tmcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(temp._vxrefList); };
+                        return false;
+                    }
+                    if (!thcycle) {
+                        if (!this._vxrefList.equals(temp._vxrefList)) {
+                            org.castor.util.CycleBreaker.releaseCycleHandle(this._vxrefList);
+                            org.castor.util.CycleBreaker.releaseCycleHandle(temp._vxrefList);
+                            return false;
+                        }
+                        org.castor.util.CycleBreaker.releaseCycleHandle(this._vxrefList);
+                        org.castor.util.CycleBreaker.releaseCycleHandle(temp._vxrefList);
+                    }
+                }
+            } else if (temp._vxrefList != null)
                 return false;
             return true;
         }
@@ -351,17 +412,25 @@ implements java.io.Serializable
         int result = super.hashCode();
         
         long tmp;
-        if (_id != null) {
+        if (_id != null
+            && !org.castor.util.CycleBreaker.startingToCycle(_id)) {
            result = 37 * result + _id.hashCode();
+           org.castor.util.CycleBreaker.releaseCycleHandle(_id);
         }
-        if (_dictionary != null) {
+        if (_dictionary != null
+            && !org.castor.util.CycleBreaker.startingToCycle(_dictionary)) {
            result = 37 * result + _dictionary.hashCode();
+           org.castor.util.CycleBreaker.releaseCycleHandle(_dictionary);
         }
-        if (_dbRefList != null) {
+        if (_dbRefList != null
+            && !org.castor.util.CycleBreaker.startingToCycle(_dbRefList)) {
            result = 37 * result + _dbRefList.hashCode();
+           org.castor.util.CycleBreaker.releaseCycleHandle(_dbRefList);
         }
-        if (_vxrefList != null) {
+        if (_vxrefList != null
+            && !org.castor.util.CycleBreaker.startingToCycle(_vxrefList)) {
            result = 37 * result + _vxrefList.hashCode();
+           org.castor.util.CycleBreaker.releaseCycleHandle(_vxrefList);
         }
         
         return result;
index e7776a7..7f7bcb0 100644 (file)
@@ -19,7 +19,7 @@ import org.exolab.castor.xml.Unmarshaller;
  * \r
  * @version $Revision$ $Date$\r
  */\r
-public class SequenceMapping extends uk.ac.vamsas.client.Vobject \r
+public class SequenceMapping extends uk.ac.vamsas.objects.core.MapType \r
 implements java.io.Serializable\r
 {\r
 \r
@@ -29,14 +29,16 @@ implements java.io.Serializable
     //--------------------------/\r
 \r
     /**\r
-     * Field _sequenceA.\r
+     * Object on which the local\r
+     *  range is defined. \r
      */\r
-    private java.lang.Object _sequenceA;\r
+    private java.lang.Object _loc;\r
 \r
     /**\r
-     * Field _sequenceB.\r
+     * Object on which the mapped\r
+     *  range is defined. \r
      */\r
-    private java.lang.Object _sequenceB;\r
+    private java.lang.Object _map;\r
 \r
     /**\r
      * Field _id.\r
@@ -44,11 +46,6 @@ implements java.io.Serializable
     private java.lang.String _id;\r
 \r
     /**\r
-     * Field _rangeList.\r
-     */\r
-    private java.util.Vector _rangeList;\r
-\r
-    /**\r
      * Field _provenance.\r
      */\r
     private uk.ac.vamsas.objects.core.Provenance _provenance;\r
@@ -60,7 +57,6 @@ implements java.io.Serializable
 \r
     public SequenceMapping() {\r
         super();\r
-        this._rangeList = new java.util.Vector();\r
     }\r
 \r
 \r
@@ -69,45 +65,6 @@ implements java.io.Serializable
     //-----------/\r
 \r
     /**\r
-     * \r
-     * \r
-     * @param vRange\r
-     * @throws java.lang.IndexOutOfBoundsException if the index\r
-     * given is outside the bounds of the collection\r
-     */\r
-    public void addRange(\r
-            final uk.ac.vamsas.objects.core.Range vRange)\r
-    throws java.lang.IndexOutOfBoundsException {\r
-        this._rangeList.addElement(vRange);\r
-    }\r
-\r
-    /**\r
-     * \r
-     * \r
-     * @param index\r
-     * @param vRange\r
-     * @throws java.lang.IndexOutOfBoundsException if the index\r
-     * given is outside the bounds of the collection\r
-     */\r
-    public void addRange(\r
-            final int index,\r
-            final uk.ac.vamsas.objects.core.Range vRange)\r
-    throws java.lang.IndexOutOfBoundsException {\r
-        this._rangeList.add(index, vRange);\r
-    }\r
-\r
-    /**\r
-     * Method enumerateRange.\r
-     * \r
-     * @return an Enumeration over all\r
-     * uk.ac.vamsas.objects.core.Range elements\r
-     */\r
-    public java.util.Enumeration enumerateRange(\r
-    ) {\r
-        return this._rangeList.elements();\r
-    }\r
-\r
-    /**\r
      * Overrides the java.lang.Object.equals method.\r
      * \r
      * @param obj\r
@@ -124,40 +81,95 @@ implements java.io.Serializable
         if (obj instanceof SequenceMapping) {\r
         \r
             SequenceMapping temp = (SequenceMapping)obj;\r
-            if (this._sequenceA != null) {\r
-                if (temp._sequenceA == null) return false;\r
-                else if (!(this._sequenceA.equals(temp._sequenceA))) \r
-                    return false;\r
-            }\r
-            else if (temp._sequenceA != null)\r
+            boolean thcycle;\r
+            boolean tmcycle;\r
+            if (this._loc != null) {\r
+                if (temp._loc == null) return false;\r
+                if (this._loc != temp._loc) {\r
+                    thcycle=org.castor.util.CycleBreaker.startingToCycle(this._loc);\r
+                    tmcycle=org.castor.util.CycleBreaker.startingToCycle(temp._loc);\r
+                    if (thcycle!=tmcycle) {\r
+                        if (!thcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(this._loc); };\r
+                        if (!tmcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(temp._loc); };\r
+                        return false;\r
+                    }\r
+                    if (!thcycle) {\r
+                        if (!this._loc.equals(temp._loc)) {\r
+                            org.castor.util.CycleBreaker.releaseCycleHandle(this._loc);\r
+                            org.castor.util.CycleBreaker.releaseCycleHandle(temp._loc);\r
+                            return false;\r
+                        }\r
+                        org.castor.util.CycleBreaker.releaseCycleHandle(this._loc);\r
+                        org.castor.util.CycleBreaker.releaseCycleHandle(temp._loc);\r
+                    }\r
+                }\r
+            } else if (temp._loc != null)\r
                 return false;\r
-            if (this._sequenceB != null) {\r
-                if (temp._sequenceB == null) return false;\r
-                else if (!(this._sequenceB.equals(temp._sequenceB))) \r
-                    return false;\r
-            }\r
-            else if (temp._sequenceB != null)\r
+            if (this._map != null) {\r
+                if (temp._map == null) return false;\r
+                if (this._map != temp._map) {\r
+                    thcycle=org.castor.util.CycleBreaker.startingToCycle(this._map);\r
+                    tmcycle=org.castor.util.CycleBreaker.startingToCycle(temp._map);\r
+                    if (thcycle!=tmcycle) {\r
+                        if (!thcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(this._map); };\r
+                        if (!tmcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(temp._map); };\r
+                        return false;\r
+                    }\r
+                    if (!thcycle) {\r
+                        if (!this._map.equals(temp._map)) {\r
+                            org.castor.util.CycleBreaker.releaseCycleHandle(this._map);\r
+                            org.castor.util.CycleBreaker.releaseCycleHandle(temp._map);\r
+                            return false;\r
+                        }\r
+                        org.castor.util.CycleBreaker.releaseCycleHandle(this._map);\r
+                        org.castor.util.CycleBreaker.releaseCycleHandle(temp._map);\r
+                    }\r
+                }\r
+            } else if (temp._map != null)\r
                 return false;\r
             if (this._id != null) {\r
                 if (temp._id == null) return false;\r
-                else if (!(this._id.equals(temp._id))) \r
-                    return false;\r
-            }\r
-            else if (temp._id != null)\r
-                return false;\r
-            if (this._rangeList != null) {\r
-                if (temp._rangeList == null) return false;\r
-                else if (!(this._rangeList.equals(temp._rangeList))) \r
-                    return false;\r
-            }\r
-            else if (temp._rangeList != null)\r
+                if (this._id != temp._id) {\r
+                    thcycle=org.castor.util.CycleBreaker.startingToCycle(this._id);\r
+                    tmcycle=org.castor.util.CycleBreaker.startingToCycle(temp._id);\r
+                    if (thcycle!=tmcycle) {\r
+                        if (!thcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(this._id); };\r
+                        if (!tmcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(temp._id); };\r
+                        return false;\r
+                    }\r
+                    if (!thcycle) {\r
+                        if (!this._id.equals(temp._id)) {\r
+                            org.castor.util.CycleBreaker.releaseCycleHandle(this._id);\r
+                            org.castor.util.CycleBreaker.releaseCycleHandle(temp._id);\r
+                            return false;\r
+                        }\r
+                        org.castor.util.CycleBreaker.releaseCycleHandle(this._id);\r
+                        org.castor.util.CycleBreaker.releaseCycleHandle(temp._id);\r
+                    }\r
+                }\r
+            } else if (temp._id != null)\r
                 return false;\r
             if (this._provenance != null) {\r
                 if (temp._provenance == null) return false;\r
-                else if (!(this._provenance.equals(temp._provenance))) \r
-                    return false;\r
-            }\r
-            else if (temp._provenance != null)\r
+                if (this._provenance != temp._provenance) {\r
+                    thcycle=org.castor.util.CycleBreaker.startingToCycle(this._provenance);\r
+                    tmcycle=org.castor.util.CycleBreaker.startingToCycle(temp._provenance);\r
+                    if (thcycle!=tmcycle) {\r
+                        if (!thcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(this._provenance); };\r
+                        if (!tmcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(temp._provenance); };\r
+                        return false;\r
+                    }\r
+                    if (!thcycle) {\r
+                        if (!this._provenance.equals(temp._provenance)) {\r
+                            org.castor.util.CycleBreaker.releaseCycleHandle(this._provenance);\r
+                            org.castor.util.CycleBreaker.releaseCycleHandle(temp._provenance);\r
+                            return false;\r
+                        }\r
+                        org.castor.util.CycleBreaker.releaseCycleHandle(this._provenance);\r
+                        org.castor.util.CycleBreaker.releaseCycleHandle(temp._provenance);\r
+                    }\r
+                }\r
+            } else if (temp._provenance != null)\r
                 return false;\r
             return true;\r
         }\r
@@ -175,90 +187,37 @@ implements java.io.Serializable
     }\r
 \r
     /**\r
-     * Returns the value of field 'provenance'.\r
-     * \r
-     * @return the value of field 'Provenance'.\r
-     */\r
-    public uk.ac.vamsas.objects.core.Provenance getProvenance(\r
-    ) {\r
-        return this._provenance;\r
-    }\r
-\r
-    /**\r
-     * Method getRange.\r
-     * \r
-     * @param index\r
-     * @throws java.lang.IndexOutOfBoundsException if the index\r
-     * given is outside the bounds of the collection\r
-     * @return the value of the uk.ac.vamsas.objects.core.Range at\r
-     * the given index\r
-     */\r
-    public uk.ac.vamsas.objects.core.Range getRange(\r
-            final int index)\r
-    throws java.lang.IndexOutOfBoundsException {\r
-        // check bounds for index\r
-        if (index < 0 || index >= this._rangeList.size()) {\r
-            throw new IndexOutOfBoundsException("getRange: Index value '" + index + "' not in range [0.." + (this._rangeList.size() - 1) + "]");\r
-        }\r
-        \r
-        return (uk.ac.vamsas.objects.core.Range) _rangeList.get(index);\r
-    }\r
-\r
-    /**\r
-     * Method getRange.Returns the contents of the collection in an\r
-     * Array.  <p>Note:  Just in case the collection contents are\r
-     * changing in another thread, we pass a 0-length Array of the\r
-     * correct type into the API call.  This way we <i>know</i>\r
-     * that the Array returned is of exactly the correct length.\r
+     * Returns the value of field 'loc'. The field 'loc' has the\r
+     * following description: Object on which the local\r
+     *  range is defined. \r
      * \r
-     * @return this collection as an Array\r
+     * @return the value of field 'Loc'.\r
      */\r
-    public uk.ac.vamsas.objects.core.Range[] getRange(\r
+    public java.lang.Object getLoc(\r
     ) {\r
-        uk.ac.vamsas.objects.core.Range[] array = new uk.ac.vamsas.objects.core.Range[0];\r
-        return (uk.ac.vamsas.objects.core.Range[]) this._rangeList.toArray(array);\r
+        return this._loc;\r
     }\r
 \r
     /**\r
-     * Method getRangeAsReference.Returns a reference to\r
-     * '_rangeList'. No type checking is performed on any\r
-     * modifications to the Vector.\r
+     * Returns the value of field 'map'. The field 'map' has the\r
+     * following description: Object on which the mapped\r
+     *  range is defined. \r
      * \r
-     * @return a reference to the Vector backing this class\r
+     * @return the value of field 'Map'.\r
      */\r
-    public java.util.Vector getRangeAsReference(\r
+    public java.lang.Object getMap(\r
     ) {\r
-        return this._rangeList;\r
+        return this._map;\r
     }\r
 \r
     /**\r
-     * Method getRangeCount.\r
-     * \r
-     * @return the size of this collection\r
-     */\r
-    public int getRangeCount(\r
-    ) {\r
-        return this._rangeList.size();\r
-    }\r
-\r
-    /**\r
-     * Returns the value of field 'sequenceA'.\r
-     * \r
-     * @return the value of field 'SequenceA'.\r
-     */\r
-    public java.lang.Object getSequenceA(\r
-    ) {\r
-        return this._sequenceA;\r
-    }\r
-\r
-    /**\r
-     * Returns the value of field 'sequenceB'.\r
+     * Returns the value of field 'provenance'.\r
      * \r
-     * @return the value of field 'SequenceB'.\r
+     * @return the value of field 'Provenance'.\r
      */\r
-    public java.lang.Object getSequenceB(\r
+    public uk.ac.vamsas.objects.core.Provenance getProvenance(\r
     ) {\r
-        return this._sequenceB;\r
+        return this._provenance;\r
     }\r
 \r
     /**\r
@@ -274,20 +233,25 @@ implements java.io.Serializable
         int result = super.hashCode();\r
         \r
         long tmp;\r
-        if (_sequenceA != null) {\r
-           result = 37 * result + _sequenceA.hashCode();\r
+        if (_loc != null\r
+            && !org.castor.util.CycleBreaker.startingToCycle(_loc)) {\r
+           result = 37 * result + _loc.hashCode();\r
+           org.castor.util.CycleBreaker.releaseCycleHandle(_loc);\r
         }\r
-        if (_sequenceB != null) {\r
-           result = 37 * result + _sequenceB.hashCode();\r
+        if (_map != null\r
+            && !org.castor.util.CycleBreaker.startingToCycle(_map)) {\r
+           result = 37 * result + _map.hashCode();\r
+           org.castor.util.CycleBreaker.releaseCycleHandle(_map);\r
         }\r
-        if (_id != null) {\r
+        if (_id != null\r
+            && !org.castor.util.CycleBreaker.startingToCycle(_id)) {\r
            result = 37 * result + _id.hashCode();\r
+           org.castor.util.CycleBreaker.releaseCycleHandle(_id);\r
         }\r
-        if (_rangeList != null) {\r
-           result = 37 * result + _rangeList.hashCode();\r
-        }\r
-        if (_provenance != null) {\r
+        if (_provenance != null\r
+            && !org.castor.util.CycleBreaker.startingToCycle(_provenance)) {\r
            result = 37 * result + _provenance.hashCode();\r
+           org.castor.util.CycleBreaker.releaseCycleHandle(_provenance);\r
         }\r
         \r
         return result;\r
@@ -341,37 +305,6 @@ implements java.io.Serializable
     }\r
 \r
     /**\r
-     */\r
-    public void removeAllRange(\r
-    ) {\r
-        this._rangeList.clear();\r
-    }\r
-\r
-    /**\r
-     * Method removeRange.\r
-     * \r
-     * @param vRange\r
-     * @return true if the object was removed from the collection.\r
-     */\r
-    public boolean removeRange(\r
-            final uk.ac.vamsas.objects.core.Range vRange) {\r
-        boolean removed = _rangeList.remove(vRange);\r
-        return removed;\r
-    }\r
-\r
-    /**\r
-     * Method removeRangeAt.\r
-     * \r
-     * @param index\r
-     * @return the element removed from the collection\r
-     */\r
-    public uk.ac.vamsas.objects.core.Range removeRangeAt(\r
-            final int index) {\r
-        java.lang.Object obj = this._rangeList.remove(index);\r
-        return (uk.ac.vamsas.objects.core.Range) obj;\r
-    }\r
-\r
-    /**\r
      * Sets the value of field 'id'.\r
      * \r
      * @param id the value of field 'id'.\r
@@ -382,94 +315,37 @@ implements java.io.Serializable
     }\r
 \r
     /**\r
-     * Sets the value of field 'provenance'.\r
-     * \r
-     * @param provenance the value of field 'provenance'.\r
-     */\r
-    public void setProvenance(\r
-            final uk.ac.vamsas.objects.core.Provenance provenance) {\r
-        this._provenance = provenance;\r
-    }\r
-\r
-    /**\r
+     * Sets the value of field 'loc'. The field 'loc' has the\r
+     * following description: Object on which the local\r
+     *  range is defined. \r
      * \r
-     * \r
-     * @param index\r
-     * @param vRange\r
-     * @throws java.lang.IndexOutOfBoundsException if the index\r
-     * given is outside the bounds of the collection\r
-     */\r
-    public void setRange(\r
-            final int index,\r
-            final uk.ac.vamsas.objects.core.Range vRange)\r
-    throws java.lang.IndexOutOfBoundsException {\r
-        // check bounds for index\r
-        if (index < 0 || index >= this._rangeList.size()) {\r
-            throw new IndexOutOfBoundsException("setRange: Index value '" + index + "' not in range [0.." + (this._rangeList.size() - 1) + "]");\r
-        }\r
-        \r
-        this._rangeList.set(index, vRange);\r
-    }\r
-\r
-    /**\r
-     * \r
-     * \r
-     * @param vRangeArray\r
+     * @param loc the value of field 'loc'.\r
      */\r
-    public void setRange(\r
-            final uk.ac.vamsas.objects.core.Range[] vRangeArray) {\r
-        //-- copy array\r
-        _rangeList.clear();\r
-        \r
-        for (int i = 0; i < vRangeArray.length; i++) {\r
-                this._rangeList.add(vRangeArray[i]);\r
-        }\r
+    public void setLoc(\r
+            final java.lang.Object loc) {\r
+        this._loc = loc;\r
     }\r
 \r
     /**\r
-     * Sets the value of '_rangeList' by copying the given Vector.\r
-     * All elements will be checked for type safety.\r
+     * Sets the value of field 'map'. The field 'map' has the\r
+     * following description: Object on which the mapped\r
+     *  range is defined. \r
      * \r
-     * @param vRangeList the Vector to copy.\r
+     * @param map the value of field 'map'.\r
      */\r
-    public void setRange(\r
-            final java.util.Vector vRangeList) {\r
-        // copy vector\r
-        this._rangeList.clear();\r
-        \r
-        this._rangeList.addAll(vRangeList);\r
+    public void setMap(\r
+            final java.lang.Object map) {\r
+        this._map = map;\r
     }\r
 \r
     /**\r
-     * Sets the value of '_rangeList' by setting it to the given\r
-     * Vector. No type checking is performed.\r
-     * @deprecated\r
-     * \r
-     * @param rangeVector the Vector to set.\r
-     */\r
-    public void setRangeAsReference(\r
-            final java.util.Vector rangeVector) {\r
-        this._rangeList = rangeVector;\r
-    }\r
-\r
-    /**\r
-     * Sets the value of field 'sequenceA'.\r
-     * \r
-     * @param sequenceA the value of field 'sequenceA'.\r
-     */\r
-    public void setSequenceA(\r
-            final java.lang.Object sequenceA) {\r
-        this._sequenceA = sequenceA;\r
-    }\r
-\r
-    /**\r
-     * Sets the value of field 'sequenceB'.\r
+     * Sets the value of field 'provenance'.\r
      * \r
-     * @param sequenceB the value of field 'sequenceB'.\r
+     * @param provenance the value of field 'provenance'.\r
      */\r
-    public void setSequenceB(\r
-            final java.lang.Object sequenceB) {\r
-        this._sequenceB = sequenceB;\r
+    public void setProvenance(\r
+            final uk.ac.vamsas.objects.core.Provenance provenance) {\r
+        this._provenance = provenance;\r
     }\r
 \r
     /**\r
@@ -480,13 +356,12 @@ implements java.io.Serializable
      * null or if any SAXException is thrown during marshaling\r
      * @throws org.exolab.castor.xml.ValidationException if this\r
      * object is an invalid instance according to the schema\r
-     * @return the unmarshaled\r
-     * uk.ac.vamsas.objects.core.SequenceMapping\r
+     * @return the unmarshaled uk.ac.vamsas.objects.core.MapType\r
      */\r
-    public static uk.ac.vamsas.objects.core.SequenceMapping unmarshal(\r
+    public static uk.ac.vamsas.objects.core.MapType unmarshal(\r
             final java.io.Reader reader)\r
     throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {\r
-        return (uk.ac.vamsas.objects.core.SequenceMapping) Unmarshaller.unmarshal(uk.ac.vamsas.objects.core.SequenceMapping.class, reader);\r
+        return (uk.ac.vamsas.objects.core.MapType) Unmarshaller.unmarshal(uk.ac.vamsas.objects.core.SequenceMapping.class, reader);\r
     }\r
 \r
     /**\r
index 6b25c6f..1a89b6c 100644 (file)
@@ -153,6 +153,8 @@ implements java.io.Serializable
         if (obj instanceof SequenceType) {
         
             SequenceType temp = (SequenceType)obj;
+            boolean thcycle;
+            boolean tmcycle;
             if (this._start != temp._start)
                 return false;
             if (this._has_start != temp._has_start)
@@ -163,31 +165,91 @@ implements java.io.Serializable
                 return false;
             if (this._sequence != null) {
                 if (temp._sequence == null) return false;
-                else if (!(this._sequence.equals(temp._sequence))) 
-                    return false;
-            }
-            else if (temp._sequence != null)
+                if (this._sequence != temp._sequence) {
+                    thcycle=org.castor.util.CycleBreaker.startingToCycle(this._sequence);
+                    tmcycle=org.castor.util.CycleBreaker.startingToCycle(temp._sequence);
+                    if (thcycle!=tmcycle) {
+                        if (!thcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(this._sequence); };
+                        if (!tmcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(temp._sequence); };
+                        return false;
+                    }
+                    if (!thcycle) {
+                        if (!this._sequence.equals(temp._sequence)) {
+                            org.castor.util.CycleBreaker.releaseCycleHandle(this._sequence);
+                            org.castor.util.CycleBreaker.releaseCycleHandle(temp._sequence);
+                            return false;
+                        }
+                        org.castor.util.CycleBreaker.releaseCycleHandle(this._sequence);
+                        org.castor.util.CycleBreaker.releaseCycleHandle(temp._sequence);
+                    }
+                }
+            } else if (temp._sequence != null)
                 return false;
             if (this._name != null) {
                 if (temp._name == null) return false;
-                else if (!(this._name.equals(temp._name))) 
-                    return false;
-            }
-            else if (temp._name != null)
+                if (this._name != temp._name) {
+                    thcycle=org.castor.util.CycleBreaker.startingToCycle(this._name);
+                    tmcycle=org.castor.util.CycleBreaker.startingToCycle(temp._name);
+                    if (thcycle!=tmcycle) {
+                        if (!thcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(this._name); };
+                        if (!tmcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(temp._name); };
+                        return false;
+                    }
+                    if (!thcycle) {
+                        if (!this._name.equals(temp._name)) {
+                            org.castor.util.CycleBreaker.releaseCycleHandle(this._name);
+                            org.castor.util.CycleBreaker.releaseCycleHandle(temp._name);
+                            return false;
+                        }
+                        org.castor.util.CycleBreaker.releaseCycleHandle(this._name);
+                        org.castor.util.CycleBreaker.releaseCycleHandle(temp._name);
+                    }
+                }
+            } else if (temp._name != null)
                 return false;
             if (this._description != null) {
                 if (temp._description == null) return false;
-                else if (!(this._description.equals(temp._description))) 
-                    return false;
-            }
-            else if (temp._description != null)
+                if (this._description != temp._description) {
+                    thcycle=org.castor.util.CycleBreaker.startingToCycle(this._description);
+                    tmcycle=org.castor.util.CycleBreaker.startingToCycle(temp._description);
+                    if (thcycle!=tmcycle) {
+                        if (!thcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(this._description); };
+                        if (!tmcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(temp._description); };
+                        return false;
+                    }
+                    if (!thcycle) {
+                        if (!this._description.equals(temp._description)) {
+                            org.castor.util.CycleBreaker.releaseCycleHandle(this._description);
+                            org.castor.util.CycleBreaker.releaseCycleHandle(temp._description);
+                            return false;
+                        }
+                        org.castor.util.CycleBreaker.releaseCycleHandle(this._description);
+                        org.castor.util.CycleBreaker.releaseCycleHandle(temp._description);
+                    }
+                }
+            } else if (temp._description != null)
                 return false;
             if (this._propertyList != null) {
                 if (temp._propertyList == null) return false;
-                else if (!(this._propertyList.equals(temp._propertyList))) 
-                    return false;
-            }
-            else if (temp._propertyList != null)
+                if (this._propertyList != temp._propertyList) {
+                    thcycle=org.castor.util.CycleBreaker.startingToCycle(this._propertyList);
+                    tmcycle=org.castor.util.CycleBreaker.startingToCycle(temp._propertyList);
+                    if (thcycle!=tmcycle) {
+                        if (!thcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(this._propertyList); };
+                        if (!tmcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(temp._propertyList); };
+                        return false;
+                    }
+                    if (!thcycle) {
+                        if (!this._propertyList.equals(temp._propertyList)) {
+                            org.castor.util.CycleBreaker.releaseCycleHandle(this._propertyList);
+                            org.castor.util.CycleBreaker.releaseCycleHandle(temp._propertyList);
+                            return false;
+                        }
+                        org.castor.util.CycleBreaker.releaseCycleHandle(this._propertyList);
+                        org.castor.util.CycleBreaker.releaseCycleHandle(temp._propertyList);
+                    }
+                }
+            } else if (temp._propertyList != null)
                 return false;
             return true;
         }
@@ -336,17 +398,25 @@ implements java.io.Serializable
         long tmp;
         result = 37 * result + (int)(_start^(_start>>>32));
         result = 37 * result + (int)(_end^(_end>>>32));
-        if (_sequence != null) {
+        if (_sequence != null
+            && !org.castor.util.CycleBreaker.startingToCycle(_sequence)) {
            result = 37 * result + _sequence.hashCode();
+           org.castor.util.CycleBreaker.releaseCycleHandle(_sequence);
         }
-        if (_name != null) {
+        if (_name != null
+            && !org.castor.util.CycleBreaker.startingToCycle(_name)) {
            result = 37 * result + _name.hashCode();
+           org.castor.util.CycleBreaker.releaseCycleHandle(_name);
         }
-        if (_description != null) {
+        if (_description != null
+            && !org.castor.util.CycleBreaker.startingToCycle(_description)) {
            result = 37 * result + _description.hashCode();
+           org.castor.util.CycleBreaker.releaseCycleHandle(_description);
         }
-        if (_propertyList != null) {
+        if (_propertyList != null
+            && !org.castor.util.CycleBreaker.startingToCycle(_propertyList)) {
            result = 37 * result + _propertyList.hashCode();
+           org.castor.util.CycleBreaker.releaseCycleHandle(_propertyList);
         }
         
         return result;
index 5c0e72a..39eb763 100644 (file)
@@ -49,9 +49,8 @@ implements java.io.Serializable
     private java.util.Vector _newickList;
 
     /**
-     * node identity and mapping data between tree representations
-     * and vamsas document objects
-     *  
+     * node identity and mapping data between tree
+     *  representations and vamsas document objects 
      */
     private java.util.Vector _treenodeList;
 
@@ -216,54 +215,161 @@ implements java.io.Serializable
         if (obj instanceof Tree) {
         
             Tree temp = (Tree)obj;
+            boolean thcycle;
+            boolean tmcycle;
             if (this._id != null) {
                 if (temp._id == null) return false;
-                else if (!(this._id.equals(temp._id))) 
-                    return false;
-            }
-            else if (temp._id != null)
+                if (this._id != temp._id) {
+                    thcycle=org.castor.util.CycleBreaker.startingToCycle(this._id);
+                    tmcycle=org.castor.util.CycleBreaker.startingToCycle(temp._id);
+                    if (thcycle!=tmcycle) {
+                        if (!thcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(this._id); };
+                        if (!tmcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(temp._id); };
+                        return false;
+                    }
+                    if (!thcycle) {
+                        if (!this._id.equals(temp._id)) {
+                            org.castor.util.CycleBreaker.releaseCycleHandle(this._id);
+                            org.castor.util.CycleBreaker.releaseCycleHandle(temp._id);
+                            return false;
+                        }
+                        org.castor.util.CycleBreaker.releaseCycleHandle(this._id);
+                        org.castor.util.CycleBreaker.releaseCycleHandle(temp._id);
+                    }
+                }
+            } else if (temp._id != null)
                 return false;
             if (this._modifiable != null) {
                 if (temp._modifiable == null) return false;
-                else if (!(this._modifiable.equals(temp._modifiable))) 
-                    return false;
-            }
-            else if (temp._modifiable != null)
+                if (this._modifiable != temp._modifiable) {
+                    thcycle=org.castor.util.CycleBreaker.startingToCycle(this._modifiable);
+                    tmcycle=org.castor.util.CycleBreaker.startingToCycle(temp._modifiable);
+                    if (thcycle!=tmcycle) {
+                        if (!thcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(this._modifiable); };
+                        if (!tmcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(temp._modifiable); };
+                        return false;
+                    }
+                    if (!thcycle) {
+                        if (!this._modifiable.equals(temp._modifiable)) {
+                            org.castor.util.CycleBreaker.releaseCycleHandle(this._modifiable);
+                            org.castor.util.CycleBreaker.releaseCycleHandle(temp._modifiable);
+                            return false;
+                        }
+                        org.castor.util.CycleBreaker.releaseCycleHandle(this._modifiable);
+                        org.castor.util.CycleBreaker.releaseCycleHandle(temp._modifiable);
+                    }
+                }
+            } else if (temp._modifiable != null)
                 return false;
             if (this._title != null) {
                 if (temp._title == null) return false;
-                else if (!(this._title.equals(temp._title))) 
-                    return false;
-            }
-            else if (temp._title != null)
+                if (this._title != temp._title) {
+                    thcycle=org.castor.util.CycleBreaker.startingToCycle(this._title);
+                    tmcycle=org.castor.util.CycleBreaker.startingToCycle(temp._title);
+                    if (thcycle!=tmcycle) {
+                        if (!thcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(this._title); };
+                        if (!tmcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(temp._title); };
+                        return false;
+                    }
+                    if (!thcycle) {
+                        if (!this._title.equals(temp._title)) {
+                            org.castor.util.CycleBreaker.releaseCycleHandle(this._title);
+                            org.castor.util.CycleBreaker.releaseCycleHandle(temp._title);
+                            return false;
+                        }
+                        org.castor.util.CycleBreaker.releaseCycleHandle(this._title);
+                        org.castor.util.CycleBreaker.releaseCycleHandle(temp._title);
+                    }
+                }
+            } else if (temp._title != null)
                 return false;
             if (this._newickList != null) {
                 if (temp._newickList == null) return false;
-                else if (!(this._newickList.equals(temp._newickList))) 
-                    return false;
-            }
-            else if (temp._newickList != null)
+                if (this._newickList != temp._newickList) {
+                    thcycle=org.castor.util.CycleBreaker.startingToCycle(this._newickList);
+                    tmcycle=org.castor.util.CycleBreaker.startingToCycle(temp._newickList);
+                    if (thcycle!=tmcycle) {
+                        if (!thcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(this._newickList); };
+                        if (!tmcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(temp._newickList); };
+                        return false;
+                    }
+                    if (!thcycle) {
+                        if (!this._newickList.equals(temp._newickList)) {
+                            org.castor.util.CycleBreaker.releaseCycleHandle(this._newickList);
+                            org.castor.util.CycleBreaker.releaseCycleHandle(temp._newickList);
+                            return false;
+                        }
+                        org.castor.util.CycleBreaker.releaseCycleHandle(this._newickList);
+                        org.castor.util.CycleBreaker.releaseCycleHandle(temp._newickList);
+                    }
+                }
+            } else if (temp._newickList != null)
                 return false;
             if (this._treenodeList != null) {
                 if (temp._treenodeList == null) return false;
-                else if (!(this._treenodeList.equals(temp._treenodeList))) 
-                    return false;
-            }
-            else if (temp._treenodeList != null)
+                if (this._treenodeList != temp._treenodeList) {
+                    thcycle=org.castor.util.CycleBreaker.startingToCycle(this._treenodeList);
+                    tmcycle=org.castor.util.CycleBreaker.startingToCycle(temp._treenodeList);
+                    if (thcycle!=tmcycle) {
+                        if (!thcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(this._treenodeList); };
+                        if (!tmcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(temp._treenodeList); };
+                        return false;
+                    }
+                    if (!thcycle) {
+                        if (!this._treenodeList.equals(temp._treenodeList)) {
+                            org.castor.util.CycleBreaker.releaseCycleHandle(this._treenodeList);
+                            org.castor.util.CycleBreaker.releaseCycleHandle(temp._treenodeList);
+                            return false;
+                        }
+                        org.castor.util.CycleBreaker.releaseCycleHandle(this._treenodeList);
+                        org.castor.util.CycleBreaker.releaseCycleHandle(temp._treenodeList);
+                    }
+                }
+            } else if (temp._treenodeList != null)
                 return false;
             if (this._propertyList != null) {
                 if (temp._propertyList == null) return false;
-                else if (!(this._propertyList.equals(temp._propertyList))) 
-                    return false;
-            }
-            else if (temp._propertyList != null)
+                if (this._propertyList != temp._propertyList) {
+                    thcycle=org.castor.util.CycleBreaker.startingToCycle(this._propertyList);
+                    tmcycle=org.castor.util.CycleBreaker.startingToCycle(temp._propertyList);
+                    if (thcycle!=tmcycle) {
+                        if (!thcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(this._propertyList); };
+                        if (!tmcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(temp._propertyList); };
+                        return false;
+                    }
+                    if (!thcycle) {
+                        if (!this._propertyList.equals(temp._propertyList)) {
+                            org.castor.util.CycleBreaker.releaseCycleHandle(this._propertyList);
+                            org.castor.util.CycleBreaker.releaseCycleHandle(temp._propertyList);
+                            return false;
+                        }
+                        org.castor.util.CycleBreaker.releaseCycleHandle(this._propertyList);
+                        org.castor.util.CycleBreaker.releaseCycleHandle(temp._propertyList);
+                    }
+                }
+            } else if (temp._propertyList != null)
                 return false;
             if (this._provenance != null) {
                 if (temp._provenance == null) return false;
-                else if (!(this._provenance.equals(temp._provenance))) 
-                    return false;
-            }
-            else if (temp._provenance != null)
+                if (this._provenance != temp._provenance) {
+                    thcycle=org.castor.util.CycleBreaker.startingToCycle(this._provenance);
+                    tmcycle=org.castor.util.CycleBreaker.startingToCycle(temp._provenance);
+                    if (thcycle!=tmcycle) {
+                        if (!thcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(this._provenance); };
+                        if (!tmcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(temp._provenance); };
+                        return false;
+                    }
+                    if (!thcycle) {
+                        if (!this._provenance.equals(temp._provenance)) {
+                            org.castor.util.CycleBreaker.releaseCycleHandle(this._provenance);
+                            org.castor.util.CycleBreaker.releaseCycleHandle(temp._provenance);
+                            return false;
+                        }
+                        org.castor.util.CycleBreaker.releaseCycleHandle(this._provenance);
+                        org.castor.util.CycleBreaker.releaseCycleHandle(temp._provenance);
+                    }
+                }
+            } else if (temp._provenance != null)
                 return false;
             return true;
         }
@@ -496,26 +602,40 @@ implements java.io.Serializable
         int result = super.hashCode();
         
         long tmp;
-        if (_id != null) {
+        if (_id != null
+            && !org.castor.util.CycleBreaker.startingToCycle(_id)) {
            result = 37 * result + _id.hashCode();
+           org.castor.util.CycleBreaker.releaseCycleHandle(_id);
         }
-        if (_modifiable != null) {
+        if (_modifiable != null
+            && !org.castor.util.CycleBreaker.startingToCycle(_modifiable)) {
            result = 37 * result + _modifiable.hashCode();
+           org.castor.util.CycleBreaker.releaseCycleHandle(_modifiable);
         }
-        if (_title != null) {
+        if (_title != null
+            && !org.castor.util.CycleBreaker.startingToCycle(_title)) {
            result = 37 * result + _title.hashCode();
+           org.castor.util.CycleBreaker.releaseCycleHandle(_title);
         }
-        if (_newickList != null) {
+        if (_newickList != null
+            && !org.castor.util.CycleBreaker.startingToCycle(_newickList)) {
            result = 37 * result + _newickList.hashCode();
+           org.castor.util.CycleBreaker.releaseCycleHandle(_newickList);
         }
-        if (_treenodeList != null) {
+        if (_treenodeList != null
+            && !org.castor.util.CycleBreaker.startingToCycle(_treenodeList)) {
            result = 37 * result + _treenodeList.hashCode();
+           org.castor.util.CycleBreaker.releaseCycleHandle(_treenodeList);
         }
-        if (_propertyList != null) {
+        if (_propertyList != null
+            && !org.castor.util.CycleBreaker.startingToCycle(_propertyList)) {
            result = 37 * result + _propertyList.hashCode();
+           org.castor.util.CycleBreaker.releaseCycleHandle(_propertyList);
         }
-        if (_provenance != null) {
+        if (_provenance != null
+            && !org.castor.util.CycleBreaker.startingToCycle(_provenance)) {
            result = 37 * result + _provenance.hashCode();
+           org.castor.util.CycleBreaker.releaseCycleHandle(_provenance);
         }
         
         return result;
index 320f7de..1a8620e 100644 (file)
@@ -15,9 +15,8 @@ import org.exolab.castor.xml.Marshaller;
 import org.exolab.castor.xml.Unmarshaller;\r
 \r
 /**\r
- * node identity and mapping data between tree representations and\r
- * vamsas document objects\r
- *  \r
+ * node identity and mapping data between tree\r
+ *  representations and vamsas document objects \r
  * \r
  * @version $Revision$ $Date$\r
  */\r
@@ -31,16 +30,15 @@ implements java.io.Serializable
     //--------------------------/\r
 \r
     /**\r
-     * reference to one or more trees containing the node being\r
-     * described.\r
-     *  \r
+     * reference to one or more trees containing\r
+     *  the node being described. \r
      */\r
     private java.util.Vector _treeId;\r
 \r
     /**\r
-     * String uniquely identifying a particular node in the\r
-     * referenced tree according to the format of the tree\r
-     * representation that is referenced.\r
+     * String uniquely identifying a particular\r
+     *  node in the referenced tree according to the format of\r
+     *  the tree representation that is referenced.\r
      *  \r
      */\r
     private java.lang.String _nodespec;\r
@@ -115,19 +113,51 @@ implements java.io.Serializable
         if (obj instanceof Treenode) {\r
         \r
             Treenode temp = (Treenode)obj;\r
+            boolean thcycle;\r
+            boolean tmcycle;\r
             if (this._treeId != null) {\r
                 if (temp._treeId == null) return false;\r
-                else if (!(this._treeId.equals(temp._treeId))) \r
-                    return false;\r
-            }\r
-            else if (temp._treeId != null)\r
+                if (this._treeId != temp._treeId) {\r
+                    thcycle=org.castor.util.CycleBreaker.startingToCycle(this._treeId);\r
+                    tmcycle=org.castor.util.CycleBreaker.startingToCycle(temp._treeId);\r
+                    if (thcycle!=tmcycle) {\r
+                        if (!thcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(this._treeId); };\r
+                        if (!tmcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(temp._treeId); };\r
+                        return false;\r
+                    }\r
+                    if (!thcycle) {\r
+                        if (!this._treeId.equals(temp._treeId)) {\r
+                            org.castor.util.CycleBreaker.releaseCycleHandle(this._treeId);\r
+                            org.castor.util.CycleBreaker.releaseCycleHandle(temp._treeId);\r
+                            return false;\r
+                        }\r
+                        org.castor.util.CycleBreaker.releaseCycleHandle(this._treeId);\r
+                        org.castor.util.CycleBreaker.releaseCycleHandle(temp._treeId);\r
+                    }\r
+                }\r
+            } else if (temp._treeId != null)\r
                 return false;\r
             if (this._nodespec != null) {\r
                 if (temp._nodespec == null) return false;\r
-                else if (!(this._nodespec.equals(temp._nodespec))) \r
-                    return false;\r
-            }\r
-            else if (temp._nodespec != null)\r
+                if (this._nodespec != temp._nodespec) {\r
+                    thcycle=org.castor.util.CycleBreaker.startingToCycle(this._nodespec);\r
+                    tmcycle=org.castor.util.CycleBreaker.startingToCycle(temp._nodespec);\r
+                    if (thcycle!=tmcycle) {\r
+                        if (!thcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(this._nodespec); };\r
+                        if (!tmcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(temp._nodespec); };\r
+                        return false;\r
+                    }\r
+                    if (!thcycle) {\r
+                        if (!this._nodespec.equals(temp._nodespec)) {\r
+                            org.castor.util.CycleBreaker.releaseCycleHandle(this._nodespec);\r
+                            org.castor.util.CycleBreaker.releaseCycleHandle(temp._nodespec);\r
+                            return false;\r
+                        }\r
+                        org.castor.util.CycleBreaker.releaseCycleHandle(this._nodespec);\r
+                        org.castor.util.CycleBreaker.releaseCycleHandle(temp._nodespec);\r
+                    }\r
+                }\r
+            } else if (temp._nodespec != null)\r
                 return false;\r
             return true;\r
         }\r
@@ -137,8 +167,9 @@ implements java.io.Serializable
     /**\r
      * Returns the value of field 'nodespec'. The field 'nodespec'\r
      * has the following description: String uniquely identifying a\r
-     * particular node in the referenced tree according to the\r
-     * format of the tree representation that is referenced.\r
+     * particular\r
+     *  node in the referenced tree according to the format of\r
+     *  the tree representation that is referenced.\r
      *  \r
      * \r
      * @return the value of field 'Nodespec'.\r
@@ -217,11 +248,15 @@ implements java.io.Serializable
         int result = super.hashCode();\r
         \r
         long tmp;\r
-        if (_treeId != null) {\r
+        if (_treeId != null\r
+            && !org.castor.util.CycleBreaker.startingToCycle(_treeId)) {\r
            result = 37 * result + _treeId.hashCode();\r
+           org.castor.util.CycleBreaker.releaseCycleHandle(_treeId);\r
         }\r
-        if (_nodespec != null) {\r
+        if (_nodespec != null\r
+            && !org.castor.util.CycleBreaker.startingToCycle(_nodespec)) {\r
            result = 37 * result + _nodespec.hashCode();\r
+           org.castor.util.CycleBreaker.releaseCycleHandle(_nodespec);\r
         }\r
         \r
         return result;\r
@@ -308,8 +343,9 @@ implements java.io.Serializable
     /**\r
      * Sets the value of field 'nodespec'. The field 'nodespec' has\r
      * the following description: String uniquely identifying a\r
-     * particular node in the referenced tree according to the\r
-     * format of the tree representation that is referenced.\r
+     * particular\r
+     *  node in the referenced tree according to the format of\r
+     *  the tree representation that is referenced.\r
      *  \r
      * \r
      * @param nodespec the value of field 'nodespec'.\r
index 50f860e..0339959 100644 (file)
@@ -69,19 +69,51 @@ implements java.io.Serializable
         if (obj instanceof User) {
         
             User temp = (User)obj;
+            boolean thcycle;
+            boolean tmcycle;
             if (this._fullname != null) {
                 if (temp._fullname == null) return false;
-                else if (!(this._fullname.equals(temp._fullname))) 
-                    return false;
-            }
-            else if (temp._fullname != null)
+                if (this._fullname != temp._fullname) {
+                    thcycle=org.castor.util.CycleBreaker.startingToCycle(this._fullname);
+                    tmcycle=org.castor.util.CycleBreaker.startingToCycle(temp._fullname);
+                    if (thcycle!=tmcycle) {
+                        if (!thcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(this._fullname); };
+                        if (!tmcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(temp._fullname); };
+                        return false;
+                    }
+                    if (!thcycle) {
+                        if (!this._fullname.equals(temp._fullname)) {
+                            org.castor.util.CycleBreaker.releaseCycleHandle(this._fullname);
+                            org.castor.util.CycleBreaker.releaseCycleHandle(temp._fullname);
+                            return false;
+                        }
+                        org.castor.util.CycleBreaker.releaseCycleHandle(this._fullname);
+                        org.castor.util.CycleBreaker.releaseCycleHandle(temp._fullname);
+                    }
+                }
+            } else if (temp._fullname != null)
                 return false;
             if (this._organization != null) {
                 if (temp._organization == null) return false;
-                else if (!(this._organization.equals(temp._organization))) 
-                    return false;
-            }
-            else if (temp._organization != null)
+                if (this._organization != temp._organization) {
+                    thcycle=org.castor.util.CycleBreaker.startingToCycle(this._organization);
+                    tmcycle=org.castor.util.CycleBreaker.startingToCycle(temp._organization);
+                    if (thcycle!=tmcycle) {
+                        if (!thcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(this._organization); };
+                        if (!tmcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(temp._organization); };
+                        return false;
+                    }
+                    if (!thcycle) {
+                        if (!this._organization.equals(temp._organization)) {
+                            org.castor.util.CycleBreaker.releaseCycleHandle(this._organization);
+                            org.castor.util.CycleBreaker.releaseCycleHandle(temp._organization);
+                            return false;
+                        }
+                        org.castor.util.CycleBreaker.releaseCycleHandle(this._organization);
+                        org.castor.util.CycleBreaker.releaseCycleHandle(temp._organization);
+                    }
+                }
+            } else if (temp._organization != null)
                 return false;
             return true;
         }
@@ -121,11 +153,15 @@ implements java.io.Serializable
         int result = super.hashCode();
         
         long tmp;
-        if (_fullname != null) {
+        if (_fullname != null
+            && !org.castor.util.CycleBreaker.startingToCycle(_fullname)) {
            result = 37 * result + _fullname.hashCode();
+           org.castor.util.CycleBreaker.releaseCycleHandle(_fullname);
         }
-        if (_organization != null) {
+        if (_organization != null
+            && !org.castor.util.CycleBreaker.startingToCycle(_organization)) {
            result = 37 * result + _organization.hashCode();
+           org.castor.util.CycleBreaker.releaseCycleHandle(_organization);
         }
         
         return result;
index ba8146f..a762b20 100644 (file)
@@ -160,33 +160,95 @@ implements java.io.Serializable
         if (obj instanceof VAMSAS) {
         
             VAMSAS temp = (VAMSAS)obj;
+            boolean thcycle;
+            boolean tmcycle;
             if (this._id != null) {
                 if (temp._id == null) return false;
-                else if (!(this._id.equals(temp._id))) 
-                    return false;
-            }
-            else if (temp._id != null)
+                if (this._id != temp._id) {
+                    thcycle=org.castor.util.CycleBreaker.startingToCycle(this._id);
+                    tmcycle=org.castor.util.CycleBreaker.startingToCycle(temp._id);
+                    if (thcycle!=tmcycle) {
+                        if (!thcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(this._id); };
+                        if (!tmcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(temp._id); };
+                        return false;
+                    }
+                    if (!thcycle) {
+                        if (!this._id.equals(temp._id)) {
+                            org.castor.util.CycleBreaker.releaseCycleHandle(this._id);
+                            org.castor.util.CycleBreaker.releaseCycleHandle(temp._id);
+                            return false;
+                        }
+                        org.castor.util.CycleBreaker.releaseCycleHandle(this._id);
+                        org.castor.util.CycleBreaker.releaseCycleHandle(temp._id);
+                    }
+                }
+            } else if (temp._id != null)
                 return false;
             if (this._modifiable != null) {
                 if (temp._modifiable == null) return false;
-                else if (!(this._modifiable.equals(temp._modifiable))) 
-                    return false;
-            }
-            else if (temp._modifiable != null)
+                if (this._modifiable != temp._modifiable) {
+                    thcycle=org.castor.util.CycleBreaker.startingToCycle(this._modifiable);
+                    tmcycle=org.castor.util.CycleBreaker.startingToCycle(temp._modifiable);
+                    if (thcycle!=tmcycle) {
+                        if (!thcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(this._modifiable); };
+                        if (!tmcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(temp._modifiable); };
+                        return false;
+                    }
+                    if (!thcycle) {
+                        if (!this._modifiable.equals(temp._modifiable)) {
+                            org.castor.util.CycleBreaker.releaseCycleHandle(this._modifiable);
+                            org.castor.util.CycleBreaker.releaseCycleHandle(temp._modifiable);
+                            return false;
+                        }
+                        org.castor.util.CycleBreaker.releaseCycleHandle(this._modifiable);
+                        org.castor.util.CycleBreaker.releaseCycleHandle(temp._modifiable);
+                    }
+                }
+            } else if (temp._modifiable != null)
                 return false;
             if (this._treeList != null) {
                 if (temp._treeList == null) return false;
-                else if (!(this._treeList.equals(temp._treeList))) 
-                    return false;
-            }
-            else if (temp._treeList != null)
+                if (this._treeList != temp._treeList) {
+                    thcycle=org.castor.util.CycleBreaker.startingToCycle(this._treeList);
+                    tmcycle=org.castor.util.CycleBreaker.startingToCycle(temp._treeList);
+                    if (thcycle!=tmcycle) {
+                        if (!thcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(this._treeList); };
+                        if (!tmcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(temp._treeList); };
+                        return false;
+                    }
+                    if (!thcycle) {
+                        if (!this._treeList.equals(temp._treeList)) {
+                            org.castor.util.CycleBreaker.releaseCycleHandle(this._treeList);
+                            org.castor.util.CycleBreaker.releaseCycleHandle(temp._treeList);
+                            return false;
+                        }
+                        org.castor.util.CycleBreaker.releaseCycleHandle(this._treeList);
+                        org.castor.util.CycleBreaker.releaseCycleHandle(temp._treeList);
+                    }
+                }
+            } else if (temp._treeList != null)
                 return false;
             if (this._dataSetList != null) {
                 if (temp._dataSetList == null) return false;
-                else if (!(this._dataSetList.equals(temp._dataSetList))) 
-                    return false;
-            }
-            else if (temp._dataSetList != null)
+                if (this._dataSetList != temp._dataSetList) {
+                    thcycle=org.castor.util.CycleBreaker.startingToCycle(this._dataSetList);
+                    tmcycle=org.castor.util.CycleBreaker.startingToCycle(temp._dataSetList);
+                    if (thcycle!=tmcycle) {
+                        if (!thcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(this._dataSetList); };
+                        if (!tmcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(temp._dataSetList); };
+                        return false;
+                    }
+                    if (!thcycle) {
+                        if (!this._dataSetList.equals(temp._dataSetList)) {
+                            org.castor.util.CycleBreaker.releaseCycleHandle(this._dataSetList);
+                            org.castor.util.CycleBreaker.releaseCycleHandle(temp._dataSetList);
+                            return false;
+                        }
+                        org.castor.util.CycleBreaker.releaseCycleHandle(this._dataSetList);
+                        org.castor.util.CycleBreaker.releaseCycleHandle(temp._dataSetList);
+                    }
+                }
+            } else if (temp._dataSetList != null)
                 return false;
             return true;
         }
@@ -342,17 +404,25 @@ implements java.io.Serializable
         int result = super.hashCode();
         
         long tmp;
-        if (_id != null) {
+        if (_id != null
+            && !org.castor.util.CycleBreaker.startingToCycle(_id)) {
            result = 37 * result + _id.hashCode();
+           org.castor.util.CycleBreaker.releaseCycleHandle(_id);
         }
-        if (_modifiable != null) {
+        if (_modifiable != null
+            && !org.castor.util.CycleBreaker.startingToCycle(_modifiable)) {
            result = 37 * result + _modifiable.hashCode();
+           org.castor.util.CycleBreaker.releaseCycleHandle(_modifiable);
         }
-        if (_treeList != null) {
+        if (_treeList != null
+            && !org.castor.util.CycleBreaker.startingToCycle(_treeList)) {
            result = 37 * result + _treeList.hashCode();
+           org.castor.util.CycleBreaker.releaseCycleHandle(_treeList);
         }
-        if (_dataSetList != null) {
+        if (_dataSetList != null
+            && !org.castor.util.CycleBreaker.startingToCycle(_dataSetList)) {
            result = 37 * result + _dataSetList.hashCode();
+           org.castor.util.CycleBreaker.releaseCycleHandle(_dataSetList);
         }
         
         return result;
index 1114663..10ee854 100644 (file)
@@ -210,47 +210,139 @@ implements java.io.Serializable
         if (obj instanceof VamsasDocument) {
         
             VamsasDocument temp = (VamsasDocument)obj;
+            boolean thcycle;
+            boolean tmcycle;
             if (this._version != null) {
                 if (temp._version == null) return false;
-                else if (!(this._version.equals(temp._version))) 
-                    return false;
-            }
-            else if (temp._version != null)
+                if (this._version != temp._version) {
+                    thcycle=org.castor.util.CycleBreaker.startingToCycle(this._version);
+                    tmcycle=org.castor.util.CycleBreaker.startingToCycle(temp._version);
+                    if (thcycle!=tmcycle) {
+                        if (!thcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(this._version); };
+                        if (!tmcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(temp._version); };
+                        return false;
+                    }
+                    if (!thcycle) {
+                        if (!this._version.equals(temp._version)) {
+                            org.castor.util.CycleBreaker.releaseCycleHandle(this._version);
+                            org.castor.util.CycleBreaker.releaseCycleHandle(temp._version);
+                            return false;
+                        }
+                        org.castor.util.CycleBreaker.releaseCycleHandle(this._version);
+                        org.castor.util.CycleBreaker.releaseCycleHandle(temp._version);
+                    }
+                }
+            } else if (temp._version != null)
                 return false;
             if (this._lockFile != null) {
                 if (temp._lockFile == null) return false;
-                else if (!(this._lockFile.equals(temp._lockFile))) 
-                    return false;
-            }
-            else if (temp._lockFile != null)
+                if (this._lockFile != temp._lockFile) {
+                    thcycle=org.castor.util.CycleBreaker.startingToCycle(this._lockFile);
+                    tmcycle=org.castor.util.CycleBreaker.startingToCycle(temp._lockFile);
+                    if (thcycle!=tmcycle) {
+                        if (!thcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(this._lockFile); };
+                        if (!tmcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(temp._lockFile); };
+                        return false;
+                    }
+                    if (!thcycle) {
+                        if (!this._lockFile.equals(temp._lockFile)) {
+                            org.castor.util.CycleBreaker.releaseCycleHandle(this._lockFile);
+                            org.castor.util.CycleBreaker.releaseCycleHandle(temp._lockFile);
+                            return false;
+                        }
+                        org.castor.util.CycleBreaker.releaseCycleHandle(this._lockFile);
+                        org.castor.util.CycleBreaker.releaseCycleHandle(temp._lockFile);
+                    }
+                }
+            } else if (temp._lockFile != null)
                 return false;
             if (this._provenance != null) {
                 if (temp._provenance == null) return false;
-                else if (!(this._provenance.equals(temp._provenance))) 
-                    return false;
-            }
-            else if (temp._provenance != null)
+                if (this._provenance != temp._provenance) {
+                    thcycle=org.castor.util.CycleBreaker.startingToCycle(this._provenance);
+                    tmcycle=org.castor.util.CycleBreaker.startingToCycle(temp._provenance);
+                    if (thcycle!=tmcycle) {
+                        if (!thcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(this._provenance); };
+                        if (!tmcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(temp._provenance); };
+                        return false;
+                    }
+                    if (!thcycle) {
+                        if (!this._provenance.equals(temp._provenance)) {
+                            org.castor.util.CycleBreaker.releaseCycleHandle(this._provenance);
+                            org.castor.util.CycleBreaker.releaseCycleHandle(temp._provenance);
+                            return false;
+                        }
+                        org.castor.util.CycleBreaker.releaseCycleHandle(this._provenance);
+                        org.castor.util.CycleBreaker.releaseCycleHandle(temp._provenance);
+                    }
+                }
+            } else if (temp._provenance != null)
                 return false;
             if (this._VAMSASList != null) {
                 if (temp._VAMSASList == null) return false;
-                else if (!(this._VAMSASList.equals(temp._VAMSASList))) 
-                    return false;
-            }
-            else if (temp._VAMSASList != null)
+                if (this._VAMSASList != temp._VAMSASList) {
+                    thcycle=org.castor.util.CycleBreaker.startingToCycle(this._VAMSASList);
+                    tmcycle=org.castor.util.CycleBreaker.startingToCycle(temp._VAMSASList);
+                    if (thcycle!=tmcycle) {
+                        if (!thcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(this._VAMSASList); };
+                        if (!tmcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(temp._VAMSASList); };
+                        return false;
+                    }
+                    if (!thcycle) {
+                        if (!this._VAMSASList.equals(temp._VAMSASList)) {
+                            org.castor.util.CycleBreaker.releaseCycleHandle(this._VAMSASList);
+                            org.castor.util.CycleBreaker.releaseCycleHandle(temp._VAMSASList);
+                            return false;
+                        }
+                        org.castor.util.CycleBreaker.releaseCycleHandle(this._VAMSASList);
+                        org.castor.util.CycleBreaker.releaseCycleHandle(temp._VAMSASList);
+                    }
+                }
+            } else if (temp._VAMSASList != null)
                 return false;
             if (this._applicationDataList != null) {
                 if (temp._applicationDataList == null) return false;
-                else if (!(this._applicationDataList.equals(temp._applicationDataList))) 
-                    return false;
-            }
-            else if (temp._applicationDataList != null)
+                if (this._applicationDataList != temp._applicationDataList) {
+                    thcycle=org.castor.util.CycleBreaker.startingToCycle(this._applicationDataList);
+                    tmcycle=org.castor.util.CycleBreaker.startingToCycle(temp._applicationDataList);
+                    if (thcycle!=tmcycle) {
+                        if (!thcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(this._applicationDataList); };
+                        if (!tmcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(temp._applicationDataList); };
+                        return false;
+                    }
+                    if (!thcycle) {
+                        if (!this._applicationDataList.equals(temp._applicationDataList)) {
+                            org.castor.util.CycleBreaker.releaseCycleHandle(this._applicationDataList);
+                            org.castor.util.CycleBreaker.releaseCycleHandle(temp._applicationDataList);
+                            return false;
+                        }
+                        org.castor.util.CycleBreaker.releaseCycleHandle(this._applicationDataList);
+                        org.castor.util.CycleBreaker.releaseCycleHandle(temp._applicationDataList);
+                    }
+                }
+            } else if (temp._applicationDataList != null)
                 return false;
             if (this._attachmentList != null) {
                 if (temp._attachmentList == null) return false;
-                else if (!(this._attachmentList.equals(temp._attachmentList))) 
-                    return false;
-            }
-            else if (temp._attachmentList != null)
+                if (this._attachmentList != temp._attachmentList) {
+                    thcycle=org.castor.util.CycleBreaker.startingToCycle(this._attachmentList);
+                    tmcycle=org.castor.util.CycleBreaker.startingToCycle(temp._attachmentList);
+                    if (thcycle!=tmcycle) {
+                        if (!thcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(this._attachmentList); };
+                        if (!tmcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(temp._attachmentList); };
+                        return false;
+                    }
+                    if (!thcycle) {
+                        if (!this._attachmentList.equals(temp._attachmentList)) {
+                            org.castor.util.CycleBreaker.releaseCycleHandle(this._attachmentList);
+                            org.castor.util.CycleBreaker.releaseCycleHandle(temp._attachmentList);
+                            return false;
+                        }
+                        org.castor.util.CycleBreaker.releaseCycleHandle(this._attachmentList);
+                        org.castor.util.CycleBreaker.releaseCycleHandle(temp._attachmentList);
+                    }
+                }
+            } else if (temp._attachmentList != null)
                 return false;
             return true;
         }
@@ -474,23 +566,35 @@ implements java.io.Serializable
         int result = super.hashCode();
         
         long tmp;
-        if (_version != null) {
+        if (_version != null
+            && !org.castor.util.CycleBreaker.startingToCycle(_version)) {
            result = 37 * result + _version.hashCode();
+           org.castor.util.CycleBreaker.releaseCycleHandle(_version);
         }
-        if (_lockFile != null) {
+        if (_lockFile != null
+            && !org.castor.util.CycleBreaker.startingToCycle(_lockFile)) {
            result = 37 * result + _lockFile.hashCode();
+           org.castor.util.CycleBreaker.releaseCycleHandle(_lockFile);
         }
-        if (_provenance != null) {
+        if (_provenance != null
+            && !org.castor.util.CycleBreaker.startingToCycle(_provenance)) {
            result = 37 * result + _provenance.hashCode();
+           org.castor.util.CycleBreaker.releaseCycleHandle(_provenance);
         }
-        if (_VAMSASList != null) {
+        if (_VAMSASList != null
+            && !org.castor.util.CycleBreaker.startingToCycle(_VAMSASList)) {
            result = 37 * result + _VAMSASList.hashCode();
+           org.castor.util.CycleBreaker.releaseCycleHandle(_VAMSASList);
         }
-        if (_applicationDataList != null) {
+        if (_applicationDataList != null
+            && !org.castor.util.CycleBreaker.startingToCycle(_applicationDataList)) {
            result = 37 * result + _applicationDataList.hashCode();
+           org.castor.util.CycleBreaker.releaseCycleHandle(_applicationDataList);
         }
-        if (_attachmentList != null) {
+        if (_attachmentList != null
+            && !org.castor.util.CycleBreaker.startingToCycle(_attachmentList)) {
            result = 37 * result + _attachmentList.hashCode();
+           org.castor.util.CycleBreaker.releaseCycleHandle(_attachmentList);
         }
         
         return result;
index 3c79e83..87f0444 100644 (file)
@@ -15,7 +15,8 @@ import org.exolab.castor.xml.Marshaller;
 import org.exolab.castor.xml.Unmarshaller;\r
 \r
 /**\r
- * Direct associations between this node and any vamsas objects\r
+ * Direct associations between this node and any vamsas\r
+ *  objects\r
  * \r
  * @version $Revision$ $Date$\r
  */\r
index e8e55b9..0614ee1 100644 (file)
@@ -15,9 +15,8 @@ import org.exolab.castor.xml.Marshaller;
 import org.exolab.castor.xml.Unmarshaller;\r
 \r
 /**\r
- * explicitly named cross reference to other objects in the\r
- * document.\r
- *  \r
+ * explicitly named cross reference to\r
+ *  other objects in the document. \r
  * \r
  * @version $Revision$ $Date$\r
  */\r
index e7c8e9a..3edd3e3 100644 (file)
@@ -45,11 +45,6 @@ public class AlignmentAnnotationDescriptor extends uk.ac.vamsas.objects.core.des
      */\r
     private java.lang.String _xmlName;\r
 \r
-    /**\r
-     * Field _identity.\r
-     */\r
-    private org.exolab.castor.xml.XMLFieldDescriptor _identity;\r
-\r
 \r
       //----------------/\r
      //- Constructors -/\r
@@ -218,10 +213,7 @@ public class AlignmentAnnotationDescriptor extends uk.ac.vamsas.objects.core.des
      */\r
     public org.exolab.castor.mapping.FieldDescriptor getIdentity(\r
     ) {\r
-        if (_identity == null) {\r
-            return super.getIdentity();\r
-        }\r
-        return _identity;\r
+        return super.getIdentity();\r
     }\r
 \r
     /**\r
index 2c67213..4d3607e 100644 (file)
@@ -45,11 +45,6 @@ public class AlignmentDescriptor extends org.exolab.castor.xml.util.XMLClassDesc
      */\r
     private java.lang.String _xmlName;\r
 \r
-    /**\r
-     * Field _identity.\r
-     */\r
-    private org.exolab.castor.xml.XMLFieldDescriptor _identity;\r
-\r
 \r
       //----------------/\r
      //- Constructors -/\r
@@ -150,7 +145,7 @@ public class AlignmentDescriptor extends org.exolab.castor.xml.util.XMLClassDesc
         desc.setValidator(fieldValidator);\r
         //-- _id\r
         desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_id", "id", org.exolab.castor.xml.NodeType.Attribute);\r
-        this._identity = desc;\r
+        super.setIdentity(desc);\r
         handler = new org.exolab.castor.xml.XMLFieldHandler() {\r
             public java.lang.Object getValue( java.lang.Object object ) \r
                 throws IllegalStateException\r
@@ -452,7 +447,7 @@ public class AlignmentDescriptor extends org.exolab.castor.xml.util.XMLClassDesc
      */\r
     public org.exolab.castor.mapping.FieldDescriptor getIdentity(\r
     ) {\r
-        return _identity;\r
+        return super.getIdentity();\r
     }\r
 \r
     /**\r
index 1f52e65..44d0c00 100644 (file)
@@ -45,11 +45,6 @@ public class AlignmentSequenceAnnotationDescriptor extends uk.ac.vamsas.objects.
      */\r
     private java.lang.String _xmlName;\r
 \r
-    /**\r
-     * Field _identity.\r
-     */\r
-    private org.exolab.castor.xml.XMLFieldDescriptor _identity;\r
-\r
 \r
       //----------------/\r
      //- Constructors -/\r
@@ -172,10 +167,7 @@ public class AlignmentSequenceAnnotationDescriptor extends uk.ac.vamsas.objects.
      */\r
     public org.exolab.castor.mapping.FieldDescriptor getIdentity(\r
     ) {\r
-        if (_identity == null) {\r
-            return super.getIdentity();\r
-        }\r
-        return _identity;\r
+        return super.getIdentity();\r
     }\r
 \r
     /**\r
index 526c7f0..d1b7830 100644 (file)
@@ -45,11 +45,6 @@ public class AlignmentSequenceDescriptor extends uk.ac.vamsas.objects.core.descr
      */\r
     private java.lang.String _xmlName;\r
 \r
-    /**\r
-     * Field _identity.\r
-     */\r
-    private org.exolab.castor.xml.XMLFieldDescriptor _identity;\r
-\r
 \r
       //----------------/\r
      //- Constructors -/\r
@@ -71,7 +66,7 @@ public class AlignmentSequenceDescriptor extends uk.ac.vamsas.objects.core.descr
         \r
         //-- _id\r
         desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_id", "id", org.exolab.castor.xml.NodeType.Attribute);\r
-        this._identity = desc;\r
+        super.setIdentity(desc);\r
         handler = new org.exolab.castor.xml.XMLFieldHandler() {\r
             public java.lang.Object getValue( java.lang.Object object ) \r
                 throws IllegalStateException\r
@@ -212,10 +207,7 @@ public class AlignmentSequenceDescriptor extends uk.ac.vamsas.objects.core.descr
      */\r
     public org.exolab.castor.mapping.FieldDescriptor getIdentity(\r
     ) {\r
-        if (_identity == null) {\r
-            return super.getIdentity();\r
-        }\r
-        return _identity;\r
+        return super.getIdentity();\r
     }\r
 \r
     /**\r
index 68ab2fb..1e98793 100644 (file)
@@ -45,11 +45,6 @@ public class AnnotationElementDescriptor extends org.exolab.castor.xml.util.XMLC
      */\r
     private java.lang.String _xmlName;\r
 \r
-    /**\r
-     * Field _identity.\r
-     */\r
-    private org.exolab.castor.xml.XMLFieldDescriptor _identity;\r
-\r
 \r
       //----------------/\r
      //- Constructors -/\r
@@ -152,7 +147,7 @@ public class AnnotationElementDescriptor extends org.exolab.castor.xml.util.XMLC
         desc.setValidator(fieldValidator);\r
         //-- _id\r
         desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_id", "id", org.exolab.castor.xml.NodeType.Attribute);\r
-        this._identity = desc;\r
+        super.setIdentity(desc);\r
         handler = new org.exolab.castor.xml.XMLFieldHandler() {\r
             public java.lang.Object getValue( java.lang.Object object ) \r
                 throws IllegalStateException\r
@@ -343,7 +338,7 @@ public class AnnotationElementDescriptor extends org.exolab.castor.xml.util.XMLC
      */\r
     public org.exolab.castor.mapping.FieldDescriptor getIdentity(\r
     ) {\r
-        return _identity;\r
+        return super.getIdentity();\r
     }\r
 \r
     /**\r
index 248fe43..dab611a 100644 (file)
@@ -45,11 +45,6 @@ public class AppDataDescriptor extends org.exolab.castor.xml.util.XMLClassDescri
      */\r
     private java.lang.String _xmlName;\r
 \r
-    /**\r
-     * Field _identity.\r
-     */\r
-    private org.exolab.castor.xml.XMLFieldDescriptor _identity;\r
-\r
 \r
       //----------------/\r
      //- Constructors -/\r
@@ -170,7 +165,7 @@ public class AppDataDescriptor extends org.exolab.castor.xml.util.XMLClassDescri
      */\r
     public org.exolab.castor.mapping.FieldDescriptor getIdentity(\r
     ) {\r
-        return _identity;\r
+        return super.getIdentity();\r
     }\r
 \r
     /**\r
index 7465b32..79c6364 100644 (file)
@@ -45,11 +45,6 @@ public class ApplicationDataDescriptor extends uk.ac.vamsas.objects.core.descrip
      */\r
     private java.lang.String _xmlName;\r
 \r
-    /**\r
-     * Field _identity.\r
-     */\r
-    private org.exolab.castor.xml.XMLFieldDescriptor _identity;\r
-\r
 \r
       //----------------/\r
      //- Constructors -/\r
@@ -291,10 +286,7 @@ public class ApplicationDataDescriptor extends uk.ac.vamsas.objects.core.descrip
      */\r
     public org.exolab.castor.mapping.FieldDescriptor getIdentity(\r
     ) {\r
-        if (_identity == null) {\r
-            return super.getIdentity();\r
-        }\r
-        return _identity;\r
+        return super.getIdentity();\r
     }\r
 \r
     /**\r
index 449d40d..d6b5823 100644 (file)
@@ -45,11 +45,6 @@ public class AttachmentDescriptor extends uk.ac.vamsas.objects.core.descriptors.
      */\r
     private java.lang.String _xmlName;\r
 \r
-    /**\r
-     * Field _identity.\r
-     */\r
-    private org.exolab.castor.xml.XMLFieldDescriptor _identity;\r
-\r
 \r
       //----------------/\r
      //- Constructors -/\r
@@ -186,7 +181,7 @@ public class AttachmentDescriptor extends uk.ac.vamsas.objects.core.descriptors.
         desc.setValidator(fieldValidator);\r
         //-- _id\r
         desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_id", "id", org.exolab.castor.xml.NodeType.Attribute);\r
-        this._identity = desc;\r
+        super.setIdentity(desc);\r
         handler = new org.exolab.castor.xml.XMLFieldHandler() {\r
             public java.lang.Object getValue( java.lang.Object object ) \r
                 throws IllegalStateException\r
@@ -247,10 +242,7 @@ public class AttachmentDescriptor extends uk.ac.vamsas.objects.core.descriptors.
      */\r
     public org.exolab.castor.mapping.FieldDescriptor getIdentity(\r
     ) {\r
-        if (_identity == null) {\r
-            return super.getIdentity();\r
-        }\r
-        return _identity;\r
+        return super.getIdentity();\r
     }\r
 \r
     /**\r
index 81bd029..d4ec584 100644 (file)
@@ -45,11 +45,6 @@ public class CommonDescriptor extends uk.ac.vamsas.objects.core.descriptors.AppD
      */\r
     private java.lang.String _xmlName;\r
 \r
-    /**\r
-     * Field _identity.\r
-     */\r
-    private org.exolab.castor.xml.XMLFieldDescriptor _identity;\r
-\r
 \r
       //----------------/\r
      //- Constructors -/\r
@@ -86,10 +81,7 @@ public class CommonDescriptor extends uk.ac.vamsas.objects.core.descriptors.AppD
      */\r
     public org.exolab.castor.mapping.FieldDescriptor getIdentity(\r
     ) {\r
-        if (_identity == null) {\r
-            return super.getIdentity();\r
-        }\r
-        return _identity;\r
+        return super.getIdentity();\r
     }\r
 \r
     /**\r
index 44090ca..ec113d2 100644 (file)
@@ -45,11 +45,6 @@ public class DataSetAnnotationsDescriptor extends uk.ac.vamsas.objects.core.desc
      */\r
     private java.lang.String _xmlName;\r
 \r
-    /**\r
-     * Field _identity.\r
-     */\r
-    private org.exolab.castor.xml.XMLFieldDescriptor _identity;\r
-\r
 \r
       //----------------/\r
      //- Constructors -/\r
@@ -178,10 +173,7 @@ public class DataSetAnnotationsDescriptor extends uk.ac.vamsas.objects.core.desc
      */\r
     public org.exolab.castor.mapping.FieldDescriptor getIdentity(\r
     ) {\r
-        if (_identity == null) {\r
-            return super.getIdentity();\r
-        }\r
-        return _identity;\r
+        return super.getIdentity();\r
     }\r
 \r
     /**\r
index 29c2ead..f677adf 100644 (file)
@@ -45,11 +45,6 @@ public class DataSetDescriptor extends org.exolab.castor.xml.util.XMLClassDescri
      */\r
     private java.lang.String _xmlName;\r
 \r
-    /**\r
-     * Field _identity.\r
-     */\r
-    private org.exolab.castor.xml.XMLFieldDescriptor _identity;\r
-\r
 \r
       //----------------/\r
      //- Constructors -/\r
@@ -70,7 +65,7 @@ public class DataSetDescriptor extends org.exolab.castor.xml.util.XMLClassDescri
         \r
         //-- _id\r
         desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_id", "id", org.exolab.castor.xml.NodeType.Attribute);\r
-        this._identity = desc;\r
+        super.setIdentity(desc);\r
         handler = new org.exolab.castor.xml.XMLFieldHandler() {\r
             public java.lang.Object getValue( java.lang.Object object ) \r
                 throws IllegalStateException\r
@@ -377,7 +372,7 @@ public class DataSetDescriptor extends org.exolab.castor.xml.util.XMLClassDescri
      */\r
     public org.exolab.castor.mapping.FieldDescriptor getIdentity(\r
     ) {\r
-        return _identity;\r
+        return super.getIdentity();\r
     }\r
 \r
     /**\r
index 762b51a..ef04791 100644 (file)
@@ -45,11 +45,6 @@ public class DbRefDescriptor extends org.exolab.castor.xml.util.XMLClassDescript
      */\r
     private java.lang.String _xmlName;\r
 \r
-    /**\r
-     * Field _identity.\r
-     */\r
-    private org.exolab.castor.xml.XMLFieldDescriptor _identity;\r
-\r
 \r
       //----------------/\r
      //- Constructors -/\r
@@ -187,7 +182,7 @@ public class DbRefDescriptor extends org.exolab.castor.xml.util.XMLClassDescript
         desc.setValidator(fieldValidator);\r
         //-- _id\r
         desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_id", "id", org.exolab.castor.xml.NodeType.Attribute);\r
-        this._identity = desc;\r
+        super.setIdentity(desc);\r
         handler = new org.exolab.castor.xml.XMLFieldHandler() {\r
             public java.lang.Object getValue( java.lang.Object object ) \r
                 throws IllegalStateException\r
@@ -223,8 +218,8 @@ public class DbRefDescriptor extends org.exolab.castor.xml.util.XMLClassDescript
         desc.setValidator(fieldValidator);\r
         //-- initialize element descriptors\r
         \r
-        //-- _mapList\r
-        desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(uk.ac.vamsas.objects.core.Map.class, "_mapList", "map", org.exolab.castor.xml.NodeType.Element);\r
+        //-- _map\r
+        desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(uk.ac.vamsas.objects.core.Map.class, "_map", "map", org.exolab.castor.xml.NodeType.Element);\r
         handler = new org.exolab.castor.xml.XMLFieldHandler() {\r
             public java.lang.Object getValue( java.lang.Object object ) \r
                 throws IllegalStateException\r
@@ -237,15 +232,7 @@ public class DbRefDescriptor extends org.exolab.castor.xml.util.XMLClassDescript
             {\r
                 try {\r
                     DbRef target = (DbRef) object;\r
-                    target.addMap( (uk.ac.vamsas.objects.core.Map) value);\r
-                } catch (java.lang.Exception ex) {\r
-                    throw new IllegalStateException(ex.toString());\r
-                }\r
-            }\r
-            public void resetValue(Object object) throws IllegalStateException, IllegalArgumentException {\r
-                try {\r
-                    DbRef target = (DbRef) object;\r
-                    target.removeAllMap();\r
+                    target.setMap( (uk.ac.vamsas.objects.core.Map) value);\r
                 } catch (java.lang.Exception ex) {\r
                     throw new IllegalStateException(ex.toString());\r
                 }\r
@@ -256,12 +243,11 @@ public class DbRefDescriptor extends org.exolab.castor.xml.util.XMLClassDescript
         };\r
         desc.setHandler(handler);\r
         desc.setNameSpaceURI("http://www.vamsas.ac.uk/schemas/1.0/vamsasTypes");\r
-        desc.setMultivalued(true);\r
+        desc.setMultivalued(false);\r
         addFieldDescriptor(desc);\r
         \r
-        //-- validation code for: _mapList\r
+        //-- validation code for: _map\r
         fieldValidator = new org.exolab.castor.xml.FieldValidator();\r
-        fieldValidator.setMinOccurs(0);\r
         { //-- local scope\r
         }\r
         desc.setValidator(fieldValidator);\r
@@ -374,7 +360,7 @@ public class DbRefDescriptor extends org.exolab.castor.xml.util.XMLClassDescript
      */\r
     public org.exolab.castor.mapping.FieldDescriptor getIdentity(\r
     ) {\r
-        return _identity;\r
+        return super.getIdentity();\r
     }\r
 \r
     /**\r
index 0dcf72b..6b3eb45 100644 (file)
@@ -45,11 +45,6 @@ public class EntryDescriptor extends org.exolab.castor.xml.util.XMLClassDescript
      */\r
     private java.lang.String _xmlName;\r
 \r
-    /**\r
-     * Field _identity.\r
-     */\r
-    private org.exolab.castor.xml.XMLFieldDescriptor _identity;\r
-\r
 \r
       //----------------/\r
      //- Constructors -/\r
@@ -70,7 +65,7 @@ public class EntryDescriptor extends org.exolab.castor.xml.util.XMLClassDescript
         \r
         //-- _id\r
         desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_id", "id", org.exolab.castor.xml.NodeType.Attribute);\r
-        this._identity = desc;\r
+        super.setIdentity(desc);\r
         handler = new org.exolab.castor.xml.XMLFieldHandler() {\r
             public java.lang.Object getValue( java.lang.Object object ) \r
                 throws IllegalStateException\r
@@ -417,7 +412,7 @@ public class EntryDescriptor extends org.exolab.castor.xml.util.XMLClassDescript
      */\r
     public org.exolab.castor.mapping.FieldDescriptor getIdentity(\r
     ) {\r
-        return _identity;\r
+        return super.getIdentity();\r
     }\r
 \r
     /**\r
index da9afa4..0d694f0 100644 (file)
@@ -45,11 +45,6 @@ public class GlyphDescriptor extends org.exolab.castor.xml.util.XMLClassDescript
      */\r
     private java.lang.String _xmlName;\r
 \r
-    /**\r
-     * Field _identity.\r
-     */\r
-    private org.exolab.castor.xml.XMLFieldDescriptor _identity;\r
-\r
 \r
       //----------------/\r
      //- Constructors -/\r
@@ -165,7 +160,7 @@ public class GlyphDescriptor extends org.exolab.castor.xml.util.XMLClassDescript
      */\r
     public org.exolab.castor.mapping.FieldDescriptor getIdentity(\r
     ) {\r
-        return _identity;\r
+        return super.getIdentity();\r
     }\r
 \r
     /**\r
index 6c30b35..649ff90 100644 (file)
@@ -45,11 +45,6 @@ public class InputDescriptor extends uk.ac.vamsas.objects.core.descriptors.Range
      */\r
     private java.lang.String _xmlName;\r
 \r
-    /**\r
-     * Field _identity.\r
-     */\r
-    private org.exolab.castor.xml.XMLFieldDescriptor _identity;\r
-\r
 \r
       //----------------/\r
      //- Constructors -/\r
@@ -178,10 +173,7 @@ public class InputDescriptor extends uk.ac.vamsas.objects.core.descriptors.Range
      */\r
     public org.exolab.castor.mapping.FieldDescriptor getIdentity(\r
     ) {\r
-        if (_identity == null) {\r
-            return super.getIdentity();\r
-        }\r
-        return _identity;\r
+        return super.getIdentity();\r
     }\r
 \r
     /**\r
index 68631e5..d24131a 100644 (file)
@@ -45,11 +45,6 @@ public class InstanceDescriptor extends uk.ac.vamsas.objects.core.descriptors.Ap
      */\r
     private java.lang.String _xmlName;\r
 \r
-    /**\r
-     * Field _identity.\r
-     */\r
-    private org.exolab.castor.xml.XMLFieldDescriptor _identity;\r
-\r
 \r
       //----------------/\r
      //- Constructors -/\r
@@ -132,10 +127,7 @@ public class InstanceDescriptor extends uk.ac.vamsas.objects.core.descriptors.Ap
      */\r
     public org.exolab.castor.mapping.FieldDescriptor getIdentity(\r
     ) {\r
-        if (_identity == null) {\r
-            return super.getIdentity();\r
-        }\r
-        return _identity;\r
+        return super.getIdentity();\r
     }\r
 \r
     /**\r
index ba1f82b..e8c70a5 100644 (file)
@@ -45,11 +45,6 @@ public class LinkDescriptor extends org.exolab.castor.xml.util.XMLClassDescripto
      */\r
     private java.lang.String _xmlName;\r
 \r
-    /**\r
-     * Field _identity.\r
-     */\r
-    private org.exolab.castor.xml.XMLFieldDescriptor _identity;\r
-\r
 \r
       //----------------/\r
      //- Constructors -/\r
@@ -160,7 +155,7 @@ public class LinkDescriptor extends org.exolab.castor.xml.util.XMLClassDescripto
      */\r
     public org.exolab.castor.mapping.FieldDescriptor getIdentity(\r
     ) {\r
-        return _identity;\r
+        return super.getIdentity();\r
     }\r
 \r
     /**\r
diff --git a/src/uk/ac/vamsas/objects/core/descriptors/LocalDescriptor.java b/src/uk/ac/vamsas/objects/core/descriptors/LocalDescriptor.java
new file mode 100644 (file)
index 0000000..409177c
--- /dev/null
@@ -0,0 +1,151 @@
+/*\r
+ * This class was automatically generated with \r
+ * <a href="http://www.castor.org">Castor 1.1</a>, using an XML\r
+ * Schema.\r
+ * $Id$\r
+ */\r
+\r
+package uk.ac.vamsas.objects.core.descriptors;\r
+\r
+  //---------------------------------/\r
+ //- Imported classes and packages -/\r
+//---------------------------------/\r
+\r
+import uk.ac.vamsas.objects.core.Local;\r
+\r
+/**\r
+ * Class LocalDescriptor.\r
+ * \r
+ * @version $Revision$ $Date$\r
+ */\r
+public class LocalDescriptor extends uk.ac.vamsas.objects.core.descriptors.MapRangeTypeDescriptor {\r
+\r
+\r
+      //--------------------------/\r
+     //- Class/Member Variables -/\r
+    //--------------------------/\r
+\r
+    /**\r
+     * Field _elementDefinition.\r
+     */\r
+    private boolean _elementDefinition;\r
+\r
+    /**\r
+     * Field _nsPrefix.\r
+     */\r
+    private java.lang.String _nsPrefix;\r
+\r
+    /**\r
+     * Field _nsURI.\r
+     */\r
+    private java.lang.String _nsURI;\r
+\r
+    /**\r
+     * Field _xmlName.\r
+     */\r
+    private java.lang.String _xmlName;\r
+\r
+\r
+      //----------------/\r
+     //- Constructors -/\r
+    //----------------/\r
+\r
+    public LocalDescriptor() {\r
+        super();\r
+        setExtendsWithoutFlatten(new uk.ac.vamsas.objects.core.descriptors.MapRangeTypeDescriptor());\r
+        _nsURI = "http://www.vamsas.ac.uk/schemas/1.0/vamsasTypes";\r
+        _xmlName = "local";\r
+        _elementDefinition = true;\r
+    }\r
+\r
+\r
+      //-----------/\r
+     //- Methods -/\r
+    //-----------/\r
+\r
+    /**\r
+     * Method getAccessMode.\r
+     * \r
+     * @return the access mode specified for this class.\r
+     */\r
+    public org.exolab.castor.mapping.AccessMode getAccessMode(\r
+    ) {\r
+        return null;\r
+    }\r
+\r
+    /**\r
+     * Method getIdentity.\r
+     * \r
+     * @return the identity field, null if this class has no\r
+     * identity.\r
+     */\r
+    public org.exolab.castor.mapping.FieldDescriptor getIdentity(\r
+    ) {\r
+        return super.getIdentity();\r
+    }\r
+\r
+    /**\r
+     * Method getJavaClass.\r
+     * \r
+     * @return the Java class represented by this descriptor.\r
+     */\r
+    public java.lang.Class getJavaClass(\r
+    ) {\r
+        return uk.ac.vamsas.objects.core.Local.class;\r
+    }\r
+\r
+    /**\r
+     * Method getNameSpacePrefix.\r
+     * \r
+     * @return the namespace prefix to use when marshaling as XML.\r
+     */\r
+    public java.lang.String getNameSpacePrefix(\r
+    ) {\r
+        return _nsPrefix;\r
+    }\r
+\r
+    /**\r
+     * Method getNameSpaceURI.\r
+     * \r
+     * @return the namespace URI used when marshaling and\r
+     * unmarshaling as XML.\r
+     */\r
+    public java.lang.String getNameSpaceURI(\r
+    ) {\r
+        return _nsURI;\r
+    }\r
+\r
+    /**\r
+     * Method getValidator.\r
+     * \r
+     * @return a specific validator for the class described by this\r
+     * ClassDescriptor.\r
+     */\r
+    public org.exolab.castor.xml.TypeValidator getValidator(\r
+    ) {\r
+        return this;\r
+    }\r
+\r
+    /**\r
+     * Method getXMLName.\r
+     * \r
+     * @return the XML Name for the Class being described.\r
+     */\r
+    public java.lang.String getXMLName(\r
+    ) {\r
+        return _xmlName;\r
+    }\r
+\r
+    /**\r
+     * Method isElementDefinition.\r
+     * \r
+     * @return true if XML schema definition of this Class is that\r
+     * of a global\r
+     * element or element with anonymous type definition.\r
+     */\r
+    public boolean isElementDefinition(\r
+    ) {\r
+        return _elementDefinition;\r
+    }\r
+\r
+}\r
index 68e512f..26cd7cc 100644 (file)
@@ -45,11 +45,6 @@ public class LockFileDescriptor extends org.exolab.castor.xml.util.XMLClassDescr
      */\r
     private java.lang.String _xmlName;\r
 \r
-    /**\r
-     * Field _identity.\r
-     */\r
-    private org.exolab.castor.xml.XMLFieldDescriptor _identity;\r
-\r
 \r
       //----------------/\r
      //- Constructors -/\r
@@ -128,7 +123,7 @@ public class LockFileDescriptor extends org.exolab.castor.xml.util.XMLClassDescr
      */\r
     public org.exolab.castor.mapping.FieldDescriptor getIdentity(\r
     ) {\r
-        return _identity;\r
+        return super.getIdentity();\r
     }\r
 \r
     /**\r
index 94e54bb..14efb4b 100644 (file)
@@ -18,7 +18,7 @@ import uk.ac.vamsas.objects.core.Map;
  * \r
  * @version $Revision$ $Date$\r
  */\r
-public class MapDescriptor extends uk.ac.vamsas.objects.core.descriptors.MapListDescriptor {\r
+public class MapDescriptor extends uk.ac.vamsas.objects.core.descriptors.MapTypeDescriptor {\r
 \r
 \r
       //--------------------------/\r
@@ -45,11 +45,6 @@ public class MapDescriptor extends uk.ac.vamsas.objects.core.descriptors.MapList
      */\r
     private java.lang.String _xmlName;\r
 \r
-    /**\r
-     * Field _identity.\r
-     */\r
-    private org.exolab.castor.xml.XMLFieldDescriptor _identity;\r
-\r
 \r
       //----------------/\r
      //- Constructors -/\r
@@ -57,10 +52,53 @@ public class MapDescriptor extends uk.ac.vamsas.objects.core.descriptors.MapList
 \r
     public MapDescriptor() {\r
         super();\r
-        setExtendsWithoutFlatten(new uk.ac.vamsas.objects.core.descriptors.MapListDescriptor());\r
+        setExtendsWithoutFlatten(new uk.ac.vamsas.objects.core.descriptors.MapTypeDescriptor());\r
         _nsURI = "http://www.vamsas.ac.uk/schemas/1.0/vamsasTypes";\r
         _xmlName = "map";\r
         _elementDefinition = true;\r
+        org.exolab.castor.xml.util.XMLFieldDescriptorImpl  desc           = null;\r
+        org.exolab.castor.mapping.FieldHandler             handler        = null;\r
+        org.exolab.castor.xml.FieldValidator               fieldValidator = null;\r
+        //-- initialize attribute descriptors\r
+        \r
+        //-- _id\r
+        desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_id", "id", org.exolab.castor.xml.NodeType.Attribute);\r
+        super.setIdentity(desc);\r
+        handler = new org.exolab.castor.xml.XMLFieldHandler() {\r
+            public java.lang.Object getValue( java.lang.Object object ) \r
+                throws IllegalStateException\r
+            {\r
+                Map target = (Map) object;\r
+                return target.getId();\r
+            }\r
+            public void setValue( java.lang.Object object, java.lang.Object value) \r
+                throws IllegalStateException, IllegalArgumentException\r
+            {\r
+                try {\r
+                    Map target = (Map) object;\r
+                    target.setId( (java.lang.String) value);\r
+                } catch (java.lang.Exception ex) {\r
+                    throw new IllegalStateException(ex.toString());\r
+                }\r
+            }\r
+            public java.lang.Object newInstance(java.lang.Object parent) {\r
+                return new java.lang.String();\r
+            }\r
+        };\r
+        desc.setHandler(handler);\r
+        desc.setMultivalued(false);\r
+        addFieldDescriptor(desc);\r
+        \r
+        //-- validation code for: _id\r
+        fieldValidator = new org.exolab.castor.xml.FieldValidator();\r
+        { //-- local scope\r
+            org.exolab.castor.xml.validators.IdValidator typeValidator;\r
+            typeValidator = new org.exolab.castor.xml.validators.IdValidator();\r
+            fieldValidator.setValidator(typeValidator);\r
+        }\r
+        desc.setValidator(fieldValidator);\r
+        //-- initialize element descriptors\r
+        \r
     }\r
 \r
 \r
@@ -86,10 +124,7 @@ public class MapDescriptor extends uk.ac.vamsas.objects.core.descriptors.MapList
      */\r
     public org.exolab.castor.mapping.FieldDescriptor getIdentity(\r
     ) {\r
-        if (_identity == null) {\r
-            return super.getIdentity();\r
-        }\r
-        return _identity;\r
+        return super.getIdentity();\r
     }\r
 \r
     /**\r
diff --git a/src/uk/ac/vamsas/objects/core/descriptors/MapRangeTypeDescriptor.java b/src/uk/ac/vamsas/objects/core/descriptors/MapRangeTypeDescriptor.java
new file mode 100644 (file)
index 0000000..174449d
--- /dev/null
@@ -0,0 +1,200 @@
+/*\r
+ * This class was automatically generated with \r
+ * <a href="http://www.castor.org">Castor 1.1</a>, using an XML\r
+ * Schema.\r
+ * $Id$\r
+ */\r
+\r
+package uk.ac.vamsas.objects.core.descriptors;\r
+\r
+  //---------------------------------/\r
+ //- Imported classes and packages -/\r
+//---------------------------------/\r
+\r
+import uk.ac.vamsas.objects.core.MapRangeType;\r
+\r
+/**\r
+ * Class MapRangeTypeDescriptor.\r
+ * \r
+ * @version $Revision$ $Date$\r
+ */\r
+public class MapRangeTypeDescriptor extends uk.ac.vamsas.objects.core.descriptors.RangeTypeDescriptor {\r
+\r
+\r
+      //--------------------------/\r
+     //- Class/Member Variables -/\r
+    //--------------------------/\r
+\r
+    /**\r
+     * Field _elementDefinition.\r
+     */\r
+    private boolean _elementDefinition;\r
+\r
+    /**\r
+     * Field _nsPrefix.\r
+     */\r
+    private java.lang.String _nsPrefix;\r
+\r
+    /**\r
+     * Field _nsURI.\r
+     */\r
+    private java.lang.String _nsURI;\r
+\r
+    /**\r
+     * Field _xmlName.\r
+     */\r
+    private java.lang.String _xmlName;\r
+\r
+\r
+      //----------------/\r
+     //- Constructors -/\r
+    //----------------/\r
+\r
+    public MapRangeTypeDescriptor() {\r
+        super();\r
+        setExtendsWithoutFlatten(new uk.ac.vamsas.objects.core.descriptors.RangeTypeDescriptor());\r
+        _nsURI = "http://www.vamsas.ac.uk/schemas/1.0/vamsasTypes";\r
+        _xmlName = "mapRangeType";\r
+        _elementDefinition = false;\r
+        org.exolab.castor.xml.util.XMLFieldDescriptorImpl  desc           = null;\r
+        org.exolab.castor.mapping.FieldHandler             handler        = null;\r
+        org.exolab.castor.xml.FieldValidator               fieldValidator = null;\r
+        //-- initialize attribute descriptors\r
+        \r
+        //-- _unit\r
+        desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Long.TYPE, "_unit", "unit", org.exolab.castor.xml.NodeType.Attribute);\r
+        handler = new org.exolab.castor.xml.XMLFieldHandler() {\r
+            public java.lang.Object getValue( java.lang.Object object ) \r
+                throws IllegalStateException\r
+            {\r
+                MapRangeType target = (MapRangeType) object;\r
+                if (!target.hasUnit()) { return null; }\r
+                return new java.lang.Long(target.getUnit());\r
+            }\r
+            public void setValue( java.lang.Object object, java.lang.Object value) \r
+                throws IllegalStateException, IllegalArgumentException\r
+            {\r
+                try {\r
+                    MapRangeType target = (MapRangeType) object;\r
+                    // if null, use delete method for optional primitives \r
+                    if (value == null) {\r
+                        target.deleteUnit();\r
+                        return;\r
+                    }\r
+                    target.setUnit( ((java.lang.Long) value).longValue());\r
+                } catch (java.lang.Exception ex) {\r
+                    throw new IllegalStateException(ex.toString());\r
+                }\r
+            }\r
+            public java.lang.Object newInstance(java.lang.Object parent) {\r
+                return null;\r
+            }\r
+        };\r
+        desc.setHandler(handler);\r
+        desc.setMultivalued(false);\r
+        addFieldDescriptor(desc);\r
+        \r
+        //-- validation code for: _unit\r
+        fieldValidator = new org.exolab.castor.xml.FieldValidator();\r
+        { //-- local scope\r
+            org.exolab.castor.xml.validators.LongValidator typeValidator;\r
+            typeValidator = new org.exolab.castor.xml.validators.LongValidator();\r
+            fieldValidator.setValidator(typeValidator);\r
+            typeValidator.setMinInclusive(1L);\r
+        }\r
+        desc.setValidator(fieldValidator);\r
+        //-- initialize element descriptors\r
+        \r
+    }\r
+\r
+\r
+      //-----------/\r
+     //- Methods -/\r
+    //-----------/\r
+\r
+    /**\r
+     * Method getAccessMode.\r
+     * \r
+     * @return the access mode specified for this class.\r
+     */\r
+    public org.exolab.castor.mapping.AccessMode getAccessMode(\r
+    ) {\r
+        return null;\r
+    }\r
+\r
+    /**\r
+     * Method getIdentity.\r
+     * \r
+     * @return the identity field, null if this class has no\r
+     * identity.\r
+     */\r
+    public org.exolab.castor.mapping.FieldDescriptor getIdentity(\r
+    ) {\r
+        return super.getIdentity();\r
+    }\r
+\r
+    /**\r
+     * Method getJavaClass.\r
+     * \r
+     * @return the Java class represented by this descriptor.\r
+     */\r
+    public java.lang.Class getJavaClass(\r
+    ) {\r
+        return uk.ac.vamsas.objects.core.MapRangeType.class;\r
+    }\r
+\r
+    /**\r
+     * Method getNameSpacePrefix.\r
+     * \r
+     * @return the namespace prefix to use when marshaling as XML.\r
+     */\r
+    public java.lang.String getNameSpacePrefix(\r
+    ) {\r
+        return _nsPrefix;\r
+    }\r
+\r
+    /**\r
+     * Method getNameSpaceURI.\r
+     * \r
+     * @return the namespace URI used when marshaling and\r
+     * unmarshaling as XML.\r
+     */\r
+    public java.lang.String getNameSpaceURI(\r
+    ) {\r
+        return _nsURI;\r
+    }\r
+\r
+    /**\r
+     * Method getValidator.\r
+     * \r
+     * @return a specific validator for the class described by this\r
+     * ClassDescriptor.\r
+     */\r
+    public org.exolab.castor.xml.TypeValidator getValidator(\r
+    ) {\r
+        return this;\r
+    }\r
+\r
+    /**\r
+     * Method getXMLName.\r
+     * \r
+     * @return the XML Name for the Class being described.\r
+     */\r
+    public java.lang.String getXMLName(\r
+    ) {\r
+        return _xmlName;\r
+    }\r
+\r
+    /**\r
+     * Method isElementDefinition.\r
+     * \r
+     * @return true if XML schema definition of this Class is that\r
+     * of a global\r
+     * element or element with anonymous type definition.\r
+     */\r
+    public boolean isElementDefinition(\r
+    ) {\r
+        return _elementDefinition;\r
+    }\r
+\r
+}\r
diff --git a/src/uk/ac/vamsas/objects/core/descriptors/MapTypeDescriptor.java b/src/uk/ac/vamsas/objects/core/descriptors/MapTypeDescriptor.java
new file mode 100644 (file)
index 0000000..39ee736
--- /dev/null
@@ -0,0 +1,230 @@
+/*\r
+ * This class was automatically generated with \r
+ * <a href="http://www.castor.org">Castor 1.1</a>, using an XML\r
+ * Schema.\r
+ * $Id$\r
+ */\r
+\r
+package uk.ac.vamsas.objects.core.descriptors;\r
+\r
+  //---------------------------------/\r
+ //- Imported classes and packages -/\r
+//---------------------------------/\r
+\r
+import uk.ac.vamsas.objects.core.MapType;\r
+\r
+/**\r
+ * Class MapTypeDescriptor.\r
+ * \r
+ * @version $Revision$ $Date$\r
+ */\r
+public class MapTypeDescriptor extends org.exolab.castor.xml.util.XMLClassDescriptorImpl {\r
+\r
+\r
+      //--------------------------/\r
+     //- Class/Member Variables -/\r
+    //--------------------------/\r
+\r
+    /**\r
+     * Field _elementDefinition.\r
+     */\r
+    private boolean _elementDefinition;\r
+\r
+    /**\r
+     * Field _nsPrefix.\r
+     */\r
+    private java.lang.String _nsPrefix;\r
+\r
+    /**\r
+     * Field _nsURI.\r
+     */\r
+    private java.lang.String _nsURI;\r
+\r
+    /**\r
+     * Field _xmlName.\r
+     */\r
+    private java.lang.String _xmlName;\r
+\r
+\r
+      //----------------/\r
+     //- Constructors -/\r
+    //----------------/\r
+\r
+    public MapTypeDescriptor() {\r
+        super();\r
+        _nsURI = "http://www.vamsas.ac.uk/schemas/1.0/vamsasTypes";\r
+        _xmlName = "mapType";\r
+        _elementDefinition = false;\r
+        \r
+        //-- set grouping compositor\r
+        setCompositorAsSequence();\r
+        org.exolab.castor.xml.util.XMLFieldDescriptorImpl  desc           = null;\r
+        org.exolab.castor.mapping.FieldHandler             handler        = null;\r
+        org.exolab.castor.xml.FieldValidator               fieldValidator = null;\r
+        //-- initialize attribute descriptors\r
+        \r
+        //-- initialize element descriptors\r
+        \r
+        //-- _local\r
+        desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(uk.ac.vamsas.objects.core.Local.class, "_local", "local", org.exolab.castor.xml.NodeType.Element);\r
+        handler = new org.exolab.castor.xml.XMLFieldHandler() {\r
+            public java.lang.Object getValue( java.lang.Object object ) \r
+                throws IllegalStateException\r
+            {\r
+                MapType target = (MapType) object;\r
+                return target.getLocal();\r
+            }\r
+            public void setValue( java.lang.Object object, java.lang.Object value) \r
+                throws IllegalStateException, IllegalArgumentException\r
+            {\r
+                try {\r
+                    MapType target = (MapType) object;\r
+                    target.setLocal( (uk.ac.vamsas.objects.core.Local) value);\r
+                } catch (java.lang.Exception ex) {\r
+                    throw new IllegalStateException(ex.toString());\r
+                }\r
+            }\r
+            public java.lang.Object newInstance(java.lang.Object parent) {\r
+                return new uk.ac.vamsas.objects.core.Local();\r
+            }\r
+        };\r
+        desc.setHandler(handler);\r
+        desc.setNameSpaceURI("http://www.vamsas.ac.uk/schemas/1.0/vamsasTypes");\r
+        desc.setRequired(true);\r
+        desc.setMultivalued(false);\r
+        addFieldDescriptor(desc);\r
+        \r
+        //-- validation code for: _local\r
+        fieldValidator = new org.exolab.castor.xml.FieldValidator();\r
+        fieldValidator.setMinOccurs(1);\r
+        { //-- local scope\r
+        }\r
+        desc.setValidator(fieldValidator);\r
+        //-- _mapped\r
+        desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(uk.ac.vamsas.objects.core.Mapped.class, "_mapped", "mapped", org.exolab.castor.xml.NodeType.Element);\r
+        handler = new org.exolab.castor.xml.XMLFieldHandler() {\r
+            public java.lang.Object getValue( java.lang.Object object ) \r
+                throws IllegalStateException\r
+            {\r
+                MapType target = (MapType) object;\r
+                return target.getMapped();\r
+            }\r
+            public void setValue( java.lang.Object object, java.lang.Object value) \r
+                throws IllegalStateException, IllegalArgumentException\r
+            {\r
+                try {\r
+                    MapType target = (MapType) object;\r
+                    target.setMapped( (uk.ac.vamsas.objects.core.Mapped) value);\r
+                } catch (java.lang.Exception ex) {\r
+                    throw new IllegalStateException(ex.toString());\r
+                }\r
+            }\r
+            public java.lang.Object newInstance(java.lang.Object parent) {\r
+                return new uk.ac.vamsas.objects.core.Mapped();\r
+            }\r
+        };\r
+        desc.setHandler(handler);\r
+        desc.setNameSpaceURI("http://www.vamsas.ac.uk/schemas/1.0/vamsasTypes");\r
+        desc.setRequired(true);\r
+        desc.setMultivalued(false);\r
+        addFieldDescriptor(desc);\r
+        \r
+        //-- validation code for: _mapped\r
+        fieldValidator = new org.exolab.castor.xml.FieldValidator();\r
+        fieldValidator.setMinOccurs(1);\r
+        { //-- local scope\r
+        }\r
+        desc.setValidator(fieldValidator);\r
+    }\r
+\r
+\r
+      //-----------/\r
+     //- Methods -/\r
+    //-----------/\r
+\r
+    /**\r
+     * Method getAccessMode.\r
+     * \r
+     * @return the access mode specified for this class.\r
+     */\r
+    public org.exolab.castor.mapping.AccessMode getAccessMode(\r
+    ) {\r
+        return null;\r
+    }\r
+\r
+    /**\r
+     * Method getIdentity.\r
+     * \r
+     * @return the identity field, null if this class has no\r
+     * identity.\r
+     */\r
+    public org.exolab.castor.mapping.FieldDescriptor getIdentity(\r
+    ) {\r
+        return super.getIdentity();\r
+    }\r
+\r
+    /**\r
+     * Method getJavaClass.\r
+     * \r
+     * @return the Java class represented by this descriptor.\r
+     */\r
+    public java.lang.Class getJavaClass(\r
+    ) {\r
+        return uk.ac.vamsas.objects.core.MapType.class;\r
+    }\r
+\r
+    /**\r
+     * Method getNameSpacePrefix.\r
+     * \r
+     * @return the namespace prefix to use when marshaling as XML.\r
+     */\r
+    public java.lang.String getNameSpacePrefix(\r
+    ) {\r
+        return _nsPrefix;\r
+    }\r
+\r
+    /**\r
+     * Method getNameSpaceURI.\r
+     * \r
+     * @return the namespace URI used when marshaling and\r
+     * unmarshaling as XML.\r
+     */\r
+    public java.lang.String getNameSpaceURI(\r
+    ) {\r
+        return _nsURI;\r
+    }\r
+\r
+    /**\r
+     * Method getValidator.\r
+     * \r
+     * @return a specific validator for the class described by this\r
+     * ClassDescriptor.\r
+     */\r
+    public org.exolab.castor.xml.TypeValidator getValidator(\r
+    ) {\r
+        return this;\r
+    }\r
+\r
+    /**\r
+     * Method getXMLName.\r
+     * \r
+     * @return the XML Name for the Class being described.\r
+     */\r
+    public java.lang.String getXMLName(\r
+    ) {\r
+        return _xmlName;\r
+    }\r
+\r
+    /**\r
+     * Method isElementDefinition.\r
+     * \r
+     * @return true if XML schema definition of this Class is that\r
+     * of a global\r
+     * element or element with anonymous type definition.\r
+     */\r
+    public boolean isElementDefinition(\r
+    ) {\r
+        return _elementDefinition;\r
+    }\r
+\r
+}\r
diff --git a/src/uk/ac/vamsas/objects/core/descriptors/MappedDescriptor.java b/src/uk/ac/vamsas/objects/core/descriptors/MappedDescriptor.java
new file mode 100644 (file)
index 0000000..9162ab5
--- /dev/null
@@ -0,0 +1,151 @@
+/*\r
+ * This class was automatically generated with \r
+ * <a href="http://www.castor.org">Castor 1.1</a>, using an XML\r
+ * Schema.\r
+ * $Id$\r
+ */\r
+\r
+package uk.ac.vamsas.objects.core.descriptors;\r
+\r
+  //---------------------------------/\r
+ //- Imported classes and packages -/\r
+//---------------------------------/\r
+\r
+import uk.ac.vamsas.objects.core.Mapped;\r
+\r
+/**\r
+ * Class MappedDescriptor.\r
+ * \r
+ * @version $Revision$ $Date$\r
+ */\r
+public class MappedDescriptor extends uk.ac.vamsas.objects.core.descriptors.MapRangeTypeDescriptor {\r
+\r
+\r
+      //--------------------------/\r
+     //- Class/Member Variables -/\r
+    //--------------------------/\r
+\r
+    /**\r
+     * Field _elementDefinition.\r
+     */\r
+    private boolean _elementDefinition;\r
+\r
+    /**\r
+     * Field _nsPrefix.\r
+     */\r
+    private java.lang.String _nsPrefix;\r
+\r
+    /**\r
+     * Field _nsURI.\r
+     */\r
+    private java.lang.String _nsURI;\r
+\r
+    /**\r
+     * Field _xmlName.\r
+     */\r
+    private java.lang.String _xmlName;\r
+\r
+\r
+      //----------------/\r
+     //- Constructors -/\r
+    //----------------/\r
+\r
+    public MappedDescriptor() {\r
+        super();\r
+        setExtendsWithoutFlatten(new uk.ac.vamsas.objects.core.descriptors.MapRangeTypeDescriptor());\r
+        _nsURI = "http://www.vamsas.ac.uk/schemas/1.0/vamsasTypes";\r
+        _xmlName = "mapped";\r
+        _elementDefinition = true;\r
+    }\r
+\r
+\r
+      //-----------/\r
+     //- Methods -/\r
+    //-----------/\r
+\r
+    /**\r
+     * Method getAccessMode.\r
+     * \r
+     * @return the access mode specified for this class.\r
+     */\r
+    public org.exolab.castor.mapping.AccessMode getAccessMode(\r
+    ) {\r
+        return null;\r
+    }\r
+\r
+    /**\r
+     * Method getIdentity.\r
+     * \r
+     * @return the identity field, null if this class has no\r
+     * identity.\r
+     */\r
+    public org.exolab.castor.mapping.FieldDescriptor getIdentity(\r
+    ) {\r
+        return super.getIdentity();\r
+    }\r
+\r
+    /**\r
+     * Method getJavaClass.\r
+     * \r
+     * @return the Java class represented by this descriptor.\r
+     */\r
+    public java.lang.Class getJavaClass(\r
+    ) {\r
+        return uk.ac.vamsas.objects.core.Mapped.class;\r
+    }\r
+\r
+    /**\r
+     * Method getNameSpacePrefix.\r
+     * \r
+     * @return the namespace prefix to use when marshaling as XML.\r
+     */\r
+    public java.lang.String getNameSpacePrefix(\r
+    ) {\r
+        return _nsPrefix;\r
+    }\r
+\r
+    /**\r
+     * Method getNameSpaceURI.\r
+     * \r
+     * @return the namespace URI used when marshaling and\r
+     * unmarshaling as XML.\r
+     */\r
+    public java.lang.String getNameSpaceURI(\r
+    ) {\r
+        return _nsURI;\r
+    }\r
+\r
+    /**\r
+     * Method getValidator.\r
+     * \r
+     * @return a specific validator for the class described by this\r
+     * ClassDescriptor.\r
+     */\r
+    public org.exolab.castor.xml.TypeValidator getValidator(\r
+    ) {\r
+        return this;\r
+    }\r
+\r
+    /**\r
+     * Method getXMLName.\r
+     * \r
+     * @return the XML Name for the Class being described.\r
+     */\r
+    public java.lang.String getXMLName(\r
+    ) {\r
+        return _xmlName;\r
+    }\r
+\r
+    /**\r
+     * Method isElementDefinition.\r
+     * \r
+     * @return true if XML schema definition of this Class is that\r
+     * of a global\r
+     * element or element with anonymous type definition.\r
+     */\r
+    public boolean isElementDefinition(\r
+    ) {\r
+        return _elementDefinition;\r
+    }\r
+\r
+}\r
index 757db07..ba76c79 100644 (file)
@@ -45,11 +45,6 @@ public class NewickDescriptor extends org.exolab.castor.xml.util.XMLClassDescrip
      */\r
     private java.lang.String _xmlName;\r
 \r
-    /**\r
-     * Field _identity.\r
-     */\r
-    private org.exolab.castor.xml.XMLFieldDescriptor _identity;\r
-\r
 \r
       //----------------/\r
      //- Constructors -/\r
@@ -140,7 +135,7 @@ public class NewickDescriptor extends org.exolab.castor.xml.util.XMLClassDescrip
         desc.setValidator(fieldValidator);\r
         //-- _id\r
         desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_id", "id", org.exolab.castor.xml.NodeType.Attribute);\r
-        this._identity = desc;\r
+        super.setIdentity(desc);\r
         handler = new org.exolab.castor.xml.XMLFieldHandler() {\r
             public java.lang.Object getValue( java.lang.Object object ) \r
                 throws IllegalStateException\r
@@ -238,7 +233,7 @@ public class NewickDescriptor extends org.exolab.castor.xml.util.XMLClassDescrip
      */\r
     public org.exolab.castor.mapping.FieldDescriptor getIdentity(\r
     ) {\r
-        return _identity;\r
+        return super.getIdentity();\r
     }\r
 \r
     /**\r
index 5594c98..88f0791 100644 (file)
@@ -45,11 +45,6 @@ public class NodeTypeDescriptor extends org.exolab.castor.xml.util.XMLClassDescr
      */\r
     private java.lang.String _xmlName;\r
 \r
-    /**\r
-     * Field _identity.\r
-     */\r
-    private org.exolab.castor.xml.XMLFieldDescriptor _identity;\r
-\r
 \r
       //----------------/\r
      //- Constructors -/\r
@@ -70,7 +65,7 @@ public class NodeTypeDescriptor extends org.exolab.castor.xml.util.XMLClassDescr
         \r
         //-- _id\r
         desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_id", "id", org.exolab.castor.xml.NodeType.Attribute);\r
-        this._identity = desc;\r
+        super.setIdentity(desc);\r
         handler = new org.exolab.castor.xml.XMLFieldHandler() {\r
             public java.lang.Object getValue( java.lang.Object object ) \r
                 throws IllegalStateException\r
@@ -328,7 +323,7 @@ public class NodeTypeDescriptor extends org.exolab.castor.xml.util.XMLClassDescr
      */\r
     public org.exolab.castor.mapping.FieldDescriptor getIdentity(\r
     ) {\r
-        return _identity;\r
+        return super.getIdentity();\r
     }\r
 \r
     /**\r
index 86d432e..ce563d4 100644 (file)
@@ -45,11 +45,6 @@ public class ParamDescriptor extends org.exolab.castor.xml.util.XMLClassDescript
      */\r
     private java.lang.String _xmlName;\r
 \r
-    /**\r
-     * Field _identity.\r
-     */\r
-    private org.exolab.castor.xml.XMLFieldDescriptor _identity;\r
-\r
 \r
       //----------------/\r
      //- Constructors -/\r
@@ -206,7 +201,7 @@ public class ParamDescriptor extends org.exolab.castor.xml.util.XMLClassDescript
      */\r
     public org.exolab.castor.mapping.FieldDescriptor getIdentity(\r
     ) {\r
-        return _identity;\r
+        return super.getIdentity();\r
     }\r
 \r
     /**\r
index 9973982..5c8c8d8 100644 (file)
@@ -45,11 +45,6 @@ public class PosDescriptor extends org.exolab.castor.xml.util.XMLClassDescriptor
      */\r
     private java.lang.String _xmlName;\r
 \r
-    /**\r
-     * Field _identity.\r
-     */\r
-    private org.exolab.castor.xml.XMLFieldDescriptor _identity;\r
-\r
 \r
       //----------------/\r
      //- Constructors -/\r
@@ -135,7 +130,7 @@ public class PosDescriptor extends org.exolab.castor.xml.util.XMLClassDescriptor
      */\r
     public org.exolab.castor.mapping.FieldDescriptor getIdentity(\r
     ) {\r
-        return _identity;\r
+        return super.getIdentity();\r
     }\r
 \r
     /**\r
index e9346ad..aaf5f97 100644 (file)
@@ -45,11 +45,6 @@ public class PropertyDescriptor extends org.exolab.castor.xml.util.XMLClassDescr
      */\r
     private java.lang.String _xmlName;\r
 \r
-    /**\r
-     * Field _identity.\r
-     */\r
-    private org.exolab.castor.xml.XMLFieldDescriptor _identity;\r
-\r
 \r
       //----------------/\r
      //- Constructors -/\r
@@ -206,7 +201,7 @@ public class PropertyDescriptor extends org.exolab.castor.xml.util.XMLClassDescr
      */\r
     public org.exolab.castor.mapping.FieldDescriptor getIdentity(\r
     ) {\r
-        return _identity;\r
+        return super.getIdentity();\r
     }\r
 \r
     /**\r
index d5f6d45..3572880 100644 (file)
@@ -45,11 +45,6 @@ public class ProvenanceDescriptor extends org.exolab.castor.xml.util.XMLClassDes
      */\r
     private java.lang.String _xmlName;\r
 \r
-    /**\r
-     * Field _identity.\r
-     */\r
-    private org.exolab.castor.xml.XMLFieldDescriptor _identity;\r
-\r
 \r
       //----------------/\r
      //- Constructors -/\r
@@ -138,7 +133,7 @@ public class ProvenanceDescriptor extends org.exolab.castor.xml.util.XMLClassDes
      */\r
     public org.exolab.castor.mapping.FieldDescriptor getIdentity(\r
     ) {\r
-        return _identity;\r
+        return super.getIdentity();\r
     }\r
 \r
     /**\r
index 1184f06..6d3be6a 100644 (file)
@@ -45,11 +45,6 @@ public class RangeAnnotationDescriptor extends uk.ac.vamsas.objects.core.descrip
      */\r
     private java.lang.String _xmlName;\r
 \r
-    /**\r
-     * Field _identity.\r
-     */\r
-    private org.exolab.castor.xml.XMLFieldDescriptor _identity;\r
-\r
 \r
       //----------------/\r
      //- Constructors -/\r
@@ -71,7 +66,7 @@ public class RangeAnnotationDescriptor extends uk.ac.vamsas.objects.core.descrip
         \r
         //-- _id\r
         desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_id", "id", org.exolab.castor.xml.NodeType.Attribute);\r
-        this._identity = desc;\r
+        super.setIdentity(desc);\r
         handler = new org.exolab.castor.xml.XMLFieldHandler() {\r
             public java.lang.Object getValue( java.lang.Object object ) \r
                 throws IllegalStateException\r
@@ -527,10 +522,7 @@ public class RangeAnnotationDescriptor extends uk.ac.vamsas.objects.core.descrip
      */\r
     public org.exolab.castor.mapping.FieldDescriptor getIdentity(\r
     ) {\r
-        if (_identity == null) {\r
-            return super.getIdentity();\r
-        }\r
-        return _identity;\r
+        return super.getIdentity();\r
     }\r
 \r
     /**\r
index 987c829..41f9da7 100644 (file)
@@ -45,11 +45,6 @@ public class RangeTypeDescriptor extends org.exolab.castor.xml.util.XMLClassDesc
      */\r
     private java.lang.String _xmlName;\r
 \r
-    /**\r
-     * Field _identity.\r
-     */\r
-    private org.exolab.castor.xml.XMLFieldDescriptor _identity;\r
-\r
 \r
       //----------------/\r
      //- Constructors -/\r
@@ -181,7 +176,7 @@ public class RangeTypeDescriptor extends org.exolab.castor.xml.util.XMLClassDesc
      */\r
     public org.exolab.castor.mapping.FieldDescriptor getIdentity(\r
     ) {\r
-        return _identity;\r
+        return super.getIdentity();\r
     }\r
 \r
     /**\r
index 762e3c2..2a7a4b2 100644 (file)
@@ -45,11 +45,6 @@ public class ReferenceTypeDescriptor extends org.exolab.castor.xml.util.XMLClass
      */\r
     private java.lang.String _xmlName;\r
 \r
-    /**\r
-     * Field _identity.\r
-     */\r
-    private org.exolab.castor.xml.XMLFieldDescriptor _identity;\r
-\r
 \r
       //----------------/\r
      //- Constructors -/\r
@@ -103,7 +98,7 @@ public class ReferenceTypeDescriptor extends org.exolab.castor.xml.util.XMLClass
         \r
         //-- _id\r
         desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_id", "id", org.exolab.castor.xml.NodeType.Attribute);\r
-        this._identity = desc;\r
+        super.setIdentity(desc);\r
         handler = new org.exolab.castor.xml.XMLFieldHandler() {\r
             public java.lang.Object getValue( java.lang.Object object ) \r
                 throws IllegalStateException\r
@@ -210,7 +205,7 @@ public class ReferenceTypeDescriptor extends org.exolab.castor.xml.util.XMLClass
      */\r
     public org.exolab.castor.mapping.FieldDescriptor getIdentity(\r
     ) {\r
-        return _identity;\r
+        return super.getIdentity();\r
     }\r
 \r
     /**\r
index c44c201..06fac17 100644 (file)
@@ -45,11 +45,6 @@ public class ScoreDescriptor extends org.exolab.castor.xml.util.XMLClassDescript
      */\r
     private java.lang.String _xmlName;\r
 \r
-    /**\r
-     * Field _identity.\r
-     */\r
-    private org.exolab.castor.xml.XMLFieldDescriptor _identity;\r
-\r
 \r
       //----------------/\r
      //- Constructors -/\r
@@ -171,7 +166,7 @@ public class ScoreDescriptor extends org.exolab.castor.xml.util.XMLClassDescript
      */\r
     public org.exolab.castor.mapping.FieldDescriptor getIdentity(\r
     ) {\r
-        return _identity;\r
+        return super.getIdentity();\r
     }\r
 \r
     /**\r
index 8158517..c489fff 100644 (file)
@@ -45,11 +45,6 @@ public class SegDescriptor extends org.exolab.castor.xml.util.XMLClassDescriptor
      */\r
     private java.lang.String _xmlName;\r
 \r
-    /**\r
-     * Field _identity.\r
-     */\r
-    private org.exolab.castor.xml.XMLFieldDescriptor _identity;\r
-\r
 \r
       //----------------/\r
      //- Constructors -/\r
@@ -219,7 +214,7 @@ public class SegDescriptor extends org.exolab.castor.xml.util.XMLClassDescriptor
      */\r
     public org.exolab.castor.mapping.FieldDescriptor getIdentity(\r
     ) {\r
-        return _identity;\r
+        return super.getIdentity();\r
     }\r
 \r
     /**\r
index 047ea50..d18b8c1 100644 (file)
@@ -45,11 +45,6 @@ public class SequenceDescriptor extends uk.ac.vamsas.objects.core.descriptors.Se
      */\r
     private java.lang.String _xmlName;\r
 \r
-    /**\r
-     * Field _identity.\r
-     */\r
-    private org.exolab.castor.xml.XMLFieldDescriptor _identity;\r
-\r
 \r
       //----------------/\r
      //- Constructors -/\r
@@ -71,7 +66,7 @@ public class SequenceDescriptor extends uk.ac.vamsas.objects.core.descriptors.Se
         \r
         //-- _id\r
         desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_id", "id", org.exolab.castor.xml.NodeType.Attribute);\r
-        this._identity = desc;\r
+        super.setIdentity(desc);\r
         handler = new org.exolab.castor.xml.XMLFieldHandler() {\r
             public java.lang.Object getValue( java.lang.Object object ) \r
                 throws IllegalStateException\r
@@ -255,10 +250,7 @@ public class SequenceDescriptor extends uk.ac.vamsas.objects.core.descriptors.Se
      */\r
     public org.exolab.castor.mapping.FieldDescriptor getIdentity(\r
     ) {\r
-        if (_identity == null) {\r
-            return super.getIdentity();\r
-        }\r
-        return _identity;\r
+        return super.getIdentity();\r
     }\r
 \r
     /**\r
index 69ae934..396515e 100644 (file)
@@ -18,7 +18,7 @@ import uk.ac.vamsas.objects.core.SequenceMapping;
  * \r
  * @version $Revision$ $Date$\r
  */\r
-public class SequenceMappingDescriptor extends org.exolab.castor.xml.util.XMLClassDescriptorImpl {\r
+public class SequenceMappingDescriptor extends uk.ac.vamsas.objects.core.descriptors.MapTypeDescriptor {\r
 \r
 \r
       //--------------------------/\r
@@ -45,11 +45,6 @@ public class SequenceMappingDescriptor extends org.exolab.castor.xml.util.XMLCla
      */\r
     private java.lang.String _xmlName;\r
 \r
-    /**\r
-     * Field _identity.\r
-     */\r
-    private org.exolab.castor.xml.XMLFieldDescriptor _identity;\r
-\r
 \r
       //----------------/\r
      //- Constructors -/\r
@@ -57,6 +52,7 @@ public class SequenceMappingDescriptor extends org.exolab.castor.xml.util.XMLCla
 \r
     public SequenceMappingDescriptor() {\r
         super();\r
+        setExtendsWithoutFlatten(new uk.ac.vamsas.objects.core.descriptors.MapTypeDescriptor());\r
         _nsURI = "http://www.vamsas.ac.uk/schemas/1.0/vamsasTypes";\r
         _xmlName = "sequenceMapping";\r
         _elementDefinition = true;\r
@@ -68,22 +64,22 @@ public class SequenceMappingDescriptor extends org.exolab.castor.xml.util.XMLCla
         org.exolab.castor.xml.FieldValidator               fieldValidator = null;\r
         //-- initialize attribute descriptors\r
         \r
-        //-- _sequenceA\r
-        desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Object.class, "_sequenceA", "sequenceA", org.exolab.castor.xml.NodeType.Attribute);\r
+        //-- _loc\r
+        desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Object.class, "_loc", "loc", org.exolab.castor.xml.NodeType.Attribute);\r
         desc.setReference(true);\r
         handler = new org.exolab.castor.xml.XMLFieldHandler() {\r
             public java.lang.Object getValue( java.lang.Object object ) \r
                 throws IllegalStateException\r
             {\r
                 SequenceMapping target = (SequenceMapping) object;\r
-                return target.getSequenceA();\r
+                return target.getLoc();\r
             }\r
             public void setValue( java.lang.Object object, java.lang.Object value) \r
                 throws IllegalStateException, IllegalArgumentException\r
             {\r
                 try {\r
                     SequenceMapping target = (SequenceMapping) object;\r
-                    target.setSequenceA( (java.lang.Object) value);\r
+                    target.setLoc( (java.lang.Object) value);\r
                 } catch (java.lang.Exception ex) {\r
                     throw new IllegalStateException(ex.toString());\r
                 }\r
@@ -97,7 +93,7 @@ public class SequenceMappingDescriptor extends org.exolab.castor.xml.util.XMLCla
         desc.setMultivalued(false);\r
         addFieldDescriptor(desc);\r
         \r
-        //-- validation code for: _sequenceA\r
+        //-- validation code for: _loc\r
         fieldValidator = new org.exolab.castor.xml.FieldValidator();\r
         fieldValidator.setMinOccurs(1);\r
         { //-- local scope\r
@@ -106,22 +102,22 @@ public class SequenceMappingDescriptor extends org.exolab.castor.xml.util.XMLCla
             fieldValidator.setValidator(typeValidator);\r
         }\r
         desc.setValidator(fieldValidator);\r
-        //-- _sequenceB\r
-        desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Object.class, "_sequenceB", "sequenceB", org.exolab.castor.xml.NodeType.Attribute);\r
+        //-- _map\r
+        desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Object.class, "_map", "map", org.exolab.castor.xml.NodeType.Attribute);\r
         desc.setReference(true);\r
         handler = new org.exolab.castor.xml.XMLFieldHandler() {\r
             public java.lang.Object getValue( java.lang.Object object ) \r
                 throws IllegalStateException\r
             {\r
                 SequenceMapping target = (SequenceMapping) object;\r
-                return target.getSequenceB();\r
+                return target.getMap();\r
             }\r
             public void setValue( java.lang.Object object, java.lang.Object value) \r
                 throws IllegalStateException, IllegalArgumentException\r
             {\r
                 try {\r
                     SequenceMapping target = (SequenceMapping) object;\r
-                    target.setSequenceB( (java.lang.Object) value);\r
+                    target.setMap( (java.lang.Object) value);\r
                 } catch (java.lang.Exception ex) {\r
                     throw new IllegalStateException(ex.toString());\r
                 }\r
@@ -135,7 +131,7 @@ public class SequenceMappingDescriptor extends org.exolab.castor.xml.util.XMLCla
         desc.setMultivalued(false);\r
         addFieldDescriptor(desc);\r
         \r
-        //-- validation code for: _sequenceB\r
+        //-- validation code for: _map\r
         fieldValidator = new org.exolab.castor.xml.FieldValidator();\r
         fieldValidator.setMinOccurs(1);\r
         { //-- local scope\r
@@ -146,7 +142,7 @@ public class SequenceMappingDescriptor extends org.exolab.castor.xml.util.XMLCla
         desc.setValidator(fieldValidator);\r
         //-- _id\r
         desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_id", "id", org.exolab.castor.xml.NodeType.Attribute);\r
-        this._identity = desc;\r
+        super.setIdentity(desc);\r
         handler = new org.exolab.castor.xml.XMLFieldHandler() {\r
             public java.lang.Object getValue( java.lang.Object object ) \r
                 throws IllegalStateException\r
@@ -182,49 +178,6 @@ public class SequenceMappingDescriptor extends org.exolab.castor.xml.util.XMLCla
         desc.setValidator(fieldValidator);\r
         //-- initialize element descriptors\r
         \r
-        //-- _rangeList\r
-        desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(uk.ac.vamsas.objects.core.Range.class, "_rangeList", "range", org.exolab.castor.xml.NodeType.Element);\r
-        handler = new org.exolab.castor.xml.XMLFieldHandler() {\r
-            public java.lang.Object getValue( java.lang.Object object ) \r
-                throws IllegalStateException\r
-            {\r
-                SequenceMapping target = (SequenceMapping) object;\r
-                return target.getRange();\r
-            }\r
-            public void setValue( java.lang.Object object, java.lang.Object value) \r
-                throws IllegalStateException, IllegalArgumentException\r
-            {\r
-                try {\r
-                    SequenceMapping target = (SequenceMapping) object;\r
-                    target.addRange( (uk.ac.vamsas.objects.core.Range) value);\r
-                } catch (java.lang.Exception ex) {\r
-                    throw new IllegalStateException(ex.toString());\r
-                }\r
-            }\r
-            public void resetValue(Object object) throws IllegalStateException, IllegalArgumentException {\r
-                try {\r
-                    SequenceMapping target = (SequenceMapping) object;\r
-                    target.removeAllRange();\r
-                } catch (java.lang.Exception ex) {\r
-                    throw new IllegalStateException(ex.toString());\r
-                }\r
-            }\r
-            public java.lang.Object newInstance(java.lang.Object parent) {\r
-                return new uk.ac.vamsas.objects.core.Range();\r
-            }\r
-        };\r
-        desc.setHandler(handler);\r
-        desc.setNameSpaceURI("http://www.vamsas.ac.uk/schemas/1.0/vamsasTypes");\r
-        desc.setRequired(true);\r
-        desc.setMultivalued(true);\r
-        addFieldDescriptor(desc);\r
-        \r
-        //-- validation code for: _rangeList\r
-        fieldValidator = new org.exolab.castor.xml.FieldValidator();\r
-        fieldValidator.setMinOccurs(1);\r
-        { //-- local scope\r
-        }\r
-        desc.setValidator(fieldValidator);\r
         //-- _provenance\r
         desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(uk.ac.vamsas.objects.core.Provenance.class, "_provenance", "Provenance", org.exolab.castor.xml.NodeType.Element);\r
         handler = new org.exolab.castor.xml.XMLFieldHandler() {\r
@@ -285,7 +238,7 @@ public class SequenceMappingDescriptor extends org.exolab.castor.xml.util.XMLCla
      */\r
     public org.exolab.castor.mapping.FieldDescriptor getIdentity(\r
     ) {\r
-        return _identity;\r
+        return super.getIdentity();\r
     }\r
 \r
     /**\r
index c6e9bf7..7b059e6 100644 (file)
@@ -45,11 +45,6 @@ public class SequenceTypeDescriptor extends org.exolab.castor.xml.util.XMLClassD
      */\r
     private java.lang.String _xmlName;\r
 \r
-    /**\r
-     * Field _identity.\r
-     */\r
-    private org.exolab.castor.xml.XMLFieldDescriptor _identity;\r
-\r
 \r
       //----------------/\r
      //- Constructors -/\r
@@ -337,7 +332,7 @@ public class SequenceTypeDescriptor extends org.exolab.castor.xml.util.XMLClassD
      */\r
     public org.exolab.castor.mapping.FieldDescriptor getIdentity(\r
     ) {\r
-        return _identity;\r
+        return super.getIdentity();\r
     }\r
 \r
     /**\r
index e05b6da..19f0b42 100644 (file)
@@ -45,11 +45,6 @@ public class TreeDescriptor extends org.exolab.castor.xml.util.XMLClassDescripto
      */\r
     private java.lang.String _xmlName;\r
 \r
-    /**\r
-     * Field _identity.\r
-     */\r
-    private org.exolab.castor.xml.XMLFieldDescriptor _identity;\r
-\r
 \r
       //----------------/\r
      //- Constructors -/\r
@@ -70,7 +65,7 @@ public class TreeDescriptor extends org.exolab.castor.xml.util.XMLClassDescripto
         \r
         //-- _id\r
         desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_id", "id", org.exolab.castor.xml.NodeType.Attribute);\r
-        this._identity = desc;\r
+        super.setIdentity(desc);\r
         handler = new org.exolab.castor.xml.XMLFieldHandler() {\r
             public java.lang.Object getValue( java.lang.Object object ) \r
                 throws IllegalStateException\r
@@ -368,7 +363,7 @@ public class TreeDescriptor extends org.exolab.castor.xml.util.XMLClassDescripto
      */\r
     public org.exolab.castor.mapping.FieldDescriptor getIdentity(\r
     ) {\r
-        return _identity;\r
+        return super.getIdentity();\r
     }\r
 \r
     /**\r
index d113459..4108527 100644 (file)
@@ -45,11 +45,6 @@ public class TreenodeDescriptor extends uk.ac.vamsas.objects.core.descriptors.No
      */\r
     private java.lang.String _xmlName;\r
 \r
-    /**\r
-     * Field _identity.\r
-     */\r
-    private org.exolab.castor.xml.XMLFieldDescriptor _identity;\r
-\r
 \r
       //----------------/\r
      //- Constructors -/\r
@@ -176,10 +171,7 @@ public class TreenodeDescriptor extends uk.ac.vamsas.objects.core.descriptors.No
      */\r
     public org.exolab.castor.mapping.FieldDescriptor getIdentity(\r
     ) {\r
-        if (_identity == null) {\r
-            return super.getIdentity();\r
-        }\r
-        return _identity;\r
+        return super.getIdentity();\r
     }\r
 \r
     /**\r
index fd16249..8a6e724 100644 (file)
@@ -45,11 +45,6 @@ public class UserDescriptor extends uk.ac.vamsas.objects.core.descriptors.AppDat
      */\r
     private java.lang.String _xmlName;\r
 \r
-    /**\r
-     * Field _identity.\r
-     */\r
-    private org.exolab.castor.xml.XMLFieldDescriptor _identity;\r
-\r
 \r
       //----------------/\r
      //- Constructors -/\r
@@ -171,10 +166,7 @@ public class UserDescriptor extends uk.ac.vamsas.objects.core.descriptors.AppDat
      */\r
     public org.exolab.castor.mapping.FieldDescriptor getIdentity(\r
     ) {\r
-        if (_identity == null) {\r
-            return super.getIdentity();\r
-        }\r
-        return _identity;\r
+        return super.getIdentity();\r
     }\r
 \r
     /**\r
index 59f8995..b999ff4 100644 (file)
@@ -45,11 +45,6 @@ public class VAMSASDescriptor extends org.exolab.castor.xml.util.XMLClassDescrip
      */\r
     private java.lang.String _xmlName;\r
 \r
-    /**\r
-     * Field _identity.\r
-     */\r
-    private org.exolab.castor.xml.XMLFieldDescriptor _identity;\r
-\r
 \r
       //----------------/\r
      //- Constructors -/\r
@@ -70,7 +65,7 @@ public class VAMSASDescriptor extends org.exolab.castor.xml.util.XMLClassDescrip
         \r
         //-- _id\r
         desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_id", "id", org.exolab.castor.xml.NodeType.Attribute);\r
-        this._identity = desc;\r
+        super.setIdentity(desc);\r
         handler = new org.exolab.castor.xml.XMLFieldHandler() {\r
             public java.lang.Object getValue( java.lang.Object object ) \r
                 throws IllegalStateException\r
@@ -252,7 +247,7 @@ public class VAMSASDescriptor extends org.exolab.castor.xml.util.XMLClassDescrip
      */\r
     public org.exolab.castor.mapping.FieldDescriptor getIdentity(\r
     ) {\r
-        return _identity;\r
+        return super.getIdentity();\r
     }\r
 \r
     /**\r
index 856736e..9c7a594 100644 (file)
@@ -45,11 +45,6 @@ public class VamsasDocumentDescriptor extends org.exolab.castor.xml.util.XMLClas
      */\r
     private java.lang.String _xmlName;\r
 \r
-    /**\r
-     * Field _identity.\r
-     */\r
-    private org.exolab.castor.xml.XMLFieldDescriptor _identity;\r
-\r
 \r
       //----------------/\r
      //- Constructors -/\r
@@ -328,7 +323,7 @@ public class VamsasDocumentDescriptor extends org.exolab.castor.xml.util.XMLClas
      */\r
     public org.exolab.castor.mapping.FieldDescriptor getIdentity(\r
     ) {\r
-        return _identity;\r
+        return super.getIdentity();\r
     }\r
 \r
     /**\r
index b150b93..aaf2f6d 100644 (file)
@@ -45,11 +45,6 @@ public class VrefDescriptor extends uk.ac.vamsas.objects.core.descriptors.Refere
      */\r
     private java.lang.String _xmlName;\r
 \r
-    /**\r
-     * Field _identity.\r
-     */\r
-    private org.exolab.castor.xml.XMLFieldDescriptor _identity;\r
-\r
 \r
       //----------------/\r
      //- Constructors -/\r
@@ -86,10 +81,7 @@ public class VrefDescriptor extends uk.ac.vamsas.objects.core.descriptors.Refere
      */\r
     public org.exolab.castor.mapping.FieldDescriptor getIdentity(\r
     ) {\r
-        if (_identity == null) {\r
-            return super.getIdentity();\r
-        }\r
-        return _identity;\r
+        return super.getIdentity();\r
     }\r
 \r
     /**\r
index aa83139..86ddb3e 100644 (file)
@@ -45,11 +45,6 @@ public class VxrefDescriptor extends uk.ac.vamsas.objects.core.descriptors.Refer
      */\r
     private java.lang.String _xmlName;\r
 \r
-    /**\r
-     * Field _identity.\r
-     */\r
-    private org.exolab.castor.xml.XMLFieldDescriptor _identity;\r
-\r
 \r
       //----------------/\r
      //- Constructors -/\r
@@ -86,10 +81,7 @@ public class VxrefDescriptor extends uk.ac.vamsas.objects.core.descriptors.Refer
      */\r
     public org.exolab.castor.mapping.FieldDescriptor getIdentity(\r
     ) {\r
-        if (_identity == null) {\r
-            return super.getIdentity();\r
-        }\r
-        return _identity;\r
+        return super.getIdentity();\r
     }\r
 \r
     /**\r