Interface RDFConsumer
- All Known Implementing Classes:
OWLRDFConsumer
,OWLRDFConsumerAdapter
public interface RDFConsumer
Receives notifications about triples generated during the parsing process.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Add a prefix to the underlying ontology format, if prefixes are supported.void
endModel()
Called when model parsing is finished.void
includeModel
(String logicalURI, String physicalURI) Receives the notification that the model being parsed includes another model with supplied URIs.void
logicalURI
(IRI logicalURI) Receives the logical URI of the model.for iris that need to be mapped to blank nodes, e.g., SWRL rules with an IRI - the IRI should be dropped for such constructs.for iris that have been remapped to blank nodes, e.g., SWRL rules: the triple subject swrl:body object, for example, needs the subject to be remapped consistently.void
startModel
(IRI physicalURI) Called when model parsing is started.void
statementWithLiteralValue
(String subject, String predicate, String object, String language, String datatype) Called when a statement with literal value is added to the model.void
Called when a statement with literal value is added to the model.void
statementWithResourceValue
(String subject, String predicate, String object) Called when a statement with resource value is added to the model.void
statementWithResourceValue
(IRI subject, IRI predicate, IRI object) Called when a statement with resource value is added to the model.
-
Method Details
-
startModel
Called when model parsing is started.- Parameters:
physicalURI
- physical URI of the model
-
endModel
void endModel()Called when model parsing is finished. -
statementWithResourceValue
Called when a statement with resource value is added to the model.- Parameters:
subject
- URI of the subject resourcepredicate
- URI of the predicate resourceobject
- URI of the object resource
-
statementWithResourceValue
Called when a statement with resource value is added to the model.- Parameters:
subject
- URI of the subject resourcepredicate
- URI of the predicate resourceobject
- URI of the object resource
-
statementWithLiteralValue
void statementWithLiteralValue(String subject, String predicate, String object, @Nullable String language, @Nullable String datatype) Called when a statement with literal value is added to the model.- Parameters:
subject
- URI of the subject resourcepredicate
- URI of the predicate resourceobject
- literal object valuelanguage
- the languagedatatype
- the URI of the literal's datatype (may benull
)
-
statementWithLiteralValue
void statementWithLiteralValue(IRI subject, IRI predicate, String object, @Nullable String language, @Nullable IRI datatype) Called when a statement with literal value is added to the model.- Parameters:
subject
- URI of the subject resourcepredicate
- URI of the predicate resourceobject
- literal object valuelanguage
- the languagedatatype
- the URI of the literal's datatype (may benull
)
-
logicalURI
Receives the logical URI of the model.- Parameters:
logicalURI
- logical URI of the model
-
includeModel
Receives the notification that the model being parsed includes another model with supplied URIs.- Parameters:
logicalURI
- logical URI of the modelphysicalURI
- physical URI of the model
-
remapIRI
for iris that need to be mapped to blank nodes, e.g., SWRL rules with an IRI - the IRI should be dropped for such constructs.- Parameters:
i
- iri to remap if not blank- Returns:
- blank iri remapping i
-
remapOnlyIfRemapped
for iris that have been remapped to blank nodes, e.g., SWRL rules: the triple subject swrl:body object, for example, needs the subject to be remapped consistently.- Parameters:
i
- iri to remap if not blank- Returns:
- blank iri remapping i, or i if i has not been remapped earlier.
-
addPrefix
Add a prefix to the underlying ontology format, if prefixes are supported.- Parameters:
abbreviation
- short name for prefixvalue
- replacement for short version
-
getConfiguration
OWLOntologyLoaderConfiguration getConfiguration()- Returns:
- the loader configuration
-