@Override public boolean check(ValidationContext ctx, Species s) { if (s.isSetConversionFactor() && s.getConversionFactorInstance() == null) { ValidationConstraint.logError(ctx, CORE_20617, s, s.getId(), s.getConversionFactor()); return false; } return true; } };
@Override public int hashCode() { final int prime = 997; int hashCode = super.hashCode(); hashCode += prime * Boolean.valueOf(amount).hashCode(); if (isSetBoundaryCondition()) { hashCode += prime * boundaryCondition.hashCode(); } if (isSetHasOnlySubstanceUnits()) { hashCode += prime * hasOnlySubstanceUnits.hashCode(); } if (isSetCharge()) { hashCode += prime * charge.hashCode(); } if (isSetSpeciesType()) { hashCode += prime * getSpeciesType().hashCode(); } if (isSetCompartment()) { hashCode += prime * getCompartment().hashCode(); } if (isSetSpatialSizeUnits()) { hashCode += prime * getSpatialSizeUnits().hashCode(); } if (isSetConversionFactor()) { hashCode += prime * getConversionFactor().hashCode(); } return hashCode; }
@Override public boolean check(ValidationContext ctx, Species s) { if (s.isSetConversionFactor()) { Parameter fac = s.getConversionFactorInstance(); // don't report if the parameter is null, that's the job of CORE_20617 if (fac != null && !fac.isConstant()) { ValidationConstraint.logError(ctx, CORE_20705, s, s.getConversionFactor()); return false; } } return true; } };
attributes.put("conversionFactor", getConversionFactor());
logger.warn(MessageFormat.format( bundle.getString("SBMLCoreParser.unknownReferenceError1"), "Parameter", "conversionFactorID", species.getConversionFactor(), species.getElementName(), SBMLtools.getIdOrName(species)));
UnitDefinition cfUnits = null; if (s.isSetConversionFactor() && m.getParameter(s.getConversionFactor()) != null) { cfUnits = m.getParameter(s.getConversionFactor()).getUnitsInstance();
equals &= s.getConversionFactor().equals(getConversionFactor());