java.lang.Object
org.geneontology.obographs.core.model.AbstractGraph
org.geneontology.obographs.core.model.Graph

@ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable public final class Graph extends AbstractGraph
A graph object holds a collection of nodes and edges Corresponds to a Named Graph in RDF, and an Ontology in OWL Note: there is no assumption that either nodes or edges are unique to a graph ## Basic OBO Graphs ![Node UML](node-bog.png) *
Author:
cjm
  • Method Details

    • getId

      public String getId()
      Overrides:
      getId in class AbstractGraph
      Returns:
      the id
    • getLbl

      public String getLbl()
      Overrides:
      getLbl in class AbstractGraph
      Returns:
      the lbl
    • getMeta

      @Nullable public Meta getMeta()
      Specified by:
      getMeta in class AbstractGraph
      Returns:
      the meta
    • getNodes

      public List<Node> getNodes()
      Specified by:
      getNodes in class AbstractGraph
      Returns:
      the nodes
    • getEdges

      public List<Edge> getEdges()
      Specified by:
      getEdges in class AbstractGraph
      Returns:
      the edges
    • getEquivalentNodesSets

      public List<EquivalentNodesSet> getEquivalentNodesSets()
      Specified by:
      getEquivalentNodesSets in class AbstractGraph
      Returns:
      the equivalentNodesSet
    • getLogicalDefinitionAxioms

      public List<LogicalDefinitionAxiom> getLogicalDefinitionAxioms()
      Specified by:
      getLogicalDefinitionAxioms in class AbstractGraph
      Returns:
      the logicalDefinitionAxioms
    • getDomainRangeAxioms

      public List<DomainRangeAxiom> getDomainRangeAxioms()
      Specified by:
      getDomainRangeAxioms in class AbstractGraph
      Returns:
      the domainRangeAxioms
    • getPropertyChainAxioms

      public List<PropertyChainAxiom> getPropertyChainAxioms()
      Specified by:
      getPropertyChainAxioms in class AbstractGraph
      Returns:
      the propertyChainAxioms
    • withId

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

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

      public final Graph 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
    • withNodes

      public final Graph withNodes(Node... elements)
      Copy the current immutable object with elements that replace the content of nodes.
      Parameters:
      elements - The elements to set
      Returns:
      A modified copy of this object
    • withNodes

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

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

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

      public final Graph withEquivalentNodesSets(EquivalentNodesSet... elements)
      Copy the current immutable object with elements that replace the content of equivalentNodesSets.
      Parameters:
      elements - The elements to set
      Returns:
      A modified copy of this object
    • withEquivalentNodesSets

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

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

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

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

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

      public final Graph withPropertyChainAxioms(PropertyChainAxiom... elements)
      Copy the current immutable object with elements that replace the content of propertyChainAxioms.
      Parameters:
      elements - The elements to set
      Returns:
      A modified copy of this object
    • withPropertyChainAxioms

      public final Graph withPropertyChainAxioms(Iterable<? extends PropertyChainAxiom> elements)
      Copy the current immutable object with elements that replace the content of propertyChainAxioms. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      elements - An iterable of propertyChainAxioms 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 Graph 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: id, lbl, meta, nodes, edges, equivalentNodesSets, logicalDefinitionAxioms, domainRangeAxioms, propertyChainAxioms.
      Overrides:
      hashCode in class Object
      Returns:
      hashCode value
    • toString

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

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