@Override public void visit(OWLDataMaxCardinality ce) { if (signature.contains(ce.getProperty().asOWLDataProperty())) { newClassExpression = ce; } else { newClassExpression = df.getOWLThing(); } }
@Override public void visit(OWLDataExactCardinality ce) { if (signature.contains(ce.getProperty().asOWLDataProperty())) { newClassExpression = ce; } else { newClassExpression = df.getOWLNothing(); } }
@Override public void visit(OWLDataSomeValuesFrom ce) { if (signature.contains(ce.getProperty().asOWLDataProperty())) { newClassExpression = ce; } else { newClassExpression = df.getOWLNothing(); } }
@Override public Collection<OWLDataProperty> getParents(OWLDataProperty child) { Set<OWLDataProperty> properties = new HashSet<>(); Stream<OWLAxiom> axioms = getRootOntology() .axioms(Filters.subDataPropertyWithSub, child, INCLUDED); sup(axioms, OWLDataPropertyExpression.class) .forEach(p -> properties.add(p.asOWLDataProperty())); return properties; }
@Override public Collection<OWLDataProperty> getChildren(OWLDataProperty parent) { Set<OWLDataProperty> properties = new HashSet<>(); Stream<OWLAxiom> axioms = getRootOntology() .axioms(Filters.subDataPropertyWithSuper, parent, INCLUDED); sub(axioms, OWLDataPropertyExpression.class) .forEach(p -> properties.add(p.asOWLDataProperty())); return properties; } }
@Override public void visit(OWLDisjointDataPropertiesAxiom axiom) { axiom.properties().forEach(prop -> { getAxiomsForLHS(prop.asOWLDataProperty()).add(axiom); indexAxiomsByRHSEntities(prop, axiom); }); }
@Override public void visit(OWLDisjointDataPropertiesAxiom axiom) { axiom.properties().forEach(prop -> { getAxiomsForLHS(prop.asOWLDataProperty()).add(axiom); indexAxiomsByRHSEntities(prop, axiom); }); }
@Override public void visit(OWLEquivalentDataPropertiesAxiom axiom) { axiom.properties().forEach(prop -> { getAxiomsForLHS(prop.asOWLDataProperty()).add(axiom); indexAxiomsByRHSEntities(prop, axiom); }); }
@Override public void visit(OWLEquivalentDataPropertiesAxiom axiom) { axiom.properties().forEach(prop -> { getAxiomsForLHS(prop.asOWLDataProperty()).add(axiom); indexAxiomsByRHSEntities(prop, axiom); }); }
@Override public void visit(OWLSubDataPropertyOfAxiom axiom) { getAxiomsForLHS(axiom.getSubProperty().asOWLDataProperty()).add(axiom); indexAxiomsByRHSEntities(axiom.getSuperProperty(), axiom); }
@Override public void visit(OWLFunctionalDataPropertyAxiom axiom) { if (!axiom.getProperty().isAnonymous()) { getAxiomsForLHS(axiom.getProperty().asOWLDataProperty()).add(axiom); } }
@Override public void visit(OWLDataPropertyDomainAxiom axiom) { getAxiomsForLHS(axiom.getProperty().asOWLDataProperty()).add(axiom); indexAxiomsByRHSEntities(axiom.getDomain(), axiom); }
@Override public void visit(OWLSubDataPropertyOfAxiom axiom) { getAxiomsForLHS(axiom.getSubProperty().asOWLDataProperty()).add(axiom); indexAxiomsByRHSEntities(axiom.getSuperProperty(), axiom); }
@Override public void visit(OWLFunctionalDataPropertyAxiom axiom) { if (!axiom.getProperty().isAnonymous()) { getAxiomsForLHS(axiom.getProperty().asOWLDataProperty()).add(axiom); } }
@Override protected Set<OWLEntity> getEntitiesThatRequireNamespaces() { return asUnorderedSet( Stream.of( getOntology().axioms(AxiomType.OBJECT_PROPERTY_ASSERTION).flatMap( ax -> ax.getProperty().objectPropertiesInSignature()), getOntology().axioms(AxiomType.DATA_PROPERTY_ASSERTION) .map(ax -> ax.getProperty().asOWLDataProperty()), getOntology().annotationPropertiesInSignature(Imports.INCLUDED)).flatMap(x -> x)); }
@Override public void visit(OWLDataPropertyRangeAxiom axiom) { if (!axiom.getProperty().isAnonymous()) { getAxiomsForLHS(axiom.getProperty().asOWLDataProperty()).add(axiom); } indexAxiomsByRHSEntities(axiom.getRange(), axiom); }
@Override public void visit(OWLDataPropertyRangeAxiom axiom) { if (!axiom.getProperty().isAnonymous()) { getAxiomsForLHS(axiom.getProperty().asOWLDataProperty()).add(axiom); } indexAxiomsByRHSEntities(axiom.getRange(), axiom); }
protected OWLObjectEditor<OWLDataProperty> getObjectEditor() { OWLDataPropertyEditor editor = new OWLDataPropertyEditor(getOWLEditorKit()); OWLDataPropertyExpression p = getAxiom().getSuperProperty(); if (!p.isAnonymous()){ editor.setEditedObject(p.asOWLDataProperty()); } return editor; }
private OWLAnnotationAssertionAxiom convertToAnnotation(OWLNamedIndividual ind, OWLDataPropertyAssertionAxiom ax) { OWLDataProperty hasIRI = ax.getProperty().asOWLDataProperty(); OWLAnnotation anno = df .getOWLAnnotation(df.getOWLAnnotationProperty(hasIRI), ax.getObject()); return df.getOWLAnnotationAssertionAxiom(ind.getIRI(), anno); } }
protected void addAnnotation(OWLNamedIndividual ind, OWLOntology ont, OWLDataPropertyAssertionAxiom ax) { addChange(new RemoveAxiom(ont, ax)); addChange(new AddAxiom(ont, convertToAnnotation(ind, ax))); remove(ax.getProperty().asOWLDataProperty()); }