Class Graph
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

*
- Author:
- cjm
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic GraphcopyOf(AbstractGraph instance) Creates an immutable copy of aAbstractGraphvalue.booleanThis instance is equal to all instances ofGraphthat have equal attribute values.getEdges()getId()getLbl()getMeta()getNodes()inthashCode()Computes a hash code from attributes:id,lbl,meta,nodes,edges,equivalentNodesSets,logicalDefinitionAxioms,domainRangeAxioms,propertyChainAxioms.toString()Prints the immutable valueGraphwith attribute values.final GraphwithDomainRangeAxioms(Iterable<? extends DomainRangeAxiom> elements) Copy the current immutable object with elements that replace the content ofdomainRangeAxioms.final GraphwithDomainRangeAxioms(DomainRangeAxiom... elements) Copy the current immutable object with elements that replace the content ofdomainRangeAxioms.final GraphCopy the current immutable object with elements that replace the content ofedges.final GraphCopy the current immutable object with elements that replace the content ofedges.final GraphwithEquivalentNodesSets(Iterable<? extends EquivalentNodesSet> elements) Copy the current immutable object with elements that replace the content ofequivalentNodesSets.final GraphwithEquivalentNodesSets(EquivalentNodesSet... elements) Copy the current immutable object with elements that replace the content ofequivalentNodesSets.final GraphCopy the current immutable object by setting a value for theidattribute.final GraphCopy the current immutable object by setting a value for thelblattribute.final GraphwithLogicalDefinitionAxioms(Iterable<? extends LogicalDefinitionAxiom> elements) Copy the current immutable object with elements that replace the content oflogicalDefinitionAxioms.final GraphwithLogicalDefinitionAxioms(LogicalDefinitionAxiom... elements) Copy the current immutable object with elements that replace the content oflogicalDefinitionAxioms.final GraphCopy the current immutable object by setting a value for themetaattribute.final GraphCopy the current immutable object with elements that replace the content ofnodes.final GraphCopy the current immutable object with elements that replace the content ofnodes.final GraphwithPropertyChainAxioms(Iterable<? extends PropertyChainAxiom> elements) Copy the current immutable object with elements that replace the content ofpropertyChainAxioms.final GraphwithPropertyChainAxioms(PropertyChainAxiom... elements) Copy the current immutable object with elements that replace the content ofpropertyChainAxioms.
-
Method Details
-
getId
- Overrides:
getIdin classAbstractGraph- Returns:
- the id
-
getLbl
- Overrides:
getLblin classAbstractGraph- Returns:
- the lbl
-
getMeta
- Specified by:
getMetain classAbstractGraph- Returns:
- the meta
-
getNodes
- Specified by:
getNodesin classAbstractGraph- Returns:
- the nodes
-
getEdges
- Specified by:
getEdgesin classAbstractGraph- Returns:
- the edges
-
getEquivalentNodesSets
- Specified by:
getEquivalentNodesSetsin classAbstractGraph- Returns:
- the equivalentNodesSet
-
getLogicalDefinitionAxioms
- Specified by:
getLogicalDefinitionAxiomsin classAbstractGraph- Returns:
- the logicalDefinitionAxioms
-
getDomainRangeAxioms
- Specified by:
getDomainRangeAxiomsin classAbstractGraph- Returns:
- the domainRangeAxioms
-
getPropertyChainAxioms
- Specified by:
getPropertyChainAxiomsin classAbstractGraph- Returns:
- the propertyChainAxioms
-
withId
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
Prints the immutable valueGraphwith attribute values. -
copyOf
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
-