@Override public String getCompartment() { return isSetCompartment() ? compartmentID : ""; }
Map<String, String> attributes = super.writeXMLAttributes(); Locale en = Locale.ENGLISH; if (isSetCompartment()) { attributes.put(TreeNodeChangeEvent.compartment, getCompartment());
@Override public boolean check(ValidationContext ctx, Species s) { return s.isSetCompartment(); } };
species.getElementName(), SBMLtools.getIdOrName(species))); if (species.isSetCompartment() && !species.isSetCompartmentInstance()) { logger.warn(MessageFormat.format(
@Override public Compartment getCompartmentInstance() { if (isSetCompartment()) { Model model = getModel(); if (model != null) { return model.getCompartment(compartmentID); } } return null; }
@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) { /* * Invalid value found for Species 'compartment' attribute */ if (s.isSetCompartment() && s.getModel() != null && s.getCompartmentInstance() == null) { ValidationConstraint.logError(ctx, CORE_20601, s, s.getId(), s.getCompartment()); return false; } return true; } };
@Override public boolean check(ValidationContext ctx, Species c) { // id 'compartment', 'hasOnlySubstanceUnits', 'boundaryCondition'and constant are mandatory attributes if (!c.isSetId() || !c.isSetConstant() || !c.isSetHasOnlySubstanceUnits() || !c.isSetBoundaryCondition() || !c.isSetCompartment()) { return false; } return super.check(ctx, c); } };
/** * Creates a new {@link QualitativeSpecies} instance. * * <p> * Copy constructor that clones all values from the input {@code species} that * are also available in {@link QualitativeSpecies}. * </p> * <p> * You should consider setting a new id and meta_id afterwards to avoid * duplicate identifiers. * </p> * * @param species * the species to be used to initialize the new instance */ public QualitativeSpecies(Species species) { super(species); initDefaults(); if (species.isSetCompartment()) { compartment = species.getCompartment(); } if (species.isSetConstant()) { constant = species.getConstant(); } /* * initialLevel, maxLevel and listOfSymbolicValues are only for qual species. */ }
charge = species.charge == null ? null : new Integer(species.charge); if (species.isSetCompartment()) { setCompartment(new String(species.getCompartment()));
equals &= s.getSpeciesType().equals(getSpeciesType()); equals &= s.isSetCompartment() == isSetCompartment(); if (equals && isSetCompartment()) { equals &= s.getCompartment().equals(getCompartment());
if (species.isSetCompartment()) { ONDEXConcept compC = compartmentsById.get(species.getCompartment()); if (compC != null) {
if (species.isSetCompartment()) { ONDEXConcept compC = compartmentsById.get(species.getCompartment()); if (compC != null) {