@Override public String getElementName() { if ((getLevel() == 1) && (getVersion() == 1)) { return "specie"; } return super.getElementName(); }
/** * Initializes the default values using the current Level/Version configuration. */ public void initDefaults() { initDefaults(getLevel(), getVersion()); }
/** * Creates a SimpleSpeciesReference instance from a given Species. * * @param species */ public SimpleSpeciesReference(Species species) { this(species.getLevel(), species.getVersion()); speciesID = species.isSetId() ? new String(species.getId()) : null; }
/** * Sets the speciesTypeID of this {@link Species} to 'speciesType'. * * @param speciesType the species type to set * @deprecated Only valid in SBML Level 2 from Version 2. * @throws PropertyNotAvailableException * for inappropriate Level/Version combinations. */ @Deprecated public void setSpeciesType(String speciesType) { if ((getLevel() != 2) || ((getLevel() == 2) && (getVersion() == 1))) { throw new PropertyNotAvailableException(TreeNodeChangeEvent.speciesType, this); } if ((speciesType == null) || (speciesType.trim().length() == 0) || checkIdentifier(speciesType)) { String oldSpeciesType = speciesTypeID; speciesTypeID = ((speciesType != null) && (speciesType.trim() .length() == 0)) ? null : speciesType; firePropertyChange(TreeNodeChangeEvent.speciesType, oldSpeciesType, speciesTypeID); } }
if (!isReadingInProgress() && (getLevel() != 2) && ((1 != getVersion()) || (2 != getVersion()))) { throw new PropertyNotAvailableException( TreeNodeChangeEvent.spatialSizeUnits, this);
if ((getVersion() == 1) || (getVersion() == 2)) { if (isSetSpatialSizeUnits()) { if (hasOnlySubstanceUnits()) { if (getVersion() >= 2) { if (isSetSpeciesType()) { attributes.put("speciesType", getSpeciesType());