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 Type
    Method
    Description
     
    asRDFNodeInDatasetHere(org.apache.jena.graph.Node node)
    Create a new ResourceInDataset in the same graph/model as this resource
     
    create(org.apache.jena.query.Dataset dataset, String graphName, org.apache.jena.graph.Node node)
     
    org.apache.jena.query.Dataset
     
    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.
    inDataset(org.apache.jena.query.Dataset other)
     
    mutateRDFNode(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

    asNode

    Methods inherited from interface org.apache.jena.rdf.model.RDFNode

    as, canAs, getModel, inModel, isAnon, isLiteral, isResource, isStmtResource, 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

      RDFNodeInDataset inDataset(org.apache.jena.query.Dataset other)
    • asLiteral

      LiteralInDataset asLiteral()
      Specified by:
      asLiteral in interface org.apache.jena.rdf.model.RDFNode
    • asResource

      ResourceInDataset asResource()
      Specified by:
      asResource in interface org.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

      default RDFNodeInDataset asRDFNodeInDatasetHere(org.apache.jena.graph.Node node)
      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)