Revision 1928
org.gvsig.gpe/library/tags/org.gvsig.gpe-2.1.242/org.gvsig.gpe.lib/org.gvsig.gpe.lib.api/pom.xml | ||
---|---|---|
1 |
<?xml version="1.0" encoding="ISO-8859-1"?> |
|
2 |
<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"> |
|
3 |
<modelVersion>4.0.0</modelVersion> |
|
4 |
<artifactId>org.gvsig.gpe.lib.api</artifactId> |
|
5 |
<packaging>jar</packaging> |
|
6 |
<name>org.gvsig.gpe.lib.api</name> |
|
7 |
<description>Generic Persistence Engine library API</description> |
|
8 |
<parent> |
|
9 |
<groupId>org.gvsig</groupId> |
|
10 |
<artifactId>org.gvsig.gpe.lib</artifactId> |
|
11 |
<version>2.1.242</version> |
|
12 |
</parent> |
|
13 |
<dependencies> |
|
14 |
<dependency> |
|
15 |
<groupId>org.gvsig</groupId> |
|
16 |
<artifactId>org.gvsig.xmlpull.lib.api</artifactId> |
|
17 |
</dependency> |
|
18 |
</dependencies> |
|
19 |
</project> |
|
20 |
|
|
0 | 21 |
org.gvsig.gpe/library/tags/org.gvsig.gpe-2.1.242/org.gvsig.gpe.lib/org.gvsig.gpe.lib.api/src/main/java/org/gvsig/gpe/lib/api/exceptions/WriterHandlerNotRegisteredException.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.lib.api.exceptions; |
|
29 |
|
|
30 |
import java.util.Hashtable; |
|
31 |
import java.util.Map; |
|
32 |
|
|
33 |
public class WriterHandlerNotRegisteredException extends WriterHandlerCreationException { |
|
34 |
/** |
|
35 |
* |
|
36 |
*/ |
|
37 |
private static final long serialVersionUID = 3901631250887201546L; |
|
38 |
|
|
39 |
private String className = null; |
|
40 |
|
|
41 |
public WriterHandlerNotRegisteredException(String className) { |
|
42 |
this.className = className; |
|
43 |
initialize(); |
|
44 |
} |
|
45 |
|
|
46 |
/** |
|
47 |
* Initialize the properties |
|
48 |
*/ |
|
49 |
private void initialize() { |
|
50 |
messageKey = "gpe_writer_handler_creation_class_not_registered"; |
|
51 |
formatString = "The writer with class name %(className) " + |
|
52 |
"has not been registered yet"; |
|
53 |
} |
|
54 |
|
|
55 |
/* |
|
56 |
* (non-Javadoc) |
|
57 |
* @see org.gvsig.tools.exception.BaseException#values() |
|
58 |
*/ |
|
59 |
protected Map values() { |
|
60 |
Hashtable params = new Hashtable(); |
|
61 |
params.put("className",className); |
|
62 |
return params; |
|
63 |
} |
|
64 |
|
|
65 |
} |
|
66 |
|
|
67 |
|
|
68 |
|
|
69 |
|
|
0 | 70 |
org.gvsig.gpe/library/tags/org.gvsig.gpe-2.1.242/org.gvsig.gpe.lib/org.gvsig.gpe.lib.api/src/main/java/org/gvsig/gpe/lib/api/exceptions/ParserNameNotFoundException.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.lib.api.exceptions; |
|
29 |
|
|
30 |
import java.util.Hashtable; |
|
31 |
import java.util.Map; |
|
32 |
|
|
33 |
public class ParserNameNotFoundException extends ParserCreationException { |
|
34 |
/** |
|
35 |
* |
|
36 |
*/ |
|
37 |
private static final long serialVersionUID = -6315192736102348696L; |
|
38 |
private String name = null; |
|
39 |
|
|
40 |
public ParserNameNotFoundException(String name) { |
|
41 |
this.name = name; |
|
42 |
initialize(); |
|
43 |
} |
|
44 |
|
|
45 |
/** |
|
46 |
* Initialize the properties |
|
47 |
*/ |
|
48 |
private void initialize() { |
|
49 |
messageKey = "gpe_parser_creation_name_not_found"; |
|
50 |
formatString = "The parser with name %(name) has not been found "; |
|
51 |
} |
|
52 |
|
|
53 |
/* |
|
54 |
* (non-Javadoc) |
|
55 |
* @see org.gvsig.tools.exception.BaseException#values() |
|
56 |
*/ |
|
57 |
protected Map values() { |
|
58 |
Hashtable params = new Hashtable(); |
|
59 |
params.put("name",name); |
|
60 |
return params; |
|
61 |
} |
|
62 |
|
|
63 |
} |
|
64 |
|
|
0 | 65 |
org.gvsig.gpe/library/tags/org.gvsig.gpe-2.1.242/org.gvsig.gpe.lib/org.gvsig.gpe.lib.api/src/main/java/org/gvsig/gpe/lib/api/exceptions/ParserNotRegisteredException.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.lib.api.exceptions; |
|
29 |
|
|
30 |
import java.util.Hashtable; |
|
31 |
import java.util.Map; |
|
32 |
|
|
33 |
public class ParserNotRegisteredException extends ParserCreationException { |
|
34 |
/** |
|
35 |
* |
|
36 |
*/ |
|
37 |
private static final long serialVersionUID = 526423919232532055L; |
|
38 |
private String className = null; |
|
39 |
|
|
40 |
public ParserNotRegisteredException(String className) { |
|
41 |
this.className = className; |
|
42 |
initialize(); |
|
43 |
} |
|
44 |
|
|
45 |
/** |
|
46 |
* Initialize the properties |
|
47 |
*/ |
|
48 |
private void initialize() { |
|
49 |
messageKey = "gpe_parser_creation_class_not_registered"; |
|
50 |
formatString = "The parser with class name %(className) " + |
|
51 |
"has not been registered yet"; |
|
52 |
} |
|
53 |
|
|
54 |
/* |
|
55 |
* (non-Javadoc) |
|
56 |
* @see org.gvsig.tools.exception.BaseException#values() |
|
57 |
*/ |
|
58 |
protected Map values() { |
|
59 |
Hashtable params = new Hashtable(); |
|
60 |
params.put("className",className); |
|
61 |
return params; |
|
62 |
} |
|
63 |
|
|
64 |
} |
|
65 |
|
|
66 |
|
|
67 |
|
|
68 |
|
|
0 | 69 |
org.gvsig.gpe/library/tags/org.gvsig.gpe-2.1.242/org.gvsig.gpe.lib/org.gvsig.gpe.lib.api/src/main/java/org/gvsig/gpe/lib/api/exceptions/WriterHandlerMimeTypeNotSupportedException.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.lib.api.exceptions; |
|
29 |
|
|
30 |
import java.util.Hashtable; |
|
31 |
import java.util.Map; |
|
32 |
|
|
33 |
public class WriterHandlerMimeTypeNotSupportedException extends WriterHandlerCreationException { |
|
34 |
/** |
|
35 |
* |
|
36 |
*/ |
|
37 |
private static final long serialVersionUID = -8043491289837882507L; |
|
38 |
|
|
39 |
private String mimeType = null; |
|
40 |
|
|
41 |
public WriterHandlerMimeTypeNotSupportedException(String mimeType) { |
|
42 |
this.mimeType = mimeType; |
|
43 |
initialize(); |
|
44 |
} |
|
45 |
|
|
46 |
/** |
|
47 |
* Initialize the properties |
|
48 |
*/ |
|
49 |
private void initialize() { |
|
50 |
messageKey = "gpe_writer_handler_creation_mimetype_not_found"; |
|
51 |
formatString = "There is not a writer to write the mimetype %(mimetype)"; |
|
52 |
} |
|
53 |
|
|
54 |
/* |
|
55 |
* (non-Javadoc) |
|
56 |
* @see org.gvsig.tools.exception.BaseException#values() |
|
57 |
*/ |
|
58 |
protected Map values() { |
|
59 |
Hashtable params = new Hashtable(); |
|
60 |
params.put("mimetype",mimeType); |
|
61 |
return params; |
|
62 |
} |
|
63 |
|
|
64 |
} |
|
65 |
|
|
66 |
|
|
67 |
|
|
0 | 68 |
org.gvsig.gpe/library/tags/org.gvsig.gpe-2.1.242/org.gvsig.gpe.lib/org.gvsig.gpe.lib.api/src/main/java/org/gvsig/gpe/lib/api/exceptions/ParserMimetypeNotSupportedException.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.lib.api.exceptions; |
|
29 |
|
|
30 |
import java.util.Hashtable; |
|
31 |
import java.util.Map; |
|
32 |
|
|
33 |
public class ParserMimetypeNotSupportedException extends ParserCreationException { |
|
34 |
/** |
|
35 |
* |
|
36 |
*/ |
|
37 |
private static final long serialVersionUID = 9064233953718286477L; |
|
38 |
private String mimeType = null; |
|
39 |
|
|
40 |
public ParserMimetypeNotSupportedException(String mimeType) { |
|
41 |
this.mimeType = mimeType; |
|
42 |
initialize(); |
|
43 |
} |
|
44 |
|
|
45 |
/** |
|
46 |
* Initialize the properties |
|
47 |
*/ |
|
48 |
private void initialize() { |
|
49 |
messageKey = "gpe_parser_creation_mimetype_not_found"; |
|
50 |
formatString = "There is not a parser to parse the mimetype %(mimetype)"; |
|
51 |
} |
|
52 |
|
|
53 |
/* |
|
54 |
* (non-Javadoc) |
|
55 |
* @see org.gvsig.tools.exception.BaseException#values() |
|
56 |
*/ |
|
57 |
protected Map values() { |
|
58 |
Hashtable params = new Hashtable(); |
|
59 |
params.put("mimetype",mimeType); |
|
60 |
return params; |
|
61 |
} |
|
62 |
|
|
63 |
} |
|
64 |
|
|
65 |
|
|
0 | 66 |
org.gvsig.gpe/library/tags/org.gvsig.gpe-2.1.242/org.gvsig.gpe.lib/org.gvsig.gpe.lib.api/src/main/java/org/gvsig/gpe/lib/api/exceptions/WriterHandlerCreationException.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.lib.api.exceptions; |
|
29 |
|
|
30 |
import java.util.HashMap; |
|
31 |
import java.util.Map; |
|
32 |
|
|
33 |
import org.gvsig.tools.exception.BaseException; |
|
34 |
|
|
35 |
/** |
|
36 |
* This exception is thrown it has been an error in the |
|
37 |
* writer creation. The reason for this error can be other |
|
38 |
* exception or a detailed error. |
|
39 |
*/ |
|
40 |
public class WriterHandlerCreationException extends BaseException { |
|
41 |
|
|
42 |
/** |
|
43 |
* |
|
44 |
*/ |
|
45 |
private static final long serialVersionUID = 3512666764912250722L; |
|
46 |
|
|
47 |
public WriterHandlerCreationException() { |
|
48 |
super(); |
|
49 |
initialize(); |
|
50 |
} |
|
51 |
|
|
52 |
public WriterHandlerCreationException(Throwable e) { |
|
53 |
super(); |
|
54 |
initCause(e); |
|
55 |
initialize(); |
|
56 |
} |
|
57 |
|
|
58 |
/** |
|
59 |
* Initialize the properties |
|
60 |
*/ |
|
61 |
private void initialize() { |
|
62 |
messageKey = "gpe_writer_handler_creation_exception"; |
|
63 |
formatString = "Impossible to create a writer"; |
|
64 |
} |
|
65 |
|
|
66 |
/* |
|
67 |
* (non-Javadoc) |
|
68 |
* @see org.gvsig.tools.exception.BaseException#values() |
|
69 |
*/ |
|
70 |
protected Map values() { |
|
71 |
return new HashMap(); |
|
72 |
} |
|
73 |
|
|
74 |
|
|
75 |
} |
|
76 |
|
|
77 |
|
|
0 | 78 |
org.gvsig.gpe/library/tags/org.gvsig.gpe-2.1.242/org.gvsig.gpe.lib/org.gvsig.gpe.lib.api/src/main/java/org/gvsig/gpe/lib/api/exceptions/ParserCreationException.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.lib.api.exceptions; |
|
29 |
|
|
30 |
import java.util.HashMap; |
|
31 |
import java.util.Map; |
|
32 |
|
|
33 |
import org.gvsig.tools.exception.BaseException; |
|
34 |
|
|
35 |
/** |
|
36 |
* This exception is thrown it has been an error in the |
|
37 |
* parser creation. The reason for this error can be other |
|
38 |
* exception or a detailed error. |
|
39 |
*/ |
|
40 |
public class ParserCreationException extends BaseException { |
|
41 |
private static final long serialVersionUID = 5482517192827506712L; |
|
42 |
|
|
43 |
public ParserCreationException() { |
|
44 |
super(); |
|
45 |
initialize(); |
|
46 |
} |
|
47 |
|
|
48 |
public ParserCreationException(Throwable e) { |
|
49 |
super(); |
|
50 |
initCause(e); |
|
51 |
initialize(); |
|
52 |
} |
|
53 |
|
|
54 |
/** |
|
55 |
* Initialize the properties |
|
56 |
*/ |
|
57 |
private void initialize() { |
|
58 |
messageKey = "gpe_parser_creation_exception"; |
|
59 |
formatString = "Impossible to create a parser"; |
|
60 |
} |
|
61 |
|
|
62 |
/* |
|
63 |
* (non-Javadoc) |
|
64 |
* @see org.gvsig.tools.exception.BaseException#values() |
|
65 |
*/ |
|
66 |
protected Map values() { |
|
67 |
return new HashMap(); |
|
68 |
} |
|
69 |
|
|
70 |
|
|
71 |
} |
|
72 |
|
|
0 | 73 |
org.gvsig.gpe/library/tags/org.gvsig.gpe-2.1.242/org.gvsig.gpe.lib/org.gvsig.gpe.lib.api/src/main/java/org/gvsig/gpe/lib/api/exceptions/ParserFileNotSupportedException.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.lib.api.exceptions; |
|
29 |
|
|
30 |
import java.io.File; |
|
31 |
import java.net.URI; |
|
32 |
import java.util.Hashtable; |
|
33 |
import java.util.Map; |
|
34 |
|
|
35 |
public class ParserFileNotSupportedException extends ParserCreationException { |
|
36 |
/** |
|
37 |
* |
|
38 |
*/ |
|
39 |
private static final long serialVersionUID = 576971727796678053L; |
|
40 |
private String uri = null; |
|
41 |
|
|
42 |
public ParserFileNotSupportedException(URI uri) { |
|
43 |
this.uri = uri.toString(); |
|
44 |
initialize(); |
|
45 |
} |
|
46 |
|
|
47 |
public ParserFileNotSupportedException(File file) { |
|
48 |
this.uri = file.getAbsolutePath(); |
|
49 |
initialize(); |
|
50 |
} |
|
51 |
|
|
52 |
/** |
|
53 |
* Initialize the properties |
|
54 |
*/ |
|
55 |
private void initialize() { |
|
56 |
messageKey = "gpe_parser_creation_uri_not_found"; |
|
57 |
formatString = "There is not a parser to parse the resource %(uri)"; |
|
58 |
} |
|
59 |
|
|
60 |
/* |
|
61 |
* (non-Javadoc) |
|
62 |
* @see org.gvsig.tools.exception.BaseException#values() |
|
63 |
*/ |
|
64 |
protected Map values() { |
|
65 |
Hashtable params = new Hashtable(); |
|
66 |
params.put("uri",uri); |
|
67 |
return params; |
|
68 |
} |
|
69 |
|
|
70 |
} |
|
71 |
|
|
72 |
|
|
73 |
|
|
0 | 74 |
org.gvsig.gpe/library/tags/org.gvsig.gpe-2.1.242/org.gvsig.gpe.lib/org.gvsig.gpe.lib.api/src/main/java/org/gvsig/gpe/lib/api/GPEManager.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 |
* 2009 {Iver T.I.} {Task} |
|
26 |
*/ |
|
27 |
|
|
28 |
package org.gvsig.gpe.lib.api; |
|
29 |
|
|
30 |
import java.io.File; |
|
31 |
import java.net.URI; |
|
32 |
import java.util.Iterator; |
|
33 |
|
|
34 |
import org.gvsig.gpe.lib.api.exceptions.ParserCreationException; |
|
35 |
import org.gvsig.gpe.lib.api.exceptions.WriterHandlerCreationException; |
|
36 |
import org.gvsig.gpe.lib.api.parser.IGPEContentHandler; |
|
37 |
import org.gvsig.gpe.lib.api.parser.IGPEContentHandlerInmGeom; |
|
38 |
import org.gvsig.gpe.lib.api.parser.IGPEErrorHandler; |
|
39 |
import org.gvsig.gpe.lib.api.writer.IGPEWriterHandler; |
|
40 |
|
|
41 |
/** |
|
42 |
* @author <a href="mailto:jpiera@gvsig.org">Jorge Piera</a> |
|
43 |
*/ |
|
44 |
public interface GPEManager { |
|
45 |
|
|
46 |
/** |
|
47 |
* Return true if exists a driver that can open the file |
|
48 |
* @param uri |
|
49 |
* File to open |
|
50 |
* @return |
|
51 |
* true if the driver exists |
|
52 |
*/ |
|
53 |
public boolean accept(URI uri); |
|
54 |
|
|
55 |
/** |
|
56 |
* Method to parse a file. It cannot to throw |
|
57 |
* any exception and it cannot to return any value. |
|
58 |
* In a future it could be implemented like a independent |
|
59 |
* thread |
|
60 |
* @param contents |
|
61 |
* Application ContentHandler |
|
62 |
* @param errors |
|
63 |
* Application ErrorsHandler |
|
64 |
* @param uri |
|
65 |
* File to open |
|
66 |
* @throws ParserCreationException |
|
67 |
* @throws Exception |
|
68 |
*/ |
|
69 |
public void parse(IGPEContentHandler contents, IGPEErrorHandler errors, URI uri) throws ParserCreationException; |
|
70 |
|
|
71 |
/** |
|
72 |
* Method to parse a file. It cannot to throw |
|
73 |
* any exception and it cannot to return any value. |
|
74 |
* In a future it could be implemented like a independent |
|
75 |
* thread |
|
76 |
* @param contents |
|
77 |
* Application ContentHandler |
|
78 |
* @param errors |
|
79 |
* Application ErrorsHandler |
|
80 |
* @param file |
|
81 |
* File to open |
|
82 |
* @throws ParserCreationException |
|
83 |
* @throws Exception |
|
84 |
*/ |
|
85 |
public void parse(IGPEContentHandler contents, IGPEErrorHandler errors, File file) throws ParserCreationException; |
|
86 |
|
|
87 |
/** |
|
88 |
* Method to parse a file. It cannot to throw |
|
89 |
* any exception and it cannot to return any value. |
|
90 |
* In a future it could be implemented like a independent |
|
91 |
* thread |
|
92 |
* @param contents |
|
93 |
* Application ContentHandler |
|
94 |
* @param errors |
|
95 |
* Application ErrorsHandler |
|
96 |
* @param uri |
|
97 |
* File to open |
|
98 |
* @throws ParserCreationException |
|
99 |
* @throws Exception |
|
100 |
*/ |
|
101 |
public void parse(IGPEContentHandlerInmGeom contents, IGPEErrorHandler errors, URI uri) throws ParserCreationException; |
|
102 |
|
|
103 |
/** |
|
104 |
* Method to parse a file. It cannot to throw |
|
105 |
* any exception and it cannot to return any value. |
|
106 |
* In a future it could be implemented like a independent |
|
107 |
* thread |
|
108 |
* @param contents |
|
109 |
* Application ContentHandler |
|
110 |
* @param errors |
|
111 |
* Application ErrorsHandler |
|
112 |
* @param file |
|
113 |
* File to open |
|
114 |
* @throws ParserCreationException |
|
115 |
* @throws Exception |
|
116 |
*/ |
|
117 |
public void parse(IGPEContentHandlerInmGeom contents, IGPEErrorHandler errors, File file) throws ParserCreationException; |
|
118 |
|
|
119 |
/** |
|
120 |
* Create a new content writer from a name |
|
121 |
* @param name |
|
122 |
* GPEWriterHandler name |
|
123 |
* GPEParser name |
|
124 |
* @param contenHandler |
|
125 |
* Application contenHandler usett to throw the parsing events |
|
126 |
* @param errorHandler |
|
127 |
* Application errror handler used to put errors and warnings |
|
128 |
* @throws GPEWriterHandlerCreationException |
|
129 |
*/ |
|
130 |
public IGPEWriterHandler createWriter(String name) throws WriterHandlerCreationException; |
|
131 |
|
|
132 |
/** |
|
133 |
* Create a new writer from a class name. This method can be used |
|
134 |
* if the class name is known but, the common method to get a writer |
|
135 |
* is using the mime type. * |
|
136 |
* @param prefferredImplClassName |
|
137 |
* The name of the class that implements {@link GPEWriterHandler} |
|
138 |
* @return |
|
139 |
* A writer for a concrete format. |
|
140 |
* @throws WriterHandlerCreationException |
|
141 |
* If it is not possible to create a writer |
|
142 |
*/ |
|
143 |
public IGPEWriterHandler createWriterByClass(String prefferredImplClassName) throws WriterHandlerCreationException; |
|
144 |
|
|
145 |
/** |
|
146 |
* Create a new writer from a mime type. Each writer has a method |
|
147 |
* named {@link GPEWriterHandler#getFormat()} that returns the mimetype |
|
148 |
* that the writer can write. One writer only supports one mimetype. |
|
149 |
* <p> |
|
150 |
* This method retrieve all the writers and returns the first |
|
151 |
* one that is able to write the mimetype. If there are more |
|
152 |
* writer that can write the format will not be used. |
|
153 |
* </p> |
|
154 |
* @param mimeType |
|
155 |
* The mimetype of the file to write |
|
156 |
* @return |
|
157 |
* A writer that can write the mimetype. |
|
158 |
* @throws WriterHandlerCreationException |
|
159 |
* If it is not possible to create a writer |
|
160 |
* @see |
|
161 |
* <a href="http://www.iana.org/assignments/media-types/">http://www.iana.org/assignments/media-types/</a> |
|
162 |
*/ |
|
163 |
public IGPEWriterHandler createWriterByMimeType(String mimeType) throws WriterHandlerCreationException; |
|
164 |
|
|
165 |
|
|
166 |
/** |
|
167 |
* Returns an iterator with the name of all the properties that |
|
168 |
* has been established. |
|
169 |
*/ |
|
170 |
public Iterator getKeys(); |
|
171 |
|
|
172 |
|
|
173 |
/** |
|
174 |
* Gets a String property |
|
175 |
* @param key |
|
176 |
* Property name |
|
177 |
* @return |
|
178 |
*/ |
|
179 |
public String getStringProperty(String key); |
|
180 |
|
|
181 |
/** |
|
182 |
* Gets a int property |
|
183 |
* @param key |
|
184 |
* Property name |
|
185 |
* @return |
|
186 |
* The int property or -1 |
|
187 |
*/ |
|
188 |
public int getIntPropertyProperty(String key); |
|
189 |
|
|
190 |
/** |
|
191 |
* Gets a boolean property. If the property doesn't exist |
|
192 |
* it returns false. |
|
193 |
* @param key |
|
194 |
* Property name |
|
195 |
* @return |
|
196 |
* The boolean property or false |
|
197 |
*/ |
|
198 |
public boolean getBooleanProperty(String key); |
|
199 |
|
|
200 |
/** |
|
201 |
* Gets a property |
|
202 |
* @param key |
|
203 |
* Property name |
|
204 |
* @return |
|
205 |
*/ |
|
206 |
public Object getProperty(String key); |
|
207 |
|
|
208 |
/** |
|
209 |
* Sets a property |
|
210 |
* @param key |
|
211 |
* @param value |
|
212 |
*/ |
|
213 |
public void setProperty(String key, Object value); |
|
214 |
|
|
215 |
|
|
216 |
public String getDefaultProjection(File file) throws ParserCreationException; |
|
217 |
} |
|
218 |
|
|
0 | 219 |
org.gvsig.gpe/library/tags/org.gvsig.gpe-2.1.242/org.gvsig.gpe.lib/org.gvsig.gpe.lib.api/src/main/java/org/gvsig/gpe/lib/api/GPEProperties.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.lib.api; |
|
29 |
|
|
30 |
|
|
31 |
/** |
|
32 |
* This class contains the generic properties for all the |
|
33 |
* GPE parsers and writers. |
|
34 |
*/ |
|
35 |
public class GPEProperties { |
|
36 |
public static final String DECIMAL_DIGITS = "decimalDigits"; |
|
37 |
} |
|
38 |
|
|
39 |
|
|
0 | 40 |
org.gvsig.gpe/library/tags/org.gvsig.gpe-2.1.242/org.gvsig.gpe.lib/org.gvsig.gpe.lib.api/src/main/java/org/gvsig/gpe/lib/api/parser/IAttributesIterator.java | ||
---|---|---|
1 |
|
|
2 |
package org.gvsig.gpe.lib.api.parser; |
|
3 |
|
|
4 |
import java.io.IOException; |
|
5 |
|
|
6 |
import org.gvsig.xmlpull.lib.api.stream.IQName; |
|
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$ |
|
50 |
* $Log$ |
|
51 |
* |
|
52 |
*/ |
|
53 |
/** |
|
54 |
* @author Carlos S?nchez Peri??n |
|
55 |
*/ |
|
56 |
public interface IAttributesIterator { |
|
57 |
/** |
|
58 |
* Returns whether there are more attributes in this sequence |
|
59 |
* |
|
60 |
* @return |
|
61 |
* @throws IOException |
|
62 |
*/ |
|
63 |
public boolean hasNext() throws IOException; |
|
64 |
|
|
65 |
/** |
|
66 |
* Returns the dimension of the attributes list. Consumer code should use it to |
|
67 |
* pass a buffer with the correct lenght. |
|
68 |
* |
|
69 |
* @return |
|
70 |
*/ |
|
71 |
public int getNumAttributes(); |
|
72 |
|
|
73 |
/** |
|
74 |
* Value of next attribute |
|
75 |
*/ |
|
76 |
public Object nextAttribute() throws IOException; |
|
77 |
|
|
78 |
/** |
|
79 |
* @return the name of the next attribute |
|
80 |
*/ |
|
81 |
public IQName nextAttributeName(); |
|
82 |
|
|
83 |
/** |
|
84 |
* Initializes the iterator |
|
85 |
*/ |
|
86 |
public void initialize(); |
|
87 |
} |
|
0 | 88 |
org.gvsig.gpe/library/tags/org.gvsig.gpe-2.1.242/org.gvsig.gpe.lib/org.gvsig.gpe.lib.api/src/main/java/org/gvsig/gpe/lib/api/parser/IGPEContentHandlerInmGeom.java | ||
---|---|---|
1 |
package org.gvsig.gpe.lib.api.parser; |
|
2 |
/* gvSIG. Sistema de Informacin Geogrfica 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 Ibez, 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: IGPEContentHandler.java 202 2007-11-27 12:00:11Z jpiera $ |
|
45 |
* $Log$ |
|
46 |
* Revision 1.18 2007/06/20 09:35:37 jorpiell |
|
47 |
* Add the javadoc comments |
|
48 |
* |
|
49 |
* Revision 1.17 2007/06/19 10:34:51 jorpiell |
|
50 |
* Add some comments and creates a warning when an operation is not supported |
|
51 |
* |
|
52 |
* |
|
53 |
*/ |
|
54 |
/** |
|
55 |
* This interface defines the "contract" between the consumer |
|
56 |
* application and libGPE. It has methods that will be invoke |
|
57 |
* by the parser every time that an event happens |
|
58 |
* @author Jorge Piera Llodr (jorge.piera@iver.es) |
|
59 |
* @author Carlos Snchez Perin (sanchez_carper@gva.es) |
|
60 |
*/ |
|
61 |
public interface IGPEContentHandlerInmGeom extends IGPEContentHandlerSFP0{ |
|
62 |
|
|
63 |
/** |
|
64 |
* This method is thrown when the parser find a new |
|
65 |
* bounding box. |
|
66 |
* @param id |
|
67 |
* Bounding box identifier |
|
68 |
* @param coords |
|
69 |
* A coordinates iterator |
|
70 |
* @param srs |
|
71 |
* Spatial reference system |
|
72 |
* @return |
|
73 |
* The consumer application object that represents |
|
74 |
* a bounding box |
|
75 |
*/ |
|
76 |
public Object startBbox(String id, ICoordinateIterator coords, String srs); |
|
77 |
|
|
78 |
/** |
|
79 |
* This method indicates that the parser thas finished to |
|
80 |
* parse the bounding box. |
|
81 |
* @param bbox |
|
82 |
* The consumer application object that represents a |
|
83 |
* bounding box |
|
84 |
*/ |
|
85 |
public void endBbox(Object bbox); |
|
86 |
|
|
87 |
/** |
|
88 |
* It is thrown every time that a new layer is detected. |
|
89 |
* @param id |
|
90 |
* Layer identifier |
|
91 |
* @param namespace |
|
92 |
* XML namespace |
|
93 |
* @param name |
|
94 |
* Layer name |
|
95 |
* @param description |
|
96 |
* Layer description |
|
97 |
* @param srs |
|
98 |
* Layer spatial reference system |
|
99 |
* @param attributes |
|
100 |
* Layer attributes |
|
101 |
* @param parentLayer |
|
102 |
* Layer that contains it |
|
103 |
* @param bBox |
|
104 |
* Layer bounding box |
|
105 |
* @return |
|
106 |
* The consumer application object that represents a layer |
|
107 |
*/ |
|
108 |
public Object startLayer(String id, String namespace, String name, String description, |
|
109 |
String srs, IAttributesIterator attributes, Object parentLayer, Object bBox); |
|
110 |
|
|
111 |
/** |
|
112 |
* It is thrown when a layer has been finished to parse. |
|
113 |
* @param layer |
|
114 |
* The consumer application object that represents a layer |
|
115 |
*/ |
|
116 |
public void endLayer(Object layer); |
|
117 |
|
|
118 |
/** |
|
119 |
* It adds a name to one layer that has been previously |
|
120 |
* created using the startLayer method. |
|
121 |
* @param name |
|
122 |
* Layer name |
|
123 |
* @param layer |
|
124 |
* The consumer application object that represents a layer |
|
125 |
*/ |
|
126 |
public void addNameToLayer(String name, Object layer); |
|
127 |
|
|
128 |
/** |
|
129 |
* It adds the description to one layer that has been previously |
|
130 |
* created using the startLayer method. |
|
131 |
* @param description |
|
132 |
* Layer description |
|
133 |
* @param layer |
|
134 |
* The consumer application object that represents a layer |
|
135 |
*/ |
|
136 |
public void addDescriptionToLayer(String description, Object layer); |
|
137 |
|
|
138 |
/** |
|
139 |
* It adds a spatial reference system to one layer that |
|
140 |
* has been previously created using the startLayer method. |
|
141 |
* @param srs |
|
142 |
* Spatial reference system |
|
143 |
* @param layer |
|
144 |
* The consumer application object that represents a layer |
|
145 |
*/ |
|
146 |
public void addSrsToLayer(String srs, Object Layer); |
|
147 |
|
|
148 |
/** |
|
149 |
* It establish the relationship parent-child between two layers |
|
150 |
* that have been previously created using the startLayer method. |
|
151 |
* @param parent |
|
152 |
* The consumer application object that represents the parent layer |
|
153 |
* @param layer |
|
154 |
* The consumer application object that represents the child layer |
|
155 |
*/ |
|
156 |
public void addParentLayerToLayer(Object parent, Object layer); |
|
157 |
|
|
158 |
/** |
|
159 |
* It adds a bounding box to one layer that has been previously |
|
160 |
* created using the startLayer method. |
|
161 |
* @param bbox |
|
162 |
* Layer bounding box |
|
163 |
* @param layer |
|
164 |
* The consumer application object that represents a layer |
|
165 |
*/ |
|
166 |
public void addBboxToLayer(Object bbox, Object layer); |
|
167 |
|
|
168 |
/** |
|
169 |
* It is thrown when the parser has found a new feature. |
|
170 |
* @param id |
|
171 |
* Feature identifier |
|
172 |
* @param name |
|
173 |
* Feature name |
|
174 |
* @param namespace |
|
175 |
* XML namespace |
|
176 |
* @param attributes |
|
177 |
* Feature attributes |
|
178 |
* @param layer |
|
179 |
* Consumer application object that represents a layer |
|
180 |
* @return |
|
181 |
* Consumer application object that represents a feature |
|
182 |
*/ |
|
183 |
public Object startFeature(String id, String namespace, String name, IAttributesIterator attributes, Object layer); |
|
184 |
|
|
185 |
/** |
|
186 |
* This method is thrown when the parser has finished to |
|
187 |
* parse a feature. |
|
188 |
* @param feature |
|
189 |
* Consumer application object that represents a feature |
|
190 |
*/ |
|
191 |
public void endFeature(Object feature); |
|
192 |
|
|
193 |
/** |
|
194 |
* This method adds a name to one layer that has been |
|
195 |
* previously created using the startFeature method. |
|
196 |
* @param name |
|
197 |
* Feature name |
|
198 |
* @param feature |
|
199 |
* Consumer application object that represents a feature |
|
200 |
*/ |
|
201 |
public void addNameToFeature(String name, Object feature); |
|
202 |
|
|
203 |
/** |
|
204 |
* This method adds a feature to one layer that has been |
|
205 |
* previously created using the startLayer method. |
|
206 |
* @param feature |
|
207 |
* Consumer application object that represents a feature |
|
208 |
* @param layer |
|
209 |
* Consumer application object that represents a layer |
|
210 |
*/ |
|
211 |
public void addFeatureToLayer(Object feature, Object layer); |
|
212 |
|
|
213 |
/** |
|
214 |
* It is thrown when the parser has found a new element |
|
215 |
* @param namespace |
|
216 |
* XML namespace |
|
217 |
* @param name |
|
218 |
* Element name |
|
219 |
* @param value |
|
220 |
* Element value |
|
221 |
* @param attributes |
|
222 |
* Element attributes |
|
223 |
* @param parentElement |
|
224 |
* The parent of this element (if exists) |
|
225 |
* @return |
|
226 |
* Consumer application object that represents an element |
|
227 |
*/ |
|
228 |
public Object startElement(String namespace, String name, Object value, |
|
229 |
IAttributesIterator attributes, Object parentElement); |
|
230 |
|
|
231 |
/** |
|
232 |
* This method is thrown when the parser find the end |
|
233 |
* of an element. |
|
234 |
* @param element |
|
235 |
* Consumer application object that represents an element |
|
236 |
*/ |
|
237 |
public void endElement(Object element); |
|
238 |
|
|
239 |
/** |
|
240 |
* It is thrown to establish a relationship parent-child |
|
241 |
* between two elements. |
|
242 |
* @param parent |
|
243 |
* Consumer application object that represents the parent element |
|
244 |
* @param element |
|
245 |
* Consumer application object that represents the child element |
|
246 |
*/ |
|
247 |
public void addParentElementToElement(Object parent, Object element); |
|
248 |
|
|
249 |
/** |
|
250 |
* This method adds an element to one feature that has been |
|
251 |
* previously created using the startFeature method |
|
252 |
* @param element |
|
253 |
* Consumer application object that represents an element |
|
254 |
* @param feature |
|
255 |
* Consumer application object that represents the feature |
|
256 |
*/ |
|
257 |
public void addElementToFeature(Object element, Object feature); |
|
258 |
|
|
259 |
/** |
|
260 |
* This method indicates that the parser has found a point. |
|
261 |
* @param id |
|
262 |
* Point identifier |
|
263 |
* @param coords |
|
264 |
* A coordinates iterator |
|
265 |
* @param srs |
|
266 |
* Spatial reference system |
|
267 |
* @return |
|
268 |
* Consumer application object that represents a point |
|
269 |
*/ |
|
270 |
public Object startPoint(String id, ICoordinateIterator coords, String srs); |
|
271 |
|
|
272 |
/** |
|
273 |
* It is thrown when the point has been completely parsed. |
|
274 |
* @param point |
|
275 |
* Consumer application object that represents a point |
|
276 |
*/ |
|
277 |
public void endPoint(Object point); |
|
278 |
|
|
279 |
/** |
|
280 |
* This method indicates that the parser has found a lineString. |
|
281 |
* @param id |
|
282 |
* LineString identifier |
|
283 |
* @param coords |
|
284 |
* A coordinates iterator |
|
285 |
* @param srs |
|
286 |
* Spatial reference system |
|
287 |
* @return |
|
288 |
* Consumer application object that represents a lineString |
|
289 |
*/ |
|
290 |
public Object startLineString( String id, ICoordinateIterator coords, String srs); |
|
291 |
|
|
292 |
/** |
|
293 |
* It is thrown when the lineString has been completely parsed. |
|
294 |
* @param lineString |
|
295 |
* Consumer application object that represents a lineString |
|
296 |
*/ |
|
297 |
public void endLineString(Object lineString); |
|
298 |
|
|
299 |
/** |
|
300 |
* This method indicates that the parser has found a linearRing. |
|
301 |
* @param id |
|
302 |
* LinearRing identifier |
|
303 |
* @param coords |
|
304 |
* A coordinates iterator |
|
305 |
* @param srs |
|
306 |
* Spatial reference system |
|
307 |
* @return |
|
308 |
* Consumer application object that represents a linarRing |
|
309 |
*/ |
|
310 |
public Object startLinearRing(String id, ICoordinateIterator coords, String srs); |
|
311 |
|
|
312 |
/** |
|
313 |
* It is thrown when the linearRing has been completely parsed. |
|
314 |
* @param linearRing |
|
315 |
* Consumer application object that represents a linearRing |
|
316 |
*/ |
|
317 |
public void endLinearRing(Object linearRing); |
|
318 |
|
|
319 |
/** |
|
320 |
* This method indicates that the parser has found a polygon. |
|
321 |
* @param id |
|
322 |
* Polygon identifier |
|
323 |
* @param coords |
|
324 |
* A coordinates iterator |
|
325 |
* @param srs |
|
326 |
* Spatial reference system |
|
327 |
* @return |
|
328 |
* Consumer application object that represents a polygon |
|
329 |
*/ |
|
330 |
public Object startPolygon(String id, ICoordinateIterator coords, String srs); |
|
331 |
|
|
332 |
/** |
|
333 |
* It is thrown when the polygon has been completely parsed. |
|
334 |
* @param polygon |
|
335 |
* Consumer application object that represents a polygon |
|
336 |
* As a polygon can have holes, when instantiating an inmutable polygon is needed to know the outerBoundary and the holes, the instantiating takes place here |
|
337 |
*/ |
|
338 |
public Object endPolygon(Object polygon); |
|
339 |
|
|
340 |
/** |
|
341 |
* This method associates a innerPolygon with its polygon |
|
342 |
* @param innerPolygon |
|
343 |
* Consumer application object that represents a innerPolygon |
|
344 |
* @param Polygon |
|
345 |
* Consumer application object that represents a polygon |
|
346 |
*/ |
|
347 |
public void addInnerPolygonToPolygon(Object innerPolygon, Object Polygon); |
|
348 |
|
|
349 |
/** |
|
350 |
* This method indicates that the parser has found a InnerPolygon. |
|
351 |
* @param id |
|
352 |
* InnerPolygon identifier |
|
353 |
* @param coords |
|
354 |
* A coordinates iterator |
|
355 |
* @param srs |
|
356 |
* Spatial reference system |
|
357 |
* @return |
|
358 |
* Consumer application object that represents a innerPolygon |
|
359 |
*/ |
|
360 |
public Object startInnerPolygon(String id, ICoordinateIterator coords, String srs); |
|
361 |
|
|
362 |
/** |
|
363 |
* It is thrown when the innerPolygon has been completely parsed. |
|
364 |
* @param innerPolygon |
|
365 |
* Consumer application object that represents a innerPolygon |
|
366 |
*/ |
|
367 |
public void endInnerPolygon(Object innerPolygon); |
|
368 |
|
|
369 |
/** |
|
370 |
* This method indicates that the parser has found a multipoint. |
|
371 |
* @param id |
|
372 |
* MultiPoint identifier |
|
373 |
* @param srs |
|
374 |
* Spatial reference system |
|
375 |
* @return |
|
376 |
* Consumer application object that represents a multiPoint |
|
377 |
*/ |
|
378 |
public Object startMultiPoint(String id, String srs); |
|
379 |
public Object startMultiPoint(String id, String srs, int dimension); |
|
380 |
|
|
381 |
/** |
|
382 |
* It is thrown when the multiPoint has been completely parsed |
|
383 |
* @param multiPoint |
|
384 |
* Consumer application object that represents a multiPoint |
|
385 |
*/ |
|
386 |
public Object endMultiPoint(Object multiPoint); |
|
387 |
|
|
388 |
/** |
|
389 |
* It is thrown to add a point to one multiPoint. |
|
390 |
* @param point |
|
391 |
* Consumer application object that represents a point |
|
392 |
* @param multiPoint |
|
393 |
* Consumer application object that represents a multiPoint |
|
394 |
*/ |
|
395 |
public void addPointToMultiPoint(Object point,Object multiPoint); |
|
396 |
|
|
397 |
/** |
|
398 |
* This method indicates that the parser has found a multiLineString. |
|
399 |
* @param id |
|
400 |
* MultiLineString identifier |
|
401 |
* @param srs |
|
402 |
* Spatial reference system |
|
403 |
* @return |
|
404 |
* Consumer application object that represents a multiLineString |
|
405 |
*/ |
|
406 |
public Object startMultiLineString(String id, String srs); |
|
407 |
public Object startMultiLineString(String id, String srs, int dimension); |
|
408 |
|
|
409 |
/** |
|
410 |
* It is thrown when the multiLineString has been completely parsed |
|
411 |
* @param multiLineString |
|
412 |
* Consumer application object that represents a multiLineString |
|
413 |
*/ |
|
414 |
public Object endMultiLineString(Object multiLineString); |
|
415 |
|
|
416 |
/** |
|
417 |
* It is thrown to add a lineString to one lineString. |
|
418 |
* @param lineString |
|
419 |
* Consumer application object that represents a lineString |
|
420 |
* @param multiLineString |
|
421 |
* Consumer application object that represents a multiLineString |
|
422 |
*/ |
|
423 |
public void addLineStringToMultiLineString(Object lineString,Object multiLineString); |
|
424 |
|
|
425 |
/** |
|
426 |
* This method indicates that the parser has found a multiPolygon. |
|
427 |
* @param id |
|
428 |
* MultiPolygon identifier |
|
429 |
* @param srs |
|
430 |
* Spatial reference system |
|
431 |
* @return |
|
432 |
* Consumer application object that represents a multiPolygon |
|
433 |
*/ |
|
434 |
public Object startMultiPolygon(String id, String srs); |
|
435 |
public Object startMultiPolygon(String id, String srs, int dimension); |
|
436 |
|
|
437 |
/** |
|
438 |
* It is thrown when the multiPolygon has been completely parsed |
|
439 |
* @param multiPolygon |
|
440 |
* Consumer application object that represents a multiPolygon |
|
441 |
*/ |
|
442 |
public Object endMultiPolygon(Object multiPolygon); |
|
443 |
|
Also available in: Unified diff