Revision 29805 branches/v2_0_0_prep/libraries/libFMap_geometries/src/org/gvsig/fmap/geom/impl/DefaultGeometryLibrary.java
DefaultGeometryLibrary.java | ||
---|---|---|
27 | 27 |
|
28 | 28 |
package org.gvsig.fmap.geom.impl; |
29 | 29 |
|
30 |
import org.gvsig.fmap.geom.GeometryLibrary; |
|
30 | 31 |
import org.gvsig.fmap.geom.GeometryLocator; |
31 | 32 |
import org.gvsig.fmap.geom.GeometryManager; |
32 | 33 |
import org.gvsig.fmap.geom.Geometry.SUBTYPES; |
... | ... | |
63 | 64 |
* |
64 | 65 |
* @author <a href="mailto:jpiera@gvsig.org">Jorge Piera</a> |
65 | 66 |
*/ |
66 |
public class DefaultGeometryLibrary extends BaseLibrary {
|
|
67 |
public class DefaultGeometryLibrary extends GeometryLibrary {
|
|
67 | 68 |
|
68 | 69 |
/* |
69 | 70 |
* (non-Javadoc) |
... | ... | |
82 | 83 |
*/ |
83 | 84 |
public void postInitialize() { |
84 | 85 |
super.postInitialize(); |
85 |
|
|
86 |
// Validate there is any implementation registered. |
|
86 |
|
|
87 | 87 |
GeometryManager geometryManager = GeometryLocator.getGeometryManager(); |
88 |
if (geometryManager == null) { |
|
89 |
throw new ReferenceNotRegisteredException( |
|
90 |
GeometryLocator.GEOMETRY_MANAGER_NAME, GeometryLocator.getInstance()); |
|
91 |
} |
|
88 |
|
|
92 | 89 |
//Register the geometries in 2D |
93 | 90 |
geometryManager.registerGeometryType(DefaultNullGeometry.class, "Null", TYPES.NULL, SUBTYPES.GEOM2D); |
94 | 91 |
geometryManager.registerGeometryType(Geometry2D.class, "Goemtry2D", TYPES.GEOMETRY, SUBTYPES.GEOM2D); |
Also available in: Unified diff