Protege 3.0

edu.stanford.smi.protege.model.framestore.undo
Class UndoFrameStore

java.lang.Object
  extended byedu.stanford.smi.protege.model.framestore.AbstractFrameStore
      extended byedu.stanford.smi.protege.model.framestore.ModificationFrameStore
          extended byedu.stanford.smi.protege.model.framestore.undo.UndoFrameStore
All Implemented Interfaces:
CommandManager, FrameStore

public class UndoFrameStore
extends ModificationFrameStore
implements CommandManager


Field Summary
 
Fields inherited from interface edu.stanford.smi.protege.model.framestore.FrameStore
UNLIMITED_MATCHES
 
Constructor Summary
UndoFrameStore()
           
 
Method Summary
 void addChangeListener(ChangeListener listener)
           
 void addDirectSuperclass(Cls cls, Cls superclass)
           
 void addDirectSuperslot(Slot slot, Slot superslot)
           
 void addDirectTemplateSlot(Cls cls, Slot slot)
           
 void addDirectType(Instance instance, Cls type)
           
 boolean beginTransaction(String name)
           
 boolean canRedo()
           
 boolean canUndo()
           
 void close()
           
 boolean commitTransaction()
           
 Cls createCls(FrameID id, String name, Collection types, Collection superclasses, boolean loadDefaults)
           
 Facet createFacet(FrameID id, String name, Collection types, boolean loadDefaults)
           
 SimpleInstance createSimpleInstance(FrameID id, String name, Collection types, boolean loadDefaults)
           
 Slot createSlot(FrameID id, String name, Collection types, Collection superslots, boolean loadDefaults)
           
 void deleteCls(Cls cls)
          Delete a single leaf class.
 void deleteFacet(Facet facet)
           
 void deleteSimpleInstance(SimpleInstance simpleInstance)
           
 void deleteSlot(Slot slot)
           
 Collection getDoneCommands()
           
 Command getRedoCommand()
           
 Command getUndoCommand()
           
 Collection getUndoneCommands()
           
 void moveDirectSubclass(Cls cls, Cls subclass, int index)
           
 void moveDirectSubslot(Slot slot, Slot subslot, int index)
           
 void moveDirectTemplateSlot(Cls cls, Slot slot, int index)
           
 void redo()
           
 void reinitialize()
           
 void removeChangeListener(ChangeListener listener)
           
 void removeDirectSuperclass(Cls cls, Cls superclass)
           
 void removeDirectSuperslot(Slot slot, Slot superslot)
           
 void removeDirectTemplateFacetOverrides(Cls cls, Slot slot)
           
 void removeDirectTemplateSlot(Cls cls, Slot slot)
           
 void removeDirectType(Instance instance, Cls type)
           
 boolean rollbackTransaction()
           
 void setDirectOwnSlotValues(Frame frame, Slot slot, Collection values)
           
 void setDirectTemplateFacetValues(Cls cls, Slot slot, Facet facet, Collection values)
           
 void setDirectTemplateSlotValues(Cls cls, Slot slot, Collection values)
           
 void setFrameName(Frame frame, String name)
           
 void undo()
           
 
Methods inherited from class edu.stanford.smi.protege.model.framestore.ModificationFrameStore
executeQuery, getClsCount, getClses, getClsesWithAnyDirectTemplateSlotValue, getClsesWithDirectTemplateFacetValue, getClsesWithDirectTemplateSlotValue, getClsesWithMatchingDirectTemplateFacetValue, getClsesWithMatchingDirectTemplateSlotValue, getDirectDomain, getDirectInstances, getDirectlyOverriddenTemplateFacets, getDirectlyOverriddenTemplateSlots, getDirectOwnSlotValues, getDirectOwnSlotValuesClosure, getDirectOwnSlotValuesCount, getDirectSubclasses, getDirectSubslots, getDirectSuperclasses, getDirectSuperslots, getDirectTemplateFacetValues, getDirectTemplateSlots, getDirectTemplateSlotValues, getDirectTypes, getDomain, getEvents, getFacetCount, getFacets, getFrame, getFrame, getFrameCount, getFrameName, getFrames, getFramesWithAnyDirectOwnSlotValue, getFramesWithDirectOwnSlotValue, getFramesWithMatchingDirectOwnSlotValue, getInstances, getMatchingReferences, getOverriddenTemplateFacets, getOverriddenTemplateSlots, getOwnFacets, getOwnFacetValues, getOwnSlots, getOwnSlotValues, getReferences, getSimpleInstanceCount, getSlotCount, getSlots, getSubclasses, getSubslots, getSuperclasses, getSuperslots, getTemplateFacets, getTemplateFacetValues, getTemplateSlots, getTemplateSlotValues, getTypes
 
Methods inherited from class edu.stanford.smi.protege.model.framestore.AbstractFrameStore
getDelegate, onSetDelegate, setDelegate, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

UndoFrameStore

public UndoFrameStore()
Method Detail

close

public void close()
Specified by:
close in interface FrameStore
Overrides:
close in class AbstractFrameStore

reinitialize

public void reinitialize()
Specified by:
reinitialize in interface FrameStore

canUndo

public boolean canUndo()
Specified by:
canUndo in interface CommandManager

canRedo

public boolean canRedo()
Specified by:
canRedo in interface CommandManager

undo

public void undo()
Specified by:
undo in interface CommandManager

getUndoCommand

