Class LogicalDefinitionAxiom

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

@ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable public final class LogicalDefinitionAxiom extends AbstractLogicalDefinitionAxiom
Corresponds to an axiom of the form C = X1 and ... and Xn, Where X_i is either a named class or OWL Restriction
Author:
cjm
  • Method Details

    • getMeta

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

      public String getDefinedClassId()
      Specified by:
      getDefinedClassId in class AbstractLogicalDefinitionAxiom
      Returns:
      the representativeNodeId
    • getGenusIds

      public List<String> getGenusIds()
      Specified by:
      getGenusIds in class AbstractLogicalDefinitionAxiom
      Returns:
      the nodeIds
    • getRestrictions

      public List<ExistentialRestrictionExpression> getRestrictions()
      Specified by:
      getRestrictions in class AbstractLogicalDefinitionAxiom
      Returns:
      the restrictions
    • withMeta

      public final LogicalDefinitionAxiom 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
    • withDefinedClassId

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

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

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

      public final LogicalDefinitionAxiom withRestrictions(ExistentialRestrictionExpression... elements)
      Copy the current immutable object with elements that replace the content of restrictions.
      Parameters:
      elements - The elements to set
      Returns:
      A modified copy of this object
    • withRestrictions

      public final LogicalDefinitionAxiom withRestrictions(Iterable<? extends ExistentialRestrictionExpression> elements)
      Copy the current immutable object with elements that replace the content of restrictions. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      elements - An iterable of restrictions 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 LogicalDefinitionAxiom 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, definedClassId, genusIds, restrictions.
      Overrides:
      hashCode in class Object
      Returns:
      hashCode value
    • toString

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

      public static LogicalDefinitionAxiom copyOf(AbstractLogicalDefinitionAxiom instance)
      Creates an immutable copy of a AbstractLogicalDefinitionAxiom 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 LogicalDefinitionAxiom instance