String prefix, boolean hasAttributes, boolean hasNamespaces,
Object contextObject)
{
if (contextObject instanceof Model) {
Model model = (Model) contextObject;
SpatialModelPlugin spatialModel = null;
if (model.getExtension(SpatialConstants.namespaceURI) != null) {
spatialModel = (SpatialModelPlugin) model.getExtension(SpatialConstants.namespaceURI);
} else {
spatialModel = new SpatialModelPlugin(model);
model.addExtension(SpatialConstants.namespaceURI, spatialModel);
}
if (elementName.equals(SpatialConstants.geometry)) {
Geometry geometry = new Geometry();
spatialModel.setGeometry(geometry);
return geometry;
}
} else if (contextObject instanceof Compartment) {
Compartment compartment = (Compartment) contextObject;
SpatialCompartmentPlugin spatialCompartment = null;