Class DomainRangeAxiom

java.lang.Object
org.geneontology.obographs.core.model.axiom.AbstractDomainRangeAxiom
org.geneontology.obographs.core.model.axiom.DomainRangeAxiom
All Implemented Interfaces:
Comparable<AbstractDomainRangeAxiom>, Axiom

@ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable public final class DomainRangeAxiom extends AbstractDomainRangeAxiom
This combined ObjectPropertyDomain, ObjectPropertyRange, and some AllValuesFrom expressions into a single convenience structure
Author:
cjm
  • Method Details

    • getMeta

      @Nullable public Meta getMeta()
      Returns:
      the meta
    • getPredicateId

      public String getPredicateId()
      Specified by:
      getPredicateId in class AbstractDomainRangeAxiom
      Returns:
      the predicateId
    • getDomainClassIds

      public Set<String> getDomainClassIds()
      For multiple domains, this is treated as intersection
      Specified by:
      getDomainClassIds in class AbstractDomainRangeAxiom
      Returns:
      the domainClassIds
    • getRangeClassIds

      public Set<String> getRangeClassIds()
      For multiple ranges, this is treated as intersection
      Specified by:
      getRangeClassIds in class AbstractDomainRangeAxiom
      Returns:
      the rangeClassIds
    • getAllValuesFromEdges

      public Set<Edge> getAllValuesFromEdges()
      Set of edges representing `X SubClassOf P only Y` axioms.

      Note that these are not in the main graph.edges object, as the edge graph is intended to be an existential graph. Most applications that do not perform a reasoning function have no use for universal axioms.

      Specified by:
      getAllValuesFromEdges in class AbstractDomainRangeAxiom
      Returns:
      the allValuesFromEdges
    • withMeta

      public final DomainRangeAxiom withMeta(@Nullable Meta value)
      Copy the current immutable object by setting a value for the meta attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for meta (can be null)
      Returns:
      A modified copy of the this object
    • withPredicateId

      public final DomainRangeAxiom withPredicateId(String value)
      Copy the current immutable object by setting a value for the predicateId attribute. An equals check used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for predicateId
      Returns:
      A modified copy of the this object
    • withDomainClassIds

      public final DomainRangeAxiom withDomainClassIds(String... elements)
      Copy the current immutable object with elements that replace the content of domainClassIds.
      Parameters:
      elements - The elements to set
      Returns:
      A modified copy of this object
    • withDomainClassIds

      public final DomainRangeAxiom withDomainClassIds(Iterable<String> elements)
      Copy the current immutable object with elements that replace the content of domainClassIds. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      elements - An iterable of domainClassIds elements to set
      Returns:
      A modified copy of this object
    • withRangeClassIds

      public final DomainRangeAxiom withRangeClassIds(String... elements)
      Copy the current immutable object with elements that replace the content of rangeClassIds.
      Parameters:
      elements - The elements to set
      Returns:
      A modified copy of this object
    • withRangeClassIds

      public final DomainRangeAxiom withRangeClassIds(Iterable<String> elements)
      Copy the current immutable object with elements that replace the content of rangeClassIds. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      elements - An iterable of rangeClassIds elements to set
      Returns:
      A modified copy of this object
    • withAllValuesFromEdges

      public final DomainRangeAxiom withAllValuesFromEdges(Edge... elements)
      Copy the current immutable object with elements that replace the content of allValuesFromEdges.
      Parameters:
      elements - The elements to set
      Returns:
      A modified copy of this object
    • withAllValuesFromEdges

      public final DomainRangeAxiom withAllValuesFromEdges(Iterable<? extends Edge> elements)
      Copy the current immutable object with elements that replace the content of allValuesFromEdges. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      elements - An iterable of allValuesFromEdges elements to set
      Returns:
      A modified copy of this object
    • equals

      public boolean equals(@Nullable Object another)
      This instance is equal to all instances of DomainRangeAxiom that have equal attribute values.
      Overrides:
      equals in class Object
      Returns:
      true if this is equal to another instance
    • hashCode

      public int hashCode()
      Computes a hash code from attributes: meta, predicateId, domainClassIds, rangeClassIds, allValuesFromEdges.
      Overrides:
      hashCode in class Object
      Returns:
      hashCode value
    • toString

      public String toString()
      Prints the immutable value DomainRangeAxiom with attribute values.
      Overrides:
      toString in class Object
      Returns:
      A string representation of the value
    • copyOf

      public static DomainRangeAxiom copyOf(AbstractDomainRangeAxiom instance)
      Creates an immutable copy of a AbstractDomainRangeAxiom value. Uses accessors to get values to initialize the new immutable instance. If an instance is already immutable, it is returned as is.
      Parameters:
      instance - The instance to copy
      Returns:
      A copied immutable DomainRangeAxiom instance