Class GraphDocument
java.lang.Object
org.geneontology.obographs.core.model.AbstractGraphDocument
org.geneontology.obographs.core.model.GraphDocument
@ParametersAreNonnullByDefault
@Generated("org.immutables.processor.ProxyProcessor")
@Immutable
public final class GraphDocument
extends AbstractGraphDocument
Holds a collection of graphs, plus document-level metadata
## Model

- Author:
- cjm
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic GraphDocumentcopyOf(AbstractGraphDocument instance) Creates an immutable copy of aAbstractGraphDocumentvalue.booleanThis instance is equal to all instances ofGraphDocumentthat have equal attribute values.The JSON-LD context for this document.getMeta()inthashCode()Computes a hash code from attributes:context,meta,graphs.toString()Prints the immutable valueGraphDocumentwith attribute values.final GraphDocumentwithContext(Object value) Copy the current immutable object by setting a value for thecontextattribute.final GraphDocumentwithGraphs(Iterable<? extends Graph> elements) Copy the current immutable object with elements that replace the content ofgraphs.final GraphDocumentwithGraphs(Graph... elements) Copy the current immutable object with elements that replace the content ofgraphs.final GraphDocumentCopy the current immutable object by setting a value for themetaattribute.
-
Method Details
-
getContext
The JSON-LD context for this document. This needs to be an unstructured Object, since it could be either a list or a map. We don't want to store it here as a Context because we want to roundtrip it the way it is written in the document.- Specified by:
getContextin classAbstractGraphDocument
-
getMeta
- Specified by:
getMetain classAbstractGraphDocument- Returns:
- the meta
-
getGraphs
- Specified by:
getGraphsin classAbstractGraphDocument- Returns:
- the graphs
-
withContext
Copy the current immutable object by setting a value for thecontextattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for context (can benull)- 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
-
withGraphs
Copy the current immutable object with elements that replace the content ofgraphs.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withGraphs
Copy the current immutable object with elements that replace the content ofgraphs. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of graphs elements to set- Returns:
- A modified copy of
thisobject
-
equals
This instance is equal to all instances ofGraphDocumentthat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:context,meta,graphs. -
toString
Prints the immutable valueGraphDocumentwith attribute values. -
copyOf
Creates an immutable copy of aAbstractGraphDocumentvalue. 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 GraphDocument instance
-