public Command getUndoCommand()
Specified by:
getUndoCommand in interface CommandManager

getRedoCommand

public Command getRedoCommand()
Specified by:
getRedoCommand in interface CommandManager

redo

public void redo()
Specified by:
redo in interface CommandManager

createCls

public Cls createCls(FrameID id,
                     String name,
                     Collection types,
                     Collection superclasses,
                     boolean loadDefaults)
Specified by:
createCls in interface FrameStore

createSlot

public Slot createSlot(FrameID id,
                       String name,
                       Collection types,
                       Collection superslots,
                       boolean loadDefaults)
Specified by:
createSlot in interface FrameStore

createFacet

public Facet createFacet(FrameID id,
                         String name,
                         Collection types,
                         boolean loadDefaults)
Specified by:
createFacet in interface FrameStore

createSimpleInstance

public SimpleInstance createSimpleInstance(FrameID id,
                                           String name,
                                           Collection types,
                                           boolean loadDefaults)
Specified by:
createSimpleInstance in interface FrameStore

deleteCls

public void deleteCls(Cls cls)
Description copied from interface: FrameStore
Delete a single leaf class. The operation fails if the class has subclasses or instances.

Specified by:
deleteCls in interface FrameStore
Parameters:
cls - Class to be deleted

deleteSlot

public void deleteSlot(Slot slot)
Specified by:
deleteSlot in interface FrameStore

deleteFacet

public void deleteFacet(Facet facet)
Specified by:
deleteFacet in interface FrameStore

deleteSimpleInstance

public void deleteSimpleInstance(SimpleInstance simpleInstance)
Specified by:
deleteSimpleInstance in interface FrameStore

addDirectTemplateSlot

public void addDirectTemplateSlot(Cls cls,
                                  Slot slot)
Specified by:
addDirectTemplateSlot in interface FrameStore

removeDirectTemplateSlot

public void removeDirectTemplateSlot(Cls cls,
                                     Slot slot)
Specified by:
removeDirectTemplateSlot in interface FrameStore

moveDirectTemplateSlot

public void moveDirectTemplateSlot(Cls cls,
                                   Slot slot,
                                   int index)
Specified by:
moveDirectTemplateSlot in interface FrameStore

setDirectTemplateSlotValues

public void setDirectTemplateSlotValues(Cls cls,
                                        Slot slot,
                                        Collection values)
Specified by:
setDirectTemplateSlotValues in interface FrameStore

setDirectTemplateFacetValues

public void setDirectTemplateFacetValues(Cls cls,
                                         Slot slot,
                                         Facet facet,
                                         Collection values)
Specified by:
setDirectTemplateFacetValues in interface FrameStore

setDirectOwnSlotValues

public void setDirectOwnSlotValues(Frame frame,
                                   Slot slot,
                                   Collection values)
Specified by:
setDirectOwnSlotValues in interface FrameStore

setFrameName

public void setFrameName(Frame frame,
                         String name)
Specified by:
setFrameName in interface FrameStore

addDirectSuperclass

public void addDirectSuperclass(Cls cls,
                                Cls superclass)
Specified by:
addDirectSuperclass in interface FrameStore

removeDirectSuperclass

public void removeDirectSuperclass(Cls cls,
                                   Cls superclass)
Specified by:
removeDirectSuperclass in interface FrameStore

moveDirectSubclass

public void moveDirectSubclass(Cls cls,
                               Cls subclass,
                               int index)
Specified by:
moveDirectSubclass in interface FrameStore

addDirectSuperslot

public void addDirectSuperslot(Slot slot,
                               Slot superslot)
Specified by:
addDirectSuperslot in interface FrameStore

removeDirectSuperslot

public void removeDirectSuperslot(Slot slot,
                                  Slot superslot)
Specified by:
removeDirectSuperslot in interface FrameStore

moveDirectSubslot

public void moveDirectSubslot(Slot slot,
                              Slot subslot,
                              int index)
Specified by:
moveDirectSubslot in interface FrameStore

addDirectType

public void addDirectType(Instance instance,
                          Cls type)
Specified by:
addDirectType in interface FrameStore

removeDirectType

public void removeDirectType(Instance instance,
                             Cls type)
Specified by:
removeDirectType in interface FrameStore

removeDirectTemplateFacetOverrides

public void removeDirectTemplateFacetOverrides(Cls cls,
                                               Slot slot)
Specified by:
removeDirectTemplateFacetOverrides in interface FrameStore

beginTransaction

public boolean beginTransaction(String name)
Specified by:
beginTransaction in interface FrameStore

commitTransaction

public boolean commitTransaction()
Specified by:
commitTransaction in interface FrameStore

rollbackTransaction

public boolean rollbackTransaction()
Specified by:
rollbackTransaction in interface FrameStore

addChangeListener

public void addChangeListener(ChangeListener listener)
Specified by:
addChangeListener in interface CommandManager

removeChangeListener

public void removeChangeListener(ChangeListener listener)
Specified by:
removeChangeListener in interface CommandManager

getDoneCommands

public Collection getDoneCommands()
Specified by:
getDoneCommands in interface CommandManager

getUndoneCommands

public Collection getUndoneCommands()
Specified by:
getUndoneCommands in interface CommandManager

Protege 3.0

Submit a bug report or feature request
Protégé is a trademark of Stanford University.
Copyright (c) 1998-2005 Stanford University.