Class Graph
- java.lang.Object
-
- org.geneontology.obographs.core.model.AbstractGraph
-
- org.geneontology.obographs.core.model.Graph
-
@ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable @CheckReturnValue 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  *- Author:
- cjm
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classGraph.BuilderBuilds instances of typeGraph.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static GraphcopyOf(AbstractGraph instance)Creates an immutable copy of aAbstractGraphvalue.booleanequals(Object another)This instance is equal to all instances ofGraphthat have equal attribute values.com.google.common.collect.ImmutableList<DomainRangeAxiom>getDomainRangeAxioms()com.google.common.collect.ImmutableList<Edge>getEdges()com.google.common.collect.ImmutableList<EquivalentNodesSet>getEquivalentNodesSets()StringgetId()StringgetLbl()com.google.common.collect.ImmutableList<LogicalDefinitionAxiom>getLogicalDefinitionAxioms()MetagetMeta()com.google.common.collect.ImmutableList<Node>getNodes()com.google.common.collect.ImmutableList<PropertyChainAxiom>getPropertyChainAxioms()inthashCode()Computes a hash code from attributes:id,lbl,meta,nodes,edges,equivalentNodesSets,logicalDefinitionAxioms,domainRangeAxioms,propertyChainAxioms.StringtoString()Prints the immutable valueGraphwith attribute values.GraphwithDomainRangeAxioms(Iterable<? extends DomainRangeAxiom> elements)Copy the current immutable object with elements that replace the content ofdomainRangeAxioms.GraphwithDomainRangeAxioms(DomainRangeAxiom... elements)Copy the current immutable object with elements that replace the content ofdomainRangeAxioms.GraphwithEdges(Iterable<? extends Edge> elements)Copy the current immutable object with elements that replace the content ofedges.GraphwithEdges(Edge... elements)Copy the current immutable object with elements that replace the content ofedges.GraphwithEquivalentNodesSets(Iterable<? extends EquivalentNodesSet> elements)Copy the current immutable object with elements that replace the content ofequivalentNodesSets.GraphwithEquivalentNodesSets(EquivalentNodesSet... elements)Copy the current immutable object with elements that replace the content ofequivalentNodesSets.GraphwithId(String value)Copy the current immutable object by setting a value for theidattribute.GraphwithLbl(String value)Copy the current immutable object by setting a value for thelblattribute.GraphwithLogicalDefinitionAxioms(Iterable<? extends LogicalDefinitionAxiom> elements)Copy the current immutable object with elements that replace the content oflogicalDefinitionAxioms.GraphwithLogicalDefinitionAxioms(LogicalDefinitionAxiom... elements)Copy the current immutable object with elements that replace the content oflogicalDefinitionAxioms.GraphwithMeta(Meta value)Copy the current immutable object by setting a value for themetaattribute.GraphwithNodes(Iterable<? extends Node> elements)Copy the current immutable object with elements that replace the content ofnodes.GraphwithNodes(Node... elements)Copy the current immutable object with elements that replace the content ofnodes.GraphwithPropertyChainAxioms(Iterable<? extends PropertyChainAxiom> elements)Copy the current immutable object with elements that replace the content ofpropertyChainAxioms.GraphwithPropertyChainAxioms(PropertyChainAxiom... elements)Copy the current immutable object with elements that replace the content ofpropertyChainAxioms.
-
-
-
Method Detail
-
getId
public String getId()
- Overrides:
getIdin classAbstractGraph- Returns:
- the id
-
getLbl
public String getLbl()
- Overrides:
getLblin classAbstractGraph- Returns:
- the lbl
-
getMeta
@Nullable public Meta getMeta()
- Specified by:
getMetain classAbstractGraph- Returns:
- the meta
-
getNodes
public com.google.common.collect.ImmutableList<Node> getNodes()
- Specified by:
getNodesin classAbstractGraph- Returns:
- the nodes
-
getEdges
public com.google.common.collect.ImmutableList<Edge> getEdges()
- Specified by:
getEdgesin classAbstractGraph- Returns:
- the edges
-
getEquivalentNodesSets
public com.google.common.collect.ImmutableList<EquivalentNodesSet> getEquivalentNodesSets()
- Specified by:
getEquivalentNodesSetsin classAbstractGraph- Returns:
- the equivalentNodesSet
-
getLogicalDefinitionAxioms
public com.google.common.collect.ImmutableList<LogicalDefinitionAxiom> getLogicalDefinitionAxioms()
- Specified by:
getLogicalDefinitionAxiomsin classAbstractGraph- Returns:
- the logicalDefinitionAxioms
-
getDomainRangeAxioms
public com.google.common.collect.ImmutableList<DomainRangeAxiom> getDomainRangeAxioms()
- Specified by:
getDomainRangeAxiomsin classAbstractGraph- Returns:
- the domainRangeAxioms
-
getPropertyChainAxioms
public com.google.common.collect.ImmutableList<PropertyChainAxiom> getPropertyChainAxioms()
- Specified by:
getPropertyChainAxiomsin classAbstractGraph- Returns:
- the propertyChainAxioms
-
withId
public final Graph withId(String value)
Copy the current immutable object by setting a value for theidattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for id- Returns:
- A modified copy of the
thisobject
-
withLbl
public final Graph withLbl(String value)
Copy the current immutable object by setting a value for thelblattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for lbl- Returns:
- A modified copy of the
thisobject
-
withMeta
public final Graph withMeta(@Nullable Meta value)
Copy the current immutable object by setting a value for themetaattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for meta (can benull)- Returns:
- A modified copy of the
thisobject
-
withNodes
public final Graph withNodes(Node... elements)
Copy the current immutable object with elements that replace the content ofnodes.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withNodes
public final Graph withNodes(Iterable<? extends Node> elements)
Copy the current immutable object with elements that replace the content ofnodes. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of nodes elements to set- Returns:
- A modified copy of
thisobject
-
withEdges
public final Graph withEdges(Edge... elements)
Copy the current immutable object with elements that replace the content ofedges.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withEdges
public final Graph withEdges(Iterable<? extends Edge> elements)
Copy the current immutable object with elements that replace the content ofedges. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of edges elements to set- Returns:
- A modified copy of
thisobject
-
withEquivalentNodesSets
public final Graph withEquivalentNodesSets(EquivalentNodesSet... elements)
Copy the current immutable object with elements that replace the content ofequivalentNodesSets.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withEquivalentNodesSets
public final Graph withEquivalentNodesSets(Iterable<? extends EquivalentNodesSet> elements)
Copy the current immutable object with elements that replace the content ofequivalentNodesSets. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of equivalentNodesSets elements to set- Returns:
- A modified copy of
thisobject
-
withLogicalDefinitionAxioms
public final Graph withLogicalDefinitionAxioms(LogicalDefinitionAxiom... elements)
Copy the current immutable object with elements that replace the content oflogicalDefinitionAxioms.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withLogicalDefinitionAxioms
public final Graph withLogicalDefinitionAxioms(Iterable<? extends LogicalDefinitionAxiom> elements)
Copy the current immutable object with elements that replace the content oflogicalDefinitionAxioms. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of logicalDefinitionAxioms elements to set- Returns:
- A modified copy of
thisobject
-
withDomainRangeAxioms
public final Graph withDomainRangeAxioms(DomainRangeAxiom... elements)
Copy the current immutable object with elements that replace the content ofdomainRangeAxioms.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withDomainRangeAxioms
public final Graph withDomainRangeAxioms(Iterable<? extends DomainRangeAxiom> elements)
Copy the current immutable object with elements that replace the content ofdomainRangeAxioms. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of domainRangeAxioms elements to set- Returns:
- A modified copy of
thisobject
-
withPropertyChainAxioms
public final Graph withPropertyChainAxioms(PropertyChainAxiom... elements)
Copy the current immutable object with elements that replace the content ofpropertyChainAxioms.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withPropertyChainAxioms
public final Graph withPropertyChainAxioms(Iterable<? extends PropertyChainAxiom> elements)
Copy the current immutable object with elements that replace the content ofpropertyChainAxioms. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of propertyChainAxioms elements to set- Returns:
- A modified copy of
thisobject
-
equals
public boolean equals(@Nullable Object another)This instance is equal to all instances ofGraphthat have equal attribute values.
-
hashCode
public int hashCode()
Computes a hash code from attributes:id,lbl,meta,nodes,edges,equivalentNodesSets,logicalDefinitionAxioms,domainRangeAxioms,propertyChainAxioms.
-
toString
public String toString()
Prints the immutable valueGraphwith attribute values.
-
copyOf
public static Graph copyOf(AbstractGraph instance)
Creates an immutable copy of aAbstractGraphvalue. 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
-
-