Interface SerdeNative


  • public interface SerdeNative
    RDF4j-based serialization for Hydra RDF graphs.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static org.eclipse.rdf4j.model.ValueFactory valueFactory
      Value factory for creating RDF4j values.
    • Method Summary

      Static Methods 
      Modifier and Type Method Description
      static org.eclipse.rdf4j.model.BNode bnode​(BlankNode r)
      Convert a Hydra blank node to its RDF4j equivalent.
      static org.eclipse.rdf4j.model.IRI iri​(Iri r)
      Convert a Hydra IRI to its RDF4j equivalent.
      static org.eclipse.rdf4j.model.Literal literal​(Literal r)
      Convert a Hydra RDF literal to its RDF4j equivalent.
      static org.eclipse.rdf4j.model.Resource resource​(Resource r)
      Convert a Hydra RDF resource to its RDF4j equivalent.
      static java.lang.String toNtriples​(Graph graph)
      Serialize an RDF graph to N-Triples format.
      static java.lang.String toNtriples​(java.util.Collection<Triple> triples)
      Serialize a collection of RDF triples to N-Triples format.
      static java.lang.String toNtriples​(java.util.List<Description> descriptions)
      Serialize a list of RDF descriptions to N-Triples format.
      static org.eclipse.rdf4j.model.Statement tripleToStatement​(Triple triple)
      Convert a Hydra RDF triple to its RDF4j Statement equivalent.
      static org.eclipse.rdf4j.model.Value value​(Node r)
      Convert a Hydra RDF node to its RDF4j Value equivalent.
    • Field Detail

      • valueFactory

        static final org.eclipse.rdf4j.model.ValueFactory valueFactory
        Value factory for creating RDF4j values.
    • Method Detail

      • toNtriples

        static java.lang.String toNtriples​(java.util.List<Description> descriptions)
        Serialize a list of RDF descriptions to N-Triples format.
        Parameters:
        descriptions - the list of RDF descriptions to serialize
        Returns:
        the serialized N-Triples string
      • toNtriples

        static java.lang.String toNtriples​(Graph graph)
        Serialize an RDF graph to N-Triples format.
        Parameters:
        graph - the RDF graph to serialize
        Returns:
        the serialized N-Triples string
      • toNtriples

        static java.lang.String toNtriples​(java.util.Collection<Triple> triples)
        Serialize a collection of RDF triples to N-Triples format.
        Parameters:
        triples - the collection of RDF triples to serialize
        Returns:
        the serialized N-Triples string
      • bnode

        static org.eclipse.rdf4j.model.BNode bnode​(BlankNode r)
        Convert a Hydra blank node to its RDF4j equivalent.
        Parameters:
        r - the Hydra blank node
        Returns:
        the RDF4j BNode
      • iri

        static org.eclipse.rdf4j.model.IRI iri​(Iri r)
        Convert a Hydra IRI to its RDF4j equivalent.
        Parameters:
        r - the Hydra IRI
        Returns:
        the RDF4j IRI
      • literal

        static org.eclipse.rdf4j.model.Literal literal​(Literal r)
        Convert a Hydra RDF literal to its RDF4j equivalent.
        Parameters:
        r - the Hydra RDF literal
        Returns:
        the RDF4j Literal
      • resource

        static org.eclipse.rdf4j.model.Resource resource​(Resource r)
        Convert a Hydra RDF resource to its RDF4j equivalent.
        Parameters:
        r - the Hydra RDF resource
        Returns:
        the RDF4j Resource
      • tripleToStatement

        static org.eclipse.rdf4j.model.Statement tripleToStatement​(Triple triple)
        Convert a Hydra RDF triple to its RDF4j Statement equivalent.
        Parameters:
        triple - the Hydra RDF triple
        Returns:
        the RDF4j Statement
      • value

        static org.eclipse.rdf4j.model.Value value​(Node r)
        Convert a Hydra RDF node to its RDF4j Value equivalent.
        Parameters:
        r - the Hydra RDF node
        Returns:
        the RDF4j Value