edu.stanford.smi.protege.model.framestore.undo
Class UndoFrameStore
java.lang.Object
edu.stanford.smi.protege.model.framestore.AbstractFrameStore
edu.stanford.smi.protege.model.framestore.ModificationFrameStore
edu.stanford.smi.protege.model.framestore.undo.UndoFrameStore
- All Implemented Interfaces:
- CommandManager, FrameStore
public class UndoFrameStore
- extends ModificationFrameStore
- implements CommandManager
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()
|
TransactionMonitor |
getTransactionStatusMonitor()
Retrieves a transaction status monitor for transactions. |
Command |
getUndoCommand()
|
Collection |
getUndoneCommands()
|
void |
moveDirectOwnSlotValue(Frame frame,
Slot slot,
int from,
int to)
|
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 |
moveDirectType(Instance instance,
Cls type,
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, getClsesWithMatchingBrowserText, 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 |
UndoFrameStore
public UndoFrameStore()
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
moveDirectOwnSlotValue
public void moveDirectOwnSlotValue(Frame frame,
Slot slot,
int from,
int to)
- Specified by:
moveDirectOwnSlotValue
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
moveDirectType
public void moveDirectType(Instance instance,
Cls type,
int index)
- Specified by:
moveDirectType
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
getTransactionStatusMonitor
public TransactionMonitor getTransactionStatusMonitor()
- Description copied from interface:
FrameStore
- Retrieves a transaction status monitor for transactions. If this call returns null
then it means that transactions are not supported.
- Specified by:
getTransactionStatusMonitor
in interface FrameStore
- Overrides:
getTransactionStatusMonitor
in class ModificationFrameStore
- Returns:
- A TransactionMonitor object that tracks the status of transactions.
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
Submit a bug report or feature request
Protégé is a trademark of Stanford University.
Copyright (c) 1998-2007 Stanford University.