svn-gvsig-desktop / trunk / applications / appgvSIG / src / com / iver / cit / gvsig / project / ProjectReader.java @ 312
History | View | Annotate | Download (3.41 KB)
1 |
package com.iver.cit.gvsig.project; |
---|---|
2 |
|
3 |
import java.io.IOException; |
4 |
|
5 |
import org.xml.sax.ContentHandler; |
6 |
import org.xml.sax.DTDHandler; |
7 |
import org.xml.sax.EntityResolver; |
8 |
import org.xml.sax.ErrorHandler; |
9 |
import org.xml.sax.InputSource; |
10 |
import org.xml.sax.SAXException; |
11 |
import org.xml.sax.SAXNotRecognizedException; |
12 |
import org.xml.sax.SAXNotSupportedException; |
13 |
import org.xml.sax.XMLReader; |
14 |
|
15 |
import com.iver.cit.gvsig.project.castor.DefaultProject; |
16 |
|
17 |
|
18 |
/**
|
19 |
* DOCUMENT ME!
|
20 |
*
|
21 |
* @author Fernando Gonz?lez Cort?s
|
22 |
*/
|
23 |
public class ProjectReader implements XMLReader { |
24 |
ContentHandler handler;
|
25 |
|
26 |
/**
|
27 |
* @see org.xml.sax.XMLReader#parse(java.lang.String)
|
28 |
*/
|
29 |
public void parse(String arg0) throws IOException, SAXException { |
30 |
} |
31 |
|
32 |
/**
|
33 |
* DOCUMENT ME!
|
34 |
*
|
35 |
* @param p DOCUMENT ME!
|
36 |
*
|
37 |
* @throws IOException DOCUMENT ME!
|
38 |
*/
|
39 |
public void parse(DefaultProject p) throws IOException { |
40 |
try {
|
41 |
handler.startDocument(); |
42 |
|
43 |
ProjectReaderHelper helper = new ProjectReaderHelper(handler);
|
44 |
|
45 |
helper.project(p); |
46 |
|
47 |
handler.endDocument(); |
48 |
} catch (SAXException e) {
|
49 |
throw new IOException(e.getMessage()); |
50 |
} |
51 |
} |
52 |
|
53 |
/**
|
54 |
* @see org.xml.sax.XMLReader#getFeature(java.lang.String)
|
55 |
*/
|
56 |
public boolean getFeature(String arg0) |
57 |
throws SAXNotRecognizedException, SAXNotSupportedException {
|
58 |
return false; |
59 |
} |
60 |
|
61 |
/**
|
62 |
* @see org.xml.sax.XMLReader#setFeature(java.lang.String, boolean)
|
63 |
*/
|
64 |
public void setFeature(String arg0, boolean arg1) |
65 |
throws SAXNotRecognizedException, SAXNotSupportedException {
|
66 |
} |
67 |
|
68 |
/**
|
69 |
* @see org.xml.sax.XMLReader#getContentHandler()
|
70 |
*/
|
71 |
public ContentHandler getContentHandler() { |
72 |
return null; |
73 |
} |
74 |
|
75 |
/**
|
76 |
* @see org.xml.sax.XMLReader#setContentHandler(org.xml.sax.ContentHandler)
|
77 |
*/
|
78 |
public void setContentHandler(ContentHandler handler) { |
79 |
this.handler = handler;
|
80 |
} |
81 |
|
82 |
/**
|
83 |
* @see org.xml.sax.XMLReader#getDTDHandler()
|
84 |
*/
|
85 |
public DTDHandler getDTDHandler() {
|
86 |
return null; |
87 |
} |
88 |
|
89 |
/**
|
90 |
* @see org.xml.sax.XMLReader#setDTDHandler(org.xml.sax.DTDHandler)
|
91 |
*/
|
92 |
public void setDTDHandler(DTDHandler arg0) { |
93 |
} |
94 |
|
95 |
/**
|
96 |
* @see org.xml.sax.XMLReader#getEntityResolver()
|
97 |
*/
|
98 |
public EntityResolver getEntityResolver() {
|
99 |
return null; |
100 |
} |
101 |
|
102 |
/**
|
103 |
* @see org.xml.sax.XMLReader#setEntityResolver(org.xml.sax.EntityResolver)
|
104 |
*/
|
105 |
public void setEntityResolver(EntityResolver arg0) { |
106 |
} |
107 |
|
108 |
/**
|
109 |
* @see org.xml.sax.XMLReader#getErrorHandler()
|
110 |
*/
|
111 |
public ErrorHandler getErrorHandler() {
|
112 |
return null; |
113 |
} |
114 |
|
115 |
/**
|
116 |
* @see org.xml.sax.XMLReader#setErrorHandler(org.xml.sax.ErrorHandler)
|
117 |
*/
|
118 |
public void setErrorHandler(ErrorHandler arg0) { |
119 |
} |
120 |
|
121 |
/**
|
122 |
* @see org.xml.sax.XMLReader#parse(org.xml.sax.InputSource)
|
123 |
*/
|
124 |
public void parse(InputSource arg0) throws IOException, SAXException { |
125 |
} |
126 |
|
127 |
/**
|
128 |
* @see org.xml.sax.XMLReader#getProperty(java.lang.String)
|
129 |
*/
|
130 |
public Object getProperty(String arg0) |
131 |
throws SAXNotRecognizedException, SAXNotSupportedException {
|
132 |
return null; |
133 |
} |
134 |
|
135 |
/**
|
136 |
* @see org.xml.sax.XMLReader#setProperty(java.lang.String,
|
137 |
* java.lang.Object)
|
138 |
*/
|
139 |
public void setProperty(String arg0, Object arg1) |
140 |
throws SAXNotRecognizedException, SAXNotSupportedException {
|
141 |
} |
142 |
} |