Protege 4.1.0

org.protege.editor.owl.ui.frame
Class AbstractOWLFrameSection<R,A extends org.semanticweb.owlapi.model.OWLAxiom,E>

java.lang.Object
  extended by org.semanticweb.owlapi.util.OWLAxiomVisitorAdapter
      extended by org.protege.editor.owl.ui.frame.AbstractOWLFrameSection<R,A,E>
All Implemented Interfaces:
MListSectionHeader, OWLObjectEditorHandler<E>, OWLFrameObject<R,A,E>, OWLFrameSection<R,A,E>, org.semanticweb.owlapi.model.OWLAnnotationAxiomVisitor, org.semanticweb.owlapi.model.OWLAxiomVisitor
Direct Known Subclasses:
AbstractOWLClassAxiomFrameSection, AbstractPropertyDomainFrameSection, AxiomListFrameSection, InferredAxiomsFrameSection, InheritedAnonymousClassesFrameSection, OWLAnnotationFrameSection, OWLAnnotationPropertyDomainFrameSection, OWLAnnotationPropertyRangeFrameSection, OWLClassAssertionAxiomTypeFrameSection, OWLDataPropertyAssertionAxiomFrameSection, OWLDataPropertyRangeFrameSection, OWLDatatypeDefinitionFrameSection, OWLDifferentIndividualsAxiomFrameSection, OWLDisjointDataPropertiesFrameSection, OWLDisjointObjectPropertiesFrameSection, OWLDisjointUnionAxiomFrameSection, OWLEquivalentDataPropertiesFrameSection, OWLEquivalentObjectPropertiesAxiomFrameSection, OWLGeneralClassAxiomsFrameSection, OWLInverseObjectPropertiesAxiomFrameSection, OWLKeySection, OWLNegativeDataPropertyAssertionFrameSection, OWLNegativeObjectPropertyAssertionFrameSection, OWLObjectPropertyAssertionAxiomFrameSection, OWLObjectPropertyRangeFrameSection, OWLPropertyChainAxiomFrameSection, OWLSameIndividualsAxiomFrameSection, OWLSubAnnotationPropertyFrameSection, OWLSubDataPropertyAxiomSuperPropertyFrameSection, OWLSubObjectPropertyAxiomSuperPropertyFrameSection, SWRLRulesFrameSection

public abstract class AbstractOWLFrameSection<R,A extends org.semanticweb.owlapi.model.OWLAxiom,E>
extends org.semanticweb.owlapi.util.OWLAxiomVisitorAdapter
implements OWLFrameSection<R,A,E>, OWLObjectEditorHandler<E>

Author: Matthew Horridge
The University Of Manchester
Bio-Health Informatics Group
Date: 19-Jan-2007

The visitor methods can be overriden to be notified when an axiom is added or removed


Field Summary
static org.apache.log4j.Logger LOGGER
           
 
Constructor Summary
protected AbstractOWLFrameSection(OWLEditorKit editorKit, String label, OWLFrame<? extends R> frame)
           
protected AbstractOWLFrameSection(OWLEditorKit editorKit, String label, String rowLabel, OWLFrame<? extends R> frame)
           
 
Method Summary
protected  void addRow(OWLFrameSectionRow<R,A,E> row)
           
 boolean canAcceptDrop(List<org.semanticweb.owlapi.model.OWLObject> objects)
           
 boolean canAdd()
           
 boolean checkEditorResults(OWLObjectEditor<E> editor)
           
protected abstract  void clear()
           
protected abstract  A createAxiom(E object)
           
 void dispose()
           
protected  void disposeOfSection()
           
 boolean dropObjects(List<org.semanticweb.owlapi.model.OWLObject> objects)
           
 List<MListButton> getAdditionalButtons()
           
 List<A> getAxioms()
           
 org.semanticweb.owlapi.reasoner.OWLReasoner getCurrentReasoner()
           
 OWLObjectEditor<E> getEditor()
           
 OWLFrame<? extends R> getFrame()
           
 String getLabel()
           
 String getName()
           
abstract  OWLObjectEditor<E> getObjectEditor()
           
protected  Set<org.semanticweb.owlapi.model.OWLOntology> getOntologies()
           
 org.semanticweb.owlapi.model.OWLDataFactory getOWLDataFactory()
           
 OWLEditorKit getOWLEditorKit()
           
 OWLModelManager getOWLModelManager()
           
 org.semanticweb.owlapi.model.OWLOntologyManager getOWLOntologyManager()
           
protected  org.semanticweb.owlapi.reasoner.OWLReasoner getReasoner()
           
 String getRendering()
          Gets the rendering for this section, which will be used to visually indicate the section.
 R getRootObject()
           
 int getRowIndex(OWLFrameSectionRow row)
          Gets the index of the specified section row.
 String getRowLabel(OWLFrameSectionRow row)
           
 List<OWLFrameSectionRow<R,A,E>> getRows()
          Gets the rows that this section contains.
protected  void handleChanges(List<? extends org.semanticweb.owlapi.model.OWLOntologyChange> changes)
           
 void handleEditingFinished(Set<E> editedObjects)
           
protected abstract  void refill(org.semanticweb.owlapi.model.OWLOntology ontology)
          Refills the section with rows.
protected  void refillInferred()
           
protected  void reset()
           
protected  void setCacheEditor(boolean cacheEditor)
           
protected  void setLabel(String label)
           
 void setRootObject(R rootObject)
           
 String toString()
           
 
Methods inherited from class org.semanticweb.owlapi.util.OWLAxiomVisitorAdapter
visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.protege.editor.owl.ui.frame.OWLFrameSection
getRowComparator
 

Field Detail

LOGGER

