-
-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Reflect latest feedback on RdfConsumer
- Loading branch information
Showing
4 changed files
with
104 additions
and
66 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,70 +1,100 @@ | ||
package com.apicatalog.rdf; | ||
|
||
/** | ||
* RDF dataset consumer interface designed for | ||
* speed, streamlined processing, and efficiency. | ||
* | ||
* This interface minimizes unnecessary object instantiation | ||
* and facilitates seamless integration with third-party libraries, | ||
* enabling efficient RDF data processing. | ||
* RDF dataset consumer interface designed for speed, streamlined processing, | ||
* and efficiency. | ||
* | ||
* This interface minimizes unnecessary object instantiation and facilitates | ||
* seamless integration with third-party libraries, enabling efficient RDF data | ||
* processing. | ||
*/ | ||
public interface RdfConsumer { | ||
|
||
/** | ||
* Sets the default graph as the active scope. | ||
* Invoked when triples belong to the unnamed, default graph. | ||
* Sets the default graph as the active scope. Invoked when triples belong to | ||
* the unnamed, default graph. | ||
*/ | ||
void defaultGraph(); | ||
|
||
/** | ||
* Sets a named graph as the active scope. | ||
* Ensures that subsequent triples are associated with the specified graph. | ||
* Sets a named graph as the active scope. Ensures that subsequent triples are | ||
* associated with the specified graph. | ||
* | ||
* @param graph The name of the graph (IRI or blank node identifier). | ||
* @param graph The name of the graph (IRI or blank node identifier | ||
* prefixed with "_:"). | ||
* @param blankGraph {@code true} if the graph name is a blank node identifier. | ||
*/ | ||
void namedGraph(String graph, boolean blankGraph); | ||
|
||
/** | ||
* Accepts a new RDF triple where the object is an IRI or a blank node. | ||
* The triple is processed within the currently active graph scope. | ||
* Accepts a new RDF triple where the object is an IRI or a blank node. The | ||
* triple is processed within the currently active graph scope. | ||
* | ||
* @param subject The subject of the triple (IRI or blank node identifier). | ||
* @param subject The subject of the triple (IRI or blank node identifier | ||
* prefixed with "_:"). | ||
* @param blankSubject {@code true} if the subject is a blank node identifier. | ||
* @param predicate The predicate of the triple (IRI or blank node identifier). | ||
* @param blankPredicate {@code true} if the predicate is a blank node identifier. | ||
* @param object The object of the triple (IRI or blank node identifier). | ||
* @param predicate The predicate of the triple (IRI or blank node | ||
* identifier prefixed with "_:"). | ||
* @param blankPredicate {@code true} if the predicate is a blank node | ||
* identifier. | ||
* @param object The object of the triple (IRI or blank node identifier | ||
* prefixed with "_:"). | ||
* @param blankObject {@code true} if the object is a blank node identifier. | ||
*/ | ||
void accept( | ||
void triple( | ||
String subject, | ||
boolean blankSubject, | ||
String predicate, | ||
boolean blankPredicate, | ||
String object, | ||
boolean blankObject | ||
); | ||
boolean blankObject); | ||
|
||
/** | ||
* Accepts a new RDF triple where the object is a literal value. | ||
* The triple is processed within the currently active graph scope. | ||
* Optimized for efficient handling of typed and language-tagged literals. | ||
* Accepts a new RDF triple where the object is a literal value. The triple is | ||
* processed within the currently active graph scope. Optimized for efficient | ||
* handling of typed and language-tagged literals. | ||
* | ||
* @param subject The subject of the triple (IRI or blank node identifier). | ||
* @param subject The subject of the triple (IRI or blank node identifier | ||
* prefixed with "_:"). | ||
* @param blankSubject {@code true} if the subject is a blank node identifier. | ||
* @param predicate The predicate of the triple (IRI or blank node identifier). | ||
* @param blankPredicate {@code true} if the predicate is a blank node identifier. | ||
* @param predicate The predicate of the triple (IRI or blank node | ||
* identifier prefixed with "_:"). | ||
* @param blankPredicate {@code true} if the predicate is a blank node | ||
* identifier. | ||
* @param literal The literal value of the object. | ||
* @param datatype The datatype IRI of the literal, never {@code null}. | ||
* @param language The language tag of the literal (optional, may be {@code null}). | ||
* @param datatype The datatype IRI of the literal (never {@code null}). | ||
*/ | ||
void accept( | ||
void triple( | ||
String subject, | ||
boolean blankSubject, | ||
String predicate, | ||
boolean blankPredicate, | ||
String literal, | ||
String datatype, | ||
String language | ||
); | ||
String datatype); | ||
|
||
/** | ||
* Accepts a new RDF triple where the object is a literal value. The triple is | ||
* processed within the currently active graph scope. Optimized for efficient | ||
* handling of typed and language-tagged literals. | ||
* | ||
* @param subject The subject of the triple (IRI or blank node identifier | ||
* prefixed with "_:"). | ||
* @param blankSubject {@code true} if the subject is a blank node identifier. | ||
* @param predicate The predicate of the triple (IRI or blank node | ||
* identifier prefixed with "_:"). | ||
* @param blankPredicate {@code true} if the predicate is a blank node | ||
* identifier. | ||
* @param literal The literal value of the object. | ||
* @param language The language code of the literal (never {@code null}). | ||
* @param direction The direction of the literal (optional, may be | ||
* {@code null}). | ||
*/ | ||
void triple( | ||
String subject, | ||
boolean blankSubject, | ||
String predicate, | ||
boolean blankPredicate, | ||
String literal, | ||
String language, | ||
String direction); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters