BEAST
eu.baltrad.beast.rules.util.RuleUtilities Class Reference
Inheritance diagram for eu.baltrad.beast.rules.util.RuleUtilities:
eu.baltrad.beast.rules.util.IRuleUtilities

Public Member Functions

void setCatalog (Catalog catalog)
 
Catalog getCatalog ()
 
void setRadarReporter (RadarConnectionStatusReporter reporter)
 
Map< String, Double > fetchLowestSourceElevationAngle (DateTime startDT, DateTime stopDT, List< String > sources)
 
Map< String, Double > fetchLowestSourceElevationAngle (DateTime startDT, DateTime stopDT, List< String > sources, String quantity)
 
CatalogEntry findFirstStoredEntry (List< CatalogEntry > entries)
 
CatalogEntry findLastStoredEntry (List< CatalogEntry > entries)
 
List< CatalogEntryremoveEntriesWithStorageTimeOlderThan (List< CatalogEntry > entries, DateTime limit)
 
CatalogEntry getEntryBySource (String source, List< CatalogEntry > entries)
 
List< CatalogEntrygetEntriesByClosestTime (DateTime nominalDT, List< CatalogEntry > entries)
 
List< CatalogEntrygetEntriesBySources (List< String > sources, List< CatalogEntry > entries)
 
List< String > getFilesFromEntries (List< CatalogEntry > entries)
 
List< String > getUuidStringsFromEntries (List< CatalogEntry > entries)
 
List< Double > getElanglesFromEntries (List< CatalogEntry > entries)
 
Calendar createCalendar (DateTime dt)
 
Calendar now ()
 
DateTime nowDT ()
 
DateTime createDateTime (Calendar c)
 Creates an date time instance from a calendar.
 
DateTime createDateTime (int year, int month, int dayOfMonth, int hourOfDay, int minute, int second)
 Creates a date time instance.
 
DateTime createDateTime (java.util.Date date)
 Creates a date time instance from a util date.
 
List< String > getSourcesFromEntries (List< CatalogEntry > entries)
 
DateTime createStorageDateTime (CatalogEntry ce)
 
DateTime createNominalTime (DateTime now, int interval)
 
DateTime createNominalTime (Date d, Time t, int interval)
 
DateTime createNextNominalTime (DateTime now, int interval)
 
DateTime createPrevNominalTime (DateTime now, int interval)
 
long getTimeoutTime (DateTime nominalTime, boolean nominalTimeout, long timeout)
 
synchronized void trigger (int ruleid, DateTime now)
 This function will keep a backlog of 100 entries.
 
synchronized boolean isTriggered (int ruleid, DateTime now)
 
synchronized List< String > getRadarSources ()
 
Map< String, Integer > diff (List< String > expected, List< String > actual)
 
void reportRadarSourceUsage (List< String > expected, List< String > actual)
 

Protected Member Functions

DateTime getCurrentDateTimeUTC ()
 

Detailed Description

Author
Anders Henja

Member Function Documentation

◆ createCalendar()

Calendar eu.baltrad.beast.rules.util.RuleUtilities.createCalendar ( DateTime dt)
inline

◆ createDateTime() [1/3]

DateTime eu.baltrad.beast.rules.util.RuleUtilities.createDateTime ( Calendar c)
inline

Creates an date time instance from a calendar.

Parameters
cthe calendar
Returns
the date time instance

Implements eu.baltrad.beast.rules.util.IRuleUtilities.

◆ createDateTime() [2/3]

DateTime eu.baltrad.beast.rules.util.RuleUtilities.createDateTime ( int year,
int month,
int dayOfMonth,
int hourOfDay,
int minute,
int second )
inline

Creates a date time instance.

Parameters
yearthe year
monththe month between 1 - 12
dayOfMonththe day between 1 - 31
hourOfDaythe hour of the day between 0 - 23
minutethe minute of the hour between 0 - 59
secondthe second of the minute between 0 - 59
Returns
the date time instance

Implements eu.baltrad.beast.rules.util.IRuleUtilities.

◆ createDateTime() [3/3]

DateTime eu.baltrad.beast.rules.util.RuleUtilities.createDateTime ( java.util.Date date)
inline

Creates a date time instance from a util date.

Parameters
datethe date
Returns
the date time

Implements eu.baltrad.beast.rules.util.IRuleUtilities.

◆ createNextNominalTime()

DateTime eu.baltrad.beast.rules.util.RuleUtilities.createNextNominalTime ( DateTime now,
int interval )
inline

◆ createNominalTime() [1/2]

DateTime eu.baltrad.beast.rules.util.RuleUtilities.createNominalTime ( Date d,
Time t,
int interval )
inline
See also
eu.baltrad.beast.rules.util.IRuleUtilities.createNominalTime(eu.baltrad.bdb.util.Date, eu.baltrad.bdb.util.Time, int)

Implements eu.baltrad.beast.rules.util.IRuleUtilities.

◆ createNominalTime() [2/2]

DateTime eu.baltrad.beast.rules.util.RuleUtilities.createNominalTime ( DateTime now,
int interval )
inline

◆ createPrevNominalTime()

DateTime eu.baltrad.beast.rules.util.RuleUtilities.createPrevNominalTime ( DateTime now,
int interval )
inline

◆ createStorageDateTime()

DateTime eu.baltrad.beast.rules.util.RuleUtilities.createStorageDateTime ( CatalogEntry ce)
inline

◆ diff()

Map< String, Integer > eu.baltrad.beast.rules.util.RuleUtilities.diff ( List< String > expected,
List< String > actual )
inline

◆ fetchLowestSourceElevationAngle() [1/2]

