@Override protected Stream<OWLAxiom> getObjects(OWLOntology ont) { return ont.generalClassAxioms().map(x -> x); } }
@Override protected Stream<OWLAxiom> getObjects(OWLOntology ont) { return ont.generalClassAxioms().map(x -> x); } }
@Override protected Stream<OWLAxiom> getObjects(OWLOntology ont) { return ont.generalClassAxioms().map(x -> x); } }
@Override protected Stream<OWLAxiom> getObjects(OWLOntology ont) { return ont.generalClassAxioms().map(x -> x); } }
/** * Gets the set of general axioms in this ontology. This includes: * <ul> * <li>Subclass axioms that have a complex class as the subclass</li> * <li>Equivalent class axioms that don't contain any named classes ( {@code OWLClass}es)</li> * <li>Disjoint class axioms that don't contain any named classes ( {@code OWLClass}es)</li> * </ul> * * @return The set that is returned is a copy of the axioms in the ontology - it will not be * updated if the ontology changes. It is therefore safe to apply changes to this * ontology while iterating over this set. * @deprecated use the stream method */ @Deprecated default Set<OWLClassAxiom> getGeneralClassAxioms() { return asSet(generalClassAxioms()); }
/** * Gets the set of general axioms in this ontology. This includes: * <ul> * <li>Subclass axioms that have a complex class as the subclass</li> * <li>Equivalent class axioms that don't contain any named classes ( {@code OWLClass}es)</li> * <li>Disjoint class axioms that don't contain any named classes ( {@code OWLClass}es)</li> * </ul> * * @return The set that is returned is a copy of the axioms in the ontology - it will not be * updated if the ontology changes. It is therefore safe to apply changes to this * ontology while iterating over this set. * @deprecated use the stream method */ @Deprecated default Set<OWLClassAxiom> getGeneralClassAxioms() { return asSet(generalClassAxioms()); }
/** * Gets the set of general axioms in this ontology. This includes: * <ul> * <li>Subclass axioms that have a complex class as the subclass</li> * <li>Equivalent class axioms that don't contain any named classes ( {@code OWLClass}es)</li> * <li>Disjoint class axioms that don't contain any named classes ( {@code OWLClass}es)</li> * </ul> * * @return The set that is returned is a copy of the axioms in the ontology - it will not be * updated if the ontology changes. It is therefore safe to apply changes to this * ontology while iterating over this set. * @deprecated use the stream method */ @Deprecated default Set<OWLClassAxiom> getGeneralClassAxioms() { return asSet(generalClassAxioms()); }
private void processGenericAxioms() { ontology.generalClassAxioms().collect(Collectors.toSet()).forEach(owlClassAxiom -> owlClassAxiom.accept(new GenericClassAxiomVisitor(vowlData))); }
/** * Gets the general axioms in the ontology. These are axioms such as DifferentIndividuals, * General Class axioms which do not describe or define a named class and so can't be written * out as a frame, nary disjoint classes, disjoint object properties, disjoint data properties * and HasKey axioms where the class expression is anonymous. * * @return A set of axioms that are general axioms (and can't be written out in a frame-based * style). */ private List<OWLAxiom> getGeneralAxioms() { List<OWLAxiom> generalAxioms = new ArrayList<>(); add(generalAxioms, ontology.generalClassAxioms()); add(generalAxioms, ontology.axioms(DIFFERENT_INDIVIDUALS)); add(generalAxioms, ontology.axioms(DISJOINT_CLASSES).filter(ax -> ax.classExpressions().count() > 2)); add(generalAxioms, ontology.axioms(DISJOINT_OBJECT_PROPERTIES).filter(ax -> ax.properties().count() > 2)); add(generalAxioms, ontology.axioms(DISJOINT_DATA_PROPERTIES).filter(ax -> ax.properties().count() > 2)); add(generalAxioms, ontology.axioms(HAS_KEY).filter(ax -> ax.getClassExpression().isAnonymous())); generalAxioms.sort(null); return generalAxioms; }
/** * Gets the general axioms in the ontology. These are axioms such as DifferentIndividuals, * General Class axioms which do not describe or define a named class and so can't be written * out as a frame, nary disjoint classes, disjoint object properties, disjoint data properties * and HasKey axioms where the class expression is anonymous. * * @return A set of axioms that are general axioms (and can't be written out in a frame-based * style). */ private List<OWLAxiom> getGeneralAxioms() { List<OWLAxiom> generalAxioms = new ArrayList<>(); add(generalAxioms, ontology.generalClassAxioms()); add(generalAxioms, ontology.axioms(DIFFERENT_INDIVIDUALS)); add(generalAxioms, ontology.axioms(DISJOINT_CLASSES).filter(ax -> ax.classExpressions().count() > 2)); add(generalAxioms, ontology.axioms(DISJOINT_OBJECT_PROPERTIES).filter(ax -> ax.properties().count() > 2)); add(generalAxioms, ontology.axioms(DISJOINT_DATA_PROPERTIES).filter(ax -> ax.properties().count() > 2)); add(generalAxioms, ontology.axioms(HAS_KEY).filter(ax -> ax.getClassExpression().isAnonymous())); generalAxioms.sort(null); return generalAxioms; }
/** * Gets the general axioms in the ontology. These are axioms such as DifferentIndividuals, * General Class axioms which do not describe or define a named class and so can't be written * out as a frame, nary disjoint classes, disjoint object properties, disjoint data properties * and HasKey axioms where the class expression is anonymous. * * @return A set of axioms that are general axioms (and can't be written out in a frame-based * style). */ private List<OWLAxiom> getGeneralAxioms() { List<OWLAxiom> generalAxioms = new ArrayList<>(); add(generalAxioms, ontology.generalClassAxioms()); add(generalAxioms, ontology.axioms(DIFFERENT_INDIVIDUALS)); add(generalAxioms, ontology.axioms(DISJOINT_CLASSES).filter(ax -> ax.classExpressions().count() > 2)); add(generalAxioms, ontology.axioms(DISJOINT_OBJECT_PROPERTIES).filter(ax -> ax.properties().count() > 2)); add(generalAxioms, ontology.axioms(DISJOINT_DATA_PROPERTIES).filter(ax -> ax.properties().count() > 2)); add(generalAxioms, ontology.axioms(HAS_KEY).filter(ax -> ax.getClassExpression().isAnonymous())); generalAxioms.sort(null); return generalAxioms; }
/** * Gets the general axioms in the ontology. These are axioms such as DifferentIndividuals, * General Class axioms which do not describe or define a named class and so can't be written * out as a frame, nary disjoint classes, disjoint object properties, disjoint data properties * and HasKey axioms where the class expression is anonymous. * * @return A set of axioms that are general axioms (and can't be written out in a frame-based * style). */ private List<OWLAxiom> getGeneralAxioms() { List<OWLAxiom> generalAxioms = new ArrayList<>(); add(generalAxioms, ontology.generalClassAxioms()); add(generalAxioms, ontology.axioms(DIFFERENT_INDIVIDUALS)); add(generalAxioms, ontology.axioms(DISJOINT_CLASSES).filter(ax -> ax.classExpressions().count() > 2)); add(generalAxioms, ontology.axioms(DISJOINT_OBJECT_PROPERTIES).filter(ax -> ax.properties().count() > 2)); add(generalAxioms, ontology.axioms(DISJOINT_DATA_PROPERTIES).filter(ax -> ax.properties().count() > 2)); add(generalAxioms, ontology.axioms(HAS_KEY).filter(ax -> ax.getClassExpression().isAnonymous())); generalAxioms.sort(null); return generalAxioms; }
@Override protected void storeOntology(OWLOntology o, PrintWriter printWriter, OWLDocumentFormat format) { checkNotNull(o, "ontology cannot be null"); checkNotNull(printWriter, "writer cannot be null"); Set<OWLAxiom> printed = new HashSet<>(); beginWritingOntology(o, printWriter); o.objectPropertiesInSignature() .forEach(p -> write(o, p, o.axioms(p), printWriter, printed)); o.dataPropertiesInSignature().forEach(p -> write(o, p, o.axioms(p), printWriter, printed)); o.classesInSignature().forEach(c -> write(o, c, o.axioms(c), printWriter, printed)); o.individualsInSignature() .forEach(i -> write(o, i, o.axioms(i).sorted(), printWriter, printed)); beginWritingGeneralAxioms(printWriter); o.generalClassAxioms().sorted().forEach(ax -> { if (printed.add(ax)) { beginWritingAxiom(printWriter); writeAxiom(null, ax, printWriter); endWritingAxiom(printWriter); } }); endWritingGeneralAxioms(printWriter); endWritingOntology(o, printWriter); printWriter.flush(); }
@Override protected void storeOntology(OWLOntology o, PrintWriter printWriter, OWLDocumentFormat format) { checkNotNull(o, "ontology cannot be null"); checkNotNull(printWriter, "writer cannot be null"); Set<OWLAxiom> printed = new HashSet<>(); beginWritingOntology(o, printWriter); o.objectPropertiesInSignature() .forEach(p -> write(o, p, o.axioms(p), printWriter, printed)); o.dataPropertiesInSignature().forEach(p -> write(o, p, o.axioms(p), printWriter, printed)); o.classesInSignature().forEach(c -> write(o, c, o.axioms(c), printWriter, printed)); o.individualsInSignature() .forEach(i -> write(o, i, o.axioms(i).sorted(), printWriter, printed)); beginWritingGeneralAxioms(printWriter); o.generalClassAxioms().sorted().forEach(ax -> { if (printed.add(ax)) { beginWritingAxiom(printWriter); writeAxiom(null, ax, printWriter); endWritingAxiom(printWriter); } }); endWritingGeneralAxioms(printWriter); endWritingOntology(o, printWriter); printWriter.flush(); }
@Override protected void storeOntology(OWLOntology o, PrintWriter printWriter, OWLDocumentFormat format) { checkNotNull(o, "ontology cannot be null"); checkNotNull(printWriter, "writer cannot be null"); Set<OWLAxiom> printed = new HashSet<>(); beginWritingOntology(o, printWriter); o.objectPropertiesInSignature() .forEach(p -> write(o, p, o.axioms(p), printWriter, printed)); o.dataPropertiesInSignature().forEach(p -> write(o, p, o.axioms(p), printWriter, printed)); o.classesInSignature().forEach(c -> write(o, c, o.axioms(c), printWriter, printed)); o.individualsInSignature() .forEach(i -> write(o, i, o.axioms(i).sorted(), printWriter, printed)); beginWritingGeneralAxioms(printWriter); o.generalClassAxioms().sorted().forEach(ax -> { if (printed.add(ax)) { beginWritingAxiom(printWriter); writeAxiom(null, ax, printWriter); endWritingAxiom(printWriter); } }); endWritingGeneralAxioms(printWriter); endWritingOntology(o, printWriter); printWriter.flush(); }
@Override protected void storeOntology(OWLOntology o, PrintWriter printWriter, OWLDocumentFormat format) { checkNotNull(o, "ontology cannot be null"); checkNotNull(printWriter, "writer cannot be null"); Set<OWLAxiom> printed = new HashSet<>(); beginWritingOntology(o, printWriter); o.objectPropertiesInSignature() .forEach(p -> write(o, p, o.axioms(p), printWriter, printed)); o.dataPropertiesInSignature().forEach(p -> write(o, p, o.axioms(p), printWriter, printed)); o.classesInSignature().forEach(c -> write(o, c, o.axioms(c), printWriter, printed)); o.individualsInSignature() .forEach(i -> write(o, i, o.axioms(i).sorted(), printWriter, printed)); beginWritingGeneralAxioms(printWriter); o.generalClassAxioms().sorted().forEach(ax -> { if (printed.add(ax)) { beginWritingAxiom(printWriter); writeAxiom(null, ax, printWriter); endWritingAxiom(printWriter); } }); endWritingGeneralAxioms(printWriter); endWritingOntology(o, printWriter); printWriter.flush(); }
ontology.generalClassAxioms().forEach(a -> a.accept(this)); for (OWLObjectProperty property : asList(ontology.objectPropertiesInSignature())) { writeOpenBracket();
ontology.generalClassAxioms().forEach(a -> a.accept(this)); for (OWLObjectProperty property : asList(ontology.objectPropertiesInSignature())) { writeOpenBracket();
ontology.generalClassAxioms().forEach(a -> a.accept(this)); for (OWLObjectProperty property : asList(ontology.objectPropertiesInSignature())) { writeOpenBracket();
ontology.generalClassAxioms().forEach(a -> a.accept(this)); for (OWLObjectProperty property : asList(ontology.objectPropertiesInSignature())) { writeOpenBracket();