Package hydra.rdf

Interface Serde


  • public interface Serde
    Serialization functions for converting RDF graphs to N-Triples format expressions
    • Method Summary

      Static Methods 
      Modifier and Type Method Description
      static Expr blankNodeToExpr​(BlankNode bnode)
      Convert a blank node to an expression
      static java.lang.String escapeIriChar​(java.lang.Integer c)
      Escape a single IRI character code to a string
      static java.lang.String escapeIriStr​(java.lang.String s)
      Escape a string for use in an N-Triples IRI.
      static java.lang.String escapeLiteralChar​(java.lang.Integer c)
      Escape a single literal character code to a string
      static java.lang.String escapeLiteralString​(java.lang.String s)
      Escape a string for use in an N-Triples literal
      static Expr graphToExpr​(Graph g)
      Convert an RDF graph to an expression
      static java.lang.Integer hexDigit​(java.lang.Integer n)
      Convert a value 0-15 to an uppercase hex digit code point
      static Expr iriToExpr​(Iri iri)
      Convert an IRI to an expression
      static Expr languageTagToExpr​(LanguageTag lang)
      Convert a language tag to an expression
      static Expr literalToExpr​(Literal lit)
      Convert a literal to an expression
      static Expr nodeToExpr​(Node n)
      Convert a node to an expression
      static java.lang.String rdfGraphToNtriples​(Graph g)
      Convert an RDF graph to an N-Triples string
      static Expr resourceToExpr​(Resource r)
      Convert a resource to an expression
      static Expr tripleToExpr​(Triple t)
      Convert a triple to an expression
      static java.lang.String uchar4​(java.lang.Integer c)
      Format a code point as a 4-digit UCHAR escape sequence
    • Method Detail

      • blankNodeToExpr

        static Expr blankNodeToExpr​(BlankNode bnode)
        Convert a blank node to an expression
      • escapeIriChar

        static java.lang.String escapeIriChar​(java.lang.Integer c)
        Escape a single IRI character code to a string
      • escapeIriStr

        static java.lang.String escapeIriStr​(java.lang.String s)
        Escape a string for use in an N-Triples IRI. Disallowed characters are emitted as 4-digit UCHAR escapes.
      • escapeLiteralChar

        static java.lang.String escapeLiteralChar​(java.lang.Integer c)
        Escape a single literal character code to a string
      • escapeLiteralString

        static java.lang.String escapeLiteralString​(java.lang.String s)
        Escape a string for use in an N-Triples literal
      • graphToExpr

        static Expr graphToExpr​(Graph g)
        Convert an RDF graph to an expression
      • hexDigit

        static java.lang.Integer hexDigit​(java.lang.Integer n)
        Convert a value 0-15 to an uppercase hex digit code point
      • iriToExpr

        static Expr iriToExpr​(Iri iri)
        Convert an IRI to an expression
      • languageTagToExpr

        static Expr languageTagToExpr​(LanguageTag lang)
        Convert a language tag to an expression
      • literalToExpr

        static Expr literalToExpr​(Literal lit)
        Convert a literal to an expression
      • nodeToExpr

        static Expr nodeToExpr​(Node n)
        Convert a node to an expression
      • rdfGraphToNtriples

        static java.lang.String rdfGraphToNtriples​(Graph g)
        Convert an RDF graph to an N-Triples string
      • resourceToExpr

        static Expr resourceToExpr​(Resource r)
        Convert a resource to an expression
      • tripleToExpr

        static Expr tripleToExpr​(Triple t)
        Convert a triple to an expression
      • uchar4

        static java.lang.String uchar4​(java.lang.Integer c)
        Format a code point as a 4-digit UCHAR escape sequence