Revision 26866 branches/v2_0_0_prep/libraries/libFMap_geometries/src/org/gvsig/fmap/geom/GeometryLibrary.java
GeometryLibrary.java | ||
---|---|---|
27 | 27 |
|
28 | 28 |
package org.gvsig.fmap.geom; |
29 | 29 |
|
30 |
import org.gvsig.fmap.geom.Geometry.SUBTYPES; |
|
31 |
import org.gvsig.fmap.geom.Geometry.TYPES; |
|
32 |
import org.gvsig.fmap.geom.aggregate.BaseMultiPrimitive2D; |
|
33 |
import org.gvsig.fmap.geom.aggregate.MultiCurve2D; |
|
34 |
import org.gvsig.fmap.geom.aggregate.MultiPoint2D; |
|
35 |
import org.gvsig.fmap.geom.aggregate.MultiPoint2DZ; |
|
36 |
import org.gvsig.fmap.geom.aggregate.MultiSurface2D; |
|
37 |
import org.gvsig.fmap.geom.primitive.Arc2D; |
|
38 |
import org.gvsig.fmap.geom.primitive.Arc2DZ; |
|
39 |
import org.gvsig.fmap.geom.primitive.Circle2D; |
|
40 |
import org.gvsig.fmap.geom.primitive.Circle2DZ; |
|
41 |
import org.gvsig.fmap.geom.primitive.Curve2D; |
|
42 |
import org.gvsig.fmap.geom.primitive.Curve2DZ; |
|
43 |
import org.gvsig.fmap.geom.primitive.Ellipse2D; |
|
44 |
import org.gvsig.fmap.geom.primitive.Ellipse2DZ; |
|
45 |
import org.gvsig.fmap.geom.primitive.EllipticArc2D; |
|
46 |
import org.gvsig.fmap.geom.primitive.EllipticArc2DZ; |
|
47 |
import org.gvsig.fmap.geom.primitive.Point2D; |
|
48 |
import org.gvsig.fmap.geom.primitive.Point2DZ; |
|
49 |
import org.gvsig.fmap.geom.primitive.Solid; |
|
50 |
import org.gvsig.fmap.geom.primitive.Solid2DZ; |
|
51 |
import org.gvsig.fmap.geom.primitive.Spline2D; |
|
52 |
import org.gvsig.fmap.geom.primitive.Spline2DZ; |
|
53 |
import org.gvsig.fmap.geom.primitive.Surface2D; |
|
54 |
import org.gvsig.fmap.geom.primitive.Surface2DZ; |
|
30 | 55 |
import org.gvsig.tools.locator.BaseLibrary; |
31 | 56 |
import org.gvsig.tools.locator.ReferenceNotRegisteredException; |
32 | 57 |
|
... | ... | |
45 | 70 |
super.initialize(); |
46 | 71 |
|
47 | 72 |
//Register the default GeometryManager |
48 |
GeometryLocator.registerGeometryManager(DefaultGeometryManager.class);
|
|
49 |
}
|
|
73 |
GeometryLocator.registerGeometryManager(DefaultGeometryManager.class); |
|
74 |
}
|
|
50 | 75 |
|
51 | 76 |
/* |
52 | 77 |
* (non-Javadoc) |
... | ... | |
60 | 85 |
if (geometryManager == null) { |
61 | 86 |
throw new ReferenceNotRegisteredException( |
62 | 87 |
GeometryLocator.GEOMETRY_MANAGER_NAME, GeometryLocator.getInstance()); |
63 |
} |
|
64 |
} |
|
88 |
} |
|
89 |
//Register the geometries in 2D |
|
90 |
geometryManager.registerGeometryType(Arc2D.class, TYPES.ARC, SUBTYPES.GEOM2D); |
|
91 |
geometryManager.registerGeometryType(Circle2D.class, TYPES.CIRCLE, SUBTYPES.GEOM2D); |
|
92 |
geometryManager.registerGeometryType(Curve2D.class, TYPES.CURVE, SUBTYPES.GEOM2D); |
|
93 |
geometryManager.registerGeometryType(Ellipse2D.class, TYPES.ELLIPSE, SUBTYPES.GEOM2D); |
|
94 |
geometryManager.registerGeometryType(EllipticArc2D.class, TYPES.ELLIPTICARC, SUBTYPES.GEOM2D); |
|
95 |
geometryManager.registerGeometryType(Point2D.class, TYPES.POINT, SUBTYPES.GEOM2D); |
|
96 |
geometryManager.registerGeometryType(Spline2D.class, TYPES.SPLINE, SUBTYPES.GEOM2D); |
|
97 |
geometryManager.registerGeometryType(Surface2D.class, TYPES.SURFACE, SUBTYPES.GEOM2D); |
|
98 |
geometryManager.registerGeometryType(BaseMultiPrimitive2D.class, TYPES.AGGREGATE, SUBTYPES.GEOM2D); |
|
99 |
geometryManager.registerGeometryType(MultiCurve2D.class, TYPES.MULTICURVE, SUBTYPES.GEOM2D); |
|
100 |
geometryManager.registerGeometryType(MultiPoint2D.class, TYPES.MULTIPOINT, SUBTYPES.GEOM2D); |
|
101 |
geometryManager.registerGeometryType(MultiSurface2D.class, TYPES.MULTISURFACE, SUBTYPES.GEOM2D); |
|
102 |
|
|
103 |
//Register the geometries in 2DZ |
|
104 |
geometryManager.registerGeometryType(Arc2DZ.class, TYPES.ARC, SUBTYPES.GEOM2DZ); |
|
105 |
geometryManager.registerGeometryType(Circle2DZ.class, TYPES.CIRCLE, SUBTYPES.GEOM2DZ); |
|
106 |
geometryManager.registerGeometryType(Curve2DZ.class, TYPES.CURVE, SUBTYPES.GEOM2DZ); |
|
107 |
geometryManager.registerGeometryType(Ellipse2DZ.class, TYPES.ELLIPSE, SUBTYPES.GEOM2DZ); |
|
108 |
geometryManager.registerGeometryType(EllipticArc2DZ.class, TYPES.ELLIPTICARC, SUBTYPES.GEOM2DZ); |
|
109 |
geometryManager.registerGeometryType(Point2DZ.class, TYPES.POINT, SUBTYPES.GEOM2DZ); |
|
110 |
geometryManager.registerGeometryType(Spline2DZ.class, TYPES.SPLINE, SUBTYPES.GEOM2DZ); |
|
111 |
geometryManager.registerGeometryType(Surface2DZ.class, TYPES.SURFACE, SUBTYPES.GEOM2DZ); |
|
112 |
geometryManager.registerGeometryType(MultiPoint2DZ.class, TYPES.MULTIPOINT, SUBTYPES.GEOM2DZ); |
|
113 |
geometryManager.registerGeometryType(Solid2DZ.class, TYPES.SOLID, SUBTYPES.GEOM2DZ); |
|
114 |
} |
|
65 | 115 |
} |
66 | 116 |
|
Also available in: Unified diff