JAL-1432 updated copyright notices
[jalview.git] / src / jalview / binding / Pdbids.java
1 /*
2  * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.0b1)
3  * Copyright (C) 2014 The Jalview Authors
4  * 
5  * This file is part of Jalview.
6  * 
7  * Jalview is free software: you can redistribute it and/or
8  * modify it under the terms of the GNU General Public License 
9  * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
10  *  
11  * Jalview is distributed in the hope that it will be useful, but 
12  * WITHOUT ANY WARRANTY; without even the implied warranty 
13  * of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
14  * PURPOSE.  See the GNU General Public License for more details.
15  * 
16  * You should have received a copy of the GNU General Public License along with Jalview.  If not, see <http://www.gnu.org/licenses/>.
17  * The Jalview Authors are detailed in the 'AUTHORS' file.
18  */
19 package jalview.binding;
20
21 //---------------------------------/
22 //- Imported classes and packages -/
23 //---------------------------------/
24
25 import org.exolab.castor.xml.Marshaller;
26 import org.exolab.castor.xml.Unmarshaller;
27
28 /**
29  * Class Pdbids.
30  * 
31  * @version $Revision$ $Date$
32  */
33 public class Pdbids extends Pdbentry implements java.io.Serializable
34 {
35
36   // ----------------/
37   // - Constructors -/
38   // ----------------/
39
40   public Pdbids()
41   {
42     super();
43   }
44
45   // -----------/
46   // - Methods -/
47   // -----------/
48
49   /**
50    * Method isValid.
51    * 
52    * @return true if this object is valid according to the schema
53    */
54   public boolean isValid()
55   {
56     try
57     {
58       validate();
59     } catch (org.exolab.castor.xml.ValidationException vex)
60     {
61       return false;
62     }
63     return true;
64   }
65
66   /**
67    * 
68    * 
69    * @param out
70    * @throws org.exolab.castor.xml.MarshalException
71    *           if object is null or if any SAXException is thrown during
72    *           marshaling
73    * @throws org.exolab.castor.xml.ValidationException
74    *           if this object is an invalid instance according to the schema
75    */
76   public void marshal(final java.io.Writer out)
77           throws org.exolab.castor.xml.MarshalException,
78           org.exolab.castor.xml.ValidationException
79   {
80     Marshaller.marshal(this, out);
81   }
82
83   /**
84    * 
85    * 
86    * @param handler
87    * @throws java.io.IOException
88    *           if an IOException occurs during marshaling
89    * @throws org.exolab.castor.xml.ValidationException
90    *           if this object is an invalid instance according to the schema
91    * @throws org.exolab.castor.xml.MarshalException
92    *           if object is null or if any SAXException is thrown during
93    *           marshaling
94    */
95   public void marshal(final org.xml.sax.ContentHandler handler)
96           throws java.io.IOException,
97           org.exolab.castor.xml.MarshalException,
98           org.exolab.castor.xml.ValidationException
99   {
100     Marshaller.marshal(this, handler);
101   }
102
103   /**
104    * Method unmarshal.
105    * 
106    * @param reader
107    * @throws org.exolab.castor.xml.MarshalException
108    *           if object is null or if any SAXException is thrown during
109    *           marshaling
110    * @throws org.exolab.castor.xml.ValidationException
111    *           if this object is an invalid instance according to the schema
112    * @return the unmarshaled jalview.binding.Pdbentry
113    */
114   public static jalview.binding.Pdbentry unmarshal(
115           final java.io.Reader reader)
116           throws org.exolab.castor.xml.MarshalException,
117           org.exolab.castor.xml.ValidationException
118   {
119     return (jalview.binding.Pdbentry) Unmarshaller.unmarshal(
120             jalview.binding.Pdbids.class, reader);
121   }
122
123   /**
124    * 
125    * 
126    * @throws org.exolab.castor.xml.ValidationException
127    *           if this object is an invalid instance according to the schema
128    */
129   public void validate() throws org.exolab.castor.xml.ValidationException
130   {
131     org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
132     validator.validate(this);
133   }
134
135 }