Source code: com/mayhoo/kanji/xml/Reading.java
1 /*
2 * This class was automatically generated with
3 * <a href="http://castor.exolab.org">Castor 0.9.3</a>, using an
4 * XML Schema.
5 * $Id: Reading.java,v 1.2 2002/04/30 06:44:34 djmay Exp $
6 */
7
8 package com.mayhoo.kanji.xml;
9
10 //---------------------------------/
11 //- Imported classes and packages -/
12 //---------------------------------/
13
14 import java.io.Reader;
15 import java.io.Serializable;
16 import java.io.Writer;
17 import org.exolab.castor.xml.*;
18 import org.exolab.castor.xml.MarshalException;
19 import org.exolab.castor.xml.ValidationException;
20 import org.xml.sax.DocumentHandler;
21
22 /**
23 * The japanese readings, with indications for prefixes/suffixes,
24 * its okurigana. ON-yomi are in katakana and KUN-yomi are in
25 * hiragana. There may be several classes of reading fields, with
26 * special classes marked as such. The current classes, are: -
27 * special "nanori" (i.e. name) readings, - a radical, and the
28 * radical name is not already a reading.
29 * @version $Revision: 1.2 $ $Date: 2002/04/30 06:44:34 $
30 **/
31 public class Reading extends ReadingType
32 implements java.io.Serializable
33 {
34
35
36 //----------------/
37 //- Constructors -/
38 //----------------/
39
40 public Reading() {
41 super();
42 } //-- com.mayhoo.kanji.xml.Reading()
43
44
45 //-----------/
46 //- Methods -/
47 //-----------/
48
49 /**
50 **/
51 public boolean isValid()
52 {
53 try {
54 validate();
55 }
56 catch (org.exolab.castor.xml.ValidationException vex) {
57 return false;
58 }
59 return true;
60 } //-- boolean isValid()
61
62 /**
63 *
64 * @param out
65 **/
66 public void marshal(java.io.Writer out)
67 throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
68 {
69
70 Marshaller.marshal(this, out);
71 } //-- void marshal(java.io.Writer)
72
73 /**
74 *
75 * @param handler
76 **/
77 public void marshal(org.xml.sax.DocumentHandler handler)
78 throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
79 {
80
81 Marshaller.marshal(this, handler);
82 } //-- void marshal(org.xml.sax.DocumentHandler)
83
84 /**
85 *
86 * @param reader
87 **/
88 public static com.mayhoo.kanji.xml.Reading unmarshal(java.io.Reader reader)
89 throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
90 {
91 return (com.mayhoo.kanji.xml.Reading) Unmarshaller.unmarshal(com.mayhoo.kanji.xml.Reading.class, reader);
92 } //-- com.mayhoo.kanji.xml.Reading unmarshal(java.io.Reader)
93
94 /**
95 **/
96 public void validate()
97 throws org.exolab.castor.xml.ValidationException
98 {
99 org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
100 validator.validate(this);
101 } //-- void validate()
102
103 }