Class BioPAXElementImpl

java.lang.Object
org.biopax.paxtools.impl.BioPAXElementImpl
All Implemented Interfaces:
Serializable, Cloneable, BioPAXElement
Direct Known Subclasses:
L3ElementImpl

public abstract class BioPAXElementImpl extends Object implements BioPAXElement
See Also:
  • Constructor Details

    • BioPAXElementImpl

      public BioPAXElementImpl()
  • Method Details

    • isEquivalent

      public boolean isEquivalent(BioPAXElement element)
      Description copied from interface: BioPAXElement
      This method compares the given element for equivalency. This is different from equals(), as BioPAX elements resolve equality based on URI. Equivalent returns true if elements are equal or if
      • both elements implement the same model interface AND
      • both elements have equivalent key properties
      These key properties vary from class to class.
      Specified by:
      isEquivalent in interface BioPAXElement
      Parameters:
      element - to be compared for equivalency
      Returns:
      true if the element equals to this, or has equivalent critical properties.
    • semanticallyEquivalent

      protected boolean semanticallyEquivalent(BioPAXElement element)
    • equivalenceCode

      public int equivalenceCode()
      Description copied from interface: BioPAXElement
      If two elements are equivalent, then their equivalence code should be the same.
      Specified by:
      equivalenceCode in interface BioPAXElement
      Returns:
      an integer that is same across all equivalent entities.
    • getUri

      public String getUri()
      Description copied from interface: BioPAXElement
      This method returns the absolute URI of the element. BioPAX data providers are responsible for generating globally unique and standard URIs for their BioPAX elements.
      Specified by:
      getUri in interface BioPAXElement
      Returns:
      unique URI for this object.
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • getAnnotations

      public Map<String,Object> getAnnotations()
      Description copied from interface: BioPAXElement
      A general-purpose map to optionally store additional application-specific information about the BioPAX element, such as statistics, inferred fields, etc.
      Specified by:
      getAnnotations in interface BioPAXElement
      Returns:
      additional (not BioPAX standard) annotations
    • equals

      public boolean equals(Object obj)
      true if and only if the other obj has the same biopax type (same BioPAXElement.getModelInterface(), not a subclass) and same URI. Other properties are not considered.
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      This method is consistent with the overridden equals(Object) method (biopax type and URI are what matters)
      Overrides:
      hashCode in class Object