Class RdfQuadEmitter
- java.lang.Object
-
- com.apicatalog.jsonld.deseralization.RdfQuadEmitter
-
- All Implemented Interfaces:
RdfTripleConsumer
class RdfQuadEmitter extends java.lang.Object implements RdfTripleConsumer
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedRdfQuadEmitter(com.apicatalog.rdf.api.RdfQuadConsumer consumer)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description RdfTripleConsumerdefaultGraph()Sets the default graph as the active scope.RdfTripleConsumernamedGraph(java.lang.String graph)Sets a named graph as the active scope.static RdfTripleConsumernewInstance(com.apicatalog.rdf.api.RdfQuadConsumer consumer)RdfTripleConsumertriple(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.RdfTripleConsumertriple(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.RdfTripleConsumertriple(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.
-
-
-
Method Detail
-
newInstance
public static RdfTripleConsumer newInstance(com.apicatalog.rdf.api.RdfQuadConsumer consumer)
-
defaultGraph
public RdfTripleConsumer defaultGraph()
Description copied from interface:RdfTripleConsumerSets the default graph as the active scope. This method is invoked when triples belong to the unnamed default graph.- Specified by:
defaultGraphin interfaceRdfTripleConsumer- Returns:
- An instance enabling fluent programming; never
null.
-
namedGraph
public RdfTripleConsumer namedGraph(java.lang.String graph)
Description copied from interface:RdfTripleConsumerSets a named graph as the active scope. Ensures that subsequent triples are associated with the specified graph.- Specified by:
namedGraphin interfaceRdfTripleConsumer- Parameters:
graph- The name of the graph (IRI or blank node identifier prefixed with "_:"); nevernull.- 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:RdfTripleConsumerAccepts 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:
triplein interfaceRdfTripleConsumer- Parameters:
subject- The subject of the triple (IRI or blank node identifier prefixed with "_:"); nevernull.predicate- The predicate of the triple (IRI); nevernull.object- The object of the triple (IRI or blank node identifier prefixed with "_:"); nevernull.- 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:RdfTripleConsumerAccepts 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:
triplein interfaceRdfTripleConsumer- Parameters:
subject- The subject of the triple (IRI or blank node identifier prefixed with "_:"); nevernull.predicate- The predicate of the triple (IRI); nevernull.literal- The literal value of the object; nevernull.datatype- The datatype IRI of the literal; nevernull.- 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:RdfTripleConsumerAccepts 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:
triplein interfaceRdfTripleConsumer- Parameters:
subject- The subject of the triple (IRI or blank node identifier prefixed with "_:"); nevernull.predicate- The predicate of the triple (IRI); nevernull.literal- The literal value of the object; nevernull.language- The language tag of the literal; nevernull.direction- The text direction of the literal (optional, may benull).- Returns:
- An instance enabling fluent programming; never
null. - Throws:
com.apicatalog.rdf.api.RdfConsumerException- if an error occurs while processing the N-Quad statement
-
-