String value, String uri, String prefix, boolean isLastAttribute,
Object contextObject) {
if (contextObject instanceof Species) {
Species species = (Species) contextObject;
SpatialSpeciesPlugin spatialSpecies = null;
if (species.getExtension(SpatialConstants.namespaceURI) != null) {
spatialSpecies = (SpatialSpeciesPlugin) species.getExtension(SpatialConstants.namespaceURI);
} else {
spatialSpecies = new SpatialSpeciesPlugin(species);
species.addExtension(SpatialConstants.namespaceURI, spatialSpecies);
}
contextObject = spatialSpecies;
} else if (contextObject instanceof Reaction) {
Reaction reaction = (Reaction) contextObject;