public abstract class ProtegeRepeatAction extends Object implements RepeatAction
HOUR, MINUTE, SECOND
Constructor and Description |
---|
ProtegeRepeatAction()
Creates a new instance of ProtegeRepeatAction
|
Modifier and Type | Method and Description |
---|---|
void |
addIntervalAction(RuNA runa)
Add this RepeatAction object to corresponding list for execution priodically
depnding on interval (HOUR, MINUTE or SECOND)
|
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
|
edu.stanford.smi.protege.model.Instance |
getInstance() |
double |
getLifetime() |
double |
getLived() |
String |
getName()
Name of this RepeatAction
|
void |
kill() |
boolean |
live(RuNA runa,
double hrs)
Method that simulate duration of life and check the end of life
|
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(double time)
Method that implement repeating action, simulate duration of life
|
void |
setInstance(edu.stanford.smi.protege.model.Instance instance) |
void |
setLifetime(double lifetime) |
void |
setLived(double lived) |
void |
setName(String name)
Can be used to change name of RepeatAction
|
public ProtegeRepeatAction()
public abstract void repeat(double time)
repeat
in interface RepeatAction
time
- elapsed time between calls (hours)public void kill()
public boolean live(RuNA runa, double hrs)
live
in interface RepeatAction
runa
- - RuNAhrs
- - elapsed time in hrspublic void fillFromProtege(edu.stanford.smi.protege.model.Instance instance, edu.stanford.smi.protege.model.KnowledgeBase kb, RuNA runa)
instance
- Instance of subclass of Protege RepeatAction classkb
- Knowledge Baseruna
- RuNA objectException
- -public abstract void removeObjects(RuNA runa)
runa
- RuNA objectpublic String getName()
getName
in interface RepeatAction
public void setName(String name)
setName
in interface RepeatAction
name
- new namepublic void addIntervalAction(RuNA runa)
runa
- RuNA objectpublic void removeIntervalAction(RuNA runa)
runa
- RuNA objectpublic double getLifetime()
public void setLifetime(double lifetime)
public double getLived()
public void setLived(double lived)
public edu.stanford.smi.protege.model.Instance getInstance()
public void setInstance(edu.stanford.smi.protege.model.Instance instance)