Class NQuadSerializer


  • public class NQuadSerializer
    extends java.lang.Object
    Encode an RDF quad in N-Quad format. For cryptographic reasons the serialization is performed with the minimum of escapes. RDF requires string-equality for IRIs, so no processing of percent encoding in the IRIs is performed.
    See Also:
    RDF 1.1. N-Quads.
    • Constructor Summary

      Constructors 
      Constructor Description
      NQuadSerializer()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.lang.String write​(com.apicatalog.rdf.RdfNQuad nQuad)  
      static java.lang.String write​(com.apicatalog.rdf.RdfResource subject, com.apicatalog.rdf.RdfResource predicate, com.apicatalog.rdf.RdfValue object, java.util.Optional<com.apicatalog.rdf.RdfResource> graphName)
      Write out the specified values in NQuad format.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • NQuadSerializer

        public NQuadSerializer()
    • Method Detail

      • write

        public static java.lang.String write​(com.apicatalog.rdf.RdfNQuad nQuad)
      • write

        public static java.lang.String write​(com.apicatalog.rdf.RdfResource subject,
                                             com.apicatalog.rdf.RdfResource predicate,
                                             com.apicatalog.rdf.RdfValue object,
                                             java.util.Optional<com.apicatalog.rdf.RdfResource> graphName)
        Write out the specified values in NQuad format.
        Parameters:
        subject - the quad's subject
        predicate - the quad's predicate
        object - the quad's object
        graphName - the quad's graph name, if any
        Returns:
        the NQuad serialization