} else if (elementName.equals(SpatialConstants.listOfParametricObjects)){
ListOf<ParametricObject> listOfParametricObjects = pg.getListOfParametricObjects();
return listOfParametricObjects;
}
} else if (contextObject instanceof ParametricObject) {
ParametricObject po = (ParametricObject) contextObject;
if (elementName.equals(SpatialConstants.imageData)){
PolygonObject polygonObject = new PolygonObject();
po.setPolygonObject(polygonObject);
return polygonObject;
}
}
else if (contextObject instanceof ListOf<?>) {
ListOf<SBase> listOf = (ListOf<SBase>) contextObject;
if (elementName.equals(SpatialConstants.coordinateComponent)) {
Geometry geo = (Geometry) listOf.getParentSBMLObject();
CoordinateComponent elem = new CoordinateComponent();
geo.addCoordinateComponent(elem);
return elem;
} else if (elementName.equals(SpatialConstants.domainType)) {
Geometry geo = (Geometry) listOf.getParentSBMLObject();
DomainType elem = new DomainType();
geo.addDomainType(elem);
return elem;
} else if (elementName.equals(SpatialConstants.domain)) {
Geometry geo = (Geometry) listOf.getParentSBMLObject();
Domain elem = new Domain();
geo.addDomain(elem);
return elem;
} else if (elementName.equals(SpatialConstants.adjacentDomains)) {
Geometry geo = (Geometry) listOf.getParentSBMLObject();
AdjacentDomains elem = new AdjacentDomains();
geo.addAdjacentDomain(elem);
return elem;
} else if (elementName.equals(SpatialConstants.sampledFieldGeometry)) {
Geometry geo = (Geometry) listOf.getParentSBMLObject();
SampledFieldGeometry elem = new SampledFieldGeometry();
geo.addGeometryDefinition(elem);
return elem;
} else if (elementName.equals(SpatialConstants.analyticGeometry)) {
Geometry geo = (Geometry) listOf.getParentSBMLObject();
AnalyticGeometry elem = new AnalyticGeometry();
geo.addGeometryDefinition(elem);
return elem;
} else if (elementName.equals(SpatialConstants.analyticGeometry)) {
Geometry geo = (Geometry) listOf.getParentSBMLObject();
AnalyticGeometry elem = new AnalyticGeometry();
geo.addGeometryDefinition(elem);
return elem;
} else if (elementName.equals(SpatialConstants.csGeometry)) {
Geometry geo = (Geometry) listOf.getParentSBMLObject();
CSGeometry elem = new CSGeometry();
geo.addGeometryDefinition(elem);
return elem;
} else if (elementName.equals(SpatialConstants.parametricGeometry)) {
Geometry geo = (Geometry) listOf.getParentSBMLObject();
ParametricGeometry elem = new ParametricGeometry();
geo.addGeometryDefinition(elem);
return elem;
} else if (elementName.equals(SpatialConstants.interiorPoint)) {
Domain domain = (Domain) listOf.getParentSBMLObject();
InteriorPoint elem = new InteriorPoint();
domain.addInteriorPoint(elem);
return elem;
} else if (elementName.equals(SpatialConstants.analyticVolume)) {
AnalyticGeometry av = (AnalyticGeometry) listOf.getParentSBMLObject();
AnalyticVolume elem = new AnalyticVolume();
av.addAnalyticVolume(elem);
return elem;
} else if (elementName.equals(SpatialConstants.sampledVolume)) {
SampledFieldGeometry sfg = (SampledFieldGeometry) listOf.getParentSBMLObject();
SampledVolume elem = new SampledVolume();
sfg.addSampledVolume(elem);
return elem;
} else if (elementName.equals(SpatialConstants.csgPrimitive)) {
CSGSetOperator csgso = (CSGSetOperator) listOf.getParentSBMLObject();
CSGPrimitive elem = new CSGPrimitive();
csgso.addCSGNode(elem);
return elem;
} else if (elementName.equals(SpatialConstants.csgPseudoPrimitive)) {
CSGSetOperator csgso = (CSGSetOperator) listOf.getParentSBMLObject();
CSGPseudoPrimitive elem = new CSGPseudoPrimitive();
csgso.addCSGNode(elem);
return elem;
} else if (elementName.equals(SpatialConstants.csgSetOperator)) {
CSGSetOperator csgso = (CSGSetOperator) listOf.getParentSBMLObject();
CSGSetOperator elem = new CSGSetOperator();
csgso.addCSGNode(elem);
return elem;
} else if (elementName.equals(SpatialConstants.csgTranslation)) {
CSGSetOperator csgso = (CSGSetOperator) listOf.getParentSBMLObject();
CSGTranslation elem = new CSGTranslation();
csgso.addCSGNode(elem);
return elem;
} else if (elementName.equals(SpatialConstants.csgRotation)) {
CSGSetOperator csgso = (CSGSetOperator) listOf.getParentSBMLObject();
CSGRotation elem = new CSGRotation();
csgso.addCSGNode(elem);
return elem;
} else if (elementName.equals(SpatialConstants.csgScale)) {
CSGSetOperator csgso = (CSGSetOperator) listOf.getParentSBMLObject();
CSGScale elem = new CSGScale();
csgso.addCSGNode(elem);
return elem;
} else if (elementName.equals(SpatialConstants.csgHomogeneousTransformation)) {
CSGSetOperator csgso = (CSGSetOperator) listOf.getParentSBMLObject();
CSGHomogeneousTransformation elem = new CSGHomogeneousTransformation();
csgso.addCSGNode(elem);
return elem;
} else if (elementName.equals(SpatialConstants.spatialPoint)) {
ParametricGeometry pg = (ParametricGeometry) listOf.getParentSBMLObject();
SpatialPoint elem = new SpatialPoint();
pg.addSpatialPoint(elem);
return elem;
} else if (elementName.equals(SpatialConstants.parametricObject)) {
ParametricGeometry pg = (ParametricGeometry) listOf.getParentSBMLObject();
ParametricObject elem = new ParametricObject();
pg.addParametricObject(elem);
return elem;
}
}