Class EventDatabase
- java.lang.Object
-
- org.processmining.servicelevelagreements.model.eventdatabase.EventDatabase
-
- All Implemented Interfaces:
IEventDatabase
- Direct Known Subclasses:
BasicEventDatabase
public abstract class EventDatabase extends java.lang.Object implements IEventDatabase
Abstract class to keep track of states of fluents, intervals, etc.- Author:
- B.F.A. Hompes
-
-
Constructor Summary
Constructors Constructor Description EventDatabase()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Map<java.lang.String,com.google.common.collect.Table<java.lang.String,java.lang.String,IntervalList>>getFluentValueMVIs()longgetLastTimeStamp()java.lang.StringholdsAt(java.lang.String fluent, java.lang.String arguments, long timestamp)Queries the database to see what value V has at timestamp T in holdsAt(F(A)=V,T).booleanholdsAt(java.lang.String fluent, java.lang.String arguments, java.lang.String value, long timestamp)Queries the database to see whether holdsAt(F(A)=V,T) holds.IntervalListholdsFor(java.lang.String fluent, java.lang.String arguments, java.lang.String value)Queries the database for holdsFor(F(A, I) and returns I.booleanholdsFor(java.lang.String fluent, java.lang.String arguments, java.lang.String value, Interval interval)Queries the database for holdsFor(F(A),I) and returns whether it holds.voidinitiate(java.lang.String fluent, java.lang.String arguments, java.lang.String value, long timestamp)Will initiate the value V for the fluent F(A) at timestamp T.voidset(java.lang.String fluent, java.lang.String arguments, java.lang.String value, IntervalList list)Will set the fluent F(A) to value V for the list of intervals L.voidsetFluentValueMVIs(java.util.Map<java.lang.String,com.google.common.collect.Table<java.lang.String,java.lang.String,IntervalList>> fluentMVIs)voidsetLastTimeStamp(long timestamp)voidterminate(java.lang.String fluent, java.lang.String arguments, java.lang.String value, long timestamp)Will terminate the value V for the fluent F(A) at timestamp T.
-
-
-
Method Detail
-
getFluentValueMVIs
public java.util.Map<java.lang.String,com.google.common.collect.Table<java.lang.String,java.lang.String,IntervalList>> getFluentValueMVIs()
- Specified by:
getFluentValueMVIsin interfaceIEventDatabase
-
setFluentValueMVIs
public void setFluentValueMVIs(java.util.Map<java.lang.String,com.google.common.collect.Table<java.lang.String,java.lang.String,IntervalList>> fluentMVIs)
- Specified by:
setFluentValueMVIsin interfaceIEventDatabase
-
holdsAt
public boolean holdsAt(java.lang.String fluent, java.lang.String arguments, java.lang.String value, long timestamp)Queries the database to see whether holdsAt(F(A)=V,T) holds.- Specified by:
holdsAtin interfaceIEventDatabase- Parameters:
fluent- Farguments- Avalue- Vtimestamp- T- Returns:
-
holdsAt
public java.lang.String holdsAt(java.lang.String fluent, java.lang.String arguments, long timestamp)Queries the database to see what value V has at timestamp T in holdsAt(F(A)=V,T). In case no value exists, null is returned.- Specified by:
holdsAtin interfaceIEventDatabase- Parameters:
fluent- Farguments- Atimestamp- T- Returns:
- value V
-
holdsFor
public IntervalList holdsFor(java.lang.String fluent, java.lang.String arguments, java.lang.String value)
Queries the database for holdsFor(F(A, I) and returns I.- Specified by:
holdsForin interfaceIEventDatabase- Parameters:
fluent- Farguments- Avalue- V- Returns:
- I
-
holdsFor
public boolean holdsFor(java.lang.String fluent, java.lang.String arguments, java.lang.String value, Interval interval)Queries the database for holdsFor(F(A),I) and returns whether it holds.- Specified by:
holdsForin interfaceIEventDatabase- Parameters:
fluent- Farguments- Avalue- Vinterval- I- Returns:
-
initiate
public void initiate(java.lang.String fluent, java.lang.String arguments, java.lang.String value, long timestamp)Will initiate the value V for the fluent F(A) at timestamp T. Will also terminate all other values for F(A) at timestamp T since fluents can have only one value at any given time.- Specified by:
initiatein interfaceIEventDatabase- Parameters:
fluent- Farguments- Avalue- Vtimestamp- T
-
terminate
public void terminate(java.lang.String fluent, java.lang.String arguments, java.lang.String value, long timestamp)Will terminate the value V for the fluent F(A) at timestamp T.- Specified by:
terminatein interfaceIEventDatabase- Parameters:
fluent- FFarguments- Avalue- Vtimestamp- T
-
set
public void set(java.lang.String fluent, java.lang.String arguments, java.lang.String value, IntervalList list)Will set the fluent F(A) to value V for the list of intervals L.- Specified by:
setin interfaceIEventDatabase- Parameters:
fluent- Farguments- Avalue- Vlist- L
-
getLastTimeStamp
public long getLastTimeStamp()
- Specified by:
getLastTimeStampin interfaceIEventDatabase
-
setLastTimeStamp
public void setLastTimeStamp(long timestamp)
-
-