Revision 1313
org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.40/org.gvsig.xmlschema.lib/org.gvsig.xmlschema.lib.api/pom.xml | ||
---|---|---|
1 |
<?xml version="1.0" encoding="ISO-8859-1"?> |
|
2 |
|
|
3 |
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> |
|
4 |
<modelVersion>4.0.0</modelVersion> |
|
5 |
<artifactId>org.gvsig.xmlschema.lib.api</artifactId> |
|
6 |
<packaging>jar</packaging> |
|
7 |
<name>org.gvsig.xmlschema.lib.api</name> |
|
8 |
<description>XML Schema library API</description> |
|
9 |
<parent> |
|
10 |
<groupId>org.gvsig</groupId> |
|
11 |
<artifactId>org.gvsig.xmlschema.lib</artifactId> |
|
12 |
<version>2.0.40</version> |
|
13 |
</parent> |
|
14 |
<dependencies> |
|
15 |
|
|
16 |
<dependency> |
|
17 |
<groupId>org.gvsig</groupId> |
|
18 |
<artifactId>org.gvsig.tools.lib</artifactId> |
|
19 |
</dependency> |
|
20 |
|
|
21 |
<dependency> |
|
22 |
<groupId>org.gvsig</groupId> |
|
23 |
<artifactId>org.gvsig.xmlpull.lib.api</artifactId> |
|
24 |
<version>2.0.1</version> |
|
25 |
</dependency> |
|
26 |
</dependencies> |
|
27 |
<build> |
|
28 |
<plugins> |
|
29 |
<plugin> |
|
30 |
<groupId>org.apache.maven.plugins</groupId> |
|
31 |
<artifactId>maven-compiler-plugin</artifactId> |
|
32 |
<configuration> |
|
33 |
<source>1.4</source> |
|
34 |
<target>1.5</target> |
|
35 |
</configuration> |
|
36 |
</plugin> |
|
37 |
</plugins> |
|
38 |
</build> |
|
39 |
<profiles> |
|
40 |
<profile> |
|
41 |
<id>cdc</id> |
|
42 |
<build> |
|
43 |
<plugins> |
|
44 |
<plugin> |
|
45 |
<groupId>org.apache.maven.plugins</groupId> |
|
46 |
<artifactId>maven-compiler-plugin</artifactId> |
|
47 |
<configuration> |
|
48 |
<source>1.4</source> |
|
49 |
<target>1.4</target> |
|
50 |
</configuration> |
|
51 |
</plugin> |
|
52 |
</plugins> |
|
53 |
</build> |
|
54 |
</profile> |
|
55 |
</profiles> |
|
56 |
</project> |
|
0 | 57 |
org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.40/org.gvsig.xmlschema.lib/org.gvsig.xmlschema.lib.api/src/main/resources/META-INF/services/org.gvsig.tools.library.Library | ||
---|---|---|
1 |
org.gvsig.xmlschema.lib.api.XMLSchemaLibrary |
|
2 |
|
org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.40/org.gvsig.xmlschema.lib/org.gvsig.xmlschema.lib.api/src/main/java/org/gvsig/xmlschema/lib/api/warnings/SchemaLocationWarning.java | ||
---|---|---|
1 |
package org.gvsig.xmlschema.lib.api.warnings; |
|
2 |
|
|
3 |
import java.util.Hashtable; |
|
4 |
import java.util.Map; |
|
5 |
|
|
6 |
import org.gvsig.tools.exception.BaseException; |
|
7 |
|
|
8 |
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana |
|
9 |
* |
|
10 |
* Copyright (C) 2004 IVER T.I. and Generalitat Valenciana. |
|
11 |
* |
|
12 |
* This program is free software; you can redistribute it and/or |
|
13 |
* modify it under the terms of the GNU General Public License |
|
14 |
* as published by the Free Software Foundation; either version 2 |
|
15 |
* of the License, or (at your option) any later version. |
|
16 |
* |
|
17 |
* This program is distributed in the hope that it will be useful, |
|
18 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
19 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
20 |
* GNU General Public License for more details. |
|
21 |
* |
|
22 |
* You should have received a copy of the GNU General Public License |
|
23 |
* along with this program; if not, write to the Free Software |
|
24 |
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,USA. |
|
25 |
* |
|
26 |
* For more information, contact: |
|
27 |
* |
|
28 |
* Generalitat Valenciana |
|
29 |
* Conselleria d'Infraestructures i Transport |
|
30 |
* Av. Blasco Ib??ez, 50 |
|
31 |
* 46010 VALENCIA |
|
32 |
* SPAIN |
|
33 |
* |
|
34 |
* +34 963862235 |
|
35 |
* gvsig@gva.es |
|
36 |
* www.gvsig.gva.es |
|
37 |
* |
|
38 |
* or |
|
39 |
* |
|
40 |
* IVER T.I. S.A |
|
41 |
* Salamanca 50 |
|
42 |
* 46005 Valencia |
|
43 |
* Spain |
|
44 |
* |
|
45 |
* +34 963163400 |
|
46 |
* dac@iver.es |
|
47 |
*/ |
|
48 |
/* CVS MESSAGES: |
|
49 |
* |
|
50 |
* $Id: SchemaLocationWarning.java 151 2007-06-14 16:15:05Z jorpiell $ |
|
51 |
* $Log$ |
|
52 |
* Revision 1.1 2007/06/14 16:15:03 jorpiell |
|
53 |
* builds to create the jars generated and add the schema code to the libGPEProject |
|
54 |
* |
|
55 |
* Revision 1.1 2007/06/14 13:50:07 jorpiell |
|
56 |
* The schema jar name has been changed |
|
57 |
* |
|
58 |
* |
|
59 |
*/ |
|
60 |
/** |
|
61 |
* @author Jorge Piera LLodr? (jorge.piera@iver.es) |
|
62 |
*/ |
|
63 |
public class SchemaLocationWarning extends BaseException{ |
|
64 |
private static final long serialVersionUID = -7232629060306401806L; |
|
65 |
private String schemaLocation = null; |
|
66 |
|
|
67 |
public SchemaLocationWarning(String schemaLocation, Throwable exception){ |
|
68 |
this.schemaLocation = schemaLocation; |
|
69 |
init(); |
|
70 |
initCause(exception); |
|
71 |
} |
|
72 |
|
|
73 |
private void init() { |
|
74 |
messageKey = "warning_gpe_schema_location"; |
|
75 |
formatString = "Schema Location %(schemaLocation) is not found"; |
|
76 |
code = serialVersionUID; |
|
77 |
} |
|
78 |
|
|
79 |
/* |
|
80 |
* (non-Javadoc) |
|
81 |
* @see org.gvsig.tools.exception.BaseException#values() |
|
82 |
*/ |
|
83 |
protected Map values() { |
|
84 |
Hashtable hash = new Hashtable(); |
|
85 |
hash.put("schemaLocation", schemaLocation); |
|
86 |
return hash; |
|
87 |
} |
|
88 |
|
|
89 |
} |
|
0 | 90 |
org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.40/org.gvsig.xmlschema.lib/org.gvsig.xmlschema.lib.api/src/main/java/org/gvsig/xmlschema/lib/api/XMLSchemaManager.java | ||
---|---|---|
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 |
|
|
23 |
/* |
|
24 |
* AUTHORS (In addition to CIT): |
|
25 |
* 2010 {Iver T.I.} {Task} |
|
26 |
*/ |
|
27 |
|
|
28 |
package org.gvsig.xmlschema.lib.api; |
|
29 |
|
|
30 |
import java.io.InputStream; |
|
31 |
|
|
32 |
import org.gvsig.xmlschema.lib.api.exceptions.SchemaCreationException; |
|
33 |
import org.gvsig.xmlschema.lib.api.som.IXSSchema; |
|
34 |
import org.gvsig.xmlschema.lib.api.som.IXSTypeDefinition; |
|
35 |
|
|
36 |
/** |
|
37 |
* @author <a href="mailto:jpiera@gvsig.org">Jorge Piera</a> |
|
38 |
*/ |
|
39 |
public interface XMLSchemaManager{ |
|
40 |
public final static int GEOMETRY = 0; |
|
41 |
public final static int POINT = 1; |
|
42 |
public final static int LINESTRING = 2; |
|
43 |
public final static int POLYGON = 3; |
|
44 |
public final static int SOLID = 4; |
|
45 |
public final static int MULTIGEOMETRY = 6; |
|
46 |
public final static int MULTIPOINT = 7; |
|
47 |
public final static int MULTILINESTRING = 8; |
|
48 |
public final static int MULTIPOLYGON = 9; |
|
49 |
public final static int MULTISOLID = 10; |
|
50 |
|
|
51 |
public IXSSchema createXSSchema(String providerName, String namespaceURI, String namespacePrefix) throws SchemaCreationException; |
|
52 |
|
|
53 |
public IXSSchema parse(String providerName, InputStream is) throws SchemaCreationException; |
|
54 |
|
|
55 |
public void registerFormat(String mimeType, String format); |
|
56 |
|
|
57 |
public String getFormat(String mimeType); |
|
58 |
|
|
59 |
public Object getApplicationDataTypeByFormat(String format, Object parserDataType); |
|
60 |
|
|
61 |
public Object getParserDataTypeByFormat(String format, Object applicationDataType); |
|
62 |
|
|
63 |
public Object getApplicationDataTypeByMimeType(String mimeType, Object parserDataType); |
|
64 |
|
|
65 |
public Object getParserDataTypeByMimeType(String mimeType, Object applicationDataType); |
|
66 |
|
|
67 |
public Object getApplicationGeometryTypeByFormat(String format, Object parserGeometryType); |
|
68 |
|
|
69 |
public Object getParserGeometryTypeByFormat(String format, Object applicationGeometry); |
|
70 |
|
|
71 |
public Object getApplicationGeometryTypeByMimeType(String mimeType, Object parserGeometryType); |
|
72 |
|
|
73 |
public Object getParserGeometryTypeByMimeType(String mimeType, Object applicationGeometry); |
|
74 |
|
|
75 |
public void addParserGeometryType(String format, Object parserGeometryType, int gpeGeometryType); |
|
76 |
|
|
77 |
public void addParserDataType(String format, Object parserDataType, int gpeDataType); |
|
78 |
|
|
79 |
public void addParserDataType(Object parserDataType, int gpeDataType); |
|
80 |
|
|
81 |
public void registerAppGeometryType(Object appGeometrytype, int gpeGeometryType); |
|
82 |
|
|
83 |
public void registerAppDataType(Object appDataType, int gpeDataType); |
|
84 |
|
|
85 |
public void registerAppGeometryType(int appGeometrytype, int gpeGeometryType); |
|
86 |
|
|
87 |
public void registerAppDataType(int appDataType, int gpeDataType); |
|
88 |
|
|
89 |
public IXSTypeDefinition getTypeDefinition(String typeName); |
|
90 |
|
|
91 |
public IXSTypeDefinition getTypeDefinition(String format, String typeName); |
|
92 |
} |
|
93 |
|
|
94 |
|
|
0 | 95 |
org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.40/org.gvsig.xmlschema.lib/org.gvsig.xmlschema.lib.api/src/main/java/org/gvsig/xmlschema/lib/api/som/IXSSimpleContent.java | ||
---|---|---|
1 |
package org.gvsig.xmlschema.lib.api.som; |
|
2 |
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana |
|
3 |
* |
|
4 |
* Copyright (C) 2004 IVER T.I. and Generalitat Valenciana. |
|
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., 59 Temple Place - Suite 330, Boston, MA 02111-1307,USA. |
|
19 |
* |
|
20 |
* For more information, contact: |
|
21 |
* |
|
22 |
* Generalitat Valenciana |
|
23 |
* Conselleria d'Infraestructures i Transport |
|
24 |
* Av. Blasco Ib??ez, 50 |
|
25 |
* 46010 VALENCIA |
|
26 |
* SPAIN |
|
27 |
* |
|
28 |
* +34 963862235 |
|
29 |
* gvsig@gva.es |
|
30 |
* www.gvsig.gva.es |
|
31 |
* |
|
32 |
* or |
|
33 |
* |
|
34 |
* IVER T.I. S.A |
|
35 |
* Salamanca 50 |
|
36 |
* 46005 Valencia |
|
37 |
* Spain |
|
38 |
* |
|
39 |
* +34 963163400 |
|
40 |
* dac@iver.es |
|
41 |
*/ |
|
42 |
/* CVS MESSAGES: |
|
43 |
* |
|
44 |
* $Id: IXSSimpleContent.java 151 2007-06-14 16:15:05Z jorpiell $ |
|
45 |
* $Log$ |
|
46 |
* Revision 1.1 2007/06/14 16:15:03 jorpiell |
|
47 |
* builds to create the jars generated and add the schema code to the libGPEProject |
|
48 |
* |
|
49 |
* Revision 1.1 2007/06/14 13:50:07 jorpiell |
|
50 |
* The schema jar name has been changed |
|
51 |
* |
|
52 |
* Revision 1.1 2007/06/07 14:54:13 jorpiell |
|
53 |
* Add the schema support |
|
54 |
* |
|
55 |
* |
|
56 |
*/ |
|
57 |
/** |
|
58 |
* @author Jorge Piera LLodr? (jorge.piera@iver.es) |
|
59 |
*/ |
|
60 |
public interface IXSSimpleContent extends IXSContentType { |
|
61 |
|
|
62 |
} |
|
0 | 63 |
org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.40/org.gvsig.xmlschema.lib/org.gvsig.xmlschema.lib.api/src/main/java/org/gvsig/xmlschema/lib/api/som/IXSNode.java | ||
---|---|---|
1 |
package org.gvsig.xmlschema.lib.api.som; |
|
2 |
|
|
3 |
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana |
|
4 |
* |
|
5 |
* Copyright (C) 2004 IVER T.I. and Generalitat Valenciana. |
|
6 |
* |
|
7 |
* This program 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 2 |
|
10 |
* of the License, or (at your option) any later version. |
|
11 |
* |
|
12 |
* This program is distributed in the hope that it will be useful, |
|
13 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
14 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
15 |
* GNU General Public License for more details. |
|
16 |
* |
|
17 |
* You should have received a copy of the GNU General Public License |
|
18 |
* along with this program; if not, write to the Free Software |
|
19 |
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,USA. |
|
20 |
* |
|
21 |
* For more information, contact: |
|
22 |
* |
|
23 |
* Generalitat Valenciana |
|
24 |
* Conselleria d'Infraestructures i Transport |
|
25 |
* Av. Blasco Ib??ez, 50 |
|
26 |
* 46010 VALENCIA |
|
27 |
* SPAIN |
|
28 |
* |
|
29 |
* +34 963862235 |
|
30 |
* gvsig@gva.es |
|
31 |
* www.gvsig.gva.es |
|
32 |
* |
|
33 |
* or |
|
34 |
* |
|
35 |
* IVER T.I. S.A |
|
36 |
* Salamanca 50 |
|
37 |
* 46005 Valencia |
|
38 |
* Spain |
|
39 |
* |
|
40 |
* +34 963163400 |
|
41 |
* dac@iver.es |
|
42 |
*/ |
|
43 |
/* CVS MESSAGES: |
|
44 |
* |
|
45 |
* $Id: IXSNode.java 151 2007-06-14 16:15:05Z jorpiell $ |
|
46 |
* $Log$ |
|
47 |
* Revision 1.1 2007/06/14 16:15:03 jorpiell |
|
48 |
* builds to create the jars generated and add the schema code to the libGPEProject |
|
49 |
* |
|
50 |
* Revision 1.1 2007/06/14 13:50:07 jorpiell |
|
51 |
* The schema jar name has been changed |
|
52 |
* |
|
53 |
* Revision 1.2 2007/05/30 12:25:48 jorpiell |
|
54 |
* Add the element collection |
|
55 |
* |
|
56 |
* Revision 1.1 2007/05/25 11:55:00 jorpiell |
|
57 |
* First update |
|
58 |
* |
|
59 |
* |
|
60 |
*/ |
|
61 |
/** |
|
62 |
* This interface must to be implemented by all the |
|
63 |
* schema elements. It has methods to manage the |
|
64 |
* DOM tree. |
|
65 |
* @author Jorge Piera LLodr? (jorge.piera@iver.es) |
|
66 |
*/ |
|
67 |
public interface IXSNode { |
|
68 |
|
|
69 |
public IXSElement getElement(); |
|
70 |
|
|
71 |
public void setElement(IXSElement element); |
|
72 |
|
|
73 |
public short getNodeType(); |
|
74 |
|
|
75 |
public String getNodeName(); |
|
76 |
|
|
77 |
public String getNodeValue(); |
|
78 |
} |
|
0 | 79 |
org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.40/org.gvsig.xmlschema.lib/org.gvsig.xmlschema.lib.api/src/main/java/org/gvsig/xmlschema/lib/api/som/XSQName.java | ||
---|---|---|
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.lib.api.som; |
|
23 |
|
|
24 |
import org.gvsig.xmlpull.lib.api.stream.IQName; |
|
25 |
|
|
26 |
|
|
27 |
/** |
|
28 |
* @author gvSIG Team |
|
29 |
* @version $Id$ |
|
30 |
* |
|
31 |
*/ |
|
32 |
public class XSQName implements IQName{ |
|
33 |
private String attributeNamespace; |
|
34 |
private String attributeName; |
|
35 |
|
|
36 |
public XSQName(String attributeNamespace, String attributeName) { |
|
37 |
this.attributeNamespace = attributeNamespace; |
|
38 |
this.attributeName = attributeName; |
|
39 |
} |
|
40 |
|
|
41 |
public XSQName(String attributeName) { |
|
42 |
this.attributeName = attributeName; |
|
43 |
} |
|
44 |
|
|
45 |
public String getLocalPart() { |
|
46 |
return attributeName; |
|
47 |
} |
|
48 |
|
|
49 |
public String getNamespaceURI() { |
|
50 |
return attributeNamespace; |
|
51 |
} |
|
52 |
|
|
53 |
} |
|
0 | 54 |
org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.40/org.gvsig.xmlschema.lib/org.gvsig.xmlschema.lib.api/src/main/java/org/gvsig/xmlschema/lib/api/som/IXSNamedNodeMap.java | ||
---|---|---|
1 |
package org.gvsig.xmlschema.lib.api.som; |
|
2 |
|
|
3 |
/* gvSIG. Geographic Information System of the Valencian Government |
|
4 |
* |
|
5 |
* Copyright (C) 2007-2008 Infrastructures and Transports Department |
|
6 |
* of the Valencian Government (CIT) |
|
7 |
* |
|
8 |
* This program is free software; you can redistribute it and/or |
|
9 |
* modify it under the terms of the GNU General Public License |
|
10 |
* as published by the Free Software Foundation; either version 2 |
|
11 |
* of the License, or (at your option) any later version. |
|
12 |
* |
|
13 |
* This program is distributed in the hope that it will be useful, |
|
14 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
15 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
16 |
* GNU General Public License for more details. |
|
17 |
* |
|
18 |
* You should have received a copy of the GNU General Public License |
|
19 |
* along with this program; if not, write to the Free Software |
|
20 |
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, |
|
21 |
* MA 02110-1301, USA. |
|
22 |
* |
|
23 |
*/ |
|
24 |
|
|
25 |
/* |
|
26 |
* AUTHORS (In addition to CIT): |
|
27 |
* 2010 {Prodevelop T.I.} {Task} |
|
28 |
*/ |
|
29 |
|
|
30 |
public interface IXSNamedNodeMap { |
|
31 |
|
|
32 |
public int getLength(); |
|
33 |
|
|
34 |
public IXSNode item(int i); |
|
35 |
|
|
36 |
} |
|
0 | 37 |
org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.40/org.gvsig.xmlschema.lib/org.gvsig.xmlschema.lib.api/src/main/java/org/gvsig/xmlschema/lib/api/som/IXSElement.java | ||
---|---|---|
1 |
package org.gvsig.xmlschema.lib.api.som; |
|
2 |
|
|
3 |
/* gvSIG. Geographic Information System of the Valencian Government |
|
4 |
* |
|
5 |
* Copyright (C) 2007-2008 Infrastructures and Transports Department |
|
6 |
* of the Valencian Government (CIT) |
|
7 |
* |
|
8 |
* This program is free software; you can redistribute it and/or |
|
9 |
* modify it under the terms of the GNU General Public License |
|
10 |
* as published by the Free Software Foundation; either version 2 |
|
11 |
* of the License, or (at your option) any later version. |
|
12 |
* |
|
13 |
* This program is distributed in the hope that it will be useful, |
|
14 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
15 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
16 |
* GNU General Public License for more details. |
|
17 |
* |
|
18 |
* You should have received a copy of the GNU General Public License |
|
19 |
* along with this program; if not, write to the Free Software |
|
20 |
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, |
|
21 |
* MA 02110-1301, USA. |
|
22 |
* |
|
23 |
*/ |
|
24 |
|
|
25 |
/* |
|
26 |
* AUTHORS (In addition to CIT): |
|
27 |
* 2010 {Prodevelop T.I.} {Task} |
|
28 |
*/ |
|
29 |
|
|
30 |
public interface IXSElement { |
|
31 |
|
|
32 |
public void appendChild(IXSElement element); |
|
33 |
|
|
34 |
public String getAttribute(String targetNamespace); |
|
35 |
|
|
36 |
public IXSNodeList getChildNodes(); |
|
37 |
|
|
38 |
public void removeChild(IXSNode item); |
|
39 |
|
|
40 |
public void removeAttribute(String type); |
|
41 |
|
|
42 |
public void setAttribute(String name, String name2); |
|
43 |
|
|
44 |
public IXSNamedNodeMap getAttributes(); |
|
45 |
|
|
46 |
} |
|
0 | 47 |
org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.40/org.gvsig.xmlschema.lib/org.gvsig.xmlschema.lib.api/src/main/java/org/gvsig/xmlschema/lib/api/som/IXSTypeDefinition.java | ||
---|---|---|
1 |
package org.gvsig.xmlschema.lib.api.som; |
|
2 |
|
|
3 |
import org.gvsig.tools.dataTypes.DataType; |
|
4 |
|
|
5 |
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana |
|
6 |
* |
|
7 |
* Copyright (C) 2004 IVER T.I. and Generalitat Valenciana. |
|
8 |
* |
|
9 |
* This program is free software; you can redistribute it and/or |
|
10 |
* modify it under the terms of the GNU General Public License |
|
11 |
* as published by the Free Software Foundation; either version 2 |
|
12 |
* of the License, or (at your option) any later version. |
|
13 |
* |
|
14 |
* This program is distributed in the hope that it will be useful, |
|
15 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
16 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
17 |
* GNU General Public License for more details. |
|
18 |
* |
|
19 |
* You should have received a copy of the GNU General Public License |
|
20 |
* along with this program; if not, write to the Free Software |
|
21 |
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,USA. |
|
22 |
* |
|
23 |
* For more information, contact: |
|
24 |
* |
|
25 |
* Generalitat Valenciana |
|
26 |
* Conselleria d'Infraestructures i Transport |
|
27 |
* Av. Blasco Ib??ez, 50 |
|
28 |
* 46010 VALENCIA |
|
29 |
* SPAIN |
|
30 |
* |
|
31 |
* +34 963862235 |
|
32 |
* gvsig@gva.es |
|
33 |
* www.gvsig.gva.es |
|
34 |
* |
|
35 |
* or |
|
36 |
* |
|
37 |
* IVER T.I. S.A |
|
38 |
* Salamanca 50 |
|
39 |
* 46005 Valencia |
|
40 |
* Spain |
|
41 |
* |
|
42 |
* +34 963163400 |
|
43 |
* dac@iver.es |
|
44 |
*/ |
|
45 |
/* CVS MESSAGES: |
|
46 |
* |
|
47 |
* $Id: IXSTypeDefinition.java 151 2007-06-14 16:15:05Z jorpiell $ |
|
48 |
* $Log$ |
|
49 |
* Revision 1.1 2007/06/14 16:15:03 jorpiell |
|
50 |
* builds to create the jars generated and add the schema code to the libGPEProject |
|
51 |
* |
|
52 |
* Revision 1.1 2007/06/14 13:50:07 jorpiell |
|
53 |
* The schema jar name has been changed |
|
54 |
* |
|
55 |
* Revision 1.3 2007/06/07 14:54:13 jorpiell |
|
56 |
* Add the schema support |
|
57 |
* |
|
58 |
* Revision 1.2 2007/05/30 12:25:48 jorpiell |
|
59 |
* Add the element collection |
|
60 |
* |
|
61 |
* Revision 1.1 2007/05/25 11:55:00 jorpiell |
|
62 |
* First update |
|
63 |
* |
|
64 |
* |
|
65 |
*/ |
|
66 |
/** |
|
67 |
* This interface represents a XML schema type. It contains |
|
68 |
* common methods to the simple and complex types. |
|
69 |
* @see http://www.w3.org/TR/xmlschema-2 |
|
70 |
* @author Jorge Piera LLodr? (jorge.piera@iver.es) |
|
71 |
*/ |
|
72 |
public interface IXSTypeDefinition extends IXSComponent{ |
|
73 |
|
|
74 |
public String getTypeName(); |
|
75 |
|
|
76 |
public DataType getDataType(); |
|
77 |
|
|
78 |
public boolean isGeometry(); |
|
79 |
|
|
80 |
public boolean isComplex(); |
|
81 |
|
|
82 |
} |
|
0 | 83 |
org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.40/org.gvsig.xmlschema.lib/org.gvsig.xmlschema.lib.api/src/main/java/org/gvsig/xmlschema/lib/api/som/IXSChoice.java | ||
---|---|---|
1 |
package org.gvsig.xmlschema.lib.api.som; |
|
2 |
|
|
3 |
|
|
4 |
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana |
|
5 |
* |
|
6 |
* Copyright (C) 2004 IVER T.I. and Generalitat Valenciana. |
|
7 |
* |
|
8 |
* This program is free software; you can redistribute it and/or |
|
9 |
* modify it under the terms of the GNU General Public License |
|
10 |
* as published by the Free Software Foundation; either version 2 |
|
11 |
* of the License, or (at your option) any later version. |
|
12 |
* |
|
13 |
* This program is distributed in the hope that it will be useful, |
|
14 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
15 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
16 |
* GNU General Public License for more details. |
|
17 |
* |
|
18 |
* You should have received a copy of the GNU General Public License |
|
19 |
* along with this program; if not, write to the Free Software |
|
20 |
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,USA. |
|
21 |
* |
|
22 |
* For more information, contact: |
|
23 |
* |
|
24 |
* Generalitat Valenciana |
|
25 |
* Conselleria d'Infraestructures i Transport |
|
26 |
* Av. Blasco Ib??ez, 50 |
|
27 |
* 46010 VALENCIA |
|
28 |
* SPAIN |
|
29 |
* |
|
30 |
* +34 963862235 |
|
31 |
* gvsig@gva.es |
|
32 |
* www.gvsig.gva.es |
|
33 |
* |
|
34 |
* or |
|
35 |
* |
|
36 |
* IVER T.I. S.A |
|
37 |
* Salamanca 50 |
|
38 |
* 46005 Valencia |
|
39 |
* Spain |
|
40 |
* |
|
41 |
* +34 963163400 |
|
42 |
* dac@iver.es |
|
43 |
*/ |
|
44 |
/* CVS MESSAGES: |
|
45 |
* |
|
46 |
* $Id: IXSChoice.java 151 2007-06-14 16:15:05Z jorpiell $ |
|
47 |
* $Log$ |
|
48 |
* Revision 1.1 2007/06/14 16:15:03 jorpiell |
|
49 |
* builds to create the jars generated and add the schema code to the libGPEProject |
|
50 |
* |
|
51 |
* Revision 1.1 2007/06/14 13:50:07 jorpiell |
|
52 |
* The schema jar name has been changed |
|
53 |
* |
|
54 |
* Revision 1.4 2007/06/07 14:54:13 jorpiell |
|
55 |
* Add the schema support |
|
56 |
* |
|
57 |
* Revision 1.3 2007/05/30 12:53:33 jorpiell |
|
58 |
* Not used libraries deleted |
|
59 |
* |
|
60 |
* Revision 1.2 2007/05/30 12:25:48 jorpiell |
|
61 |
* Add the element collection |
|
62 |
* |
|
63 |
* Revision 1.1 2007/05/25 11:55:00 jorpiell |
|
64 |
* First update |
|
65 |
* |
|
66 |
* |
|
67 |
*/ |
|
68 |
/** |
|
69 |
* This interface represents a XML schema choice element. |
|
70 |
* Example: |
|
71 |
* <p> |
|
72 |
* <pre> |
|
73 |
* <code> |
|
74 |
* <choice |
|
75 |
* id = ID |
|
76 |
* maxOccurs = (nonNegativeInteger | unbounded) : 1 |
|
77 |
* minOccurs = nonNegativeInteger : 1 |
|
78 |
* {any attributes with non-schema namespace . . .}> |
|
79 |
* Content: (annotation?, (element | group | choice | sequence | any)*) |
|
80 |
* </choice> |
|
81 |
* </code> |
|
82 |
* </pre> |
|
83 |
* </p> |
|
84 |
* @see http://www.w3.org/TR/xmlschema-1/#element-choice |
|
85 |
* @author Jorge Piera LLodr? (jorge.piera@iver.es) |
|
86 |
*/ |
|
87 |
public interface IXSChoice extends IXSGroup { |
|
88 |
|
|
89 |
|
|
90 |
} |
|
0 | 91 |
org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.40/org.gvsig.xmlschema.lib/org.gvsig.xmlschema.lib.api/src/main/java/org/gvsig/xmlschema/lib/api/som/IXSGroup.java | ||
---|---|---|
1 |
package org.gvsig.xmlschema.lib.api.som; |
|
2 |
|
|
3 |
import java.util.Collection; |
|
4 |
|
|
5 |
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana |
|
6 |
* |
|
7 |
* Copyright (C) 2004 IVER T.I. and Generalitat Valenciana. |
|
8 |
* |
|
9 |
* This program is free software; you can redistribute it and/or |
|
10 |
* modify it under the terms of the GNU General Public License |
|
11 |
* as published by the Free Software Foundation; either version 2 |
|
12 |
* of the License, or (at your option) any later version. |
|
13 |
* |
|
14 |
* This program is distributed in the hope that it will be useful, |
|
15 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
16 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
17 |
* GNU General Public License for more details. |
|
18 |
* |
|
19 |
* You should have received a copy of the GNU General Public License |
|
20 |
* along with this program; if not, write to the Free Software |
|
21 |
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,USA. |
|
22 |
* |
|
23 |
* For more information, contact: |
|
24 |
* |
|
25 |
* Generalitat Valenciana |
|
26 |
* Conselleria d'Infraestructures i Transport |
|
27 |
* Av. Blasco Ib??ez, 50 |
|
28 |
* 46010 VALENCIA |
|
29 |
* SPAIN |
|
30 |
* |
|
31 |
* +34 963862235 |
|
32 |
* gvsig@gva.es |
|
33 |
* www.gvsig.gva.es |
|
34 |
* |
|
35 |
* or |
|
36 |
* |
|
37 |
* IVER T.I. S.A |
|
38 |
* Salamanca 50 |
|
39 |
* 46005 Valencia |
|
40 |
* Spain |
|
41 |
* |
|
42 |
* +34 963163400 |
|
43 |
* dac@iver.es |
|
44 |
*/ |
|
45 |
/* CVS MESSAGES: |
|
46 |
* |
|
47 |
* $Id: IXSGroup.java 151 2007-06-14 16:15:05Z jorpiell $ |
|
48 |
* $Log$ |
|
49 |
* Revision 1.1 2007/06/14 16:15:03 jorpiell |
|
50 |
* builds to create the jars generated and add the schema code to the libGPEProject |
|
51 |
* |
|
52 |
* Revision 1.1 2007/06/14 13:50:07 jorpiell |
|
53 |
* The schema jar name has been changed |
|
54 |
* |
|
55 |
* Revision 1.2 2007/06/07 14:54:13 jorpiell |
|
56 |
* Add the schema support |
|
57 |
* |
|
58 |
* Revision 1.1 2007/05/30 12:25:48 jorpiell |
|
59 |
* Add the element collection |
|
60 |
* |
|
61 |
* |
|
62 |
*/ |
|
63 |
/** |
|
64 |
* This interface represents a XML schema group element. |
|
65 |
* Example: |
|
66 |
* <p> |
|
67 |
* <pre> |
|
68 |
* <code> |
|
69 |
* <group |
|
70 |
* id = ID |
|
71 |
* maxOccurs = (nonNegativeInteger | unbounded) : 1 |
|
72 |
* minOccurs = nonNegativeInteger : 1 |
|
73 |
* name = NCName |
|
74 |
* ref = QName |
|
75 |
* {any attributes with non-schema namespace . . .}> |
|
76 |
* Content: (annotation?, (all | choice | sequence)?) |
|
77 |
* </group>> |
|
78 |
* </code> |
|
79 |
* </pre> |
|
80 |
* </p> |
|
81 |
* @see http://www.w3.org/TR/xmlschema-1/#element-group |
|
82 |
* @author Jorge Piera LLodr? (jorge.piera@iver.es) |
|
83 |
*/ |
|
84 |
public interface IXSGroup extends IXSComponent{ |
|
85 |
|
|
86 |
public void addChildElement(IXSElement element); |
|
87 |
|
|
88 |
public Collection getItems(); |
|
89 |
} |
|
0 | 90 |
org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.40/org.gvsig.xmlschema.lib/org.gvsig.xmlschema.lib.api/src/main/java/org/gvsig/xmlschema/lib/api/som/IXSSchemaDocument.java | ||
---|---|---|
1 |
package org.gvsig.xmlschema.lib.api.som; |
|
2 |
|
|
3 |
import java.net.URI; |
|
4 |
import java.util.Enumeration; |
|
5 |
|
|
6 |
import org.gvsig.xmlschema.lib.api.exceptions.SchemaCreationException; |
|
7 |
|
|
8 |
|
|
9 |
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana |
|
10 |
* |
|
11 |
* Copyright (C) 2004 IVER T.I. and Generalitat Valenciana. |
|
12 |
* |
|
13 |
* This program is free software; you can redistribute it and/or |
|
14 |
* modify it under the terms of the GNU General Public License |
|
15 |
* as published by the Free Software Foundation; either version 2 |
|
16 |
* of the License, or (at your option) any later version. |
|
17 |
* |
|
18 |
* This program is distributed in the hope that it will be useful, |
|
19 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
20 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
21 |
* GNU General Public License for more details. |
|
22 |
* |
|
23 |
* You should have received a copy of the GNU General Public License |
|
24 |
* along with this program; if not, write to the Free Software |
|
25 |
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,USA. |
|
26 |
* |
|
27 |
* For more information, contact: |
|
28 |
* |
|
29 |
* Generalitat Valenciana |
|
30 |
* Conselleria d'Infraestructures i Transport |
|
31 |
* Av. Blasco Ib??ez, 50 |
|
32 |
* 46010 VALENCIA |
|
33 |
* SPAIN |
|
34 |
* |
|
35 |
* +34 963862235 |
|
36 |
* gvsig@gva.es |
|
37 |
* www.gvsig.gva.es |
|
38 |
* |
|
39 |
* or |
|
40 |
* |
|
41 |
* IVER T.I. S.A |
|
42 |
* Salamanca 50 |
|
43 |
* 46005 Valencia |
|
44 |
* Spain |
|
45 |
* |
|
46 |
* +34 963163400 |
|
47 |
* dac@iver.es |
|
48 |
*/ |
|
49 |
/* CVS MESSAGES: |
|
50 |
* |
|
51 |
* $Id: IXSSchemaDocument.java 175 2007-11-20 16:14:37Z jpiera $ |
|
52 |
* $Log$ |
|
53 |
* Revision 1.2 2007/06/22 12:20:48 jorpiell |
|
54 |
* The typeNotFoundException has been deleted. It never was thrown |
|
55 |
* |
|
56 |
* Revision 1.1 2007/06/14 16:15:03 jorpiell |
|
57 |
* builds to create the jars generated and add the schema code to the libGPEProject |
|
58 |
* |
|
59 |
* Revision 1.1 2007/06/14 13:50:07 jorpiell |
|
60 |
* The schema jar name has been changed |
|
61 |
* |
|
62 |
* Revision 1.2 2007/06/08 13:00:40 jorpiell |
|
63 |
* Add the targetNamespace to the file |
|
64 |
* |
|
65 |
* Revision 1.1 2007/06/07 14:54:13 jorpiell |
|
66 |
* Add the schema support |
|
67 |
* |
|
68 |
* |
|
69 |
*/ |
|
70 |
/** |
|
71 |
* This interface represents a XML file. It could has some |
|
72 |
* associated schemas. |
|
73 |
* @author Jorge Piera LLodr? (jorge.piera@iver.es) |
|
74 |
*/ |
|
75 |
public interface IXSSchemaDocument { |
|
76 |
|
|
77 |
/** |
|
78 |
* @return <true> if the document has a schema |
|
79 |
*/ |
|
80 |
public boolean hasSchemas(); |
|
81 |
|
|
82 |
/** |
|
83 |
* @return <true> if the document has namespace prefixes |
|
84 |
*/ |
|
85 |
public boolean hasPrefixes(); |
|
86 |
|
|
87 |
/** |
|
88 |
* Adds a new Schema from a URI. It downloads the file |
|
89 |
* and creates the schema |
|
90 |
* @param uri |
|
91 |
* URI tha contains the schema |
|
92 |
* @param schema |
|
93 |
* Schema to add |
|
94 |
*/ |
|
95 |
public void addSchema(URI uri) throws SchemaCreationException; |
|
96 |
|
|
97 |
/** |
|
98 |
* Adds a new Schema from a URI |
|
99 |
* @param uri |
|
100 |
* URI tha contains the schema |
|
101 |
* @param schema |
|
102 |
* Schema to add |
|
103 |
*/ |
|
104 |
public void addSchema(URI uri, IXSSchema schema); |
|
105 |
|
|
106 |
/** |
|
107 |
* Add a schema location. |
|
108 |
* @param uri |
|
109 |
* @param schemaLocation |
|
110 |
*/ |
|
111 |
public void addSchemaLocation(URI uri, String schemaLocation); |
|
112 |
|
|
113 |
/** |
|
114 |
* Gets the schema location |
|
115 |
* @param uri |
|
116 |
* Schema URI |
|
117 |
* @return |
|
118 |
* The schema location |
|
119 |
*/ |
|
120 |
public String getSchemaLocation(URI uri); |
|
121 |
|
|
122 |
/** |
|
123 |
* Return <true> if the schema URI has a schema location |
|
124 |
* @param uri |
|
125 |
* @return |
|
126 |
*/ |
|
127 |
public boolean hasSchemaLocation(URI uri); |
|
128 |
|
|
129 |
/** |
|
130 |
* Return if the map has a schema |
|
131 |
* @param uri |
|
132 |
* URI tha contains the schema |
|
133 |
* @return |
|
134 |
* <true> if exists or <false> |
|
135 |
*/ |
|
136 |
public boolean hasSchema(URI uri); |
|
137 |
|
|
138 |
/** |
|
139 |
* @return |
|
140 |
* A lsit of the schemas URI's |
|
141 |
*/ |
|
142 |
public Enumeration getURIs(); |
|
143 |
|
|
144 |
/** |
|
145 |
* @return |
|
146 |
* A list of schemas |
|
147 |
*/ |
|
148 |
public Enumeration getSchemas(); |
|
149 |
|
|
150 |
/** |
|
151 |
* @return |
|
152 |
* A list of namespace prefixes |
|
153 |
*/ |
|
154 |
public Enumeration getPrefixes(); |
|
155 |
|
|
156 |
/** |
|
157 |
* Get a schema from a URI |
|
158 |
* @param uri |
|
159 |
* URI where the schema is |
|
160 |
* @return |
|
161 |
* A Schema |
|
162 |
*/ |
|
163 |
public IXSSchema getSchema(URI uri); |
|
164 |
|
|
165 |
/** |
|
166 |
* Remove a schema from a URI |
|
167 |
* @param uri |
|
168 |
* Schema URI |
|
169 |
*/ |
|
170 |
public void remove(URI uri); |
|
171 |
|
|
172 |
/** |
|
173 |
* Adds a prefix from a namespace that is used into the |
|
174 |
* XML file |
|
175 |
* @param prefix |
|
176 |
* Napescape prefix |
|
177 |
* @param namespaceURI |
|
178 |
* Napespace URI |
|
179 |
*/ |
|
180 |
public void addNamespacePrefix(String prefix, String namespaceURI); |
|
181 |
|
|
182 |
/** |
|
183 |
* Return the namespace URI from a prefix |
|
184 |
* @param prefix |
|
185 |
* Namespace prefix |
|
186 |
* @return |
|
187 |
* A namespace URI |
|
188 |
*/ |
|
189 |
public String getNamespaceURI(String prefix); |
|
190 |
|
|
191 |
/** |
|
192 |
* It retusn the namespace prefix |
|
193 |
* @param namespaceURI |
|
194 |
* Namespace URI |
|
195 |
* @return |
|
196 |
* The namespace prefix |
|
197 |
*/ |
|
198 |
public String getNamespacePrefix(String namespaceURI); |
|
199 |
|
|
200 |
/** |
|
201 |
* Get a element from a qualified name |
|
202 |
* @param namespacePrefix |
|
203 |
* Namespace prefix |
|
204 |
* @param elementName |
|
205 |
* Local name |
|
206 |
* @return |
|
207 |
* A SXD element |
|
208 |
* @throws TypeNotFoundException |
|
209 |
*/ |
|
210 |
public IXSElementDeclaration getElementDeclarationByName(String namespacePrefix, String elementName) ; |
|
211 |
|
|
212 |
/** |
|
213 |
* Get a element from a qualified name |
|
214 |
* @param elementName |
|
215 |
* Namespace prefix and local name |
|
216 |
* @return |
|
217 |
* A SXD element |
|
218 |
* @throws TypeNotFoundException |
|
219 |
*/ |
|
220 |
public IXSElementDeclaration getElementDeclarationByName(String elementName); |
|
221 |
|
|
222 |
/** |
|
223 |
* Search a XML schema type definition by name |
|
224 |
* @param targetNamespace |
|
225 |
* Namespace to seach the element |
|
226 |
* @param typeName |
|
227 |
* XML schema type name |
|
228 |
* @return |
|
229 |
* A XML schema type definition |
|
230 |
* @throws TypeNotFoundException |
|
231 |
*/ |
|
232 |
public IXSTypeDefinition getTypeByName(String targetNamespace, String typeName); |
|
233 |
|
|
234 |
/** |
|
235 |
* Search a XML schema type definition by name |
|
236 |
* @param typeName |
|
237 |
* XML schema type name |
|
238 |
* @return |
|
239 |
* A XML schema type definition |
|
240 |
* @throws TypeNotFoundException |
|
241 |
*/ |
|
242 |
public IXSTypeDefinition getTypeByName(String typeName); |
|
243 |
|
|
244 |
/** |
|
245 |
* @return <true> if the element names are qualified |
|
246 |
*/ |
|
247 |
public boolean isElementFormDefault(); |
|
248 |
|
|
249 |
/** |
|
250 |
* Set if the element names are qualified |
|
251 |
* @param isElementQualified |
|
252 |
* <true> if the element names are qualified |
|
253 |
*/ |
|
254 |
public void setElementFormDefault(boolean isQualified); |
|
255 |
|
|
256 |
/** |
|
257 |
* @return the targetNamespace for the file. It will be used |
|
258 |
* for the unqualified names |
|
259 |
*/ |
|
260 |
public String getTargetNamespace(); |
|
261 |
|
|
262 |
/** |
|
263 |
* Set the targetNamespace |
|
264 |
* @param targetNamespace |
|
265 |
* TargetNamespace to set |
|
266 |
*/ |
|
267 |
public void setTargetNamespace(String targetNamespace); |
|
268 |
} |
|
0 | 269 |
org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.40/org.gvsig.xmlschema.lib/org.gvsig.xmlschema.lib.api/src/main/java/org/gvsig/xmlschema/lib/api/som/IXSElementDeclaration.java | ||
---|---|---|
1 |
package org.gvsig.xmlschema.lib.api.som; |
|
2 |
|
|
3 |
|
|
4 |
|
|
5 |
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana |
|
6 |
* |
|
7 |
* Copyright (C) 2004 IVER T.I. and Generalitat Valenciana. |
|
8 |
* |
|
9 |
* This program is free software; you can redistribute it and/or |
|
10 |
* modify it under the terms of the GNU General Public License |
|
11 |
* as published by the Free Software Foundation; either version 2 |
|
12 |
* of the License, or (at your option) any later version. |
|
13 |
* |
|
14 |
* This program is distributed in the hope that it will be useful, |
|
15 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
16 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
17 |
* GNU General Public License for more details. |
|
18 |
* |
|
19 |
* You should have received a copy of the GNU General Public License |
|
20 |
* along with this program; if not, write to the Free Software |
|
21 |
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,USA. |
|
22 |
* |
|
23 |
* For more information, contact: |
|
24 |
* |
|
25 |
* Generalitat Valenciana |
|
26 |
* Conselleria d'Infraestructures i Transport |
|
27 |
* Av. Blasco Ib??ez, 50 |
|
28 |
* 46010 VALENCIA |
|
29 |
* SPAIN |
|
30 |
* |
|
31 |
* +34 963862235 |
|
32 |
* gvsig@gva.es |
|
33 |
* www.gvsig.gva.es |
|
34 |
* |
|
35 |
* or |
|
36 |
* |
|
37 |
* IVER T.I. S.A |
|
38 |
* Salamanca 50 |
|
39 |
* 46005 Valencia |
|
40 |
* Spain |
|
41 |
* |
|
42 |
* +34 963163400 |
|
43 |
* dac@iver.es |
|
44 |
*/ |
|
45 |
/* CVS MESSAGES: |
|
46 |
* |
|
47 |
* $Id: IXSElementDeclaration.java 162 2007-06-29 12:19:48Z jorpiell $ |
|
48 |
* $Log$ |
|
49 |
* Revision 1.3 2007/06/29 12:19:14 jorpiell |
|
50 |
* The schema validation is made independently of the concrete writer |
|
51 |
* |
|
52 |
* Revision 1.2 2007/06/22 12:20:48 jorpiell |
|
53 |
* The typeNotFoundException has been deleted. It never was thrown |
|
54 |
* |
|
55 |
* Revision 1.1 2007/06/14 16:15:03 jorpiell |
|
56 |
* builds to create the jars generated and add the schema code to the libGPEProject |
|
57 |
* |
|
58 |
* Revision 1.1 2007/06/14 13:50:07 jorpiell |
|
59 |
* The schema jar name has been changed |
|
60 |
* |
|
61 |
* Revision 1.4 2007/06/08 11:35:16 jorpiell |
|
62 |
* IXSSchema interface updated |
|
63 |
* |
|
64 |
* Revision 1.3 2007/06/07 14:54:13 jorpiell |
|
65 |
* Add the schema support |
|
66 |
* |
|
67 |
* Revision 1.2 2007/05/30 12:25:48 jorpiell |
|
68 |
* Add the element collection |
|
69 |
* |
|
70 |
* Revision 1.1 2007/05/25 11:55:00 jorpiell |
|
71 |
* First update |
|
72 |
* |
|
73 |
* |
|
74 |
*/ |
|
75 |
/** |
|
76 |
* This interface represents a XML schema element declaration. |
|
77 |
* Example: |
|
78 |
* <p> |
|
79 |
* <pre> |
|
80 |
* <code> |
|
81 |
* <xs:element name="PurchaseOrder" type="PurchaseOrderType"/> |
|
82 |
* </code> |
|
83 |
* </pre> |
|
84 |
* </p> |
|
85 |
* @see http://www.w3.org/TR/xmlschema-1/#cElement_Declarations |
|
86 |
* @author Jorge Piera LLodr? (jorge.piera@iver.es) |
|
87 |
*/ |
|
88 |
public interface IXSElementDeclaration extends IXSComponent{ |
|
89 |
public static final int MAX_OCCURS_UNBOUNDED = -1; |
|
90 |
public static final int MIN_OCCURS_UNBOUNDED = -1; |
|
91 |
|
|
92 |
public IXSTypeDefinition getTypeDefinition(); |
|
93 |
|
|
94 |
public String getTypeName(); |
|
95 |
|
|
96 |
public boolean isNillable(); |
|
97 |
|
|
98 |
public int getMinOccurs(); |
|
99 |
|
|
100 |
public int getMaxOccurs(); |
|
101 |
|
|
102 |
public IXSElementDeclaration getSubElementByName(String name); |
|
103 |
|
|
104 |
public IXSElementDeclaration getParentElement(); |
|
105 |
|
|
106 |
/** |
|
107 |
* Add a new XML schema Complex type |
|
108 |
* @param type |
|
109 |
* See the IXSComplexType interface for possible values |
|
110 |
* @param contentType |
|
111 |
* A complex content or a simple content |
|
112 |
* See the IXSContentType for possible values |
|
113 |
* @param contentTypeRestriction |
|
114 |
* A extension or a restriction |
|
115 |
* @return |
|
116 |
* A xML schema complex type |
|
117 |
*/ |
|
118 |
public IXSComplexTypeDefinition addComplexType(String type, String contentType, String contentTypeRestriction); |
|
119 |
} |
|
120 |
|
|
0 | 121 |
org.gvsig.xmlschema/library/tags/org.gvsig.xmlschema-2.0.40/org.gvsig.xmlschema.lib/org.gvsig.xmlschema.lib.api/src/main/java/org/gvsig/xmlschema/lib/api/som/IXSSchema.java | ||
---|---|---|
1 |
package org.gvsig.xmlschema.lib.api.som; |
|
2 |
|
|
3 |
import java.io.OutputStream; |
|
4 |
import java.util.Collection; |
|
5 |
|
|
6 |
import org.gvsig.xmlschema.lib.api.exceptions.SchemaWrittingException; |
|
7 |
import org.gvsig.xmlschema.lib.api.utils.SchemaObjectsMapping; |
|
8 |
|
|
9 |
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana |
|
10 |
* |
|
11 |
* Copyright (C) 2004 IVER T.I. and Generalitat Valenciana. |
|
12 |
* |
|
13 |
* This program is free software; you can redistribute it and/or |
|
14 |
* modify it under the terms of the GNU General Public License |
|
15 |
* as published by the Free Software Foundation; either version 2 |
|
16 |
* of the License, or (at your option) any later version. |
|
17 |
* |
|
18 |
* This program is distributed in the hope that it will be useful, |
|
19 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
20 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
21 |
* GNU General Public License for more details. |
|
22 |
* |
|
23 |
* You should have received a copy of the GNU General Public License |
|
24 |
* along with this program; if not, write to the Free Software |
|
25 |
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,USA. |
|
26 |
* |
|
27 |
* For more information, contact: |
|
28 |
* |
|
29 |
* Generalitat Valenciana |
|
30 |
* Conselleria d'Infraestructures i Transport |
|
31 |
* Av. Blasco Ib??ez, 50 |
|
32 |
* 46010 VALENCIA |
|
33 |
* SPAIN |
|
34 |
* |
|
35 |
* +34 963862235 |
|
36 |
* gvsig@gva.es |
|
37 |
* www.gvsig.gva.es |
|
38 |
* |
|
39 |
* or |
|
40 |
* |
|
41 |
* IVER T.I. S.A |
|
42 |
* Salamanca 50 |
|
43 |
* 46005 Valencia |
|
44 |
* Spain |
|
45 |
* |
|
46 |
* +34 963163400 |
|
47 |
* dac@iver.es |
|
48 |
*/ |
|
49 |
/* CVS MESSAGES: |
|
50 |
* |
|
51 |
* $Id: IXSSchema.java 164 2007-07-02 10:00:46Z jorpiell $ |
|
52 |
* $Log$ |
|
53 |
* Revision 1.3 2007/07/02 09:57:35 jorpiell |
|
54 |
* The generated xsd schemas have to be valid |
|
55 |
* |
|
56 |
* Revision 1.2 2007/06/22 12:20:48 jorpiell |
|
57 |
* The typeNotFoundException has been deleted. It never was thrown |
|
58 |
* |
|
59 |
* Revision 1.1 2007/06/14 16:15:03 jorpiell |
|
60 |
* builds to create the jars generated and add the schema code to the libGPEProject |
|
61 |
* |
|
62 |
* Revision 1.1 2007/06/14 13:50:07 jorpiell |
|
63 |
* The schema jar name has been changed |
|
64 |
* |
|
65 |
* Revision 1.6 2007/06/08 11:35:16 jorpiell |
|
66 |
* IXSSchema interface updated |
|
67 |
* |
|
68 |
* Revision 1.5 2007/06/07 14:54:13 jorpiell |
|
69 |
* Add the schema support |
|
70 |
* |
|
71 |
* Revision 1.4 2007/05/30 12:53:33 jorpiell |
|
72 |
* Not used libraries deleted |
|
73 |
* |
|
74 |
* Revision 1.3 2007/05/30 12:25:48 jorpiell |
|
75 |
* Add the element collection |
|
76 |
* |
|
77 |
* Revision 1.2 2007/05/28 12:38:03 jorpiell |
|
78 |
* Some bugs fixed |
|
79 |
* |
|
80 |
* Revision 1.1 2007/05/25 11:55:00 jorpiell |
|
81 |
* First update |
|
82 |
* |
|
83 |
* |
|
84 |
*/ |
|
85 |
/** |
|
86 |
* This interface represents a XML schema. XML Schemas |
|
87 |
* express shared vocabularies and allow machines to |
|
88 |
* carry out rules made by people. They provide a means |
|
89 |
* for defining the structure, content and semantics of |
|
90 |
* XML documents. |
|
91 |
* @see http://www.w3.org/XML/Schema |
|
92 |
* @author Jorge Piera LLodr? (jorge.piera@iver.es) |
|
93 |
*/ |
|
94 |
public interface IXSSchema { |
|
95 |
|
|
96 |
/** |
|
97 |
* @return The schema target namespace. |
|
98 |
*/ |
|
99 |
public String getTargetNamespace(); |
|
100 |
|
|
101 |
/** |
|
102 |
* @return The prefix for the target namespace. |
|
103 |
*/ |
|
104 |
public String getTargetNamespacePrefix(); |
|
105 |
|
|
106 |
/** |
|
107 |
* It retusn a namespace prefix |
|
108 |
* @param namespaceURI |
|
109 |
* Namespace URI |
|
110 |
* @return |
|
111 |
* The namespace prefix |
|
112 |
*/ |
|
113 |
public String getNamespacePrefix(String namespaceURI); |
|
114 |
|
|
115 |
/** |
|
116 |
* @return the DOM document that contains the |
|
117 |
* schema information. It can be used by others |
|
118 |
* applications to modify the schema |
|
119 |
*/ |
|
120 |
public IXSDocument getDocument(); |
|
121 |
|
|
122 |
/** |
|
123 |
* @return the XML schema elements |
|
124 |
* @throws TypeNotFoundException |
|
125 |
*/ |
|
126 |
public Collection getElementDeclarations(); |
|
127 |
|
|
128 |
/** |
|
129 |
* Search a XML schema element by name |
|
130 |
* @param targetNamespace |
|
131 |
* Namespace to seach the element |
|
132 |
* @param elementName |
|
133 |
* Element name |
|
134 |
* @return |
|
135 |
* A XML schema element |
|
136 |
* @throws TypeNotFoundException |
|
137 |
*/ |
|
138 |
public IXSElementDeclaration getElementDeclarationByName(String targetNamespace, String elementName); |
|
139 |
|
|
140 |
/** |
|
141 |
* @return the XML schema type definitions |
|
142 |
* @throws TypeNotFoundException |
|
143 |
*/ |
|
144 |
public Collection getTypeDefinitions(); |
|
145 |
|
|
146 |
/** |
|
147 |
* Search a XML schema type definition by name |
|
148 |
* @param targetNamespace |
|
149 |
* Namespace to seach the element |
|
150 |
* @param typeName |
|
151 |
* XML schema type name |
|
152 |
* @return |
|
153 |
* A XML schema type definition |
|
154 |
* @throws TypeNotFoundException |
|
155 |
*/ |
|
156 |
public IXSTypeDefinition getTypeByName(String targetNamespace, String typeName); |
|
157 |
|
|
158 |
/** |
|
159 |
* It writes the schema to one OutputStream |
|
160 |
* @param os |
|
161 |
* OutputStream to write the file |
|
162 |
* @throws SchemaWrittingException |
|
163 |
*/ |
|
164 |
public void write(OutputStream os) throws SchemaWrittingException ; |
|
165 |
|
|
166 |
/** |
|
167 |
* Add a new XML schema element |
Also available in: Unified diff