ru.igis.omtab.ra
Class ProtegeRepeatAction

java.lang.Object
  extended by ru.igis.omtab.ra.ProtegeRepeatAction
All Implemented Interfaces:
RepeatAction
Direct Known Subclasses:
DriftRepeatAction, OMTPolyOnFieldRepeatAction, SpillRepeatAction

public abstract class ProtegeRepeatAction
extends java.lang.Object
implements RepeatAction

Abstract reference realisation of Repeat Action interface Must be extended by concrete classes corresponding to subclasses of class RepeatAction in Protege

Author:
ru

Constructor Summary
ProtegeRepeatAction()
          Creates a new instance of ProtegeRepeatAction
 
Method Summary
 void addIntervalAction(RuNA runa)
          Add this RepeatAction object to corresponding list for execution priodically depnding on interval (HOUR, MINUTE or SECOND)
abstract  void fillFromProtege(edu.stanford.smi.protege.model.Instance instance, edu.stanford.smi.protege.model.KnowledgeBase kb, RuNA runa)
          Take information from Protege Instance and put it to RepeatAction object
 java.lang.String getName()
          Name of this RepeatAction
 void removeIntervalAction(RuNA runa)
          Stop execution of Repeat Action by removing it from corresponding list
abstract  void removeObjects(RuNA runa)
          Method to clear created while starting this RepeatAction object Map Objects when removing it
abstract  void repeat(long time)
          Method that implement repeating action
 void setName(java.lang.String name)
          Can be used to change name of RepeatAction
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ProtegeRepeatAction

public ProtegeRepeatAction()
Creates a new instance of ProtegeRepeatAction

Method Detail

repeat

public abstract void repeat(long time)
Method that implement repeating action

Specified by:
repeat in interface RepeatAction
Parameters:
time - elapsed time between calls (hours, minutes or seconds)

fillFromProtege

public abstract void fillFromProtege(edu.stanford.smi.protege.model.Instance instance,
                                     edu.stanford.smi.protege.model.KnowledgeBase kb,
                                     RuNA runa)
                              throws java.lang.Exception
Take information from Protege Instance and put it to RepeatAction object

Parameters:
instance - Instance of subclass of Protege RepeatAction class
kb - Knowledge Base
runa - RuNA object
Throws:
java.lang.Exception - -

removeObjects

public abstract void removeObjects(RuNA runa)
Method to clear created while starting this RepeatAction object Map Objects when removing it

Parameters:
runa - RuNA object

getName

public java.lang.String getName()
Name of this RepeatAction

Specified by:
getName in interface RepeatAction
Returns:
String name

setName

public void setName(java.lang.String name)
Can be used to change name of RepeatAction

Specified by:
setName in interface RepeatAction
Parameters:
name - new name

addIntervalAction

public void addIntervalAction(RuNA runa)
Add this RepeatAction object to corresponding list for execution priodically depnding on interval (HOUR, MINUTE or SECOND)

Parameters:
runa - RuNA object

removeIntervalAction

public void removeIntervalAction(RuNA runa)
Stop execution of Repeat Action by removing it from corresponding list

Parameters:
runa - RuNA object