@Override public boolean check(ValidationContext ctx, Species s) { if (s.isSetSpeciesType() && s.getSpeciesTypeInstance() == null) { ValidationConstraint.logError(ctx, CORE_20612, s, s.getId(), s.getSpeciesType()); return false; } return true; } };
@Override public boolean check(ValidationContext ctx, Species s) { // TODO - change the way we report the error, to report the error per compartment, only once. // And we should be able to avoid a loop over the full listofSpecies for each species Model m = s.getModel(); if (s.isSetSpeciesType() && m != null) { String st = s.getSpeciesType(); for (Species spec: m.getListOfSpecies()) { // Are species in same compartment but not the same? if (spec.isSetSpeciesType() && spec.getCompartment().equals(s.getCompartment()) && !spec.getId().equals(s.getId())) { // Must have different Types if (spec.getSpeciesType().equals(st)) { return false; } } } } return true; } };
&& (subModel.getSpeciesType(relatedSpecies.getSpeciesType()) == null)) { subModel.addSpeciesType(relatedSpecies.getSpeciesTypeInstance().clone());
@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; }
attributes.put("speciesType", getSpeciesType());
setSpeciesType(species.getSpeciesType());
logger.warn(MessageFormat.format( bundle.getString("SBMLCoreParser.unknownReferenceError1"), "SpeciesType", "speciesTypeID", species.getSpeciesType(), species.getElementName(), SBMLtools.getIdOrName(species)));
equals &= s.getSpeciesType().equals(getSpeciesType());