protected void refillInferred() { getOWLModelManager().getReasonerPreferences().executeTask(OptionalInferenceTask.SHOW_INFERRED_OBJECT_PROPERTY_ASSERTIONS, () -> { if (!getOWLModelManager().getReasoner().isConsistent()) { return; } OWLDataFactory factory = getOWLDataFactory(); if (!getRootObject().isAnonymous()){ for (OWLObjectProperty prop : getReasoner().getRootOntology().getObjectPropertiesInSignature(true)) { if (prop.equals(factory.getOWLTopObjectProperty())) { continue; } NodeSet<OWLNamedIndividual> values = getReasoner().getObjectPropertyValues(getRootObject().asOWLNamedIndividual(), prop); for (OWLNamedIndividual ind : values.getFlattened()) { OWLObjectPropertyAssertionAxiom ax = getOWLDataFactory().getOWLObjectPropertyAssertionAxiom(prop, getRootObject(), ind); if (!added.contains(ax)) { addRow(new OWLObjectPropertyAssertionAxiomFrameSectionRow(getOWLEditorKit(), OWLObjectPropertyAssertionAxiomFrameSection.this, null, getRootObject(), ax)); } } } } }); }
public void visit(OWLObjectPropertyAssertionAxiom axiom) { if (axiom.getSubject().equals(getRootObject())) { reset(); } } }
/** * Refills the section with rows. This method will be called * by the system and should be directly called. */ protected void refill(OWLOntology ontology) { for (OWLObjectPropertyAssertionAxiom ax : ontology.getObjectPropertyAssertionAxioms(getRootObject())) { addRow(new OWLObjectPropertyAssertionAxiomFrameSectionRow(getOWLEditorKit(), this, ontology, getRootObject(), ax)); added.add(ax); } }
protected OWLObjectPropertyAssertionAxiom createAxiom(OWLObjectPropertyIndividualPair object) { return getOWLDataFactory().getOWLObjectPropertyAssertionAxiom(object.getProperty(), getRootObject(), object.getIndividual()); }
public void run() { if (!getOWLModelManager().getReasoner().isConsistent()) { return; } OWLDataFactory factory = getOWLDataFactory(); if (!getRootObject().isAnonymous()){ for (OWLObjectProperty prop : getReasoner().getRootOntology().getObjectPropertiesInSignature(true)) { if (prop.equals(factory.getOWLTopObjectProperty())) { continue; } NodeSet<OWLNamedIndividual> values = getReasoner().getObjectPropertyValues(getRootObject().asOWLNamedIndividual(), prop); for (OWLNamedIndividual ind : values.getFlattened()) { OWLObjectPropertyAssertionAxiom ax = getOWLDataFactory().getOWLObjectPropertyAssertionAxiom(prop, getRootObject(), ind); if (!added.contains(ax)) { addRow(new OWLObjectPropertyAssertionAxiomFrameSectionRow(getOWLEditorKit(), OWLObjectPropertyAssertionAxiomFrameSection.this, null, getRootObject(), ax)); } } } } } });
owlIndividualSections.add(new OWLObjectPropertyAssertionAxiomFrameSection(editorKit, this)); owlIndividualSections.add(new OWLNegativeObjectPropertyAssertionFrameSection(editorKit, this)); owlIndividualSections.add(new OWLDataPropertyAssertionAxiomFrameSection(editorKit, this));
public OWLObjectPropertyAssertionAxiomFrameSection(OWLEditorKit owlEditorKit, OWLFrame<? extends OWLIndividual> frame) { super(owlEditorKit, LABEL, "Object property assertion", frame); editor = new OWLObjectPropertyIndividualPairEditor2(getOWLEditorKit()); }
@Override protected boolean isResettingChange(OWLOntologyChange change) { if (!change.isAxiomChange()) { return false; } OWLAxiom axiom = change.getAxiom(); if (axiom instanceof OWLObjectPropertyAssertionAxiom) { return ((OWLObjectPropertyAssertionAxiom) axiom).getSubject().equals(getRootObject()); } return false; }
protected void refillInferred() { getOWLModelManager().getReasonerPreferences().executeTask(OptionalInferenceTask.SHOW_INFERRED_OBJECT_PROPERTY_ASSERTIONS, new Runnable() { public void run() { if (!getOWLModelManager().getReasoner().isConsistent()) { return; } OWLDataFactory factory = getOWLDataFactory(); if (!getRootObject().isAnonymous()){ for (OWLObjectProperty prop : getReasoner().getRootOntology().getObjectPropertiesInSignature(true)) { if (prop.equals(factory.getOWLTopObjectProperty())) { continue; } NodeSet<OWLNamedIndividual> values = getReasoner().getObjectPropertyValues(getRootObject().asOWLNamedIndividual(), prop); for (OWLNamedIndividual ind : values.getFlattened()) { OWLObjectPropertyAssertionAxiom ax = getOWLDataFactory().getOWLObjectPropertyAssertionAxiom(prop, getRootObject(), ind); if (!added.contains(ax)) { addRow(new OWLObjectPropertyAssertionAxiomFrameSectionRow(getOWLEditorKit(), OWLObjectPropertyAssertionAxiomFrameSection.this, null, getRootObject(), ax)); } } } } } }); }
/** * Refills the section with rows. This method will be called * by the system and should be directly called. */ protected void refill(OWLOntology ontology) { added.clear(); for (OWLObjectPropertyAssertionAxiom ax : ontology.getObjectPropertyAssertionAxioms(getRootObject())) { addRow(new OWLObjectPropertyAssertionAxiomFrameSectionRow(getOWLEditorKit(), this, ontology, getRootObject(), ax)); added.add(ax); } }
public void run() { if (!getOWLModelManager().getReasoner().isConsistent()) { return; } OWLDataFactory factory = getOWLDataFactory(); if (!getRootObject().isAnonymous()){ for (OWLObjectProperty prop : getReasoner().getRootOntology().getObjectPropertiesInSignature(true)) { if (prop.equals(factory.getOWLTopObjectProperty())) { continue; } NodeSet<OWLNamedIndividual> values = getReasoner().getObjectPropertyValues(getRootObject().asOWLNamedIndividual(), prop); for (OWLNamedIndividual ind : values.getFlattened()) { OWLObjectPropertyAssertionAxiom ax = getOWLDataFactory().getOWLObjectPropertyAssertionAxiom(prop, getRootObject(), ind); if (!added.contains(ax)) { addRow(new OWLObjectPropertyAssertionAxiomFrameSectionRow(getOWLEditorKit(), OWLObjectPropertyAssertionAxiomFrameSection.this, null, getRootObject(), ax)); } } } } } });
protected OWLObjectPropertyAssertionAxiom createAxiom(OWLObjectPropertyIndividualPair object) { return getOWLDataFactory().getOWLObjectPropertyAssertionAxiom(object.getProperty(), getRootObject(), object.getIndividual()); }
owlIndividualSections.add(new OWLObjectPropertyAssertionAxiomFrameSection(editorKit, this)); owlIndividualSections.add(new OWLNegativeObjectPropertyAssertionFrameSection(editorKit, this)); owlIndividualSections.add(new OWLDataPropertyAssertionAxiomFrameSection(editorKit, this));
public OWLObjectPropertyAssertionAxiomFrameSection(OWLEditorKit owlEditorKit, OWLFrame<? extends OWLIndividual> frame) { super(owlEditorKit, LABEL, "Object property assertion", frame); editor = new OWLObjectPropertyIndividualPairEditor2(getOWLEditorKit()); }
@Override protected boolean isResettingChange(OWLOntologyChange change) { if (!change.isAxiomChange()) { return false; } OWLAxiom axiom = change.getAxiom(); if (axiom instanceof OWLObjectPropertyAssertionAxiom) { return ((OWLObjectPropertyAssertionAxiom) axiom).getSubject().equals(getRootObject()); } return false; }
protected void refillInferred() { getOWLModelManager().getReasonerPreferences().executeTask(OptionalInferenceTask.SHOW_INFERRED_OBJECT_PROPERTY_ASSERTIONS, new Runnable() { public void run() { if (!getOWLModelManager().getReasoner().isConsistent()) { return; } OWLDataFactory factory = getOWLDataFactory(); if (!getRootObject().isAnonymous()){ for (OWLObjectProperty prop : getReasoner().getRootOntology().getObjectPropertiesInSignature(true)) { if (prop.equals(factory.getOWLTopObjectProperty())) { continue; } NodeSet<OWLNamedIndividual> values = getReasoner().getObjectPropertyValues(getRootObject().asOWLNamedIndividual(), prop); for (OWLNamedIndividual ind : values.getFlattened()) { OWLObjectPropertyAssertionAxiom ax = getOWLDataFactory().getOWLObjectPropertyAssertionAxiom(prop, getRootObject(), ind); if (!added.contains(ax)) { addRow(new OWLObjectPropertyAssertionAxiomFrameSectionRow(getOWLEditorKit(), OWLObjectPropertyAssertionAxiomFrameSection.this, null, getRootObject(), ax)); } } } } } }); }
protected void refillInferred() { getOWLModelManager().getReasonerPreferences().executeTask(OptionalInferenceTask.SHOW_INFERRED_OBJECT_PROPERTY_ASSERTIONS, () -> { if (!getOWLModelManager().getReasoner().isConsistent()) { return; } OWLDataFactory factory = getOWLDataFactory(); if (!getRootObject().isAnonymous()){ for (OWLObjectProperty prop : getReasoner().getRootOntology().getObjectPropertiesInSignature(true)) { if (prop.equals(factory.getOWLTopObjectProperty())) { continue; } NodeSet<OWLNamedIndividual> values = getReasoner().getObjectPropertyValues(getRootObject().asOWLNamedIndividual(), prop); for (OWLNamedIndividual ind : values.getFlattened()) { OWLObjectPropertyAssertionAxiom ax = getOWLDataFactory().getOWLObjectPropertyAssertionAxiom(prop, getRootObject(), ind); if (!added.contains(ax)) { addRow(new OWLObjectPropertyAssertionAxiomFrameSectionRow(getOWLEditorKit(), OWLObjectPropertyAssertionAxiomFrameSection.this, null, getRootObject(), ax)); } } } } }); }
/** * Refills the section with rows. This method will be called * by the system and should be directly called. */ protected void refill(OWLOntology ontology) { added.clear(); for (OWLObjectPropertyAssertionAxiom ax : ontology.getObjectPropertyAssertionAxioms(getRootObject())) { addRow(new OWLObjectPropertyAssertionAxiomFrameSectionRow(getOWLEditorKit(), this, ontology, getRootObject(), ax)); added.add(ax); } }
protected OWLObjectPropertyAssertionAxiom createAxiom(OWLObjectPropertyIndividualPair object) { return getOWLDataFactory().getOWLObjectPropertyAssertionAxiom(object.getProperty(), getRootObject(), object.getIndividual()); }
owlIndividualSections.add(new OWLObjectPropertyAssertionAxiomFrameSection(editorKit, this)); owlIndividualSections.add(new OWLNegativeObjectPropertyAssertionFrameSection(editorKit, this)); owlIndividualSections.add(new OWLDataPropertyAssertionAxiomFrameSection(editorKit, this));