Map< String, Double > eu.baltrad.beast.rules.util.RuleUtilities.fetchLowestSourceElevationAngle ( DateTime startDT,
DateTime stopDT,
List< String > sources )
inline
See also
eu.baltrad.beast.rules.util.IRuleUtilities.fetchLowestSourceElevationAngle(eu.baltrad.bdb.util.DateTime, eu.baltrad.bdb.util.DateTime, java.util.List)

Implements eu.baltrad.beast.rules.util.IRuleUtilities.

◆ fetchLowestSourceElevationAngle() [2/2]

Map< String, Double > eu.baltrad.beast.rules.util.RuleUtilities.fetchLowestSourceElevationAngle ( DateTime startDT,
DateTime stopDT,
List< String > sources,
String quantity )
inline
See also
eu.baltrad.beast.rules.util.IRuleUtilities.fetchLowestSourceElevationAngle(eu.baltrad.bdb.util.DateTime, eu.baltrad.bdb.util.DateTime, java.util.List, java.lang.String)

Implements eu.baltrad.beast.rules.util.IRuleUtilities.

◆ findFirstStoredEntry()

CatalogEntry eu.baltrad.beast.rules.util.RuleUtilities.findFirstStoredEntry ( List< CatalogEntry > entries)
inline

◆ findLastStoredEntry()

CatalogEntry eu.baltrad.beast.rules.util.RuleUtilities.findLastStoredEntry ( List< CatalogEntry > entries)
inline

◆ getCatalog()

Catalog eu.baltrad.beast.rules.util.RuleUtilities.getCatalog ( )
inline
Returns
the catalog

◆ getCurrentDateTimeUTC()

DateTime eu.baltrad.beast.rules.util.RuleUtilities.getCurrentDateTimeUTC ( )
inlineprotected
Returns
The current UTC date time

◆ getElanglesFromEntries()

List< Double > eu.baltrad.beast.rules.util.RuleUtilities.getElanglesFromEntries ( List< CatalogEntry > entries)
inline

◆ getEntriesByClosestTime()

List< CatalogEntry > eu.baltrad.beast.rules.util.RuleUtilities.getEntriesByClosestTime ( DateTime nominalDT,
List< CatalogEntry > entries )
inline

◆ getEntriesBySources()

List< CatalogEntry > eu.baltrad.beast.rules.util.RuleUtilities.getEntriesBySources ( List< String > sources,
List< CatalogEntry > entries )
inline

◆ getEntryBySource()

CatalogEntry eu.baltrad.beast.rules.util.RuleUtilities.getEntryBySource ( String source,
List< CatalogEntry > entries )
inline

◆ getFilesFromEntries()

List< String > eu.baltrad.beast.rules.util.RuleUtilities.getFilesFromEntries ( List< CatalogEntry > entries)
inline

◆ getRadarSources()

synchronized List< String > eu.baltrad.beast.rules.util.RuleUtilities.getRadarSources ( )
inline

◆ getSourcesFromEntries()

List< String > eu.baltrad.beast.rules.util.RuleUtilities.getSourcesFromEntries ( List< CatalogEntry > entries)
inline

◆ getTimeoutTime()

long eu.baltrad.beast.rules.util.RuleUtilities.getTimeoutTime ( DateTime nominalTime,
boolean nominalTimeout,
long timeout )
inline
See also
eu.baltrad.beast.rules.util.IRuleUtilities.getTimeoutTime(eu.baltrad.bdb.util.DateTime, boolean, long)

Implements eu.baltrad.beast.rules.util.IRuleUtilities.

◆ getUuidStringsFromEntries()

List< String > eu.baltrad.beast.rules.util.RuleUtilities.getUuidStringsFromEntries ( List< CatalogEntry > entries)
inline

◆ isTriggered()

synchronized boolean eu.baltrad.beast.rules.util.RuleUtilities.isTriggered ( int ruleid,
DateTime now )
inline

◆ now()

Calendar eu.baltrad.beast.rules.util.RuleUtilities.now ( )
inline
Returns
the current calendar. Same as calling GregorianCalendar.getInstance().

Implements eu.baltrad.beast.rules.util.IRuleUtilities.

◆ nowDT()

DateTime eu.baltrad.beast.rules.util.RuleUtilities.nowDT ( )
inline
Returns
the current date time.

Implements eu.baltrad.beast.rules.util.IRuleUtilities.

◆ removeEntriesWithStorageTimeOlderThan()

List< CatalogEntry > eu.baltrad.beast.rules.util.RuleUtilities.removeEntriesWithStorageTimeOlderThan ( List< CatalogEntry > entries,
DateTime limit )
inline

◆ reportRadarSourceUsage()

void eu.baltrad.beast.rules.util.RuleUtilities.reportRadarSourceUsage ( List< String > expected,
List< String > actual )
inline

◆ setCatalog()

void eu.baltrad.beast.rules.util.RuleUtilities.setCatalog ( Catalog catalog)
inline
Parameters
catalogthe catalog to set

◆ setRadarReporter()

void eu.baltrad.beast.rules.util.RuleUtilities.setRadarReporter ( RadarConnectionStatusReporter reporter)
inline
Parameters
reporterthe reporter to set

◆ trigger()

synchronized void eu.baltrad.beast.rules.util.RuleUtilities.trigger ( int ruleid,
DateTime now )
inline

This function will keep a backlog of 100 entries.

See also
eu.baltrad.beast.rules.util.IRuleUtilities.trigger(int, eu.baltrad.bdb.util.DateTime)

Implements eu.baltrad.beast.rules.util.IRuleUtilities.


The documentation for this class was generated from the following file: