root / org.gvsig.xmlschema / library / trunk / org.gvsig.xmlschema / org.gvsig.xmlschema.prov / org.gvsig.xmlschema.prov.kxml / src / main / java / org / gvsig / xmlschema / prov / kxml / XmlSchemaKmlxProvider.java @ 250
History | View | Annotate | Download (2.37 KB)
1 |
/* gvSIG. Geographic Information System of the Valencian Government
|
---|---|
2 |
*
|
3 |
* Copyright (C) 2007-2008 Infrastructures and Transports Department
|
4 |
* of the Valencian Government (CIT)
|
5 |
*
|
6 |
* This program is free software; you can redistribute it and/or
|
7 |
* modify it under the terms of the GNU General Public License
|
8 |
* as published by the Free Software Foundation; either version 2
|
9 |
* of the License, or (at your option) any later version.
|
10 |
*
|
11 |
* This program is distributed in the hope that it will be useful,
|
12 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
13 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
14 |
* GNU General Public License for more details.
|
15 |
*
|
16 |
* You should have received a copy of the GNU General Public License
|
17 |
* along with this program; if not, write to the Free Software
|
18 |
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
19 |
* MA 02110-1301, USA.
|
20 |
*
|
21 |
*/
|
22 |
package org.gvsig.xmlschema.prov.kxml; |
23 |
|
24 |
import java.io.IOException; |
25 |
import java.io.InputStream; |
26 |
|
27 |
import org.slf4j.Logger; |
28 |
import org.slf4j.LoggerFactory; |
29 |
import org.xmlpull.v1.XmlPullParserException; |
30 |
|
31 |
import org.gvsig.tools.service.spi.AbstractProvider; |
32 |
import org.gvsig.tools.service.spi.ProviderServices; |
33 |
import org.gvsig.xmlschema.lib.api.exceptions.SchemaCreationException; |
34 |
import org.gvsig.xmlschema.lib.api.som.IXSSchema; |
35 |
import org.gvsig.xmlschema.lib.spi.XmlSchemaProvider; |
36 |
import org.gvsig.xmlschema.prov.kxml.model.XSSchema; |
37 |
|
38 |
|
39 |
/**
|
40 |
* @author gvSIG Team
|
41 |
* @version $Id$
|
42 |
*
|
43 |
*/
|
44 |
public class XmlSchemaKmlxProvider extends AbstractProvider implements XmlSchemaProvider { |
45 |
private static final Logger LOG = LoggerFactory.getLogger(XmlSchemaKmlxProvider.class); |
46 |
|
47 |
/**
|
48 |
* Constructor.
|
49 |
*
|
50 |
* @param providerServices
|
51 |
* the services for the provider
|
52 |
* @param file
|
53 |
* to get the Sensor from
|
54 |
*/
|
55 |
public XmlSchemaKmlxProvider(ProviderServices providerServices) {
|
56 |
super(providerServices);
|
57 |
} |
58 |
|
59 |
public IXSSchema createXSSchema(String namespaceURI, String namespacePrefix) |
60 |
throws SchemaCreationException {
|
61 |
throw new UnsupportedOperationException("this operation has not been implemented yet"); |
62 |
} |
63 |
|
64 |
public IXSSchema parse(InputStream is) throws SchemaCreationException { |
65 |
try {
|
66 |
return new XSSchema(is); |
67 |
} catch (IOException e) { |
68 |
throw new SchemaCreationException(e); |
69 |
} |
70 |
} |
71 |
} |