private void translateAndSetPendingAnnotations(IRI subject) { Set<OWLAnnotation> annotations = getConsumer().translateAnnotations(subject); getConsumer().setPendingAnnotations(annotations); }
if (!annotationMainNodes.isEmpty()) { for (IRI annotationMainNode : annotationMainNodes) { annosOnMainNodeAnnotations.addAll(translateAnnotations(annotationMainNode));
@Override public void handleTriple(IRI subject, IRI predicate, IRI object) throws UnloadableImportException { consumeTriple(subject, predicate, object); IRI listNode = getConsumer().getResourceObject(subject, OWLRDFVocabulary.OWL_MEMBERS.getIRI(), true); if (getConsumer().isObjectProperty(getConsumer().getFirstResource(listNode, false))) { Set<OWLAnnotation> annotations = getConsumer().translateAnnotations(subject); List<OWLObjectPropertyExpression> props = getConsumer().translateToObjectPropertyList(listNode); getConsumer().addAxiom(getDataFactory().getOWLDisjointObjectPropertiesAxiom(new HashSet<OWLObjectPropertyExpression>(props), annotations)); } else { Set<OWLAnnotation> annotations = getConsumer().translateAnnotations(subject); List<OWLDataPropertyExpression> props = getConsumer().translateToDataPropertyList(listNode); getConsumer().addAxiom(getDataFactory().getOWLDisjointDataPropertiesAxiom(new HashSet<OWLDataPropertyExpression>(props), annotations)); } }
if (!annotationMainNodes.isEmpty()) { for (IRI annotationMainNode : annotationMainNodes) { annosOnMainNodeAnnotations.addAll(translateAnnotations(annotationMainNode));
@Override public void handleTriple(IRI subject, IRI predicate, IRI object) throws UnloadableImportException { IRI listNode = getConsumer().getResourceObject(subject, OWLRDFVocabulary.OWL_MEMBERS.getIRI(), true); if (listNode != null) { Set<OWLClassExpression> desc = getConsumer().translateToClassExpressionSet(listNode); Set<OWLAnnotation> annotations = getConsumer().translateAnnotations(subject); addAxiom(getDataFactory().getOWLDisjointClassesAxiom(desc, annotations)); consumeTriple(subject, predicate, object); } }
public void handleTriple(IRI subject, IRI predicate, IRI object) throws UnloadableImportException { consumeTriple(subject, predicate, object); IRI listNode = getConsumer().getResourceObject(subject, OWLRDFVocabulary.OWL_MEMBERS.getIRI(), true); if (listNode != null) { Set<OWLClassExpression> desc = getConsumer().translateToClassExpressionSet(listNode); Set<OWLAnnotation> annotations = getConsumer().translateAnnotations(subject); getConsumer().setPendingAnnotations(annotations); addAxiom(getDataFactory().getOWLDisjointClassesAxiom(desc, getPendingAnnotations())); } }
@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())); } }
@Override @SuppressWarnings("deprecation") public void handleTriple(IRI subject, IRI predicate, IRI object) throws UnloadableImportException { IRI source = getConsumer().getResourceObject(subject, OWLRDFVocabulary.OWL_SOURCE_INDIVIDUAL.getIRI(), true); if (source == null) { source = getConsumer().getResourceObject(subject, OWLRDFVocabulary.RDF_SUBJECT.getIRI(), true); } IRI property = getConsumer().getResourceObject(subject, OWLRDFVocabulary.OWL_ASSERTION_PROPERTY.getIRI(), true); if (property == null) { property = getConsumer().getResourceObject(subject, OWLRDFVocabulary.RDF_PREDICATE.getIRI(), true); } Object target = getConsumer().getResourceObject(subject, OWLRDFVocabulary.OWL_TARGET_INDIVIDUAL.getIRI(), true); if (target == null) { target = getConsumer().getLiteralObject(subject, OWLRDFVocabulary.OWL_TARGET_VALUE.getIRI(), true); } if (target == null) { target = getConsumer().getResourceObject(subject, OWLRDFVocabulary.RDF_OBJECT.getIRI(), true); } if (target == null) { target = getConsumer().getLiteralObject(subject, OWLRDFVocabulary.RDF_OBJECT.getIRI(), true); } Set<OWLAnnotation> annos = getConsumer().translateAnnotations(subject); if (target instanceof OWLLiteral && (!isStrict() || getConsumer().isDataProperty(property))) { translateNegativeDataPropertyAssertion(subject, predicate, object, source, property, (OWLLiteral) target, annos); } else if(target instanceof IRI && (!isStrict() || getConsumer().isObjectProperty(property))) { translateNegativeObjectPropertyAssertion(subject, predicate, object, source, property, (IRI) target, annos); } // TODO LOG ERROR }
OWLDataPropertyExpression prop = getConsumer().translateDataPropertyExpression(property); consumeTriple(subject, predicate, object); getConsumer().translateAnnotations(subject); Set<OWLAnnotation> annos = getConsumer().getPendingAnnotations(); addAxiom(getDataFactory().getOWLNegativeDataPropertyAssertionAxiom(prop, sourceInd, target, annos));
OWLDataPropertyExpression prop = getConsumer().translateDataPropertyExpression(property); consumeTriple(subject, predicate, object); getConsumer().translateAnnotations(subject); Set<OWLAnnotation> annos = getConsumer().getPendingAnnotations(); addAxiom(getDataFactory().getOWLNegativeDataPropertyAssertionAxiom(prop, sourceInd, target, annos));
Set<OWLAnnotation> annos = getConsumer().translateAnnotations(subject);//getConsumer().getPendingAnnotations(); if(target instanceof OWLLiteral) { OWLIndividual sourceInd = getConsumer().getOWLIndividual(source);