All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.protege.editor.owl.model.selection.OWLSelectionModel Maven / Gradle / Ivy

Go to download

OWL ontology editing infrastructure used by the Protege desktop application.

The newest version!
package org.protege.editor.owl.model.selection;

import org.protege.editor.owl.model.util.OWLAxiomInstance;
import org.semanticweb.owlapi.model.*;

import javax.annotation.Nonnull;
import javax.annotation.Nullable;
import java.util.Optional;


/**
 * Author: Matthew Horridge
* The University Of Manchester
* Medical Informatics Group
* Date: Mar 27, 2006

* [email protected]
* www.cs.man.ac.uk/~horridgm

* An OWLSelectionModel keeps track * of a list of OWLObjects. If the list * of objects changes, any listeners are notified. Note that * lists are compared using equals. */ public interface OWLSelectionModel { /** * Gets the most recently selected class. * @return The selected OWLClass, or null * if a class is not selected. */ @Nullable OWLClass getLastSelectedClass(); /** * Gets the most recently selected property * @return The selected OWLObjectProperty, or null * if there is no selected property. */ @Nullable OWLObjectProperty getLastSelectedObjectProperty(); /** * Gets the most recently selected property * @return The selected OWLDataProperty, or null * if there is no selected property. */ @Nullable OWLDataProperty getLastSelectedDataProperty(); /** * Gets the most recently selected annotation property * @return The selected OWLAnnotationProperty, or null * if there is no selected property. */ @Nullable OWLAnnotationProperty getLastSelectedAnnotationProperty(); /** * Gets the most recently selected individual. * @return The selected individual, or null if * there is no selected individual. */ @Nullable OWLNamedIndividual getLastSelectedIndividual(); /** * Gets the most recently selected datatype. * @return The selected datatype, or null if * there is no selected datatype. */ @Nullable OWLDatatype getLastSelectedDatatype(); /** * Gets the last selected entity. * @return The OWLEntity that was last selected. */ @Nullable OWLEntity getSelectedEntity(); /** * If any of the last selected entities are equal to * the specified entity then the selection is cleared. */ void clearLastSelectedEntity(@Nonnull OWLEntity entity); /** * A convenience method that will delegate to the appropriate * selection method depending on the type of entity. * @param entity The entity to be selected. */ void setSelectedEntity(@Nullable OWLEntity entity); /** * Instances of an axiom wrt the containing ontology */ void setSelectedAxiom(@Nonnull OWLAxiomInstance axiomInstance); /** * Instances of an axiom wrt the containing ontology * @return and OWLAxiomInstance (an axiom, ontology pair) */ @Nullable OWLAxiomInstance getLastSelectedAxiomInstance(); void setSelectedObject(@Nullable OWLObject object); @Nullable OWLObject getSelectedObject(); /** * Adds an OWLSelectionModelListener to the list of listeners. * @param listener The listener to to be added. This listener will be notified * of any changes to the set of selected objects. */ void addListener(@Nonnull OWLSelectionModelListener listener); /** * Removes a previously added OWLSelectionModelListener. If the * listener was not added then this method will have no effect. * @param listener The listener to remove. */ void removeListener(@Nonnull OWLSelectionModelListener listener); }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy