*/
public void writeElement(SBMLObjectForXML xmlObject,
Object sbmlElementToWrite) {
if (sbmlElementToWrite instanceof SBase) {
SBase sbase = (SBase) sbmlElementToWrite;
if (!xmlObject.isSetName()) {
if (sbase.getElementName().equals("species")) {
xmlObject.setName("specie");
} else if (sbase.getElementName().equals("speciesReference")) {
xmlObject.setName("specieReference");
} else if (sbase.getElementName().equals("assignementRule")) {
AssignmentRule assignmentRule = (AssignmentRule) sbase;
Variable variable = assignmentRule.getVariableInstance();
if (variable instanceof Species) {
xmlObject.setName("specieConcentrationRule");
} else if (variable instanceof Compartment) {
xmlObject.setName("compartmentVolumeRule");
} else if (variable instanceof Parameter) {
xmlObject.setName("parameterRule");
}
} else {
xmlObject.setName(sbase.getElementName());
}
}
}
}