@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 &= getConversionFactor().equals(m.getConversionFactor());
logger.warn(MessageFormat.format( bundle.getString("SBMLCoreParser.unknownReferenceError1"), "Parameter", "conversionFactorID", model.getConversionFactor(), model.getElementName(), SBMLtools.getIdOrName(model)));
setConversionFactor(model.getConversionFactor());