Class RdfQuadEmitter

    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected com.apicatalog.rdf.api.RdfQuadConsumer consumer  
      protected java.lang.String graph  
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected RdfQuadEmitter​(com.apicatalog.rdf.api.RdfQuadConsumer consumer)  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      RdfTripleConsumer defaultGraph()
      Sets the default graph as the active scope.
      RdfTripleConsumer namedGraph​(java.lang.String graph)
      Sets a named graph as the active scope.
      static RdfTripleConsumer newInstance​(com.apicatalog.rdf.api.RdfQuadConsumer consumer)  
      RdfTripleConsumer triple​(java.lang.String subject, java.lang.String predicate, java.lang.String object)
      Accepts an RDF triple where the object is an IRI or a blank node.
      RdfTripleConsumer triple​(java.lang.String subject, java.lang.String predicate, java.lang.String literal, java.lang.String datatype)
      Accepts an RDF triple where the object is a literal with a datatype.
      RdfTripleConsumer triple​(java.lang.String subject, java.lang.String predicate, java.lang.String literal, java.lang.String language, java.lang.String direction)
      Accepts an RDF triple where the object is a localized string value.
      • Methods inherited from class java.lang.Object

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

      • consumer

        protected final com.apicatalog.rdf.api.RdfQuadConsumer consumer
      • graph

        protected java.lang.String graph
    • Constructor Detail

      • RdfQuadEmitter

        protected RdfQuadEmitter​(com.apicatalog.rdf.api.RdfQuadConsumer consumer)
    • Method Detail

      • newInstance

        public static RdfTripleConsumer newInstance​(com.apicatalog.rdf.api.RdfQuadConsumer consumer)
      • defaultGraph

        public RdfTripleConsumer defaultGraph()
        Description copied from interface: RdfTripleConsumer
        Sets the default graph as the active scope. This method is invoked when triples belong to the unnamed default graph.
        Specified by:
        defaultGraph in interface RdfTripleConsumer
        Returns:
        An instance enabling fluent programming; never null.
      • namedGraph

        public RdfTripleConsumer namedGraph​(java.lang.String graph)
        Description copied from interface: RdfTripleConsumer
        Sets a named graph as the active scope. Ensures that subsequent triples are associated with the specified graph.
        Specified by:
        namedGraph in interface RdfTripleConsumer
        Parameters:
        graph - The name of the graph (IRI or blank node identifier prefixed with "_:"); never null.
        Returns:
        An instance enabling fluent programming; never null.
      • triple

        public RdfTripleConsumer triple​(java.lang.String subject,
                                        java.lang.String predicate,
                                        java.lang.String object)
                                 throws com.apicatalog.rdf.api.RdfConsumerException
        Description copied from interface: RdfTripleConsumer
        Accepts an RDF triple where the object is an IRI or a blank node. The triple is processed within the currently active graph scope.
        Specified by:
        triple in interface RdfTripleConsumer
        Parameters:
        subject - The subject of the triple (IRI or blank node identifier prefixed with "_:"); never null.
        predicate - The predicate of the triple (IRI); never null.
        object - The object of the triple (IRI or blank node identifier prefixed with "_:"); never null.
        Returns:
        An instance enabling fluent programming; never null.
        Throws:
        com.apicatalog.rdf.api.RdfConsumerException - if an error occurs while processing the N-Quad statement
      • triple

        public RdfTripleConsumer triple​(java.lang.String subject,
                                        java.lang.String predicate,
                                        java.lang.String literal,
                                        java.lang.String datatype)
                                 throws com.apicatalog.rdf.api.RdfConsumerException
        Description copied from interface: RdfTripleConsumer
        Accepts an RDF triple where the object is a literal with a datatype. Optimized for efficient handling of typed literals. The triple is processed within the currently active graph scope.
        Specified by:
        triple in interface RdfTripleConsumer
        Parameters:
        subject - The subject of the triple (IRI or blank node identifier prefixed with "_:"); never null.
        predicate - The predicate of the triple (IRI); never null.
        literal - The literal value of the object; never null.
        datatype - The datatype IRI of the literal; never null.
        Returns:
        An instance enabling fluent programming; never null.
        Throws:
        com.apicatalog.rdf.api.RdfConsumerException - if an error occurs while processing the N-Quad statement
      • triple

        public RdfTripleConsumer triple​(java.lang.String subject,
                                        java.lang.String predicate,
                                        java.lang.String literal,
                                        java.lang.String language,
                                        java.lang.String direction)
                                 throws com.apicatalog.rdf.api.RdfConsumerException
        Description copied from interface: RdfTripleConsumer
        Accepts an RDF triple where the object is a localized string value. Optimized for efficient handling of language-tagged literals. The triple is processed within the currently active graph scope.
        Specified by:
        triple in interface RdfTripleConsumer
        Parameters:
        subject - The subject of the triple (IRI or blank node identifier prefixed with "_:"); never null.
        predicate - The predicate of the triple (IRI); never null.
        literal - The literal value of the object; never null.
        language - The language tag of the literal; never null.
        direction - The text direction of the literal (optional, may be null).
        Returns:
        An instance enabling fluent programming; never null.
        Throws:
        com.apicatalog.rdf.api.RdfConsumerException - if an error occurs while processing the N-Quad statement