/** * Returns the conversionFactor ID of this {@link Model}. * * @return the conversionFactorID of this {@link Model}. Returns an empty * {@link String} if it is not set. */ public String getConversionFactor() { return isSetConversionFactor() ? conversionFactorID : ""; }
model.getElementName(), SBMLtools.getIdOrName(model))); if (model.isSetConversionFactor() && !model.isSetConversionFactorInstance()) { logger.warn(MessageFormat.format(
@Override public boolean check(ValidationContext ctx, Model m) { if (m.isSetConversionFactor()) { return m.getConversionFactorInstance() != null; } return true; } };
@Override public boolean check(ValidationContext ctx, Model m) { if (m.isSetConversionFactor()) { Parameter fac = m.getConversionFactorInstance(); if (fac != null && !fac.isConstant()) { ValidationConstraint.logError(ctx, CORE_20705, m, m.getConversionFactor()); return false; } } return true; } };
@Override public int hashCode() { final int prime = 887; int hashCode = super.hashCode(); if (isSetTimeUnits()) { hashCode += prime * getTimeUnits().hashCode(); } if (isSetAreaUnits()) { hashCode += prime * getAreaUnits().hashCode(); } if (isSetConversionFactor()) { hashCode += prime * getConversionFactor().hashCode(); } if (isSetExtentUnits()) { hashCode += prime * getExtentUnits().hashCode(); } if (isSetLengthUnits()) { hashCode += prime * getLengthUnits().hashCode(); } if (isSetSubstanceUnits()) { hashCode += prime * getSubstanceUnits().hashCode(); } if (isSetVolumeUnits()) { hashCode += prime * getVolumeUnits().hashCode(); } return hashCode; }
@Override public Map<String, String> writeXMLAttributes() { Map<String, String> attributes = super.writeXMLAttributes(); if (getLevel() > 2) { if (isSetSubstanceUnits()) { attributes.put("substanceUnits", getSubstanceUnits()); } if (isSetTimeUnits()) { attributes.put("timeUnits", getTimeUnits()); } if (isSetVolumeUnits()) { attributes.put("volumeUnits", getVolumeUnits()); } if (isSetAreaUnits()) { attributes.put("areaUnits", getAreaUnits()); } if (isSetLengthUnits()) { attributes.put("lengthUnits", getLengthUnits()); } if (isSetExtentUnits()) { attributes.put("extentUnits", getExtentUnits()); } if (isSetConversionFactor()) { attributes.put("conversionFactor", getConversionFactor()); } } return attributes; }
equals &= getAreaUnits().equals(m.getAreaUnits()); equals &= m.isSetConversionFactor() == isSetConversionFactor(); if (equals && isSetConversionFactor()) { equals &= getConversionFactor().equals(m.getConversionFactor());
cfUnits = m.getParameter(s.getConversionFactor()).getUnitsInstance(); else if (m.isSetConversionFactor() && m.getConversionFactorInstance() != null) { cfUnits = m.getConversionFactorInstance().getUnitsInstance();
setAreaUnits(model.getAreaUnits()); if (model.isSetConversionFactor()) { setConversionFactor(model.getConversionFactor());