svn-gvsig-desktop / branches / v2_0_0_prep / libraries / libFMap_geometries / src / org / gvsig / fmap / geom / type / GeometryType.java @ 26866
History | View | Annotate | Download (2.31 KB)
1 |
package org.gvsig.fmap.geom.type; |
---|---|
2 |
|
3 |
import org.gvsig.fmap.geom.Geometry; |
4 |
import org.gvsig.fmap.geom.GeometryManager; |
5 |
import org.gvsig.fmap.geom.operation.GeometryOperation; |
6 |
|
7 |
/**
|
8 |
* This class represents the type of a geometry. All the geometries
|
9 |
* has to have a type that can be retrieved using the
|
10 |
* {@link Geometry}{@link #getGeometryType()} method.
|
11 |
*
|
12 |
* @author <a href="mailto:jpiera@gvsig.org">Jorge Piera</a>
|
13 |
*/
|
14 |
public interface GeometryType { |
15 |
|
16 |
/**
|
17 |
* @return the identifier of the geometry type. This identifier
|
18 |
* is assigned by the {@link GeometryManager} in run time.
|
19 |
*/
|
20 |
public int getId(); |
21 |
|
22 |
/**
|
23 |
* @return the name of the geometry type.
|
24 |
*/
|
25 |
public String getName(); |
26 |
|
27 |
/**
|
28 |
* @return the type of the geometry. It is a constant value
|
29 |
* that has to be one of the values in {@link Geometry.TYPES}
|
30 |
* The type is an abstract representation of the object (Point, Curve...)
|
31 |
* but it is not a concrete representation (Point2D, Point3D...).
|
32 |
*/
|
33 |
public int getType(); |
34 |
|
35 |
/**
|
36 |
* @return the subtype of the geometry. It is a constant value
|
37 |
* that has to be one of the values in {@link Geometry.SUBTYPES}.
|
38 |
* The subtype represents a set of geometries with a
|
39 |
* dimensional relationship (2D, 3D, 2DM...)
|
40 |
*/
|
41 |
public int getSubType(); |
42 |
|
43 |
/**
|
44 |
* This method creates a {@link Geometry} with the type specified
|
45 |
* by this class. The geometry is empty, and all the internal
|
46 |
* attributes must be assigned to a value when the geometry has
|
47 |
* been created.
|
48 |
*
|
49 |
* @return
|
50 |
* A empty geometry
|
51 |
* @throws InstantiationException
|
52 |
* This exception is maybe thrown when the application is trying
|
53 |
* to instantiate the geometry
|
54 |
* @throws IllegalAccessException
|
55 |
* This exception is maybe thrown when the application is trying
|
56 |
* to instantiate the geometry
|
57 |
*/
|
58 |
public Geometry create() throws InstantiationException, IllegalAccessException; |
59 |
|
60 |
/**
|
61 |
* Registers an operation for this geometry type.
|
62 |
* @param index
|
63 |
* @param geomOp
|
64 |
*/
|
65 |
public void setGeometryOperation(int index, GeometryOperation geomOp); |
66 |
|
67 |
/**
|
68 |
* Get the operation for this geometry at a concrete position
|
69 |
* @param index
|
70 |
* The position of the operation
|
71 |
* @return
|
72 |
* A geometry operation
|
73 |
*/
|
74 |
public GeometryOperation getGeometryOperation(int index); |
75 |
|
76 |
/**
|
77 |
* @return the geometry as a String
|
78 |
*/
|
79 |
public String toString(); |
80 |
|
81 |
} |