Class NodeFmtLib

java.lang.Object
org.apache.jena.riot.out.NodeFmtLib

public class NodeFmtLib extends Object
Presentation utilities for Nodes, Triples, Quads and more.

Methods str generate a re-parseable string.

Methods displayStr do not guarantee a re-parseable string e.g. may use abbreviations or common prefixes.

  • Constructor Details

    • NodeFmtLib

      public NodeFmtLib()
  • Method Details

    • str

      public static String str(org.apache.jena.graph.Triple t)
      Format a triple, using Turtle literal abbreviations.
    • str

      public static String str(Quad q)
      Format a quad, using Turtle literal abbreviations.
    • strTTL

      public static String strTTL(org.apache.jena.graph.Node node)
      With Turtle abbreviation for literals, no prefixes of base URI
    • strNT

      public static String strNT(org.apache.jena.graph.Node node)
      Format in N-triples style.
    • str

      public static String str(org.apache.jena.graph.Node node, PrefixMap prefixMap)
      Format in Turtle style, using the prefix map.
    • str

      public static String str(org.apache.jena.graph.Node node, String base, PrefixMap prefixMap)
      Format in Turtle style, using the base URI and prefix map.
    • strNodesNT

      public static String strNodesNT(org.apache.jena.graph.Node... nodes)
    • strNodesTTL

      public static String strNodesTTL(org.apache.jena.graph.Node... nodes)
    • displayStr

      public static String displayStr(org.apache.jena.rdf.model.RDFNode obj)
      A displayable string for an RDFNode. Includes common abbreviations
    • displayStr

      public static String displayStr(org.apache.jena.graph.Triple t)
    • displayStr

      public static String displayStr(Quad q)
    • displayStr

      public static String displayStr(org.apache.jena.graph.Node node)
    • encodeBNodeLabel

      public static String encodeBNodeLabel(String label)
    • decodeBNodeLabel

      public static String decodeBNodeLabel(String label)