@Override public Stream<OWLDeclarationAxiom> declarationAxioms(OWLEntity subject) { return withReadLock(() -> delegate.declarationAxioms(subject)); }
@Override public Stream<OWLDeclarationAxiom> declarationAxioms(OWLEntity subject) { return withReadLock(() -> delegate.declarationAxioms(subject)); }
@Override public Stream<OWLDeclarationAxiom> declarationAxioms(OWLEntity subject) { return withReadLock(() -> delegate.declarationAxioms(subject)); }
@Override public Stream<OWLDeclarationAxiom> declarationAxioms(OWLEntity subject) { return withReadLock(() -> delegate.declarationAxioms(subject)); }
/** * Writes out the declaration axioms for the specified entity. * * @param entity The entity * @return The axioms that were written out */ protected Set<OWLAxiom> writeDeclarations(OWLEntity entity) { Set<OWLAxiom> axioms = new HashSet<>(); ont.declarationAxioms(entity).sorted().forEach(ax -> { ax.accept(this); axioms.add(ax); writeReturn(); }); return axioms; }
private static Stream<OWLAxiom> getAxioms(OWLOntology ont, OWLEntity entity) { return Stream.of(ont.referencingAxioms(entity), ont.declarationAxioms(entity), ont.annotationAssertionAxioms(entity.getIRI())).flatMap(x -> x); }
private static Stream<OWLAxiom> getAxioms(OWLOntology ont, OWLEntity entity) { return Stream.of(ont.referencingAxioms(entity), ont.declarationAxioms(entity), ont.annotationAssertionAxioms(entity.getIRI())).flatMap(x -> x); }
private static Stream<OWLAxiom> getAxioms(OWLOntology ont, OWLEntity entity) { return Stream.of(ont.referencingAxioms(entity), ont.declarationAxioms(entity), ont.annotationAssertionAxioms(entity.getIRI())).flatMap(x -> x); }
private void remove(OWLNamedIndividual ind) { ontologies().forEach(o -> { remove(o.declarationAxioms(ind), o); remove(o.classAssertionAxioms(ind), o); }); }
private void remove(OWLDataProperty prop) { ontologies().forEach(o -> { remove(o.declarationAxioms(prop), o); remove(o.axioms(prop), o); }); }
private void remove(OWLDataProperty prop) { ontologies().forEach(o -> { remove(o.declarationAxioms(prop), o); remove(o.axioms(prop), o); }); }
private void remove(OWLNamedIndividual ind) { ontologies().forEach(o -> { remove(o.declarationAxioms(ind), o); remove(o.classAssertionAxioms(ind), o); }); }
private void writeDeclarations(OWLEntity entity, Set<OWLAxiom> alreadyWrittenAxioms, Collection<IRI> illegals) { Collection<OWLDeclarationAxiom> axioms = asList(ont.declarationAxioms(entity).sorted()); axioms.stream().filter(alreadyWrittenAxioms::add).forEach(this::acceptAndReturn); // if multiple illegal declarations already exist, they have already // been outputted the renderer cannot take responsibility for removing // them. It should not add declarations for illegally punned entities // here, though if (addMissingDeclarations && axioms.isEmpty() && !entity.isBuiltIn() && !illegals.contains(entity.getIRI()) && !ont.isDeclared(entity, Imports.INCLUDED)) { OWLDeclarationAxiom declaration = ont.getOWLOntologyManager().getOWLDataFactory().getOWLDeclarationAxiom(entity); acceptAndReturn(declaration); } }
private void remove(OWLDataProperty prop) { ontologies().forEach(o -> { remove(o.declarationAxioms(prop), o); remove(o.axioms(prop), o); }); }
private void writeDeclarations(OWLEntity entity, Set<OWLAxiom> alreadyWrittenAxioms, Collection<IRI> illegals) { Collection<OWLDeclarationAxiom> axioms = asList(ont.declarationAxioms(entity).sorted()); axioms.stream().filter(alreadyWrittenAxioms::add).forEach(this::acceptAndReturn); // if multiple illegal declarations already exist, they have already // been outputted the renderer cannot take responsibility for removing // them. It should not add declarations for illegally punned entities // here, though if (addMissingDeclarations && axioms.isEmpty() && !entity.isBuiltIn() && !illegals.contains(entity.getIRI()) && !ont.isDeclared(entity, Imports.INCLUDED)) { OWLDeclarationAxiom declaration = ont.getOWLOntologyManager().getOWLDataFactory().getOWLDeclarationAxiom(entity); acceptAndReturn(declaration); } }
private void remove(OWLNamedIndividual ind) { ontologies().forEach(o -> { remove(o.declarationAxioms(ind), o); remove(o.classAssertionAxioms(ind), o); }); }
private boolean createGraph(OWLEntity entity, Collection<IRI> illegalPuns) { final List<OWLAxiom> axioms = new ArrayList<>(); add(axioms, ontology.declarationAxioms(entity)); entity.accept(new GraphVisitor(ontology, axioms, this::createGraph)); if (axioms.isEmpty() && shouldInsertDeclarations() && !illegalPuns.contains(entity.getIRI()) && OWLDocumentFormat.isMissingType(entity, ontology)) { axioms.add(df.getOWLDeclarationAxiom(entity)); } // Don't write out duplicates for punned annotations! if (!punned.contains(entity.getIRI())) { add(axioms, ontology.annotationAssertionAxioms(entity.getIRI(), EXCLUDED)); } createGraph(axioms.stream()); return !axioms.isEmpty(); }
private static Collection<OWLAxiom> getAxioms(OWLOntology ont, OWLLiteral entity) { List<OWLAxiom> axioms = asList(ont.referencingAxioms(entity, EXCLUDED)); add(axioms, ont.declarationAxioms(entity.getDatatype())); return axioms; }
private static Collection<OWLAxiom> getAxioms(OWLOntology ont, OWLLiteral entity) { List<OWLAxiom> axioms = asList(ont.referencingAxioms(entity, EXCLUDED)); add(axioms, ont.declarationAxioms(entity.getDatatype())); return axioms; }
private static Collection<OWLAxiom> getAxioms(OWLOntology ont, OWLLiteral entity) { List<OWLAxiom> axioms = asList(ont.referencingAxioms(entity, EXCLUDED)); add(axioms, ont.declarationAxioms(entity.getDatatype())); return axioms; }