@Override public boolean readAttribute(String attributeName, String prefix, String value) { boolean isAttributeRead = super.readAttribute(attributeName, prefix, value); if (!isAttributeRead) { isAttributeRead = true; if (attributeName.equals(MultiConstants.compartment)) { setCompartment(value); } else { isAttributeRead = false; } } return isAttributeRead; }
@Override public boolean equals(Object obj) { if (this == obj) { return true; } if (!super.equals(obj)) { return false; } if (getClass() != obj.getClass()) { return false; } CompartmentReference other = (CompartmentReference) obj; if (compartment == null) { if (other.compartment != null) { return false; } } else if (!compartment.equals(other.compartment)) { return false; } return true; }
@Override public int hashCode() { final int prime = 2707; int result = super.hashCode(); result = prime * result + arrayDimension; result = prime * result + ((size == null) ? 0 : size.hashCode()); return result; }
@Override public TreeNode getChildAt(int index) { if (index < 0) { throw new IndexOutOfBoundsException(MessageFormat.format( resourceBundle.getString("IndexSurpassesBoundsException"), index, 0)); } int count = super.getChildCount(), pos = 0; if (index < count) { return super.getChildAt(index); } else { index -= count; } if (listOfUnits != null) { if (index == pos) { return getListOfUnits(); } pos++; } throw new IndexOutOfBoundsException(MessageFormat.format( resourceBundle.getString("IndexExceedsBoundsException"), index, +Math.min(pos, 0))); }
@Override public Map<String, String> writeXMLAttributes() { Map<String, String> attributes = super.writeXMLAttributes(); if (isSetId()) { attributes.remove("id"); attributes.put(QualConstants.shortLabel+ ":id", getId()); } if (isSetName()) { attributes.remove("name"); attributes.put(QualConstants.shortLabel+ ":name", getName()); } return attributes; }
@Override public int getChildCount() { int children = super.getChildCount(); if (listOfUnits != null) { children++; } return children; }
@Override public Map<String, String> writeXMLAttributes() { Map<String, String> attributes = super.writeXMLAttributes(); if (isSetId()) { attributes.remove("id"); attributes.put(MultiConstants.shortLabel+ ":id", getId()); } if (isSetName()) { attributes.remove("name"); attributes.put(MultiConstants.shortLabel+ ":name", getName()); } if (isSetOccur()) { attributes.put(MultiConstants.shortLabel+ ":" + MultiConstants.occur, occur.toString()); } return attributes; }
@Override public TreeNode getChildAt(int index) { if (index < 0) { throw new IndexOutOfBoundsException(MessageFormat.format( resourceBundle.getString("IndexSurpassesBoundsException"), index, 0)); } int count = super.getChildCount(), pos = 0; if (index < count) { return super.getChildAt(index); } else { index -= count; } if (isSetListOfPossibleSpeciesFeatureValues()) { if (pos == index) { return getListOfPossibleSpeciesFeatureValues(); } pos++; } throw new IndexOutOfBoundsException(MessageFormat.format( resourceBundle.getString("IndexExceedsBoundsException"), index, Math.min(pos, 0))); }
@Override public int getChildCount() { int count = super.getChildCount(); if (isSetListOfSpeciesFeatureValues()) { count++; } return count; }
@Override public Map<String, String> writeXMLAttributes() { Map<String, String> attributes = super.writeXMLAttributes(); if (isSetId()) { attributes.remove("id"); attributes.put(MultiConstants.shortLabel + ":id", getId()); } if (isSetName()) { attributes.remove("name"); attributes.put(MultiConstants.shortLabel + ":name", getName()); } if (isSetCompartment()) { attributes.put(MultiConstants.shortLabel + ":" + MultiConstants.compartment, getCompartment()); } return attributes; }
@Override public boolean readAttribute(String attributeName, String prefix, String value) { boolean isAttributeRead = super.readAttribute(attributeName, prefix, value); if (!isAttributeRead) { isAttributeRead = true; if (attributeName.equals(MultiConstants.numericValue)) { setNumericValue(value); } else { isAttributeRead = false; } } return isAttributeRead; } }
@Override public TreeNode getChildAt(int index) { if (index < 0) { throw new IndexOutOfBoundsException(MessageFormat.format( resourceBundle.getString("IndexSurpassesBoundsException"), index, 0)); } int count = super.getChildCount(), pos = 0; if (index < count) { return super.getChildAt(index); } else { index -= count; } if (isSetListOfSpeciesFeatureValues()) { if (pos == index) { return getListOfSpeciesFeatureValues(); } pos++; } throw new IndexOutOfBoundsException( MessageFormat.format(resourceBundle.getString("IndexExceedsBoundsException"), index, Math.min(pos, 0))); }
@Override public int hashCode() { final int prime = 4547; int result = super.hashCode(); result = prime * result + ((numericValue == null) ? 0 : numericValue.hashCode()); return result; }
@Override public boolean equals(Object obj) { if (this == obj) { return true; } if (!super.equals(obj)) { return false; } if (getClass() != obj.getClass()) { return false; } PossibleSpeciesFeatureValue other = (PossibleSpeciesFeatureValue) obj; if (numericValue == null) { if (other.numericValue != null) { return false; } } else if (!numericValue.equals(other.numericValue)) { return false; } return true; }
@Override public int getChildCount() { int childCount = super.getChildCount(); if (isSetListOfMembers()) { childCount++; } // removed as unsupported but could be added again in the future // if (isSetListOfMemberConstraints()) { // childCount++; // } return childCount; }
@Override public Map<String, String> writeXMLAttributes() { Map<String, String> attributes = super.writeXMLAttributes(); if (isSetIdRef()) { attributes.put(GroupsConstants.shortLabel + ":" + GroupsConstants.idRef, idRef); } if (isSetMetaIdRef()) { attributes.put(GroupsConstants.shortLabel + ":" + GroupsConstants.metaIdRef, metaIdRef); } if (isSetId()) { attributes.remove("id"); attributes.put(GroupsConstants.shortLabel + ":id", getId()); } if (isSetName()) { attributes.remove("name"); attributes.put(GroupsConstants.shortLabel + ":name", getName()); } return attributes; }
@Override public boolean readAttribute(String attributeName, String prefix, String value) { boolean isAttributeRead = super.readAttribute(attributeName, prefix, value); if (!isAttributeRead) { isAttributeRead = true; if (attributeName.equals(GroupsConstants.identicalAttribute)) { setIdenticalAttribute(value); } else if (attributeName.equals(GroupsConstants.distinctAttribute)) { setDistinctAttribute(value); } else { isAttributeRead = false; } } return isAttributeRead; }
@Override public TreeNode getChildAt(int index) { if (index < 0) { throw new IndexOutOfBoundsException(MessageFormat.format( resourceBundle.getString("IndexSurpassesBoundsException"), index, 0)); } int count = super.getChildCount(), pos = 0; if (index < count) { return super.getChildAt(index); } else { index -= count; } if (isSetListOfDeletions()) { if (pos == index) { return getListOfDeletions(); } pos++; } throw new IndexOutOfBoundsException(MessageFormat.format( resourceBundle.getString("IndexExceedsBoundsException"), index, Math.min(pos, 0))); }
@Override public int hashCode() { final int prime = 6197; int result = super.hashCode(); result = prime * result + ((compartment == null) ? 0 : compartment.hashCode()); return result; }
@Override public boolean equals(Object obj) { if (this == obj) { return true; } if (!super.equals(obj)) { return false; } if (getClass() != obj.getClass()) { return false; } Dimension other = (Dimension) obj; if (arrayDimension != other.arrayDimension) { return false; } if (size == null) { if (other.size != null) { return false; } } else if (!size.equals(other.size)) { return false; } return true; }