public class OWLRDFConsumer extends Object implements RDFConsumer, AnonymousNodeChecker
| Constructor and Description |
|---|
OWLRDFConsumer(OWLOntology ontology,
AnonymousNodeChecker checker,
OWLOntologyLoaderConfiguration configuration)
Instantiates a new oWLRDF consumer.
|
OWLRDFConsumer(OWLOntology ontology,
OWLOntologyLoaderConfiguration configuration)
Instantiates a new oWLRDF consumer.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addAnnotatedSource(IRI annotatedAnonSource,
IRI annotationMainNode)
Records an annotation of an anonymous node (either an annotation of an
annotation, or an annotation of an axiom for example).
|
void |
addClassExpression(IRI iri,
boolean explicitlyTyped)
Adds the class expression.
|
void |
addDataProperty(IRI iri,
boolean explicitlyTyped)
Adds the data property.
|
void |
addDataRange(IRI iri,
boolean explicitlyTyped)
Adds the data range.
|
void |
addObjectProperty(IRI iri,
boolean explicitlyTyped)
Adds the object property.
|
void |
addPrefix(String abbreviation,
String value)
Add a prefix to the underlying ontology format, if prefixes are
supported.
|
void |
endModel()
Called when model parsing is finished.
|
<E extends OWLEntity> |
generateAndLogParseError(EntityType<E> entityType,
IRI mainNode) |
Set<IRI> |
getAnnotatedSourceAnnotationMainNodes(IRI source)
Gets the main nodes of annotations that annotated the specified source.
|
OWLDataFactory |
getDataFactory()
Gets the data factory.
|
OWLAxiom |
getLastAddedAxiom()
Gets the last added axiom.
|
OWLOntology |
getOntology()
Gets the ontology.
|
RDFDocumentFormat |
getOntologyFormat()
Gets the ontology format.
|
OWLOntologyManager |
getOWLOntologyManager()
Gets the oWL ontology manager.
|
Set<OWLAnnotation> |
getPendingAnnotations()
Gets any annotations that were translated since the last call of this
method (calling this method clears the current pending annotations).
|
void |
includeModel(String logicalURI,
String physicalURI)
Receives the notification that the model being parsed includes another
model with supplied URIs.
|
boolean |
isAnonymousNode(IRI iri) |
boolean |
isAnonymousNode(String iri) |
boolean |
isAnonymousSharedNode(String iri) |
boolean |
isClassExpression(IRI iri)
Checks if is class expression.
|
boolean |
isParsedAllTriples()
Checks if is parsed all triples.
|
boolean |
isRestriction(IRI iri)
Checks if is restriction.
|
void |
logicalURI(IRI logicalURI)
Receives the logical URI of the model.
|
IRI |
remapIRI(IRI i)
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.
|
String |
remapOnlyIfRemapped(String i)
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 |
setExpectedAxioms(int expectedAxioms)
Sets the expected axioms.
|
void |
setOntologyFormat(RDFDocumentFormat format)
Sets the ontology format.
|
void |
startModel(IRI physicalURI)
Called when model parsing is started.
|
void |
statementWithLiteralValue(IRI subject,
IRI predicate,
String object,
String language,
IRI datatype)
Called when a statement with literal value is added to the model.
|
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 |
statementWithResourceValue(IRI subject,
IRI predicate,
IRI object)
Called when a statement with resource 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.
|
Set<OWLAnnotation> |
translateAnnotations(IRI mainNode)
Translates the annotation on a main node.
|
OWLClassExpression |
translateClassExpression(IRI i)
compatibility proxy for TranslatorAccessor#translateClassExpression
|
OWLDataPropertyExpression |
translateDataPropertyExpression(IRI iri)
Translate data property expression.
|
OWLDataRange |
translateDataRange(IRI mainNode)
Given a main node, translated data ranges according to Table 12.
|
OWLIndividual |
translateIndividual(IRI node)
Translate individual.
|
OWLObjectPropertyExpression |
translateObjectPropertyExpression(IRI mainNode)
Translate object property expression.
|
public OWLRDFConsumer(@Nonnull OWLOntology ontology, @Nonnull OWLOntologyLoaderConfiguration configuration)
ontology - the ontologyconfiguration - the configurationpublic OWLRDFConsumer(@Nonnull OWLOntology ontology, @Nonnull AnonymousNodeChecker checker, @Nonnull OWLOntologyLoaderConfiguration configuration)
ontology - the ontologychecker - anonymous node checkerconfiguration - the configurationpublic void addPrefix(String abbreviation, String value)
RDFConsumeraddPrefix in interface RDFConsumerabbreviation - short name for prefixvalue - replacement for short version@Nonnull public OWLOntology getOntology()
@Nonnull public RDFDocumentFormat getOntologyFormat()
public void setOntologyFormat(RDFDocumentFormat format)
format - the new ontology formatpublic void setExpectedAxioms(int expectedAxioms)
expectedAxioms - the new expected axiomspublic OWLDataFactory getDataFactory()
@Nonnull public Set<OWLAnnotation> getPendingAnnotations()
public boolean isAnonymousNode(String iri)
isAnonymousNode in interface AnonymousNodeCheckerpublic boolean isAnonymousSharedNode(String iri)
isAnonymousSharedNode in interface AnonymousNodeCheckerpublic boolean isAnonymousNode(IRI iri)
isAnonymousNode in interface AnonymousNodeCheckerpublic OWLAxiom getLastAddedAxiom()
public void addClassExpression(IRI iri, boolean explicitlyTyped)
iri - the iriexplicitlyTyped - the explicitly typedpublic boolean isClassExpression(IRI iri)
iri - the iripublic void addObjectProperty(IRI iri, boolean explicitlyTyped)
iri - the iriexplicitlyTyped - the explicitly typedpublic void addDataProperty(IRI iri, boolean explicitlyTyped)
iri - the iriexplicitlyTyped - the explicitly typedpublic void addDataRange(IRI iri, boolean explicitlyTyped)
iri - the iriexplicitlyTyped - the explicitly typedpublic boolean isRestriction(IRI iri)
iri - the iripublic OWLOntologyManager getOWLOntologyManager()
public void addAnnotatedSource(IRI annotatedAnonSource, IRI annotationMainNode)
annotatedAnonSource - The source that the annotation annotatesannotationMainNode - The annotationspublic Set<IRI> getAnnotatedSourceAnnotationMainNodes(IRI source)
source - The source (axiom or annotation main node)public void startModel(IRI physicalURI)
RDFConsumerstartModel in interface RDFConsumerphysicalURI - physical URI of the modelpublic boolean isParsedAllTriples()
public void endModel()
RDFConsumerendModel in interface RDFConsumerpublic void includeModel(String logicalURI, String physicalURI)
RDFConsumerincludeModel in interface RDFConsumerlogicalURI - logical URI of the modelphysicalURI - physical URI of the modelpublic void logicalURI(IRI logicalURI)
RDFConsumerlogicalURI in interface RDFConsumerlogicalURI - logical URI of the modelpublic void statementWithLiteralValue(@Nonnull String subject, @Nonnull String predicate, @Nonnull String object, @Nullable String language, @Nullable String datatype)
RDFConsumerstatementWithLiteralValue in interface RDFConsumersubject - URI of the subject resourcepredicate - URI of the predicate resourceobject - literal object valuelanguage - the languagedatatype - the URI of the literal's datatype (may be null)public void statementWithLiteralValue(@Nonnull IRI subject, @Nonnull IRI predicate, @Nonnull String object, String language, IRI datatype)
RDFConsumerstatementWithLiteralValue in interface RDFConsumersubject - URI of the subject resourcepredicate - URI of the predicate resourceobject - literal object valuelanguage - the languagedatatype - the URI of the literal's datatype (may be null)public void statementWithResourceValue(@Nonnull String subject, @Nonnull String predicate, @Nonnull String object)
RDFConsumerstatementWithResourceValue in interface RDFConsumersubject - URI of the subject resourcepredicate - URI of the predicate resourceobject - URI of the object resourcepublic void statementWithResourceValue(@Nonnull IRI subject, @Nonnull IRI predicate, @Nonnull IRI object)
RDFConsumerstatementWithResourceValue in interface RDFConsumersubject - URI of the subject resourcepredicate - URI of the predicate resourceobject - URI of the object resource@Nonnull public OWLClassExpression translateClassExpression(@Nonnull IRI i)
i - iri fr the class expression@Nonnull public OWLDataRange translateDataRange(@Nonnull IRI mainNode)
mainNode - The main node@Nonnull public OWLDataPropertyExpression translateDataPropertyExpression(@Nonnull IRI iri)
iri - the iri@Nonnull public OWLObjectPropertyExpression translateObjectPropertyExpression(@Nonnull IRI mainNode)
mainNode - the main node@Nonnull public OWLIndividual translateIndividual(@Nonnull IRI node)
node - the node@Nonnull public Set<OWLAnnotation> translateAnnotations(IRI mainNode)
mainNode - The main node@Nonnull public <E extends OWLEntity> E generateAndLogParseError(@Nonnull EntityType<E> entityType, @Nonnull IRI mainNode)
E - entity typeentityType - entity typemainNode - main node@Nonnull public IRI remapIRI(@Nonnull IRI i)
RDFConsumerremapIRI in interface RDFConsumeri - iri to remap if not blank@Nonnull public String remapOnlyIfRemapped(@Nonnull String i)
RDFConsumerremapOnlyIfRemapped in interface RDFConsumeri - iri to remap if not blankCopyright © 2015 The University of Manchester. All Rights Reserved.