org.protege.editor.owl.ui.frame.individual.OWLObjectPropertyAssertionAxiomFrameSectionRow Maven / Gradle / Ivy
The newest version!
package org.protege.editor.owl.ui.frame.individual;
import org.protege.editor.owl.OWLEditorKit;
import org.protege.editor.owl.ui.editor.OWLObjectEditor;
import org.protege.editor.owl.ui.editor.OWLObjectPropertyIndividualPairEditor2;
import org.protege.editor.owl.ui.frame.AbstractOWLFrameSectionRow;
import org.protege.editor.owl.ui.frame.OWLFrameSection;
import org.protege.editor.owl.ui.frame.OWLObjectPropertyIndividualPair;
import org.semanticweb.owlapi.model.OWLIndividual;
import org.semanticweb.owlapi.model.OWLObject;
import org.semanticweb.owlapi.model.OWLObjectPropertyAssertionAxiom;
import org.semanticweb.owlapi.model.OWLOntology;
import java.util.ArrayList;
import java.util.List;
/**
* Author: Matthew Horridge
* The University Of Manchester
* Bio-Health Informatics Group
* Date: 30-Jan-2007
*/
public class OWLObjectPropertyAssertionAxiomFrameSectionRow extends AbstractOWLFrameSectionRow {
public OWLObjectPropertyAssertionAxiomFrameSectionRow(OWLEditorKit owlEditorKit,
OWLFrameSection section,
OWLOntology ontology, OWLIndividual rootObject,
OWLObjectPropertyAssertionAxiom axiom) {
super(owlEditorKit, section, ontology, rootObject, axiom);
}
protected OWLObjectEditor getObjectEditor() {
OWLObjectPropertyIndividualPairEditor2 editor = new OWLObjectPropertyIndividualPairEditor2(getOWLEditorKit());
editor.setEditedObject(new OWLObjectPropertyIndividualPair(getAxiom().getProperty().asOWLObjectProperty(), getAxiom().getObject()));
return editor;
}
protected OWLObjectPropertyAssertionAxiom createAxiom(OWLObjectPropertyIndividualPair editedObject) {
return getOWLDataFactory().getOWLObjectPropertyAssertionAxiom(editedObject.getProperty(),
getRootObject(),
editedObject.getIndividual());
}
/**
* Gets a list of objects contained in this row. These objects
* could be placed on the clip board during a copy operation,
* or navigated to etc.
*/
public List getManipulatableObjects() {
List objects = new ArrayList<>(2);
objects.add(getAxiom().getProperty());
objects.add(getAxiom().getObject());
return objects;
}
public String getDelimeter() {
return " ";
}
}