Package org.biopax.paxtools.impl
Class BioPAXElementImpl
java.lang.Object
org.biopax.paxtools.impl.BioPAXElementImpl
- All Implemented Interfaces:
Serializable,Cloneable,BioPAXElement
- Direct Known Subclasses:
L3ElementImpl
- See Also:
-
Field Summary
Fields inherited from interface org.biopax.paxtools.model.BioPAXElement
UNKNOWN_DOUBLE, UNKNOWN_FLOAT, UNKNOWN_INT -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleantrue if and only if the other obj has the same biopax type (sameBioPAXElement.getModelInterface(), not a subclass) and same URI.intIf two elements are equivalent, then their equivalence code should be the same.A general-purpose map to optionally store additional application-specific information about the BioPAX element, such as statistics, inferred fields, etc.getUri()This method returns the absolute URI of the element.inthashCode()This method is consistent with the overriddenequals(Object)method (biopax type and URI are what matters)booleanisEquivalent(BioPAXElement element) This method compares the given element for equivalency.protected booleansemanticallyEquivalent(BioPAXElement element) toString()Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.biopax.paxtools.model.BioPAXElement
getModelInterface
-
Constructor Details
-
BioPAXElementImpl
public BioPAXElementImpl()
-
-
Method Details
-
isEquivalent
Description copied from interface:BioPAXElementThis 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
- Specified by:
isEquivalentin interfaceBioPAXElement- Parameters:
element- to be compared for equivalency- Returns:
- true if the element equals to this, or has equivalent critical properties.
-
semanticallyEquivalent
-
equivalenceCode
public int equivalenceCode()Description copied from interface:BioPAXElementIf two elements are equivalent, then their equivalence code should be the same.- Specified by:
equivalenceCodein interfaceBioPAXElement- Returns:
- an integer that is same across all equivalent entities.
-
getUri
Description copied from interface:BioPAXElementThis 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:
getUriin interfaceBioPAXElement- Returns:
- unique URI for this object.
-
toString
-
getAnnotations
Description copied from interface:BioPAXElementA general-purpose map to optionally store additional application-specific information about the BioPAX element, such as statistics, inferred fields, etc.- Specified by:
getAnnotationsin interfaceBioPAXElement- Returns:
- additional (not BioPAX standard) annotations
-
equals
true if and only if the other obj has the same biopax type (sameBioPAXElement.getModelInterface(), not a subclass) and same URI. Other properties are not considered. -
hashCode
public int hashCode()This method is consistent with the overriddenequals(Object)method (biopax type and URI are what matters)
-