1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20 package org.onemind.commons.relabean.serialize;
21
22
23 import java.io.InputStream;
24
25 import java.util.Collection;
26 import org.onemind.commons.relabean.RelationalBeanModel;
27
28
29 /***
30 * A model reader
31 * @author TiongHiang Lee (thlee@onemindsoft.org)
32 * @version $Id: BeanModelReader.java,v 1.2 2004/08/26 16:29:00 thlee Exp $ $Name: $
33 */
34 public abstract class BeanModelReader
35 {
36 /*** the model **/
37 private RelationalBeanModel _model;
38
39 /***
40 * Constructor
41 * @param model the model
42 */
43 public BeanModelReader(RelationalBeanModel model)
44 {
45 _model = model;
46 }
47
48 /***
49 * Read the metamodel from the stream
50 * @param instream the input stream
51 * @return the relational bean model
52 */
53 public abstract RelationalBeanModel readMetaModel(InputStream instream);
54
55 /***
56 * Read the model instance
57 * @param stream the input stream
58 * @return the model instance
59 */
60 public abstract Collection readModel(InputStream stream);
61
62 /***
63 * Get sax instance of the reader
64 * @return the reader
65 */
66 private BeanModelReader getSaxInstance()
67 {
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82 return null;
83 }
84 }