rebult for castor-1.1(vamsas version)
[vamsas.git] / src / uk / ac / vamsas / objects / core / Map.java
1 /*\r
2  * This class was automatically generated with \r
3  * <a href="http://www.castor.org">Castor 1.1</a>, using an XML\r
4  * Schema.\r
5  * $Id$\r
6  */\r
7 \r
8 package uk.ac.vamsas.objects.core;\r
9 \r
10   //---------------------------------/\r
11  //- Imported classes and packages -/\r
12 //---------------------------------/\r
13 \r
14 import org.exolab.castor.xml.Marshaller;\r
15 import org.exolab.castor.xml.Unmarshaller;\r
16 \r
17 /**\r
18  * From: Offset to first\r
19  *  position in dataset sequence record that\r
20  *  this database entry maps to To: Offset\r
21  *  to last position in dataset sequence\r
22  *  record that this database entry maps to\r
23  *  Start: Offset to first last position in\r
24  *  database entry that first (or offset)\r
25  *  position in sequence maps to End: Offset\r
26  *  to last position in database entry that\r
27  *  last (offset) position in sequence maps\r
28  *  to \r
29  * \r
30  * @version $Revision$ $Date$\r
31  */\r
32 public class Map extends uk.ac.vamsas.objects.core.MapList \r
33 implements java.io.Serializable\r
34 {\r
35 \r
36 \r
37       //----------------/\r
38      //- Constructors -/\r
39     //----------------/\r
40 \r
41     public Map() {\r
42         super();\r
43     }\r
44 \r
45 \r
46       //-----------/\r
47      //- Methods -/\r
48     //-----------/\r
49 \r
50     /**\r
51      * Overrides the java.lang.Object.equals method.\r
52      * \r
53      * @param obj\r
54      * @return true if the objects are equal.\r
55      */\r
56     public boolean equals(\r
57             final java.lang.Object obj) {\r
58         if ( this == obj )\r
59             return true;\r
60         \r
61         if (super.equals(obj)==false)\r
62             return false;\r
63         \r
64         if (obj instanceof Map) {\r
65         \r
66         return true;\r
67     }\r
68     return false;\r
69     }\r
70 \r
71     /**\r
72      * Overrides the java.lang.Object.hashCode method.\r
73      * <p>\r
74      * The following steps came from <b>Effective Java Programming\r
75      * Language Guide</b> by Joshua Bloch, Chapter 3\r
76      * \r
77      * @return a hash code value for the object.\r
78      */\r
79     public int hashCode(\r
80     ) {\r
81         int result = super.hashCode();\r
82         \r
83         long tmp;\r
84         \r
85         return result;\r
86     }\r
87 \r
88     /**\r
89      * Method isValid.\r
90      * \r
91      * @return true if this object is valid according to the schema\r
92      */\r
93     public boolean isValid(\r
94     ) {\r
95         try {\r
96             validate();\r
97         } catch (org.exolab.castor.xml.ValidationException vex) {\r
98             return false;\r
99         }\r
100         return true;\r
101     }\r
102 \r
103     /**\r
104      * \r
105      * \r
106      * @param out\r
107      * @throws org.exolab.castor.xml.MarshalException if object is\r
108      * null or if any SAXException is thrown during marshaling\r
109      * @throws org.exolab.castor.xml.ValidationException if this\r
110      * object is an invalid instance according to the schema\r
111      */\r
112     public void marshal(\r
113             final java.io.Writer out)\r
114     throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {\r
115         Marshaller.marshal(this, out);\r
116     }\r
117 \r
118     /**\r
119      * \r
120      * \r
121      * @param handler\r
122      * @throws java.io.IOException if an IOException occurs during\r
123      * marshaling\r
124      * @throws org.exolab.castor.xml.ValidationException if this\r
125      * object is an invalid instance according to the schema\r
126      * @throws org.exolab.castor.xml.MarshalException if object is\r
127      * null or if any SAXException is thrown during marshaling\r
128      */\r
129     public void marshal(\r
130             final org.xml.sax.ContentHandler handler)\r
131     throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {\r
132         Marshaller.marshal(this, handler);\r
133     }\r
134 \r
135     /**\r
136      * Method unmarshal.\r
137      * \r
138      * @param reader\r
139      * @throws org.exolab.castor.xml.MarshalException if object is\r
140      * null or if any SAXException is thrown during marshaling\r
141      * @throws org.exolab.castor.xml.ValidationException if this\r
142      * object is an invalid instance according to the schema\r
143      * @return the unmarshaled uk.ac.vamsas.objects.core.MapList\r
144      */\r
145     public static uk.ac.vamsas.objects.core.MapList unmarshal(\r
146             final java.io.Reader reader)\r
147     throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {\r
148         return (uk.ac.vamsas.objects.core.MapList) Unmarshaller.unmarshal(uk.ac.vamsas.objects.core.Map.class, reader);\r
149     }\r
150 \r
151     /**\r
152      * \r
153      * \r
154      * @throws org.exolab.castor.xml.ValidationException if this\r
155      * object is an invalid instance according to the schema\r
156      */\r
157     public void validate(\r
158     )\r
159     throws org.exolab.castor.xml.ValidationException {\r
160         org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();\r
161         validator.validate(this);\r
162     }\r
163 \r
164 }\r