@Override protected Set<OWLClassAssertionAxiom> getAxiomsInOntology(OWLNamedIndividual subject, OWLOntology ontology) { return ontology.getClassAssertionAxioms(subject); }
private boolean isTyped(OWLNamedIndividual ind) { for (OWLOntology ont : ontologies) { if (!ont.getClassAssertionAxioms(ind).isEmpty()){ return true; } } return false; }
private boolean isTyped(OWLNamedIndividual ind) { for (OWLOntology ont : ontologies) { if (!ont.getClassAssertionAxioms(ind).isEmpty()){ return true; } } return false; }
private boolean isTyped(OWLNamedIndividual ind) { for (OWLOntology ont : ontologies) { if (!ont.getClassAssertionAxioms(ind).isEmpty()){ return true; } } return false; }
private boolean isTyped(OWLNamedIndividual ind) { for (OWLOntology ont : ontologies) { if (!ont.getClassAssertionAxioms(ind).isEmpty()){ return true; } } return false; }
@Override @Deprecated public Set<OWLClassAssertionAxiom> getClassAssertionAxioms( OWLClassExpression owlClassExpression) { return withReadLock(() -> delegate.getClassAssertionAxioms(owlClassExpression)); }
@Override @Deprecated public Set<OWLClassAssertionAxiom> getClassAssertionAxioms(OWLIndividual owlIndividual) { return withReadLock(() -> delegate.getClassAssertionAxioms(owlIndividual)); }
@Override @Deprecated public Set<OWLClassAssertionAxiom> getClassAssertionAxioms(OWLIndividual owlIndividual) { return withReadLock(() -> delegate.getClassAssertionAxioms(owlIndividual)); }
public Set<OWLIndividual> getIndividuals(OWLOntology ontology) { Set<OWLIndividual> result = new TreeSet<OWLIndividual>(); for (OWLClassAssertionAxiom ax : ontology.getClassAssertionAxioms(this)) { result.add(ax.getIndividual()); } return result; }
@Override @Deprecated public Set<OWLClassAssertionAxiom> getClassAssertionAxioms( OWLClassExpression owlClassExpression) { return withReadLock(() -> delegate.getClassAssertionAxioms(owlClassExpression)); }
public Set<OWLClassExpression> getTypes(OWLOntology ontology) { Set<OWLClassExpression> result = new TreeSet<OWLClassExpression>(); for (OWLClassAssertionAxiom axiom : ontology.getClassAssertionAxioms(this)) { result.add(axiom.getClassExpression()); } return result; }
@Override @Deprecated public Set<OWLClassAssertionAxiom> getClassAssertionAxioms(OWLIndividual owlIndividual) { return withReadLock(() -> delegate.getClassAssertionAxioms(owlIndividual)); }
@Override @Deprecated public Set<OWLClassAssertionAxiom> getClassAssertionAxioms( OWLClassExpression owlClassExpression) { return withReadLock(() -> delegate.getClassAssertionAxioms(owlClassExpression)); }
@Override @Deprecated public Set<OWLClassAssertionAxiom> getClassAssertionAxioms( OWLClassExpression owlClassExpression) { return withReadLock(() -> delegate.getClassAssertionAxioms(owlClassExpression)); }
@Override @Deprecated public Set<OWLClassAssertionAxiom> getClassAssertionAxioms(OWLIndividual owlIndividual) { return withReadLock(() -> delegate.getClassAssertionAxioms(owlIndividual)); }
@Nonnull @Override public Stream<OWLClass> getTypes(@Nonnull OWLNamedIndividual individual) { return rootOntology.getImportsClosure() .stream() .flatMap(o -> o.getImportsClosure().stream()) .flatMap(o -> o.getClassAssertionAxioms(individual).stream()) .map(OWLClassAssertionAxiom::getClassExpression) .filter(ce -> !ce.isAnonymous()) .map(OWLClassExpression::asOWLClass); }
private Set<OWLAxiom> getRelevantAxioms(OWLNamedIndividual subject) { var relevantAxioms = new HashSet<OWLAxiom>(); for (OWLOntology ontology : rootOntology.getImportsClosure()) { relevantAxioms.addAll(ontology.getClassAssertionAxioms(subject)); relevantAxioms.addAll(ontology.getAnnotationAssertionAxioms(subject.getIRI())); relevantAxioms.addAll(ontology.getObjectPropertyAssertionAxioms(subject)); relevantAxioms.addAll(ontology.getDataPropertyAssertionAxioms(subject)); } return relevantAxioms; }
protected Set<OWLClassAssertionAxiom> getClassAxioms(OWLClassExpression descr, OWLOntology ont) { if (!descr.isAnonymous()){ return ont.getClassAssertionAxioms(descr.asOWLClass()); } else{ Set<OWLClassAssertionAxiom> axioms = new HashSet<>(); for (OWLClassAssertionAxiom ax : ont.getAxioms(AxiomType.CLASS_ASSERTION)){ if (ax.getClassExpression().equals(descr)){ axioms.add(ax); } } return axioms; } }
protected Set<OWLClassAssertionAxiom> getClassAxioms(OWLClassExpression descr, OWLOntology ont) { if (!descr.isAnonymous()){ return ont.getClassAssertionAxioms(descr.asOWLClass()); } else{ Set<OWLClassAssertionAxiom> axioms = new HashSet<OWLClassAssertionAxiom>(); for (OWLClassAssertionAxiom ax : ont.getAxioms(AxiomType.CLASS_ASSERTION)){ if (ax.getClassExpression().equals(descr)){ axioms.add(ax); } } return axioms; } }
/** * Refills the section with rows. This method will be called * by the system and should be directly called. */ protected void refill(OWLOntology ontology) { for (OWLClassAssertionAxiom ax : ontology.getClassAssertionAxioms(getRootObject())) { addRow(new OWLClassAssertionAxiomTypeFrameSectionRow(getOWLEditorKit(), this, ontology, getRootObject(), ax)); added.add(ax.getClassExpression()); } }