public class OWLRDFConsumer extends Object implements RDFConsumer, org.semanticweb.owlapi.util.AnonymousNodeChecker
| Constructor and Description |
|---|
OWLRDFConsumer(org.semanticweb.owlapi.model.OWLOntology ontology,
org.semanticweb.owlapi.util.AnonymousNodeChecker checker,
org.semanticweb.owlapi.model.OWLOntologyLoaderConfiguration configuration)
Instantiates a new oWLRDF consumer.
|
OWLRDFConsumer(org.semanticweb.owlapi.model.OWLOntology ontology,
org.semanticweb.owlapi.model.OWLOntologyLoaderConfiguration configuration)
Instantiates a new oWLRDF consumer.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addAnnotatedSource(org.semanticweb.owlapi.model.IRI annotatedAnonSource,
org.semanticweb.owlapi.model.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(org.semanticweb.owlapi.model.IRI iri,
boolean explicitlyTyped)
Adds the class expression.
|
void |
addDataProperty(org.semanticweb.owlapi.model.IRI iri,
boolean explicitlyTyped)
Adds the data property.
|
void |
addDataRange(org.semanticweb.owlapi.model.IRI iri,
boolean explicitlyTyped)
Adds the data range.
|
void |
addObjectProperty(org.semanticweb.owlapi.model.IRI iri,
boolean explicitlyTyped)
Adds the object property.
|
void |
endModel()
Called when model parsing is finished.
|
<E extends org.semanticweb.owlapi.model.OWLEntity> |
generateAndLogParseError(org.semanticweb.owlapi.model.EntityType<E> entityType,
org.semanticweb.owlapi.model.IRI mainNode) |
Set<org.semanticweb.owlapi.model.IRI> |
getAnnotatedSourceAnnotationMainNodes(org.semanticweb.owlapi.model.IRI source)
Gets the main nodes of annotations that annotated the specified source.
|
org.semanticweb.owlapi.model.OWLDataFactory |
getDataFactory()
Gets the data factory.
|
org.semanticweb.owlapi.model.OWLAxiom |
getLastAddedAxiom()
Gets the last added axiom.
|
org.semanticweb.owlapi.model.OWLOntology |
getOntology()
Gets the ontology.
|
org.semanticweb.owlapi.formats.RDFDocumentFormat |
getOntologyFormat()
Gets the ontology format.
|
org.semanticweb.owlapi.model.OWLOntologyManager |
getOWLOntologyManager()
Gets the oWL ontology manager.
|
Set<org.semanticweb.owlapi.model.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(org.semanticweb.owlapi.model.IRI iri) |
boolean |
isAnonymousNode(String iri) |
boolean |
isAnonymousSharedNode(String iri) |
boolean |
isClassExpression(org.semanticweb.owlapi.model.IRI iri)
Checks if is class expression.
|
boolean |
isParsedAllTriples()
Checks if is parsed all triples.
|
boolean |
isRestriction(org.semanticweb.owlapi.model.IRI iri)
Checks if is restriction.
|
void |
logicalURI(org.semanticweb.owlapi.model.IRI logicalURI)
Receives the logical URI of the model.
|
org.semanticweb.owlapi.model.IRI |
remapIRI(org.semanticweb.owlapi.model.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(org.semanticweb.owlapi.formats.RDFDocumentFormat format)
Sets the ontology format.
|
void |
startModel(org.semanticweb.owlapi.model.IRI physicalURI)
Called when model parsing is started.
|
void |
statementWithLiteralValue(org.semanticweb.owlapi.model.IRI subject,
org.semanticweb.owlapi.model.IRI predicate,
String object,
String language,
org.semanticweb.owlapi.model.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(org.semanticweb.owlapi.model.IRI subject,
org.semanticweb.owlapi.model.IRI predicate,
org.semanticweb.owlapi.model.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<org.semanticweb.owlapi.model.OWLAnnotation> |
translateAnnotations(org.semanticweb.owlapi.model.IRI mainNode)
Translates the annotation on a main node.
|
org.semanticweb.owlapi.model.OWLClassExpression |
translateClassExpression(org.semanticweb.owlapi.model.IRI i)
compatibility proxy for TranslatorAccessor#translateClassExpression
|
org.semanticweb.owlapi.model.OWLDataPropertyExpression |
translateDataPropertyExpression(org.semanticweb.owlapi.model.IRI iri)
Translate data property expression.
|
org.semanticweb.owlapi.model.OWLDataRange |
translateDataRange(org.semanticweb.owlapi.model.IRI mainNode)
Given a main node, translated data ranges according to Table 12.
|
org.semanticweb.owlapi.model.OWLIndividual |
translateIndividual(org.semanticweb.owlapi.model.IRI node)
Translate individual.
|
org.semanticweb.owlapi.model.OWLObjectPropertyExpression |
translateObjectPropertyExpression(org.semanticweb.owlapi.model.IRI mainNode)
Translate object property expression.
|
public OWLRDFConsumer(@Nonnull org.semanticweb.owlapi.model.OWLOntology ontology, @Nonnull org.semanticweb.owlapi.model.OWLOntologyLoaderConfiguration configuration)
ontology - the ontologyconfiguration - the configurationpublic OWLRDFConsumer(@Nonnull org.semanticweb.owlapi.model.OWLOntology ontology, @Nonnull org.semanticweb.owlapi.util.AnonymousNodeChecker checker, @Nonnull org.semanticweb.owlapi.model.OWLOntologyLoaderConfiguration configuration)
ontology - the ontologychecker - anonymous node checkerconfiguration - the configuration@Nonnull public org.semanticweb.owlapi.model.OWLOntology getOntology()
@Nonnull public org.semanticweb.owlapi.formats.RDFDocumentFormat getOntologyFormat()
public void setOntologyFormat(org.semanticweb.owlapi.formats.RDFDocumentFormat format)
format - the new ontology formatpublic void setExpectedAxioms(int expectedAxioms)
expectedAxioms - the new expected axiomspublic org.semanticweb.owlapi.model.OWLDataFactory getDataFactory()
@Nonnull public Set<org.semanticweb.owlapi.model.OWLAnnotation> getPendingAnnotations()
public boolean isAnonymousNode(String iri)
isAnonymousNode in interface org.semanticweb.owlapi.util.AnonymousNodeCheckerpublic boolean isAnonymousSharedNode(String iri)
isAnonymousSharedNode in interface org.semanticweb.owlapi.util.AnonymousNodeCheckerpublic boolean isAnonymousNode(org.semanticweb.owlapi.model.IRI iri)
isAnonymousNode in interface org.semanticweb.owlapi.util.AnonymousNodeCheckerpublic org.semanticweb.owlapi.model.OWLAxiom getLastAddedAxiom()
public void addClassExpression(org.semanticweb.owlapi.model.IRI iri,
boolean explicitlyTyped)
iri - the iriexplicitlyTyped - the explicitly typedpublic boolean isClassExpression(org.semanticweb.owlapi.model.IRI iri)
iri - the iripublic void addObjectProperty(org.semanticweb.owlapi.model.IRI iri,
boolean explicitlyTyped)
iri - the iriexplicitlyTyped - the explicitly typedpublic void addDataProperty(org.semanticweb.owlapi.model.IRI iri,
boolean explicitlyTyped)
iri - the iriexplicitlyTyped - the explicitly typedpublic void addDataRange(org.semanticweb.owlapi.model.IRI iri,
boolean explicitlyTyped)
iri - the iriexplicitlyTyped - the explicitly typedpublic boolean isRestriction(org.semanticweb.owlapi.model.IRI iri)
iri - the iripublic org.semanticweb.owlapi.model.OWLOntologyManager getOWLOntologyManager()
public void addAnnotatedSource(org.semanticweb.owlapi.model.IRI annotatedAnonSource,
org.semanticweb.owlapi.model.IRI annotationMainNode)
annotatedAnonSource - The source that the annotation annotatesannotationMainNode - The annotationspublic Set<org.semanticweb.owlapi.model.IRI> getAnnotatedSourceAnnotationMainNodes(org.semanticweb.owlapi.model.IRI source)
source - The source (axiom or annotation main node)public void startModel(org.semanticweb.owlapi.model.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(org.semanticweb.owlapi.model.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 org.semanticweb.owlapi.model.IRI subject, @Nonnull org.semanticweb.owlapi.model.IRI predicate, @Nonnull String object, String language, org.semanticweb.owlapi.model.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 org.semanticweb.owlapi.model.IRI subject, @Nonnull org.semanticweb.owlapi.model.IRI predicate, @Nonnull org.semanticweb.owlapi.model.IRI object)
RDFConsumerstatementWithResourceValue in interface RDFConsumersubject - URI of the subject resourcepredicate - URI of the predicate resourceobject - URI of the object resource@Nonnull public org.semanticweb.owlapi.model.OWLClassExpression translateClassExpression(@Nonnull org.semanticweb.owlapi.model.IRI i)
i - iri fr the class expression@Nonnull public org.semanticweb.owlapi.model.OWLDataRange translateDataRange(@Nonnull org.semanticweb.owlapi.model.IRI mainNode)
mainNode - The main node@Nonnull public org.semanticweb.owlapi.model.OWLDataPropertyExpression translateDataPropertyExpression(@Nonnull org.semanticweb.owlapi.model.IRI iri)
iri - the iri@Nonnull public org.semanticweb.owlapi.model.OWLObjectPropertyExpression translateObjectPropertyExpression(@Nonnull org.semanticweb.owlapi.model.IRI mainNode)
mainNode - the main node@Nonnull public org.semanticweb.owlapi.model.OWLIndividual translateIndividual(@Nonnull org.semanticweb.owlapi.model.IRI node)
node - the node@Nonnull public Set<org.semanticweb.owlapi.model.OWLAnnotation> translateAnnotations(org.semanticweb.owlapi.model.IRI mainNode)
mainNode - The main node@Nonnull public <E extends org.semanticweb.owlapi.model.OWLEntity> E generateAndLogParseError(@Nonnull org.semanticweb.owlapi.model.EntityType<E> entityType, @Nonnull org.semanticweb.owlapi.model.IRI mainNode)
E - entity typeentityType - entity typemainNode - main node@Nonnull public org.semanticweb.owlapi.model.IRI remapIRI(@Nonnull org.semanticweb.owlapi.model.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 © 2014 The University of Manchester. All Rights Reserved.