Package org.aksw.jenax.arq.dataset.api
Interface RDFNodeInDataset
- All Superinterfaces:
org.apache.jena.graph.FrontsNode,org.apache.jena.rdf.model.RDFNode
- All Known Subinterfaces:
LiteralInDataset,ResourceInDataset
- All Known Implementing Classes:
LiteralInDatasetImpl,ResourceInDatasetImpl
public interface RDFNodeInDataset
extends org.apache.jena.rdf.model.RDFNode
An RDFNode linked to a Dataset in addition to its model.
- Author:
- raven
-
Method Summary
Modifier and TypeMethodDescriptiondefault RDFNodeInDatasetasRDFNodeInDatasetHere(org.apache.jena.graph.Node node) Create a new ResourceInDataset in the same graph/model as this resourcestatic RDFNodeInDatasetorg.apache.jena.query.DatasetThe named graph such that r.getDataset().getNamedGraph(r.getGraphName()).equals(r.getModel()) While the model and possibly graph instances may not be reference equal due to being different views, they should still operate on the same underlying collection of triples.inDataset(org.apache.jena.query.Dataset other) default RDFNodeInDatasetmutateRDFNode(Consumer<? super org.apache.jena.rdf.model.RDFNode> resourceMutator) Pass itself to a consumer and return this.Methods inherited from interface org.apache.jena.graph.FrontsNode
asNodeMethods inherited from interface org.apache.jena.rdf.model.RDFNode
as, asStatementTerm, canAs, getModel, inModel, isAnon, isLiteral, isResource, isStatementTerm, isURIResource, toString, visitWith
-
Method Details
-
getGraphName
String getGraphName()The named graph such that r.getDataset().getNamedGraph(r.getGraphName()).equals(r.getModel()) While the model and possibly graph instances may not be reference equal due to being different views, they should still operate on the same underlying collection of triples.- Returns:
-
getDataset
org.apache.jena.query.Dataset getDataset() -
inDataset
-
asLiteral
LiteralInDataset asLiteral()- Specified by:
asLiteralin interfaceorg.apache.jena.rdf.model.RDFNode
-
asResource
ResourceInDataset asResource()- Specified by:
asResourcein interfaceorg.apache.jena.rdf.model.RDFNode
-
mutateRDFNode
default RDFNodeInDataset mutateRDFNode(Consumer<? super org.apache.jena.rdf.model.RDFNode> resourceMutator) Pass itself to a consumer and return this. Useful for retaining the type when adding properties to a ResourceInDataset: flowOrStream.map(ResourceInDatasetImpl.createX().acceptResource(r -> r.addProperty(foo, bar));- Returns:
-
asRDFNodeInDatasetHere
Create a new ResourceInDataset in the same graph/model as this resource- Returns:
-
create
static RDFNodeInDataset create(org.apache.jena.query.Dataset dataset, String graphName, org.apache.jena.graph.Node node)
-