Revision 36572
tags/v1_12_0_Build_1402/libGPE-GML/src/org/gvsig/gpe/gml/warnings/GMLWarningNoSchema.java | ||
---|---|---|
1 |
package org.gvsig.gpe.gml.warnings; |
|
2 |
|
|
3 |
import java.util.Map; |
|
4 |
|
|
5 |
import org.gvsig.exceptions.BaseException; |
|
6 |
|
|
7 |
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana |
|
8 |
* |
|
9 |
* Copyright (C) 2004 IVER T.I. and Generalitat Valenciana. |
|
10 |
* |
|
11 |
* This program is free software; you can redistribute it and/or |
|
12 |
* modify it under the terms of the GNU General Public License |
|
13 |
* as published by the Free Software Foundation; either version 2 |
|
14 |
* of the License, or (at your option) any later version. |
|
15 |
* |
|
16 |
* This program is distributed in the hope that it will be useful, |
|
17 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
18 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
19 |
* GNU General Public License for more details. |
|
20 |
* |
|
21 |
* You should have received a copy of the GNU General Public License |
|
22 |
* along with this program; if not, write to the Free Software |
|
23 |
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,USA. |
|
24 |
* |
|
25 |
* For more information, contact: |
|
26 |
* |
|
27 |
* Generalitat Valenciana |
|
28 |
* Conselleria d'Infraestructures i Transport |
|
29 |
* Av. Blasco Ib??ez, 50 |
|
30 |
* 46010 VALENCIA |
|
31 |
* SPAIN |
|
32 |
* |
|
33 |
* +34 963862235 |
|
34 |
* gvsig@gva.es |
|
35 |
* www.gvsig.gva.es |
|
36 |
* |
|
37 |
* or |
|
38 |
* |
|
39 |
* IVER T.I. S.A |
|
40 |
* Salamanca 50 |
|
41 |
* 46005 Valencia |
|
42 |
* Spain |
|
43 |
* |
|
44 |
* +34 963163400 |
|
45 |
* dac@iver.es |
|
46 |
*/ |
|
47 |
/* CVS MESSAGES: |
|
48 |
* |
|
49 |
* $Id: GMLWarningNoSchema.java 6 2007-02-28 11:49:30Z csanchez $ |
|
50 |
* $Log$ |
|
51 |
* Revision 1.1 2007/02/28 11:48:31 csanchez |
|
52 |
* *** empty log message *** |
|
53 |
* |
|
54 |
* Revision 1.1 2007/02/20 10:53:20 jorpiell |
|
55 |
* Añadidos los proyectos de kml y gml antiguos |
|
56 |
* |
|
57 |
* Revision 1.1 2007/01/15 13:08:06 csanchez |
|
58 |
* Sistema de Warnings y Excepciones adaptado a BasicException |
|
59 |
* |
|
60 |
* |
|
61 |
*/ |
|
62 |
/** |
|
63 |
* @author Carlos S?nchez Peri??n (sanchez_carper@gva.es) |
|
64 |
*/ |
|
65 |
public class GMLWarningNoSchema extends BaseException{ |
|
66 |
|
|
67 |
/** |
|
68 |
* |
|
69 |
*/ |
|
70 |
private static final long serialVersionUID = -7047301394212726690L; |
|
71 |
|
|
72 |
|
|
73 |
public GMLWarningNoSchema() { |
|
74 |
init(); |
|
75 |
} |
|
76 |
|
|
77 |
protected Map values() { |
|
78 |
// TODO Auto-generated method stub |
|
79 |
return null; |
|
80 |
} |
|
81 |
public void init() { |
|
82 |
messageKey="gml_warning_no_schema"; |
|
83 |
formatString="GML without schema"; |
|
84 |
code = serialVersionUID; |
|
85 |
} |
|
86 |
} |
|
0 | 87 |
tags/v1_12_0_Build_1402/libGPE-GML/src/org/gvsig/gpe/gml/warnings/GMLWarningMalformed.java | ||
---|---|---|
1 |
package org.gvsig.gpe.gml.warnings; |
|
2 |
|
|
3 |
import java.util.Map; |
|
4 |
|
|
5 |
import org.gvsig.exceptions.BaseException; |
|
6 |
|
|
7 |
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana |
|
8 |
* |
|
9 |
* Copyright (C) 2004 IVER T.I. and Generalitat Valenciana. |
|
10 |
* |
|
11 |
* This program is free software; you can redistribute it and/or |
|
12 |
* modify it under the terms of the GNU General Public License |
|
13 |
* as published by the Free Software Foundation; either version 2 |
|
14 |
* of the License, or (at your option) any later version. |
|
15 |
* |
|
16 |
* This program is distributed in the hope that it will be useful, |
|
17 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
18 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
19 |
* GNU General Public License for more details. |
|
20 |
* |
|
21 |
* You should have received a copy of the GNU General Public License |
|
22 |
* along with this program; if not, write to the Free Software |
|
23 |
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,USA. |
|
24 |
* |
|
25 |
* For more information, contact: |
|
26 |
* |
|
27 |
* Generalitat Valenciana |
|
28 |
* Conselleria d'Infraestructures i Transport |
|
29 |
* Av. Blasco Ib??ez, 50 |
|
30 |
* 46010 VALENCIA |
|
31 |
* SPAIN |
|
32 |
* |
|
33 |
* +34 963862235 |
|
34 |
* gvsig@gva.es |
|
35 |
* www.gvsig.gva.es |
|
36 |
* |
|
37 |
* or |
|
38 |
* |
|
39 |
* IVER T.I. S.A |
|
40 |
* Salamanca 50 |
|
41 |
* 46005 Valencia |
|
42 |
* Spain |
|
43 |
* |
|
44 |
* +34 963163400 |
|
45 |
* dac@iver.es |
|
46 |
*/ |
|
47 |
/* CVS MESSAGES: |
|
48 |
* |
|
49 |
* $Id: GMLWarningMalformed.java 6 2007-02-28 11:49:30Z csanchez $ |
|
50 |
* $Log$ |
|
51 |
* Revision 1.1 2007/02/28 11:48:31 csanchez |
|
52 |
* *** empty log message *** |
|
53 |
* |
|
54 |
* Revision 1.1 2007/02/20 10:53:20 jorpiell |
|
55 |
* Añadidos los proyectos de kml y gml antiguos |
|
56 |
* |
|
57 |
* Revision 1.1 2007/01/15 13:08:06 csanchez |
|
58 |
* Sistema de Warnings y Excepciones adaptado a BasicException |
|
59 |
* |
|
60 |
* |
|
61 |
*/ |
|
62 |
/** |
|
63 |
* @author Carlos S?nchez Peri??n (sanchez_carper@gva.es) |
|
64 |
*/ |
|
65 |
public class GMLWarningMalformed extends BaseException{ |
|
66 |
|
|
67 |
/** |
|
68 |
* |
|
69 |
*/ |
|
70 |
private static final long serialVersionUID = 3061826648337677594L; |
|
71 |
|
|
72 |
public GMLWarningMalformed(){ |
|
73 |
init(); |
|
74 |
} |
|
75 |
|
|
76 |
protected Map values() { |
|
77 |
// TODO Auto-generated method stub |
|
78 |
return null; |
|
79 |
} |
|
80 |
public void init() { |
|
81 |
messageKey="gml_warning_malformed_file"; |
|
82 |
formatString="GML isn't a W3C standard"; |
|
83 |
code = serialVersionUID; |
|
84 |
} |
|
85 |
} |
|
0 | 86 |
tags/v1_12_0_Build_1402/libGPE-GML/src/org/gvsig/gpe/gml/warnings/GMLWarningWrongNamespace.java | ||
---|---|---|
1 |
package org.gvsig.gpe.gml.warnings; |
|
2 |
|
|
3 |
import java.util.Hashtable; |
|
4 |
import java.util.Map; |
|
5 |
|
|
6 |
import org.gvsig.exceptions.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: GMLWarningWrongNamespace.java 6 2007-02-28 11:49:30Z csanchez $ |
|
51 |
* $Log$ |
|
52 |
* Revision 1.1 2007/02/28 11:48:31 csanchez |
|
53 |
* *** empty log message *** |
|
54 |
* |
|
55 |
* Revision 1.1 2007/02/20 10:53:20 jorpiell |
|
56 |
* Añadidos los proyectos de kml y gml antiguos |
|
57 |
* |
|
58 |
* Revision 1.1 2007/01/15 13:08:06 csanchez |
|
59 |
* Sistema de Warnings y Excepciones adaptado a BasicException |
|
60 |
* |
|
61 |
* |
|
62 |
*/ |
|
63 |
/** |
|
64 |
* @author Carlos S?nchez Peri??n (sanchez_carper@gva.es) |
|
65 |
*/ |
|
66 |
public class GMLWarningWrongNamespace extends BaseException{ |
|
67 |
|
|
68 |
/** |
|
69 |
* |
|
70 |
*/ |
|
71 |
private static final long serialVersionUID = -5960588828358796702L; |
|
72 |
private String namespace; |
|
73 |
|
|
74 |
public GMLWarningWrongNamespace(String key){ |
|
75 |
super(); |
|
76 |
this.init(); |
|
77 |
this.namespace = key; |
|
78 |
} |
|
79 |
|
|
80 |
protected Map values() { |
|
81 |
Hashtable params; |
|
82 |
params = new Hashtable(); |
|
83 |
params.put("namespace",namespace); |
|
84 |
return params; |
|
85 |
} |
|
86 |
|
|
87 |
public String getNamespace() { |
|
88 |
return namespace; |
|
89 |
} |
|
90 |
|
|
91 |
public void setNamespace(String namespace) { |
|
92 |
this.namespace = namespace; |
|
93 |
} |
|
94 |
|
|
95 |
public void init() { |
|
96 |
messageKey="gml_warning_wrong_Namespace"; |
|
97 |
formatString="Invalid Tag Ignored, not found in %(namespace) namespace"; |
|
98 |
code = serialVersionUID; |
|
99 |
} |
|
100 |
|
|
101 |
} |
|
0 | 102 |
tags/v1_12_0_Build_1402/libGPE-GML/src/org/gvsig/gpe/gml/warnings/GMLWarningInfo.java | ||
---|---|---|
1 |
package org.gvsig.gpe.gml.warnings; |
|
2 |
|
|
3 |
import org.gvsig.exceptions.BaseException; |
|
4 |
import org.gvsig.exceptions.ListBaseException; |
|
5 |
import org.gvsig.gpe.gml.exceptions.GMLExceptionList; |
|
6 |
|
|
7 |
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana |
|
8 |
* |
|
9 |
* Copyright (C) 2004 IVER T.I. and Generalitat Valenciana. |
|
10 |
* |
|
11 |
* This program is free software; you can redistribute it and/or |
|
12 |
* modify it under the terms of the GNU General Public License |
|
13 |
* as published by the Free Software Foundation; either version 2 |
|
14 |
* of the License, or (at your option) any later version. |
|
15 |
* |
|
16 |
* This program is distributed in the hope that it will be useful, |
|
17 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
18 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
19 |
* GNU General Public License for more details. |
|
20 |
* |
|
21 |
* You should have received a copy of the GNU General Public License |
|
22 |
* along with this program; if not, write to the Free Software |
|
23 |
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,USA. |
|
24 |
* |
|
25 |
* For more information, contact: |
|
26 |
* |
|
27 |
* Generalitat Valenciana |
|
28 |
* Conselleria d'Infraestructures i Transport |
|
29 |
* Av. Blasco Ib??ez, 50 |
|
30 |
* 46010 VALENCIA |
|
31 |
* SPAIN |
|
32 |
* |
|
33 |
* +34 963862235 |
|
34 |
* gvsig@gva.es |
|
35 |
* www.gvsig.gva.es |
|
36 |
* |
|
37 |
* or |
|
38 |
* |
|
39 |
* IVER T.I. S.A |
|
40 |
* Salamanca 50 |
|
41 |
* 46005 Valencia |
|
42 |
* Spain |
|
43 |
* |
|
44 |
* +34 963163400 |
|
45 |
* dac@iver.es |
|
46 |
*/ |
|
47 |
/* CVS MESSAGES: |
|
48 |
* |
|
49 |
* $Id: GMLWarningInfo.java 6 2007-02-28 11:49:30Z csanchez $ |
|
50 |
* $Log$ |
|
51 |
* Revision 1.1 2007/02/28 11:48:31 csanchez |
|
52 |
* *** empty log message *** |
|
53 |
* |
|
54 |
* Revision 1.1 2007/02/20 10:53:20 jorpiell |
|
55 |
* Añadidos los proyectos de kml y gml antiguos |
|
56 |
* |
|
57 |
* Revision 1.1 2007/01/15 13:08:06 csanchez |
|
58 |
* Sistema de Warnings y Excepciones adaptado a BasicException |
|
59 |
* |
|
60 |
* Revision 1.1 2006/12/22 11:25:04 csanchez |
|
61 |
* Nuevo parser GML 2.x para gml's sin esquema |
|
62 |
* |
|
63 |
* |
|
64 |
*/ |
|
65 |
/************************************************************************ |
|
66 |
* Class < GMLFileParseInfo > * |
|
67 |
* * |
|
68 |
* This Class gets all the warnings from the GML Parser, the GML parser * |
|
69 |
* always tries parse the GML file even though it isn't a standard but * |
|
70 |
* it has to info the user. * |
|
71 |
* * |
|
72 |
* @author Carlos S?nchez Peri??n (sanchez_carper@gva.es) * |
|
73 |
************************************************************************/ |
|
74 |
public class GMLWarningInfo { |
|
75 |
|
|
76 |
private ListBaseException warning; |
|
77 |
|
|
78 |
public GMLWarningInfo(){ |
|
79 |
warning=new GMLExceptionList(); |
|
80 |
} |
|
81 |
|
|
82 |
/** |
|
83 |
* This method return true if there aren't warnings else returns false |
|
84 |
* @return boolean |
|
85 |
*/ |
|
86 |
public boolean areWarnings(){ |
|
87 |
if (warning.isEmpty()){ |
|
88 |
return false; |
|
89 |
} |
|
90 |
return true; |
|
91 |
} |
|
92 |
/** |
|
93 |
* This method return the list of warnings parsing the GML |
|
94 |
* @return ArrayList of warnings |
|
95 |
*/ |
|
96 |
public ListBaseException getGMLWarningList(){ |
|
97 |
return warning; |
|
98 |
} |
|
99 |
|
|
100 |
/** |
|
101 |
* This method inserts a new warning into the list |
|
102 |
* @args int new warning |
|
103 |
*/ |
|
104 |
public void setElement(BaseException war){ |
|
105 |
//Only we add a warning when it is new |
|
106 |
if (warning.contains(war)==false) |
|
107 |
{ |
|
108 |
warning.add((war)); |
|
109 |
} |
|
110 |
} |
|
111 |
/** |
|
112 |
* This method returns a warning from the list |
|
113 |
* @args int index |
|
114 |
* @return int warning |
|
115 |
*/ |
|
116 |
public BaseException getElement(int index, ListBaseException war){ |
|
117 |
//it returns the int value of a warning or 0 if it doesn't exists |
|
118 |
if (war.isEmpty()==false) |
|
119 |
{ |
|
120 |
if (index < war.size()){ |
|
121 |
return (BaseException)war.get(index); |
|
122 |
} |
|
123 |
} |
|
124 |
return null; |
|
125 |
} |
|
126 |
|
|
127 |
/** |
|
128 |
* This method inserts a new warning list |
|
129 |
* @args int new warning |
|
130 |
*/ |
|
131 |
public void setGMLWarningList(ListBaseException war){ |
|
132 |
int i=0; |
|
133 |
BaseException info; |
|
134 |
while(i < war.size()){ |
|
135 |
info = this.getElement(i,war); |
|
136 |
if (info != null) |
|
137 |
{ |
|
138 |
this.setElement(info); |
|
139 |
} |
|
140 |
i++; |
|
141 |
} |
|
142 |
} |
|
143 |
} |
|
0 | 144 |
tags/v1_12_0_Build_1402/libGPE-GML/src/org/gvsig/gpe/gml/warnings/GMLWarningNotFound.java | ||
---|---|---|
1 |
package org.gvsig.gpe.gml.warnings; |
|
2 |
|
|
3 |
import java.util.Hashtable; |
|
4 |
import java.util.Map; |
|
5 |
|
|
6 |
import org.gvsig.exceptions.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: GMLWarningNotFound.java 6 2007-02-28 11:49:30Z csanchez $ |
|
51 |
* $Log$ |
|
52 |
* Revision 1.1 2007/02/28 11:48:31 csanchez |
|
53 |
* *** empty log message *** |
|
54 |
* |
|
55 |
* Revision 1.1 2007/02/20 10:53:20 jorpiell |
|
56 |
* Añadidos los proyectos de kml y gml antiguos |
|
57 |
* |
|
58 |
* Revision 1.1 2007/01/15 13:08:06 csanchez |
|
59 |
* Sistema de Warnings y Excepciones adaptado a BasicException |
|
60 |
* |
|
61 |
* |
|
62 |
*/ |
|
63 |
/** |
|
64 |
* @author Carlos S?nchez Peri??n (sanchez_carper@gva.es) |
|
65 |
*/ |
|
66 |
public class GMLWarningNotFound extends BaseException{ |
|
67 |
|
|
68 |
private static final long serialVersionUID = -8467084335329308731L; |
|
69 |
private String filename = null; |
|
70 |
|
|
71 |
public GMLWarningNotFound(String file,Throwable e) { |
|
72 |
this.init(); |
|
73 |
this.filename=file; |
|
74 |
initCause(e); |
|
75 |
} |
|
76 |
|
|
77 |
protected Map values() { |
|
78 |
Hashtable params; |
|
79 |
params = new Hashtable(); |
|
80 |
params.put("file",filename); |
|
81 |
return params; |
|
82 |
} |
|
83 |
|
|
84 |
public void init() { |
|
85 |
messageKey="gml_warning_cant_open_schema"; |
|
86 |
formatString="Error opening GML schema %(filename)"; |
|
87 |
code = serialVersionUID; |
|
88 |
} |
|
89 |
|
|
90 |
public String getFilename() { |
|
91 |
return filename; |
|
92 |
} |
|
93 |
|
|
94 |
public void setFilename(String filename) { |
|
95 |
this.filename = filename; |
|
96 |
} |
|
97 |
|
|
98 |
} |
|
0 | 99 |
tags/v1_12_0_Build_1402/libGPE-GML/src/org/gvsig/gpe/gml/warnings/GMLWarningVersionNotSupported.java | ||
---|---|---|
1 |
package org.gvsig.gpe.gml.warnings; |
|
2 |
|
|
3 |
import java.util.Hashtable; |
|
4 |
import java.util.Map; |
|
5 |
|
|
6 |
import org.gvsig.exceptions.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: GMLWarningVersionNotSupported.java 6 2007-02-28 11:49:30Z csanchez $ |
|
51 |
* $Log$ |
|
52 |
* Revision 1.1 2007/02/28 11:48:31 csanchez |
|
53 |
* *** empty log message *** |
|
54 |
* |
|
55 |
* Revision 1.1 2007/02/20 10:53:20 jorpiell |
|
56 |
* Añadidos los proyectos de kml y gml antiguos |
|
57 |
* |
|
58 |
* Revision 1.1 2007/01/15 13:08:06 csanchez |
|
59 |
* Sistema de Warnings y Excepciones adaptado a BasicException |
|
60 |
* |
|
61 |
* |
|
62 |
*/ |
|
63 |
/** |
|
64 |
* @author Carlos S?nchez Peri??n (sanchez_carper@gva.es) |
|
65 |
*/ |
|
66 |
public class GMLWarningVersionNotSupported extends BaseException{ |
|
67 |
|
|
68 |
private static final long serialVersionUID = 5475287715951343565L; |
|
69 |
private String version = null; |
|
70 |
|
|
71 |
public GMLWarningVersionNotSupported(String ver) { |
|
72 |
this.init(); |
|
73 |
this.version=ver; |
|
74 |
} |
|
75 |
|
|
76 |
protected Map values() { |
|
77 |
Hashtable params; |
|
78 |
params = new Hashtable(); |
|
79 |
params.put("version",version); |
|
80 |
return params; |
|
81 |
} |
|
82 |
|
|
83 |
public String getVersion() { |
|
84 |
return version; |
|
85 |
} |
|
86 |
|
|
87 |
public void setVersion(String version) { |
|
88 |
this.version = version; |
|
89 |
} |
|
90 |
|
|
91 |
public void init() { |
|
92 |
messageKey="Gml_Warning_Version_Not_Supported"; |
|
93 |
formatString="GML version %(ver) not implemented"; |
|
94 |
code = serialVersionUID; |
|
95 |
} |
|
96 |
} |
|
0 | 97 |
tags/v1_12_0_Build_1402/libGPE-GML/src/org/gvsig/gpe/gml/GmlProperties.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 |
* 2008 Iver T.I. {{Task}} |
|
26 |
*/ |
|
27 |
|
|
28 |
package org.gvsig.gpe.gml; |
|
29 |
|
|
30 |
import java.util.Properties; |
|
31 |
|
|
32 |
import org.gvsig.gpe.GPEDefaults; |
|
33 |
import org.gvsig.gpe.IGPEProperties; |
|
34 |
|
|
35 |
/** |
|
36 |
* This class contains the properties for the GML |
|
37 |
* parsers and writers. This class has been registered using |
|
38 |
* the SPI (Service Provider Interface) and the values of their |
|
39 |
* properties can be configured using {@link GPEDefaults}. |
|
40 |
*/ |
|
41 |
public class GmlProperties implements IGPEProperties{ |
|
42 |
public Properties properties = null; |
|
43 |
|
|
44 |
public GmlProperties(){ |
|
45 |
properties = new Properties(); |
|
46 |
properties.put(DECIMAL, DECIMAL_VALUE); |
|
47 |
properties.put(COORDINATES_SEPARATOR, COORDINATES_SEPARATOR_VALUE); |
|
48 |
properties.put(TUPLES_SEPARATOR, TUPLES_SEPARATOR_VALUE); |
|
49 |
properties.put(DEFAULT_FEATURECOLLECTION, DEFAULT_FEATURECOLLECTION_VALUE); |
|
50 |
properties.put(DEFAULT_FEATURE, DEFAULT_FEATURE_VALUE); |
|
51 |
properties.put(SRS_BASED_ON_XML, SRS_BASED_ON_XML_VALUE); |
|
52 |
} |
|
53 |
|
|
54 |
/** |
|
55 |
* This attribute is used to represent the decimal separator. |
|
56 |
* It separates the integral and the fractional parts of a |
|
57 |
* decimal numeral. |
|
58 |
*/ |
|
59 |
public static final String DECIMAL = "decimal"; |
|
60 |
private static final String DECIMAL_VALUE = "."; |
|
61 |
|
|
62 |
/** |
|
63 |
* It separates the different dimensions of each coordinate |
|
64 |
* of a geometry (e.g. Uses ",": X1,Y1,Z1) |
|
65 |
*/ |
|
66 |
public static final String COORDINATES_SEPARATOR = "coordinatesSeparator"; |
|
67 |
private static final String COORDINATES_SEPARATOR_VALUE = ","; |
|
68 |
|
|
69 |
/** |
|
70 |
* It separates the different tuples of dimensions |
|
71 |
* (e.g. Uses blank space " ": X1,Y1,Z1 X2,Y2,Z2) |
|
72 |
*/ |
|
73 |
public static final String TUPLES_SEPARATOR = "tuplesSeparator"; |
|
74 |
private static final String TUPLES_SEPARATOR_VALUE = " "; |
|
75 |
|
|
76 |
/** |
|
77 |
* Default name for a collection of features. This name will be used |
|
78 |
* only if there is not a name for a feature collection. |
|
79 |
*/ |
|
80 |
public static final String DEFAULT_FEATURECOLLECTION= "featureCollection"; |
|
81 |
private static final String DEFAULT_FEATURECOLLECTION_VALUE= "FeatureCollection"; |
|
82 |
|
|
83 |
/** |
|
84 |
* Default name for a feature. It is only used if the |
|
85 |
* feature to write doesn't has a name |
|
86 |
*/ |
|
87 |
public static final String DEFAULT_FEATURE= "feature"; |
|
88 |
private static final String DEFAULT_FEATURE_VALUE= "Feature"; |
|
89 |
|
|
90 |
/** |
|
91 |
* IF the SRS are based on XML or if are based on EPSG code. |
|
92 |
*/ |
|
93 |
public static final String SRS_BASED_ON_XML = "srsBasedOnXml"; |
|
94 |
private static final Boolean SRS_BASED_ON_XML_VALUE = new Boolean(true); |
|
95 |
|
|
96 |
/* |
|
97 |
* (non-Javadoc) |
|
98 |
* @see org.gvsig.gpe.IGPEProperties#getProperties() |
|
99 |
*/ |
|
100 |
public Properties getProperties() { |
|
101 |
return properties; |
|
102 |
} |
|
103 |
|
|
104 |
} |
|
105 |
|
tags/v1_12_0_Build_1402/libGPE-GML/src/org/gvsig/gpe/gml/parser/GPEGml2_1_2_Parser.java | ||
---|---|---|
1 |
package org.gvsig.gpe.gml.parser; |
|
2 |
|
|
3 |
import org.gvsig.gpe.gml.parser.profiles.Gml2BindingProfile; |
|
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: GPEGmlParser.java 162 2007-06-29 12:19:48Z jorpiell $ |
|
48 |
* $Log$ |
|
49 |
* Revision 1.15 2007/06/29 12:19:34 jorpiell |
|
50 |
* The schema validation is made independently of the concrete writer |
|
51 |
* |
|
52 |
* Revision 1.14 2007/06/07 14:53:30 jorpiell |
|
53 |
* Add the schema support |
|
54 |
* |
|
55 |
* Revision 1.13 2007/05/24 07:29:47 csanchez |
|
56 |
* Añadidos Alias GML2 |
|
57 |
* |
|
58 |
* Revision 1.12 2007/05/17 11:20:51 jorpiell |
|
59 |
* Add the layer methods |
|
60 |
* |
|
61 |
* Revision 1.11 2007/05/16 12:34:55 csanchez |
|
62 |
* GPEParser Prototipo final de lectura |
|
63 |
* |
|
64 |
* Revision 1.10 2007/05/14 11:23:12 jorpiell |
|
65 |
* ProjectionFactory updated |
|
66 |
* |
|
67 |
* Revision 1.9 2007/05/14 09:52:26 jorpiell |
|
68 |
* Tupes separator tag updated |
|
69 |
* |
|
70 |
* Revision 1.8 2007/05/09 06:54:25 jorpiell |
|
71 |
* Change the File by URI |
|
72 |
* |
|
73 |
* Revision 1.7 2007/05/07 07:06:46 jorpiell |
|
74 |
* Add a constructor with the name and the description fields |
|
75 |
* |
|
76 |
* Revision 1.6 2007/04/25 11:08:38 csanchez |
|
77 |
* Parseo correcto con XSOM de esquemas, EntityResolver para los imports |
|
78 |
* |
|
79 |
* Revision 1.5 2007/04/20 12:04:10 csanchez |
|
80 |
* Actualizacion protoripo libGPE, Añadidos test para el parser, parseo con XSOM |
|
81 |
* |
|
82 |
* Revision 1.4 2007/04/19 11:51:43 csanchez |
|
83 |
* Actualizacion protoripo libGPE |
|
84 |
* |
|
85 |
* Revision 1.1 2007/04/18 12:54:45 csanchez |
|
86 |
* Actualizacion protoripo libGPE |
|
87 |
* |
|
88 |
* |
|
89 |
*/ |
|
90 |
/** |
|
91 |
* @author Carlos S?nchez Peri??n (sanchez_carper@gva.es) |
|
92 |
**/ |
|
93 |
|
|
94 |
public class GPEGml2_1_2_Parser extends GPEDefaultGmlParser{ |
|
95 |
|
|
96 |
public GPEGml2_1_2_Parser() { |
|
97 |
super(); |
|
98 |
setProfile(new Gml2BindingProfile()); |
|
99 |
} |
|
100 |
|
|
101 |
/* |
|
102 |
* (non-Javadoc) |
|
103 |
* @see org.gvsig.gpe.parser.GPEParser#getDescription() |
|
104 |
*/ |
|
105 |
public String getDescription() { |
|
106 |
return "This parser parses GML 2.1.2"; |
|
107 |
} |
|
108 |
|
|
109 |
/* |
|
110 |
* (non-Javadoc) |
|
111 |
* @see org.gvsig.gpe.parser.GPEParser#getName() |
|
112 |
*/ |
|
113 |
public String getName() { |
|
114 |
return "GML v2.1.2 parser"; |
|
115 |
} |
|
116 |
|
|
117 |
/* |
|
118 |
* (non-Javadoc) |
|
119 |
* @see org.gvsig.gpe.parser.GPEParser#getFormat() |
|
120 |
*/ |
|
121 |
public String getFormat() { |
|
122 |
return "text/xml; subtype=gml/2.1.2"; |
|
123 |
} |
|
124 |
} |
tags/v1_12_0_Build_1402/libGPE-GML/src/org/gvsig/gpe/gml/parser/GPEDefaultGmlParser.java | ||
---|---|---|
1 |
package org.gvsig.gpe.gml.parser; |
|
2 |
|
|
3 |
import java.io.File; |
|
4 |
import java.io.FileInputStream; |
|
5 |
import java.io.FileNotFoundException; |
|
6 |
import java.io.IOException; |
|
7 |
import java.io.InputStream; |
|
8 |
import java.net.URI; |
|
9 |
|
|
10 |
import org.gvsig.gpe.gml.parser.profiles.IBindingProfile; |
|
11 |
import org.gvsig.gpe.xml.exceptions.GPEXmlEmptyFileException; |
|
12 |
import org.gvsig.gpe.xml.parser.GPEXmlParser; |
|
13 |
import org.gvsig.gpe.xml.stream.IXmlStreamReader; |
|
14 |
import org.gvsig.gpe.xml.stream.XmlStreamException; |
|
15 |
|
|
16 |
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana |
|
17 |
* |
|
18 |
* Copyright (C) 2004 IVER T.I. and Generalitat Valenciana. |
|
19 |
* |
|
20 |
* This program is free software; you can redistribute it and/or |
|
21 |
* modify it under the terms of the GNU General Public License |
|
22 |
* as published by the Free Software Foundation; either version 2 |
|
23 |
* of the License, or (at your option) any later version. |
|
24 |
* |
|
25 |
* This program is distributed in the hope that it will be useful, |
|
26 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
27 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
28 |
* GNU General Public License for more details. |
|
29 |
* |
|
30 |
* You should have received a copy of the GNU General Public License |
|
31 |
* along with this program; if not, write to the Free Software |
|
32 |
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,USA. |
|
33 |
* |
|
34 |
* For more information, contact: |
|
35 |
* |
|
36 |
* Generalitat Valenciana |
|
37 |
* Conselleria d'Infraestructures i Transport |
|
38 |
* Av. Blasco Ib??ez, 50 |
|
39 |
* 46010 VALENCIA |
|
40 |
* SPAIN |
|
41 |
* |
|
42 |
* +34 963862235 |
|
43 |
* gvsig@gva.es |
|
44 |
* www.gvsig.gva.es |
|
45 |
* |
|
46 |
* or |
|
47 |
* |
|
48 |
* IVER T.I. S.A |
|
49 |
* Salamanca 50 |
|
50 |
* 46005 Valencia |
|
51 |
* Spain |
|
52 |
* |
|
53 |
* +34 963163400 |
|
54 |
* dac@iver.es |
|
55 |
*/ |
|
56 |
/* CVS MESSAGES: |
|
57 |
* |
|
58 |
* $Id: GPEGmlParser.java 162 2007-06-29 12:19:48Z jorpiell $ |
|
59 |
* $Log$ |
|
60 |
* Revision 1.15 2007/06/29 12:19:34 jorpiell |
|
61 |
* The schema validation is made independently of the concrete writer |
|
62 |
* |
|
63 |
* Revision 1.14 2007/06/07 14:53:30 jorpiell |
|
64 |
* Add the schema support |
|
65 |
* |
|
66 |
* Revision 1.13 2007/05/24 07:29:47 csanchez |
|
67 |
* Añadidos Alias GML2 |
|
68 |
* |
|
69 |
* Revision 1.12 2007/05/17 11:20:51 jorpiell |
|
70 |
* Add the layer methods |
|
71 |
* |
|
72 |
* Revision 1.11 2007/05/16 12:34:55 csanchez |
|
73 |
* GPEParser Prototipo final de lectura |
|
74 |
* |
|
75 |
* Revision 1.10 2007/05/14 11:23:12 jorpiell |
|
76 |
* ProjectionFactory updated |
|
77 |
* |
|
78 |
* Revision 1.9 2007/05/14 09:52:26 jorpiell |
|
79 |
* Tupes separator tag updated |
|
80 |
* |
|
81 |
* Revision 1.8 2007/05/09 06:54:25 jorpiell |
|
82 |
* Change the File by URI |
|
83 |
* |
|
84 |
* Revision 1.7 2007/05/07 07:06:46 jorpiell |
|
85 |
* Add a constructor with the name and the description fields |
|
86 |
* |
|
87 |
* Revision 1.6 2007/04/25 11:08:38 csanchez |
|
88 |
* Parseo correcto con XSOM de esquemas, EntityResolver para los imports |
|
89 |
* |
|
90 |
* Revision 1.5 2007/04/20 12:04:10 csanchez |
|
91 |
* Actualizacion protoripo libGPE, Añadidos test para el parser, parseo con XSOM |
|
92 |
* |
|
93 |
* Revision 1.4 2007/04/19 11:51:43 csanchez |
|
94 |
* Actualizacion protoripo libGPE |
|
95 |
* |
|
96 |
* Revision 1.1 2007/04/18 12:54:45 csanchez |
|
97 |
* Actualizacion protoripo libGPE |
|
98 |
* |
|
99 |
* |
|
100 |
*/ |
|
101 |
/** |
|
102 |
* @author Carlos S?nchez Peri??n (sanchez_carper@gva.es) |
|
103 |
*/ |
|
104 |
|
|
105 |
public abstract class GPEDefaultGmlParser extends GPEXmlParser { |
|
106 |
private IXmlStreamReader fileParser = null; |
|
107 |
private IBindingProfile profile = null; |
|
108 |
|
|
109 |
/*********************************************************************************************** |
|
110 |
* <GPEGmlParser> Constructor Method |
|
111 |
**********************************************************************************************/ |
|
112 |
public GPEDefaultGmlParser() { |
|
113 |
super(); |
|
114 |
} |
|
115 |
|
|
116 |
/*********************************************************************************************** |
|
117 |
* <getFormats> Returns the file extensions that are accepted to GML Parser |
|
118 |
* |
|
119 |
* @return String[] Accepted Extensions |
|
120 |
**********************************************************************************************/ |
|
121 |
public String[] getFormats() { |
|
122 |
String[] formats = new String[3]; |
|
123 |
formats[0] = "GML"; |
|
124 |
formats[1] = "XML"; |
|
125 |
formats[2] = "BGML"; |
|
126 |
return formats; |
|
127 |
} |
|
128 |
|
|
129 |
/*********************************************************************************************** |
|
130 |
* <accept> Returns true if the file is a gml file and the parser has to parse it |
|
131 |
* |
|
132 |
* @param URI uri |
|
133 |
* @return boolean |
|
134 |
**********************************************************************************************/ |
|
135 |
public boolean accept(URI uri) { |
|
136 |
if ((uri.getPath().toUpperCase().endsWith("GML")) |
|
137 |
|| (uri.getPath().toUpperCase().endsWith("XML")) |
|
138 |
|| (uri.getPath().toUpperCase().endsWith("BGML"))) { |
|
139 |
return true; |
|
140 |
} |
|
141 |
return false; |
|
142 |
} |
|
143 |
|
|
144 |
/*********************************************************************************************** |
|
145 |
* <createInputStream> Creates an InputStream from a file. |
|
146 |
* |
|
147 |
* @param File file |
|
148 |
* @return FileInputStream |
|
149 |
**********************************************************************************************/ |
|
150 |
protected InputStream createInputStream(File file) throws FileNotFoundException { |
|
151 |
return new FileInputStream(file); |
|
152 |
} |
|
153 |
|
|
154 |
/*********************************************************************************************** |
|
155 |
* <initParse> Starts to parse the file. |
|
156 |
* |
|
157 |
* @throws XmlStreamException |
|
158 |
* @throws GPEXmlEmptyFileException |
|
159 |
**********************************************************************************************/ |
|
160 |
protected void initParse() throws GPEXmlEmptyFileException, XmlStreamException { |
|
161 |
// First, it gets the file parser. |
|
162 |
fileParser = getParser(); |
|
163 |
// If the file is empty |
|
164 |
if (getParser().getEventType() == IXmlStreamReader.END_DOCUMENT) { |
|
165 |
throw new GPEXmlEmptyFileException(); |
|
166 |
} |
|
167 |
try{ |
|
168 |
getProfile().getFeatureCollectionBinding(). |
|
169 |
parse(getParser(), this); |
|
170 |
} catch (IOException e) { |
|
171 |
getErrorHandler().addError(e); |
|
172 |
} |
|
173 |
} |
|
174 |
|
|
175 |
public IXmlStreamReader getFileParser() { |
|
176 |
return fileParser; |
|
177 |
} |
|
178 |
|
|
179 |
/*********************************************************************************************** |
|
180 |
* <getNext> Gets the next tag or text token from the file. without white spaces. |
|
181 |
**********************************************************************************************/ |
|
182 |
public void getNext() { |
|
183 |
// Get next tag --> next():Method from KXML library to get next tag |
|
184 |
try { |
|
185 |
fileParser.next(); |
|
186 |
if ((fileParser.getEventType() == IXmlStreamReader.CHARACTERS) |
|
187 |
&& (fileParser.isWhitespace())) { |
|
188 |
getNext(); |
|
189 |
} |
|
190 |
} catch (XmlStreamException e) { |
|
191 |
// TODO Bloque catch generado autom?ticamente |
|
192 |
System.out.println("Error en XmlPullParser al intentar obtener la siguiente etiqueta: " |
|
193 |
+ e.getMessage()); |
|
194 |
} catch (IOException e) { |
|
195 |
// TODO Bloque catch generado autom?ticamente |
|
196 |
System.out.println("Error al leer la siguiente etiqueta en XmlPullParser: " |
|
197 |
+ e.getMessage()); |
|
198 |
} |
|
199 |
} |
|
200 |
|
|
201 |
/** |
|
202 |
* @param profile the profile to set |
|
203 |
*/ |
|
204 |
protected void setProfile(IBindingProfile profile) { |
|
205 |
this.profile = profile; |
|
206 |
} |
|
207 |
|
|
208 |
/** |
|
209 |
* @return the profile |
|
210 |
*/ |
|
211 |
public IBindingProfile getProfile() { |
|
212 |
return profile; |
|
213 |
} |
|
214 |
} |
|
0 | 215 |
tags/v1_12_0_Build_1402/libGPE-GML/src/org/gvsig/gpe/gml/parser/GPEGmlSFP0Parser.java | ||
---|---|---|
1 |
package org.gvsig.gpe.gml.parser; |
|
2 |
|
|
3 |
import org.gvsig.gpe.gml.parser.profiles.GmlSFP0BindingProfile; |
|
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$ |
|
48 |
* $Log$ |
|
49 |
* |
|
50 |
*/ |
|
51 |
/** |
|
52 |
* @author Jorge Piera LLodr? (jorge.piera@iver.es) |
|
53 |
*/ |
|
54 |
public class GPEGmlSFP0Parser extends GPEDefaultGmlParser { |
|
55 |
|
|
56 |
public GPEGmlSFP0Parser() { |
|
57 |
super(); |
|
58 |
setProfile(new GmlSFP0BindingProfile()); |
|
59 |
} |
|
60 |
|
|
61 |
/* |
|
62 |
* (non-Javadoc) |
|
63 |
* @see org.gvsig.gpe.parser.GPEParser#getDescription() |
|
64 |
*/ |
|
65 |
public String getDescription() { |
|
66 |
return "This parser parser GML 3.1.2 SFP"; |
|
67 |
} |
|
68 |
|
|
69 |
/* |
|
70 |
* (non-Javadoc) |
|
71 |
* @see org.gvsig.gpe.parser.GPEParser#getName() |
|
72 |
*/ |
|
73 |
public String getName() { |
|
74 |
return "GML v3.1.2 with the SFP"; |
|
75 |
} |
|
76 |
|
|
77 |
/* |
|
78 |
* (non-Javadoc) |
|
79 |
* @see org.gvsig.gpe.parser.GPEParser#getFormat() |
|
80 |
*/ |
|
81 |
public String getFormat() { |
|
82 |
//A?adir los parsers de los formatos soportados!!! |
|
83 |
return "text/xml; subtype=gml/3.2"; |
|
84 |
} |
|
85 |
} |
|
0 | 86 |
tags/v1_12_0_Build_1402/libGPE-GML/src/org/gvsig/gpe/gml/parser/profiles/Gml2BindingProfile.java | ||
---|---|---|
1 |
package org.gvsig.gpe.gml.parser.profiles; |
|
2 |
|
|
3 |
|
|
4 |
import org.gvsig.gpe.gml.parser.v2.coordinates.CoordTypeIterator; |
|
5 |
import org.gvsig.gpe.gml.parser.v2.coordinates.CoordinatesTypeIterator; |
|
6 |
import org.gvsig.gpe.gml.parser.v2.features.ElementTypeBinding; |
|
7 |
import org.gvsig.gpe.gml.parser.v2.features.FeatureCollectionBinding; |
|
8 |
import org.gvsig.gpe.gml.parser.v2.features.FeatureMemberTypeBinding; |
|
9 |
import org.gvsig.gpe.gml.parser.v2.features.FeatureMembersTypeBinding; |
|
10 |
import org.gvsig.gpe.gml.parser.v2.features.FeatureTypeBinding; |
|
11 |
import org.gvsig.gpe.gml.parser.v2.geometries.BoundedByTypeBinding; |
|
12 |
import org.gvsig.gpe.gml.parser.v2.geometries.BoxTypeBinding; |
|
13 |
import org.gvsig.gpe.gml.parser.v2.geometries.GeometryBinding; |
|
14 |
import org.gvsig.gpe.gml.parser.v2.geometries.GeometryMemberTypeBinding; |
|
15 |
import org.gvsig.gpe.gml.parser.v2.geometries.GeometryPropertyTypeBinding; |
|
16 |
import org.gvsig.gpe.gml.parser.v2.geometries.InnerBoundaryIsTypeBinding; |
|
17 |
import org.gvsig.gpe.gml.parser.v2.geometries.LineStringMemberTypeBinding; |
|
18 |
import org.gvsig.gpe.gml.parser.v2.geometries.LineStringPropertyTypeBinding; |
|
19 |
import org.gvsig.gpe.gml.parser.v2.geometries.LineStringTypeBinding; |
|
20 |
import org.gvsig.gpe.gml.parser.v2.geometries.LinearRingTypeBinding; |
|
21 |
import org.gvsig.gpe.gml.parser.v2.geometries.MultiGeometryPropertyTypeBinding; |
|
22 |
import org.gvsig.gpe.gml.parser.v2.geometries.MultiGeometryTypeBinding; |
|
23 |
import org.gvsig.gpe.gml.parser.v2.geometries.MultiLineStringPropertyTypeBinding; |
|
24 |
import org.gvsig.gpe.gml.parser.v2.geometries.MultiLineStringTypeBinding; |
|
25 |
import org.gvsig.gpe.gml.parser.v2.geometries.MultiPointPropertyTypeBinding; |
|
26 |
import org.gvsig.gpe.gml.parser.v2.geometries.MultiPointTypeBinding; |
|
27 |
import org.gvsig.gpe.gml.parser.v2.geometries.MultiPolygonPropertyTypeBinding; |
|
28 |
import org.gvsig.gpe.gml.parser.v2.geometries.MultiPolygonTypeBinding; |
|
29 |
import org.gvsig.gpe.gml.parser.v2.geometries.OuterBoundaryIsTypeBinding; |
|
30 |
import org.gvsig.gpe.gml.parser.v2.geometries.PointMemberTypeBinding; |
|
31 |
import org.gvsig.gpe.gml.parser.v2.geometries.PointPropertyTypeBinding; |
|
32 |
import org.gvsig.gpe.gml.parser.v2.geometries.PointTypeBinding; |
|
33 |
import org.gvsig.gpe.gml.parser.v2.geometries.PolygonMemberTypeBinding; |
|
34 |
import org.gvsig.gpe.gml.parser.v2.geometries.PolygonPropertyTypeBinding; |
|
35 |
import org.gvsig.gpe.gml.parser.v2.geometries.PolygonTypeBinding; |
|
36 |
|
|
37 |
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana |
|
38 |
* |
|
39 |
* Copyright (C) 2004 IVER T.I. and Generalitat Valenciana. |
|
40 |
* |
|
41 |
* This program is free software; you can redistribute it and/or |
|
42 |
* modify it under the terms of the GNU General Public License |
|
43 |
* as published by the Free Software Foundation; either version 2 |
|
44 |
* of the License, or (at your option) any later version. |
|
45 |
* |
|
46 |
* This program is distributed in the hope that it will be useful, |
|
47 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
48 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
49 |
* GNU General Public License for more details. |
|
50 |
* |
|
51 |
* You should have received a copy of the GNU General Public License |
|
52 |
* along with this program; if not, write to the Free Software |
|
53 |
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,USA. |
|
54 |
* |
|
55 |
* For more information, contact: |
|
56 |
* |
|
57 |
* Generalitat Valenciana |
|
58 |
* Conselleria d'Infraestructures i Transport |
|
59 |
* Av. Blasco Ib??ez, 50 |
|
60 |
* 46010 VALENCIA |
|
61 |
* SPAIN |
|
62 |
* |
|
63 |
* +34 963862235 |
|
64 |
* gvsig@gva.es |
|
65 |
* www.gvsig.gva.es |
|
66 |
* |
|
67 |
* or |
|
68 |
* |
|
69 |
* IVER T.I. S.A |
|
70 |
* Salamanca 50 |
|
71 |
* 46005 Valencia |
|
72 |
* Spain |
|
73 |
* |
|
74 |
* +34 963163400 |
|
75 |
* dac@iver.es |
|
76 |
*/ |
|
77 |
/* CVS MESSAGES: |
|
78 |
* |
|
79 |
* $Id$ |
|
80 |
* $Log$ |
|
81 |
* |
|
82 |
*/ |
|
83 |
/** |
|
84 |
* @author Jorge Piera LLodr? (jorge.piera@iver.es) |
|
85 |
*/ |
|
86 |
public class Gml2BindingProfile extends DefaultBindingProfile { |
|
87 |
protected FeatureCollectionBinding featureCollectionBinding = new FeatureCollectionBinding(); |
|
88 |
protected ElementTypeBinding elementTypeBinding = new ElementTypeBinding(); |
|
89 |
protected GeometryBinding geometryBinding = new GeometryBinding(); |
|
90 |
protected GeometryPropertyTypeBinding geometryPropertyTypeBinding = new GeometryPropertyTypeBinding(); |
|
91 |
protected PointPropertyTypeBinding pointPropertyTypeBinding = new PointPropertyTypeBinding(); |
|
92 |
protected LineStringPropertyTypeBinding lineStringPropertyTypeBinding = new LineStringPropertyTypeBinding(); |
|
93 |
protected PolygonPropertyTypeBinding polygonPropertyTypeBinding = new PolygonPropertyTypeBinding(); |
|
94 |
protected MultiPointPropertyTypeBinding multiPointPropertyTypeBinding = new MultiPointPropertyTypeBinding(); |
|
95 |
protected MultiLineStringPropertyTypeBinding multiLineStringPropertyTypeBinding = new MultiLineStringPropertyTypeBinding(); |
|
96 |
protected MultiPolygonPropertyTypeBinding multiPolygonPropertyTypeBinding = new MultiPolygonPropertyTypeBinding(); |
|
97 |
protected MultiGeometryPropertyTypeBinding multiGeometryPropertyTypeBinding = new MultiGeometryPropertyTypeBinding(); |
|
98 |
protected BoundedByTypeBinding boundedByTypeBinding = new BoundedByTypeBinding(); |
|
99 |
protected FeatureMemberTypeBinding featureMemberTypeBinding = new FeatureMemberTypeBinding(); |
|
100 |
protected FeatureMembersTypeBinding featureMembersTypeBinding = new FeatureMembersTypeBinding(); |
|
101 |
protected FeatureTypeBinding featureTypeBinding = new FeatureTypeBinding(); |
|
102 |
protected BoxTypeBinding boxTypeBinding = new BoxTypeBinding(); |
|
103 |
protected CoordinatesTypeIterator coordinatesTypeIterator = new CoordinatesTypeIterator(); |
|
104 |
protected CoordTypeIterator coordTypeIterator = new CoordTypeIterator(); |
|
105 |
protected PointMemberTypeBinding pointMemberTypeBinding = new PointMemberTypeBinding(); |
|
106 |
protected PointTypeBinding pointTypeBinding = new PointTypeBinding(); |
|
107 |
protected LineStringMemberTypeBinding lineStringMemberTypeBinding = new LineStringMemberTypeBinding(); |
|
108 |
protected LineStringTypeBinding lineStringTypeBinding = new LineStringTypeBinding(); |
|
109 |
protected LinearRingTypeBinding linearRingTypeBinding = new LinearRingTypeBinding(); |
|
110 |
protected PolygonMemberTypeBinding polygonMemberTypeBinding = new PolygonMemberTypeBinding(); |
|
111 |
protected PolygonTypeBinding polygonTypeBinding = new PolygonTypeBinding(); |
|
112 |
protected GeometryMemberTypeBinding geometryMemberTypeBinding = new GeometryMemberTypeBinding(); |
|
113 |
protected MultiPointTypeBinding multiPointTypeBinding = new MultiPointTypeBinding(); |
|
114 |
protected MultiLineStringTypeBinding multiLineStringTypeBinding = new MultiLineStringTypeBinding(); |
|
115 |
protected MultiPolygonTypeBinding multiPolygonTypeBinding = new MultiPolygonTypeBinding(); |
|
116 |
protected MultiGeometryTypeBinding multiGeometryTypeBinding = new MultiGeometryTypeBinding(); |
|
117 |
protected OuterBoundaryIsTypeBinding outerBoundaryIsTypeBinding = new OuterBoundaryIsTypeBinding(); |
|
118 |
protected InnerBoundaryIsTypeBinding innerBoundaryIsTypeBinding = new InnerBoundaryIsTypeBinding(); |
|
119 |
|
|
120 |
/* |
|
121 |
* (non-Javadoc) |
|
122 |
* @see org.gvsig.gpe.gml.profiles.IProfile#getFeatureCollectionBinding() |
|
123 |
*/ |
|
124 |
public FeatureCollectionBinding getFeatureCollectionBinding(){ |
|
125 |
return featureCollectionBinding; |
|
126 |
} |
|
127 |
|
|
128 |
/* |
|
129 |
* (non-Javadoc) |
|
130 |
* @see org.gvsig.gpe.gml.profiles.IProfile#getElementTypeBinding() |
|
131 |
*/ |
|
132 |
public ElementTypeBinding getElementTypeBinding(){ |
|
133 |
return elementTypeBinding; |
|
134 |
} |
|
135 |
|
|
136 |
/* |
|
137 |
* (non-Javadoc) |
|
138 |
* @see org.gvsig.gpe.gml.profiles.IProfile#getGeometryBinding() |
|
139 |
*/ |
|
140 |
public GeometryBinding getGeometryBinding() { |
|
141 |
return geometryBinding; |
|
142 |
} |
|
143 |
|
|
144 |
/* |
|
145 |
* (non-Javadoc) |
|
146 |
* @see org.gvsig.gpe.gml.profiles.IProfile#getGeometryPropertyTypeBinding() |
|
147 |
*/ |
|
148 |
public GeometryPropertyTypeBinding getGeometryPropertyTypeBinding() { |
|
149 |
return geometryPropertyTypeBinding; |
|
150 |
} |
|
151 |
|
|
152 |
/* |
|
153 |
* (non-Javadoc) |
|
154 |
* @see org.gvsig.gpe.gml.profiles.IProfile#getLineStringPropertyTypeBinding() |
|
155 |
*/ |
|
156 |
public LineStringPropertyTypeBinding getLineStringPropertyTypeBinding() { |
|
157 |
return lineStringPropertyTypeBinding; |
|
158 |
} |
|
159 |
|
|
160 |
/* |
|
161 |
* (non-Javadoc) |
|
162 |
* @see org.gvsig.gpe.gml.profiles.IProfile#getMultiGeometryPropertyTypeBinding() |
|
163 |
*/ |
|
164 |
public MultiGeometryPropertyTypeBinding getMultiGeometryPropertyTypeBinding() { |
|
165 |
return multiGeometryPropertyTypeBinding; |
|
166 |
} |
|
167 |
|
|
168 |
/* |
|
169 |
* (non-Javadoc) |
|
170 |
* @see org.gvsig.gpe.gml.profiles.IProfile#getMultiLineStringPropertyTypeBinding() |
|
171 |
*/ |
|
172 |
public MultiLineStringPropertyTypeBinding getMultiLineStringPropertyTypeBinding() { |
|
173 |
return multiLineStringPropertyTypeBinding; |
|
174 |
} |
|
175 |
|
|
176 |
/* |
|
177 |
* (non-Javadoc) |
|
178 |
* @see org.gvsig.gpe.gml.profiles.IProfile#getMultiPointPropertyTypeBinding() |
|
179 |
*/ |
|
180 |
public MultiPointPropertyTypeBinding getMultiPointPropertyTypeBinding() { |
|
181 |
return multiPointPropertyTypeBinding ; |
|
182 |
} |
|
183 |
|
|
184 |
/* |
|
185 |
* (non-Javadoc) |
|
186 |
* @see org.gvsig.gpe.gml.profiles.IProfile#getMultiPolygonPropertyTypeBinding() |
|
187 |
*/ |
|
188 |
public MultiPolygonPropertyTypeBinding getMultiPolygonPropertyTypeBinding() { |
|
189 |
return multiPolygonPropertyTypeBinding; |
|
190 |
} |
|
191 |
|
|
192 |
/* |
|
193 |
* (non-Javadoc) |
|
194 |
* @see org.gvsig.gpe.gml.profiles.IProfile#getPointPropertyTypeBinding() |
|
195 |
*/ |
|
196 |
public PointPropertyTypeBinding getPointPropertyTypeBinding() { |
|
197 |
return pointPropertyTypeBinding; |
|
198 |
} |
|
199 |
|
|
200 |
/* |
|
201 |
* (non-Javadoc) |
|
202 |
* @see org.gvsig.gpe.gml.profiles.IProfile#getPolygonPropertyTypeBinding() |
|
203 |
*/ |
|
204 |
public PolygonPropertyTypeBinding getPolygonPropertyTypeBinding() { |
|
205 |
return polygonPropertyTypeBinding; |
|
206 |
} |
|
207 |
|
|
208 |
/* |
|
209 |
* (non-Javadoc) |
|
210 |
* @see org.gvsig.gpe.gml.profiles.IProfile#getBoundedByTypeBinding() |
|
211 |
*/ |
|
212 |
public BoundedByTypeBinding getBoundedByTypeBinding() { |
|
213 |
return boundedByTypeBinding; |
|
214 |
} |
|
215 |
|
|
216 |
/* |
|
217 |
* (non-Javadoc) |
|
218 |
* @see org.gvsig.gpe.gml.profiles.IProfile#getFeatureMemberTypeBinding() |
|
219 |
*/ |
|
220 |
public FeatureMemberTypeBinding getFeatureMemberTypeBinding() { |
|
221 |
return featureMemberTypeBinding; |
|
222 |
} |
|
223 |
|
|
224 |
/* |
|
225 |
* (non-Javadoc) |
|
226 |
* @see org.gvsig.gpe.gml.profiles.IProfile#getFeatureTypeBinding() |
|
227 |
*/ |
|
228 |
public FeatureTypeBinding getFeatureTypeBinding() { |
|
229 |
return featureTypeBinding; |
|
230 |
} |
|
231 |
|
|
232 |
/* |
|
233 |
* (non-Javadoc) |
|
234 |
* @see org.gvsig.gpe.gml.profiles.IProfile#getBoxTypeBinding() |
|
235 |
*/ |
|
236 |
public BoxTypeBinding getBoxTypeBinding() { |
|
237 |
return boxTypeBinding; |
|
238 |
} |
|
239 |
|
|
240 |
/* |
|
241 |
* (non-Javadoc) |
|
242 |
* @see org.gvsig.gpe.gml.profiles.IProfile#getCoordinatesTypeBinding() |
|
243 |
*/ |
|
244 |
public CoordinatesTypeIterator getCoordinatesTypeBinding() { |
|
245 |
return coordinatesTypeIterator; |
|
246 |
} |
|
247 |
|
|
248 |
/* |
|
249 |
* (non-Javadoc) |
|
250 |
* @see org.gvsig.gpe.gml.profiles.IProfile#getCoordTypeBinding() |
|
251 |
*/ |
|
252 |
public CoordTypeIterator getCoordTypeBinding() { |
|
253 |
return coordTypeIterator; |
|
254 |
} |
|
255 |
|
|
256 |
/* |
|
257 |
* (non-Javadoc) |
|
258 |
* @see org.gvsig.gpe.gml.profiles.IProfile#getGeometryMemberTypeBinding() |
|
259 |
*/ |
|
260 |
public GeometryMemberTypeBinding getGeometryMemberTypeBinding() { |
|
261 |
return geometryMemberTypeBinding; |
Also available in: Unified diff