Class RDFStar

java.lang.Object
org.apache.jena.system.RDFStar

public class RDFStar extends Object
Library for RDF-star translation to and from reification form. There is one reification for each unique quoted triple term. This is especially important when decoding.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static org.apache.jena.graph.Graph
    decodeFromRDF(org.apache.jena.graph.Graph graph)
    Returns a copy of the argument graph with any reifications for triple terms translated to triple terms.
    static void
    decodeFromRDF(org.apache.jena.graph.Graph graph, StreamRDF dest)
    Copy the argument graph to a StreamRDF, replacing reifications with for triple terms.
    static org.apache.jena.graph.Graph
    decodeFromRDFInPlace(org.apache.jena.graph.Graph graph)
    Replace reification encoding of RDF-star terms with RDF-star triples.
    static org.apache.jena.graph.Graph
    encodeAsRDF(org.apache.jena.graph.Graph graph)
    Returns a copy of the argument graph with any triple terms encoded as reification.
    static void
    encodeAsRDF(org.apache.jena.graph.Graph graph, StreamRDF dest)
    Copy to a StreamRDF, encoding RDF-star Triple terms by replacing them with RDF Reification.
    static org.apache.jena.graph.Graph
    encodeAsRDFInPlace(org.apache.jena.graph.Graph graph)
    Encode RDF-star Triple terms by replacing them with RDF Reification.
    static org.apache.jena.graph.Node
    reificationSubject(org.apache.jena.graph.Node_Triple nodeTriple)
    Calculate a reification subject node for a Node_Triple This must be the same node (same by value) whenever called with a Node_Triple with the same s/p/o.

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • RDFStar

      public RDFStar()
  • Method Details

    • encodeAsRDF

      public static org.apache.jena.graph.Graph encodeAsRDF(org.apache.jena.graph.Graph graph)
      Returns a copy of the argument graph with any triple terms encoded as reification.

      See decodeFromRDF(Graph) for the reverse operation.

      See encodeAsRDFInPlace(Graph) decodeFromRDFInPlace(Graph) for operations that alters the argument graph in-place.

      Returns a new graph with triples involving triple terms replaced with reification.

    • encodeAsRDF

      public static void encodeAsRDF(org.apache.jena.graph.Graph graph, StreamRDF dest)
      Copy to a StreamRDF, encoding RDF-star Triple terms by replacing them with RDF Reification.
    • decodeFromRDF

      public static org.apache.jena.graph.Graph decodeFromRDF(org.apache.jena.graph.Graph graph)
      Returns a copy of the argument graph with any reifications for triple terms translated to triple terms.

      See decodeFromRDF(Graph) for the reverse operation.

      See encodeAsRDFInPlace(Graph) decodeFromRDFInPlace(Graph) for operations that alters the argument graph in-place.

    • decodeFromRDF

      public static void decodeFromRDF(org.apache.jena.graph.Graph graph, StreamRDF dest)
      Copy the argument graph to a StreamRDF, replacing reifications with for triple terms. Caution: this operation uses space proportional to the number of triple terms present.
    • encodeAsRDFInPlace

      public static org.apache.jena.graph.Graph encodeAsRDFInPlace(org.apache.jena.graph.Graph graph)
      Encode RDF-star Triple terms by replacing them with RDF Reification.

      Changes the argument graph in-place.

      See Also:
    • decodeFromRDFInPlace

      public static org.apache.jena.graph.Graph decodeFromRDFInPlace(org.apache.jena.graph.Graph graph)
      Replace reification encoding of RDF-star terms with RDF-star triples.

      This function assuming any reification use in the graph is for RDF-star terms.

    • reificationSubject

      public static org.apache.jena.graph.Node reificationSubject(org.apache.jena.graph.Node_Triple nodeTriple)
      Calculate a reification subject node for a Node_Triple This must be the same node (same by value) whenever called with a Node_Triple with the same s/p/o.