public static final org.apache.log4j.Logger LOGGER
Constructor Detail

AbstractOWLFrameSection

protected AbstractOWLFrameSection(OWLEditorKit editorKit,
                                  String label,
                                  String rowLabel,
                                  OWLFrame<? extends R> frame)

AbstractOWLFrameSection

protected AbstractOWLFrameSection(OWLEditorKit editorKit,
                                  String label,
                                  OWLFrame<? extends R> frame)
Method Detail

setCacheEditor

protected void setCacheEditor(boolean cacheEditor)

getAdditionalButtons

public List<MListButton> getAdditionalButtons()

handleChanges

protected void handleChanges(List<? extends org.semanticweb.owlapi.model.OWLOntologyChange> changes)

dispose

public final void dispose()
Specified by:
dispose in interface OWLFrameSection<R,A extends org.semanticweb.owlapi.model.OWLAxiom,E>

setLabel

protected void setLabel(String label)

getReasoner

protected org.semanticweb.owlapi.reasoner.OWLReasoner getReasoner()

disposeOfSection

protected void disposeOfSection()

getLabel

public String getLabel()
Specified by:
getLabel in interface OWLFrameSection<R,A extends org.semanticweb.owlapi.model.OWLAxiom,E>

getRowLabel

public String getRowLabel(OWLFrameSectionRow row)
Specified by:
getRowLabel in interface OWLFrameSection<R,A extends org.semanticweb.owlapi.model.OWLAxiom,E>

getEditor

public final OWLObjectEditor<E> getEditor()
Specified by:
getEditor in interface OWLFrameObject<R,A extends org.semanticweb.owlapi.model.OWLAxiom,E>
Specified by:
getEditor in interface OWLFrameSection<R,A extends org.semanticweb.owlapi.model.OWLAxiom,E>

handleEditingFinished

public void handleEditingFinished(Set<E> editedObjects)
Specified by:
handleEditingFinished in interface OWLObjectEditorHandler<E>

createAxiom

protected abstract A createAxiom(E object)

getObjectEditor

public abstract OWLObjectEditor<E> getObjectEditor()

checkEditorResults

public boolean checkEditorResults(OWLObjectEditor<E> editor)
Specified by:
checkEditorResults in interface OWLFrameObject<R,A extends org.semanticweb.owlapi.model.OWLAxiom,E>

getRowIndex

public int getRowIndex(OWLFrameSectionRow row)
Gets the index of the specified section row.

Specified by:
getRowIndex in interface OWLFrameSection<R,A extends org.semanticweb.owlapi.model.OWLAxiom,E>
Parameters:
row - The row whose index is to be obtained.
Returns:
The index of the row, or -1 if the row is not contained within this section.

getOWLEditorKit

public OWLEditorKit getOWLEditorKit()

getOWLModelManager

public OWLModelManager getOWLModelManager()

getOWLOntologyManager

public org.semanticweb.owlapi.model.OWLOntologyManager getOWLOntologyManager()

getOWLDataFactory

public org.semanticweb.owlapi.model.OWLDataFactory getOWLDataFactory()

getCurrentReasoner

public org.semanticweb.owlapi.reasoner.OWLReasoner getCurrentReasoner()

getFrame

public OWLFrame<? extends R> getFrame()
Specified by:
getFrame in interface OWLFrameSection<R,A extends org.semanticweb.owlapi.model.OWLAxiom,E>

getRootObject

public R getRootObject()
Specified by:
getRootObject in interface OWLFrameSection<R,A extends org.semanticweb.owlapi.model.OWLAxiom,E>

setRootObject

public void setRootObject(R rootObject)
Specified by:
setRootObject in interface OWLFrameSection<R,A extends org.semanticweb.owlapi.model.OWLAxiom,E>

getOntologies

protected Set<org.semanticweb.owlapi.model.OWLOntology> getOntologies()

refill

protected abstract void refill(org.semanticweb.owlapi.model.OWLOntology ontology)
Refills the section with rows. This method will be called by the system and should be directly called. The method will never be called if the root object is null


clear

protected abstract void clear()

refillInferred

protected void refillInferred()

addRow

protected void addRow(OWLFrameSectionRow<R,A,E> row)

reset

protected void reset()

getRows

public List<OWLFrameSectionRow<R,A,E>> getRows()
Gets the rows that this section contains.

Specified by:
getRows in interface OWLFrameSection<R,A extends org.semanticweb.owlapi.model.OWLAxiom,E>

getAxioms

public List<A> getAxioms()
Specified by:
getAxioms in interface OWLFrameSection<R,A extends org.semanticweb.owlapi.model.OWLAxiom,E>

getRendering

public String getRendering()
Gets the rendering for this section, which will be used to visually indicate the section.

Returns:
A String representation of the section. This is typically the section label.

canAdd

public boolean canAdd()
Specified by:
canAdd in interface MListSectionHeader

canAcceptDrop

public boolean canAcceptDrop(List<org.semanticweb.owlapi.model.OWLObject> objects)
Specified by:
canAcceptDrop in interface OWLFrameObject<R,A extends org.semanticweb.owlapi.model.OWLAxiom,E>

dropObjects

public boolean dropObjects(List<org.semanticweb.owlapi.model.OWLObject> objects)
Specified by:
dropObjects in interface OWLFrameObject<R,A extends org.semanticweb.owlapi.model.OWLAxiom,E>

toString

public String toString()
Overrides:
toString in class Object

getName

public String getName()
Specified by:
getName in interface MListSectionHeader

Protege 4.1.0

Submit a bug report or feature request

For further API reference and developer documentation, see Protege 4 Developer Documentation.

Copyright © 2010 Stanford Center for Biomedical Informatics Research