private void processIfAnonymous(OWLIndividual ind, @Nullable OWLAxiom root) { if (!currentIndividuals.contains(ind)) { currentIndividuals.add(ind); if (ind.isAnonymous()) { ont.axioms(ind).sorted().filter(ax -> root == null || !root.equals(ax)) .forEach(ax -> ax.accept(this)); ont.annotationAssertionAxioms(ind.asOWLAnonymousIndividual()).sorted() .forEach(ax -> ax.accept(this)); } currentIndividuals.remove(ind); } }
private void processIfAnonymous(OWLIndividual ind, @Nullable OWLAxiom root) { if (!currentIndividuals.contains(ind)) { currentIndividuals.add(ind); if (ind.isAnonymous()) { ont.axioms(ind).sorted().filter(ax -> root == null || !root.equals(ax)) .forEach(ax -> ax.accept(this)); ont.annotationAssertionAxioms(ind.asOWLAnonymousIndividual()).sorted() .forEach(ax -> ax.accept(this)); } currentIndividuals.remove(ind); } }
private void processIfAnonymous(OWLIndividual ind) { if (!currentIndividuals.contains(ind)) { currentIndividuals.add(ind); if (ind.isAnonymous()) { ont.axioms(ind).sorted().forEach(ax -> ax.accept(this)); ont.annotationAssertionAxioms(ind.asOWLAnonymousIndividual()).sorted() .forEach(ax -> ax.accept(this)); } currentIndividuals.remove(ind); } }
private void processIfAnonymous(OWLIndividual ind, @Nullable OWLAxiom root) { if (!currentIndividuals.contains(ind)) { currentIndividuals.add(ind); if (ind.isAnonymous()) { ont.axioms(ind).sorted().filter(ax -> root == null || !root.equals(ax)) .forEach(ax -> ax.accept(this)); ont.annotationAssertionAxioms(ind.asOWLAnonymousIndividual()).sorted() .forEach(ax -> ax.accept(this)); } currentIndividuals.remove(ind); } }
private void processIfAnonymous(OWLIndividual ind, @Nullable OWLAxiom root) { if (!currentIndividuals.contains(ind)) { currentIndividuals.add(ind); if (ind.isAnonymous()) { ont.axioms(ind).sorted().filter(ax -> root == null || !root.equals(ax)) .forEach(ax -> ax.accept(this)); ont.annotationAssertionAxioms(ind.asOWLAnonymousIndividual()).sorted() .forEach(ax -> ax.accept(this)); } currentIndividuals.remove(ind); } }
private void processIfAnonymous(OWLIndividual ind) { if (!currentIndividuals.contains(ind)) { currentIndividuals.add(ind); if (ind.isAnonymous()) { ont.axioms(ind).sorted().forEach(ax -> ax.accept(this)); ont.annotationAssertionAxioms(ind.asOWLAnonymousIndividual()).sorted() .forEach(ax -> ax.accept(this)); } currentIndividuals.remove(ind); } }
private void processIfAnonymous(OWLIndividual ind) { if (!currentIndividuals.contains(ind)) { currentIndividuals.add(ind); if (ind.isAnonymous()) { ont.axioms(ind).sorted().forEach(ax -> ax.accept(this)); ont.annotationAssertionAxioms(ind.asOWLAnonymousIndividual()).sorted() .forEach(ax -> ax.accept(this)); } currentIndividuals.remove(ind); } }
private void processIfAnonymous(OWLIndividual ind) { if (!currentIndividuals.contains(ind)) { currentIndividuals.add(ind); if (ind.isAnonymous()) { ont.axioms(ind).sorted().forEach(ax -> ax.accept(this)); ont.annotationAssertionAxioms(ind.asOWLAnonymousIndividual()).sorted() .forEach(ax -> ax.accept(this)); } currentIndividuals.remove(ind); } }
private void processIfAnonymous(OWLIndividual ind) { if (!currentIndividuals.contains(ind)) { currentIndividuals.add(ind); if (ind.isAnonymous()) { for (OWLAxiom ax : ontology.getAxioms(ind)) { ax.accept(this); } for (OWLAnnotationAssertionAxiom ax : ontology .getAnnotationAssertionAxioms(ind.asOWLAnonymousIndividual())) { ax.accept(this); } } currentIndividuals.remove(ind); } }
private void processIfAnonymous(OWLIndividual ind, OWLAxiom root) { if (!currentIndividuals.contains(ind)) { currentIndividuals.add(ind); if (ind.isAnonymous()) { for (OWLAxiom ax : ontology.getAxioms(ind)) { if (root == null || !root.equals(ax)) { ax.accept(this); } } for (OWLAnnotationAssertionAxiom ax : ontology.getAnnotationAssertionAxioms(ind.asOWLAnonymousIndividual())) { ax.accept(this); } } currentIndividuals.remove(ind); } }
@Override public String getShortForm(OWLEntity entity) { Stream<OWLOntology> onts = ontologySetProvider.ontologies(); List<OWLAnnotationAssertionAxiom> flatMap = asList( onts.flatMap(o -> o.annotationAssertionAxioms(entity.getIRI(), INCLUDED).sorted())); for (OWLAnnotationProperty prop : annotationProperties) { // visit the properties in order of preference AnnotationLanguageFilter checker = new AnnotationLanguageFilter(prop, preferredLanguageMap.get(prop)); flatMap.forEach(ax -> ax.accept(checker)); OWLObject match = checker.getMatch(); if (match != null) { return getRendering(match); } } return alternateShortFormProvider.getShortForm(entity); }
@Override public String getShortForm(OWLEntity entity) { Stream<OWLOntology> onts = ontologySetProvider.ontologies(); List<OWLAnnotationAssertionAxiom> flatMap = asList( onts.flatMap(o -> o.annotationAssertionAxioms(entity.getIRI(), INCLUDED).sorted())); for (OWLAnnotationProperty prop : annotationProperties) { // visit the properties in order of preference AnnotationLanguageFilter checker = new AnnotationLanguageFilter(prop, preferredLanguageMap.get(prop)); flatMap.forEach(ax -> ax.accept(checker)); OWLObject match = checker.getMatch(); if (match != null) { return getRendering(match); } } return alternateShortFormProvider.getShortForm(entity); }
@Override public String getShortForm(OWLEntity entity) { Stream<OWLOntology> onts = ontologySetProvider.ontologies(); List<OWLAnnotationAssertionAxiom> flatMap = asList( onts.flatMap(o -> o.annotationAssertionAxioms(entity.getIRI(), INCLUDED).sorted())); for (OWLAnnotationProperty prop : annotationProperties) { // visit the properties in order of preference AnnotationLanguageFilter checker = new AnnotationLanguageFilter(prop, preferredLanguageMap.get(prop)); flatMap.forEach(ax -> ax.accept(checker)); OWLObject match = checker.getMatch(); if (match != null) { return getRendering(match); } } return alternateShortFormProvider.getShortForm(entity); }
public String getShortForm(OWLEntity entity) { for (OWLAnnotationProperty prop : annotationProperties) { // visit the properties in order of preference AnnotationLanguageFilter checker = new AnnotationLanguageFilter(prop, preferredLanguageMap.get(prop)); for (OWLOntology ontology : ontologySetProvider.getOntologies()) { for (OWLAnnotationAssertionAxiom ax : entity.getAnnotationAssertionAxioms(ontology)) { ax.accept(checker); } } if (checker.getMatch() != null) { return getRendering(checker.getMatch()); } } return alternateShortFormProvider.getShortForm(entity); }