Class DefinitionPropertyValue

java.lang.Object
org.geneontology.obographs.core.model.meta.AbstractDefinitionPropertyValue
org.geneontology.obographs.core.model.meta.DefinitionPropertyValue
All Implemented Interfaces:
Comparable<PropertyValue>, PropertyValue

@ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable public final class DefinitionPropertyValue extends AbstractDefinitionPropertyValue
A PropertyValue that represents a textual definition of an ontology class or property
Author:
cjm
  • Method Details

    • getPred

      public String getPred()
      Predicates correspond to OWL properties. Like all preds in this datamodel, a pred is represented as a String which denotes a CURIE
      Returns:
      the pred
    • getVal

      public String getVal()
      The value of the property-value
      Returns:
      the val
    • getXrefs

      public List<String> getXrefs()
      An array denoting objects that support the property value assertion
      Returns:
      the xrefs
    • getMeta

      @Nullable public Meta getMeta()
      Returns:
      The value of the meta attribute
    • withPred

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

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

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

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

      public final DefinitionPropertyValue 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
    • equals

      public boolean equals(@Nullable Object another)
      This instance is equal to all instances of DefinitionPropertyValue 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: pred, val, xrefs, meta.
      Overrides:
      hashCode in class Object
      Returns:
      hashCode value
    • toString

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

      Creates an immutable copy of a AbstractDefinitionPropertyValue 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 DefinitionPropertyValue instance