ru.igis.omtab.ra
Class JessAlignmentAction

java.lang.Object
  extended by ru.igis.omtab.ra.JessAlignmentAction
All Implemented Interfaces:
RepeatAction

public class JessAlignmentAction
extends java.lang.Object
implements RepeatAction

Reference realisation of Repeat Action interface Periodically check if some object is on the line joining two points or two other object (stationary) See Jess documentation

Author:
Ru

Constructor Summary
JessAlignmentAction(MapOb mob, java.lang.Object src, float[] llps, float bd, java.lang.String auf, jess.Rete engine)
          Creates a new instance of JessRepeatTest
JessAlignmentAction(MapOb mob, java.lang.Object src, MapOb mo1, MapOb mo2, float bd, java.lang.String auf, jess.Rete engine)
          Creates a new instance of JessRepeatTest
 
Method Summary
 java.lang.String getName()
          Every RepeatAction must return a string name to search it in Second, Hour or Day Action lists
 void repeat(long time)
          Periodically check bearings from object on two other objects or points and if bearings difference become less than given one then call user function passing to it 2 parameters: - arbitrary object (may be any of three others or other at all) - Current bearings difference
 void setName(java.lang.String name)
          You can set name for this RepeatAction with a help of this method
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JessAlignmentAction

public JessAlignmentAction(MapOb mob,
                           java.lang.Object src,
                           float[] llps,
                           float bd,
                           java.lang.String auf,
                           jess.Rete engine)
                    throws jess.JessException
Creates a new instance of JessRepeatTest

Parameters:
mob - - Map Object that will be crossing line
src - - arbitrary object
llps - - array of two points coordinates in form [lat1, lon1, lat2, lon2]
bd - - bearings difference to check alignment (1-2 degrees may be, depend on time scale and object speed)
auf - - userfunction to call when object is on line
engine - - Rete engine
Throws:
jess.JessException - -

JessAlignmentAction

public JessAlignmentAction(MapOb mob,
                           java.lang.Object src,
                           MapOb mo1,
                           MapOb mo2,
                           float bd,
                           java.lang.String auf,
                           jess.Rete engine)
                    throws jess.JessException
Creates a new instance of JessRepeatTest

Parameters:
mob - - Map Object that will be crossing line
src - - arbitrary object
mo1 - - First Map Object
mo2 - - Second Map Object
bd - - bearings difference to check alignment (1-2 degrees, may be, depend on time scale and object speed)
auf - - userfunction to call when object is on line
engine - - Rete engine
Throws:
jess.JessException - -
Method Detail

repeat

public void repeat(long time)
Periodically check bearings from object on two other objects or points and if bearings difference become less than given one then call user function passing to it 2 parameters: - arbitrary object (may be any of three others or other at all) - Current bearings difference

Specified by:
repeat in interface RepeatAction
Parameters:
time - - elapsed time in corresponding tome units

getName

public java.lang.String getName()
Description copied from interface: RepeatAction
Every RepeatAction must return a string name to search it in Second, Hour or Day Action lists

Specified by:
getName in interface RepeatAction
Returns:
Some string

setName

public void setName(java.lang.String name)
Description copied from interface: RepeatAction
You can set name for this RepeatAction with a help of this method

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