@Override public void handleResourceTriple(IRI subject, IRI predicate, IRI object) throws UnloadableImportException { handle(subject, predicate, object); } });
@Override public void handleLiteralTriple(IRI subject, IRI predicate, OWLLiteral object) throws UnloadableImportException { handle(subject, predicate, object); } });
@Override public boolean canHandleStreaming(IRI subject, IRI predicate, IRI object) throws UnloadableImportException { // FIXME: Why is .handle being called from inside canHandleStreaming? getConsumer().handle(subject, predicate, OWLRDFVocabulary.OWL_OBJECT_PROPERTY.getIRI()); return !isAnonymous(subject); }
@Override public void handleTriple(IRI subject, IRI predicate, IRI object) throws UnloadableImportException { consumeTriple(subject, predicate, object); // Add a type triple for an annotation property (Table 6 in Mapping to RDF Graph Spec) getConsumer().handle(subject, predicate, OWLRDFVocabulary.OWL_ANNOTATION_PROPERTY.getIRI()); } }
@Override public boolean canHandleStreaming(IRI subject, IRI predicate, IRI object) throws UnloadableImportException { // FIXME: Why is .handle being called from inside canHandleStreaming? getConsumer().handle(subject, predicate, OWLRDFVocabulary.OWL_OBJECT_PROPERTY.getIRI()); return !isAnonymous(subject); }
protected OWLAxiom handleAxiomTriples(IRI subjectTripleObject, IRI predicateTripleObject, OWLLiteral con, Set<OWLAnnotation> annotations) { getConsumer().handle(subjectTripleObject, predicateTripleObject, con); return getConsumer().getLastAddedAxiom(); }
protected OWLAxiom handleAxiomTriples(IRI subjectTripleObject, IRI predicateTripleObject, OWLLiteral con, Set<OWLAnnotation> annotations) { getConsumer().handle(subjectTripleObject, predicateTripleObject, con); return getConsumer().getLastAddedAxiom(); }
@Override public void handleTriple(IRI subject, IRI predicate, IRI object) throws UnloadableImportException { // TODO: Change to rdfs:Class? (See table 5 in the spec) getConsumer().addClassExpression(subject, false); consumeTriple(subject, predicate, object); if (!isStrict()) { getConsumer().handle(subject, predicate, OWLRDFVocabulary.OWL_CLASS.getIRI()); } } }
@Override public boolean canHandleStreaming(IRI subject, IRI predicate, IRI object) throws UnloadableImportException { if (!isAnonymous(subject)) { // FIXME: Why is .handle being called from inside canHandleStreaming? getConsumer().handle(subject, predicate, OWLRDFVocabulary.OWL_OBJECT_PROPERTY.getIRI()); } getConsumer().addObjectProperty(subject, false); return !isAnonymous(subject); }
protected void checkForAndProcessAnnotatedDeclaration(IRI mainNode) throws UnloadableImportException { IRI annotatedPropertyObject = getResourceObject(mainNode, OWL_ANNOTATED_PROPERTY, false); if (annotatedPropertyObject == null) { return; } boolean rdfTypePredicate = annotatedPropertyObject.equals(RDF_TYPE.getIRI()); if (!rdfTypePredicate) { return; } IRI annotatedTargetObject = getResourceObject(mainNode, OWL_ANNOTATED_TARGET, false); if (annotatedTargetObject == null) { return; } IRI annotatedSubjectObject = getResourceObject(mainNode, OWL_ANNOTATED_SOURCE, false); if (annotatedSubjectObject == null) { return; } boolean isEntityType = isEntityTypeIRI(annotatedTargetObject); if (isEntityType) { // This will add and record the declaration for us handle(annotatedSubjectObject, annotatedPropertyObject, annotatedTargetObject); } }
@Override public void handleTriple(IRI subject, IRI predicate, IRI object) throws UnloadableImportException { IRI annotatedSource = getObjectOfSourceTriple(subject); IRI annotatedProperty = getObjectOfPropertyTriple(subject); IRI annotatedTarget = getObjectOfTargetTriple(subject); OWLLiteral annotatedTargetLiteral = null; if (annotatedTarget == null) { annotatedTargetLiteral = getTargetLiteral(subject); } // check that other conditions are not invalid if(annotatedSource!=null&&annotatedProperty!=null) { consumeTriple(subject, predicate, object); Set<OWLAnnotation> annotations = getConsumer().translateAnnotations(subject); getConsumer().setPendingAnnotations(annotations); if (annotatedTarget != null) { getConsumer().handle(annotatedSource, annotatedProperty, annotatedTarget); } else if(annotatedTargetLiteral != null) { getConsumer().handle(annotatedSource, annotatedProperty, annotatedTargetLiteral); } if (!annotations.isEmpty()) { OWLAxiom ax = getConsumer().getLastAddedAxiom(); getConsumer().removeAxiom(ax.getAxiomWithoutAnnotations()); } } }
public void handleTriple(IRI subject, IRI predicate, IRI object) throws UnloadableImportException { consumeTriple(subject, predicate, object); IRI annotatedSource = getObjectOfSourceTriple(subject); IRI annotatedProperty = getObjectOfPropertyTriple(subject); IRI annotatedTarget = getObjectOfTargetTriple(subject); OWLLiteral annotatedTargetLiteral = null; if(annotatedTarget == null) { annotatedTargetLiteral = getTargetLiteral(subject); } Set<OWLAnnotation> annotations = getConsumer().translateAnnotations(subject); getConsumer().setPendingAnnotations(annotations); if (annotatedTarget != null) { getConsumer().handle(annotatedSource, annotatedProperty, annotatedTarget); } else { getConsumer().handle(annotatedSource, annotatedProperty, annotatedTargetLiteral); } if (!annotations.isEmpty()) { OWLAxiom ax = getConsumer().getLastAddedAxiom(); getConsumer().applyChange(new RemoveAxiom(getConsumer().getOntology(), ax.getAxiomWithoutAnnotations())); } }