Revision 43985 trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.geometry/org.gvsig.fmap.geometry.api/src/main/java/org/gvsig/fmap/geom/GeometryLibrary.java
GeometryLibrary.java | ||
---|---|---|
41 | 41 |
*/ |
42 | 42 |
public class GeometryLibrary extends AbstractLibrary { |
43 | 43 |
|
44 |
@Override |
|
44 | 45 |
public void doRegistration() { |
45 | 46 |
registerAsAPI(GeometryLibrary.class); |
46 | 47 |
require(ToolsLibrary.class); |
47 | 48 |
require(ProjectionLibrary.class); |
48 | 49 |
} |
49 | 50 |
|
51 |
@Override |
|
50 | 52 |
protected void doInitialize() throws LibraryException { |
53 |
DataTypesManager dataTypesManager = ToolsLocator.getDataTypesManager(); |
|
54 |
dataTypesManager.addtype(DataTypes.GEOMETRY, "Geometry", "Geometry", |
|
55 |
Geometry.class, null); |
|
56 |
dataTypesManager.addtype(DataTypes.ENVELOPE, "Envelope", "Envelope", |
|
57 |
Envelope.class, null); |
|
58 |
|
|
51 | 59 |
} |
52 | 60 |
|
61 |
@Override |
|
53 | 62 |
protected void doPostInitialize() throws LibraryException { |
54 | 63 |
// Validate there is any implementation registered. |
55 | 64 |
if(! GeometryLocator.getInstance().exists(GeometryLocator.GEOMETRY_MANAGER_NAME)) { |
... | ... | |
57 | 66 |
GeometryLocator.GEOMETRY_MANAGER_NAME, |
58 | 67 |
GeometryLocator.getInstance()); |
59 | 68 |
} |
60 |
DataTypesManager dataTypesManager = ToolsLocator.getDataTypesManager(); |
|
61 |
dataTypesManager.addtype(DataTypes.GEOMETRY, "Geometry", "Geometry", |
|
62 |
Geometry.class, null); |
|
63 |
dataTypesManager.addtype(DataTypes.ENVELOPE, "Envelope", "Envelope", |
|
64 |
Envelope.class, null); |
|
65 |
|
|
66 | 69 |
} |
67 | 70 |
} |
Also available in: Unified diff