svn-gvsig-desktop / trunk / libraries / libTopology / src / org / gvsig / topology / ITopologyErrorContainer.java @ 18995
History | View | Annotate | Download (4.54 KB)
1 |
/*
|
---|---|
2 |
* Created on 07-sep-2007
|
3 |
*
|
4 |
* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana
|
5 |
*
|
6 |
* Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
|
7 |
*
|
8 |
* This program is free software; you can redistribute it and/or
|
9 |
* modify it under the terms of the GNU General Public License
|
10 |
* as published by the Free Software Foundation; either version 2
|
11 |
* of the License, or (at your option) any later version.
|
12 |
*
|
13 |
* This program is distributed in the hope that it will be useful,
|
14 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
15 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
16 |
* GNU General Public License for more details.
|
17 |
*
|
18 |
* You should have received a copy of the GNU General Public License
|
19 |
* along with this program; if not, write to the Free Software
|
20 |
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,USA.
|
21 |
*
|
22 |
* For more information, contact:
|
23 |
*
|
24 |
* Generalitat Valenciana
|
25 |
* Conselleria d'Infraestructures i Transport
|
26 |
* Av. Blasco Ib??ez, 50
|
27 |
* 46010 VALENCIA
|
28 |
* SPAIN
|
29 |
*
|
30 |
* +34 963862235
|
31 |
* gvsig@gva.es
|
32 |
* www.gvsig.gva.es
|
33 |
*
|
34 |
* or
|
35 |
*
|
36 |
* IVER T.I. S.A
|
37 |
* Salamanca 50
|
38 |
* 46005 Valencia
|
39 |
* Spain
|
40 |
*
|
41 |
* +34 963163400
|
42 |
* dac@iver.es
|
43 |
*/
|
44 |
/* CVS MESSAGES:
|
45 |
*
|
46 |
* $Id:
|
47 |
* $Log:
|
48 |
*/
|
49 |
package org.gvsig.topology; |
50 |
|
51 |
import java.util.List; |
52 |
|
53 |
import org.cresques.cts.IProjection; |
54 |
|
55 |
import com.iver.cit.gvsig.fmap.layers.FLyrVect; |
56 |
import com.iver.cit.gvsig.fmap.layers.XMLException; |
57 |
import com.iver.utiles.XMLEntity; |
58 |
|
59 |
|
60 |
/**
|
61 |
*All classes that contains TopologyError must
|
62 |
*implement this interface.
|
63 |
*/
|
64 |
public interface ITopologyErrorContainer extends Cloneable{ |
65 |
|
66 |
public static final int ONLY_ERRORS = 0;//TODO QUITAR |
67 |
|
68 |
public static final int ONLY_EXCEPTIONS = 1; |
69 |
|
70 |
public static final int BOTH_ERROR_EXCEPTIONS = 2; |
71 |
|
72 |
/**
|
73 |
* Adds a topology error to the container.
|
74 |
* @param topologyError
|
75 |
*/
|
76 |
public void addTopologyError(TopologyError topologyError); |
77 |
|
78 |
/**
|
79 |
* Returns the number of topology errors contained.
|
80 |
* @return
|
81 |
*/
|
82 |
public int getNumberOfErrors(); |
83 |
|
84 |
/**
|
85 |
* Returns the number of errors that has been marked as exceptions
|
86 |
* @return
|
87 |
*/
|
88 |
public int getNumberOfExceptions(); |
89 |
|
90 |
/**
|
91 |
* Clear all contained errors.
|
92 |
*/
|
93 |
public void clear(); |
94 |
|
95 |
/**
|
96 |
* Returns the topology error at position index.
|
97 |
* @param index
|
98 |
* @return
|
99 |
*/
|
100 |
public TopologyError getTopologyError(int index); |
101 |
|
102 |
/**
|
103 |
*Returns the contained errors. In function
|
104 |
*of the specified params, returned errors
|
105 |
*will be reprojected, filtered by rule, geometry type,
|
106 |
*etc.
|
107 |
*/
|
108 |
public List<TopologyError> getTopologyErrors(String ruleName, int shapeType, FLyrVect sourceLayer, IProjection desiredProjection, boolean includeExceptions); |
109 |
|
110 |
/**
|
111 |
* Returns the contained errors filtered by violated rule.
|
112 |
* @param ruleName
|
113 |
* @param desiredProjection
|
114 |
* @param includeExceptions
|
115 |
* @return
|
116 |
*/
|
117 |
public List<TopologyError> getTopologyErrorsByRule(String ruleName, IProjection desiredProjection, boolean includeExceptions); |
118 |
|
119 |
/**
|
120 |
* Returns the contained errors filtered by type of error geometry.
|
121 |
* @param shapeType
|
122 |
* @param desiredProjection
|
123 |
* @param includeExceptions
|
124 |
* @return
|
125 |
*/
|
126 |
public List<TopologyError> getTopologyErrorsByShapeType(int shapeType, IProjection desiredProjection, boolean includeExceptions); |
127 |
|
128 |
/**
|
129 |
* Returns the contained errors filtered by layer that causes the error.
|
130 |
* @param layer
|
131 |
* @param desiredProjection
|
132 |
* @param includeExceptions
|
133 |
* @return
|
134 |
*/
|
135 |
public List<TopologyError> getTopologyErrorsByLyr(FLyrVect layer, IProjection desiredProjection, boolean includeExceptions); |
136 |
|
137 |
/**
|
138 |
* Marks an error as an exception.
|
139 |
*
|
140 |
* @param error to mark as an exception
|
141 |
*/
|
142 |
public void markAsTopologyException(TopologyError topologyError); |
143 |
|
144 |
/**
|
145 |
* Mark the given error (until now consideer as an exception) as "not tolered".
|
146 |
*
|
147 |
* @param topologyError error to adds to the not tolered errors list.
|
148 |
*/
|
149 |
public void demoteToError(TopologyError topologyError); |
150 |
|
151 |
public void removeErrorsByLayer(FLyrVect layer); |
152 |
|
153 |
public void removeErrorsByRule(String ruleName); |
154 |
/**
|
155 |
* Returns an unique identifier for the error in the container
|
156 |
* context.
|
157 |
* @return
|
158 |
*/
|
159 |
public String getErrorFid(); |
160 |
|
161 |
/**
|
162 |
* XML Castor's persistence method.
|
163 |
* @param xml
|
164 |
* @throws XMLException
|
165 |
*/
|
166 |
public void setXMLEntity(XMLEntity xml) throws XMLException; |
167 |
|
168 |
public XMLEntity getXMLEntity() throws XMLException; |
169 |
|
170 |
public Object clone(); |
171 |
|
172 |
|
173 |
public FLyrVect getAsFMapLayer(String name, IProjection projection); |
174 |
|
175 |
public void setTopology(Topology topology); |
176 |
|
177 |
public Topology getTopology();
|
178 |
} |
179 |
|