Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

traffic
Class UQuery  view UQuery download UQuery.java

java.lang.Object
  extended bytraffic.UQuery
All Implemented Interfaces:
java.io.Serializable

public class UQuery
extends java.lang.Object
implements java.io.Serializable

A generic ad-hoc query system. Queries are created using the GQuery panel. Queries are saved by OCity so that they will be written to a file with the rest of the miniTraff persistant data.

Since:
2003/07/17 18:15:20
Version:
1.5, 2003/08/01 17:39:53

Field Summary
private  boolean[] active
           
private  OCity ccc
           
private  int[][] constant
           
private  java.lang.String[] description
           
private  int[][] element
           
private  int[][] fragment
           
private  int[][] intersection
           
private  java.lang.String[][] methodname
           
private  java.lang.String[] options
           
private  int[][] phase
           
private  java.lang.String[][] street
           
 
Constructor Summary
UQuery()
           
 
Method Summary
 int getConstant(int qnbr, int cnbr)
          Get the Uquery constant data.
 java.lang.String getDescription(int qnbr)
          Get the user defined description of the query.
 int getElement(int qnbr, int enbr)
          Get the Uquery query element data.
 int getFrag(int qnbr, int lnbr)
          Get the Uquery fragment data.
 int getIntrs(int qnbr, int lnbr)
          Get the Uquery Intersection data.
 java.lang.String getMethodName(int qnbr, int mnbr)
          Get the Uquery method name data.
 java.lang.String[] getOptions()
          Get the operators (OR, +, etc.) that GQuery uses to build queries.
 int getPhase(int qnbr, int lnbr)
          Get the Uquery phase data.
 java.lang.String getStreet(int qnbr, int lnbr)
          Get the Uquery street data.
 boolean isActive(int qnbr)
          True if a query is active.
 boolean qbIPGreen(java.lang.Integer qnum, java.lang.Integer lnum)
          Get the Uquery signal green data.
 boolean qbIPLoopHit(java.lang.Integer qnum, java.lang.Integer lnum)
          Get the Uquery loop actuation data.
 boolean qbIPOLGreen(java.lang.Integer qnum, java.lang.Integer lnum)
          Get the Uquery overlap green data.
 boolean qbIPOLRed(java.lang.Integer qnum, java.lang.Integer lnum)
          Get the Uquery overlap red data.
 boolean qbIPOLYel(java.lang.Integer qnum, java.lang.Integer lnum)
          Get the Uquery overlap yellow data.
 boolean qbIPRecall(java.lang.Integer qnum, java.lang.Integer lnum)
          Get the Uquery recall called data.
 boolean qbIPRed(java.lang.Integer qnum, java.lang.Integer lnum)
          Get the Uquery signal red data.
 boolean qbIPYellow(java.lang.Integer qnum, java.lang.Integer lnum)
          Get the Uquery signal yellow data.
 int qiIPGrnTime(java.lang.Integer qnum, java.lang.Integer lnum)
          Get the Uquery green time remaining data.
 int qiIPYelTime(java.lang.Integer qnum, java.lang.Integer lnum)
          Get the Uquery yellow time remaining data.
 int qiSFVeh0Loc(java.lang.Integer qnum, java.lang.Integer lnum)
          Get the Uquery first vehicle location data.
 int qiSFVeh0Spd(java.lang.Integer qnum, java.lang.Integer lnum)
          Get the Uquery first vehicle speed data.
 int qiSFVehCnt(java.lang.Integer qnum, java.lang.Integer lnum)
          Get the Uquery vehicle count data.
 int qiTime(java.lang.Integer qnum, java.lang.Integer lnum)
          Get the Uquery time data.
 void setActive(boolean state, int qnbr)
          Make a query active.
 void setConstant(int icon, int qnbr, int cnbr)
          Set the Uquery constant data.
 void setDescription(java.lang.String name, int qnbr)
          Set the user defined description of the query.
 void setElement(int iele, int qnbr, int enbr)
          Set the Uquery query element data.
 void setFrag(int ifrag, int qnbr, int lnbr)
          Set the Uquery fragment data.
 void setIntrs(int iintrs, int qnbr, int lnbr)
          Set the Uquery Intersection data.
 void setMethodName(java.lang.String name, int qnbr, int mnbr)
          Set the Uquery method name data.
 void setPhase(int iphase, int qnbr, int lnbr)
          Set the Uquery phase data.
 void setPointers(OCity city)
          Sets the OCity pointer after a new city has been read so that we are reading data from the proper city.
 void setStreet(java.lang.String name, int qnbr, int lnbr)
          Set the Uquery street data.
 java.lang.Object subQuery(int qnbr, int lnbr, int mnbr)
          This method reflectivly invokes the methods whose names start with 'q'.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ccc

private transient OCity ccc

active

private boolean[] active

phase

private int[][] phase

fragment

private int[][] fragment

intersection

private int[][] intersection

constant

private int[][] constant

element

private int[][] element

description

private java.lang.String[] description

street

private java.lang.String[][] street

methodname

private java.lang.String[][] methodname

options

private java.lang.String[] options
Constructor Detail

UQuery

public UQuery()
Method Detail

setPointers

public void setPointers(OCity city)
Sets the OCity pointer after a new city has been read so that we are reading data from the proper city.


getOptions

public java.lang.String[] getOptions()
Get the operators (OR, +, etc.) that GQuery uses to build queries.


isActive

public boolean isActive(int qnbr)
True if a query is active. When a query is active it will be used to interrogate the system.


setActive

public void setActive(boolean state,
                      int qnbr)
Make a query active. When a query is active it will be used to interrogate the system.


getDescription

public java.lang.String getDescription(int qnbr)
Get the user defined description of the query.


setDescription

public void setDescription(java.lang.String name,
                           int qnbr)
Set the user defined description of the query.


getPhase

public int getPhase(int qnbr,
                    int lnbr)
Get the Uquery phase data. This is the data entered by the user on the GQuery panel.


setPhase

public void setPhase(int iphase,
                     int qnbr,
                     int lnbr)
Set the Uquery phase data. This is the data entered by the user on the GQuery panel.


getIntrs

public int getIntrs(int qnbr,
                    int lnbr)
Get the Uquery Intersection data. This is the data entered by the user on the GQuery panel.


setIntrs

public void setIntrs(int iintrs,
                     int qnbr,
                     int lnbr)
Set the Uquery Intersection data. This is the data entered by the user on the GQuery panel.


getFrag

public int getFrag(int qnbr,
                   int lnbr)
Get the Uquery fragment data. This is the data entered by the user on the GQuery panel.


setFrag

public void setFrag(int ifrag,
                    int qnbr,
                    int lnbr)
Set the Uquery fragment data. This is the data entered by the user on the GQuery panel.


getStreet

public java.lang.String getStreet(int qnbr,
                                  int lnbr)
Get the Uquery street data. This is the data entered by the user on the GQuery panel.


setStreet

public void setStreet(java.lang.String name,
                      int qnbr,
                      int lnbr)
Set the Uquery street data. This is the data entered by the user on the GQuery panel.


getConstant

public int getConstant(int qnbr,
                       int cnbr)
Get the Uquery constant data. This is the data entered by the user on the GQuery panel.


setConstant

public void setConstant(int icon,
                        int qnbr,
                        int cnbr)
Set the Uquery constant data. This is the data entered by the user on the GQuery panel.


getMethodName

public java.lang.String getMethodName(int qnbr,
                                      int mnbr)
Get the Uquery method name data. This is the data entered by the user on the GQuery panel.


setMethodName

public void setMethodName(java.lang.String name,
                          int qnbr,
                          int mnbr)
Set the Uquery method name data. This is the data selected by the user on the GQuery panel.


getElement

public int getElement(int qnbr,
                      int enbr)
Get the Uquery query element data. This is the data entered by the user on the GQuery panel.


setElement

public void setElement(int iele,
                       int qnbr,
                       int enbr)
Set the Uquery query element data. This is the data selected by the user on the GQuery panel.


qiTime

public int qiTime(java.lang.Integer qnum,
                  java.lang.Integer lnum)
Get the Uquery time data. This is the dynamic data created by normal traffic flow. This method is called by subQuery reflectivly.

This method is a wrapper for the getTimeCount method in JavaDriver


qiIPGrnTime

public int qiIPGrnTime(java.lang.Integer qnum,
                       java.lang.Integer lnum)
Get the Uquery green time remaining data. This is the dynamic data created by normal traffic flow. This method is called by subQuery reflectivly.

This method is a wrapper for the getGLeft method in OIntersection


qiIPYelTime

public int qiIPYelTime(java.lang.Integer qnum,
                       java.lang.Integer lnum)
Get the Uquery yellow time remaining data. This is the dynamic data created by normal traffic flow. This method is called by subQuery reflectivly.

This method is a wrapper for the getYLeft method in OIntersection


qbIPRed

public boolean qbIPRed(java.lang.Integer qnum,
                       java.lang.Integer lnum)
Get the Uquery signal red data. This is the dynamic data created by normal traffic flow. This method is called by subQuery reflectivly.

This method is a wrapper for the isRed method in OIntersection


qbIPYellow

public boolean qbIPYellow(java.lang.Integer qnum,
                          java.lang.Integer lnum)
Get the Uquery signal yellow data. This is the dynamic data created by normal traffic flow. This method is called by subQuery reflectivly.

This method is a wrapper for the isYellow method in OIntersection


qbIPGreen

public boolean qbIPGreen(java.lang.Integer qnum,
                         java.lang.Integer lnum)
Get the Uquery signal green data. This is the dynamic data created by normal traffic flow. This method is called by subQuery reflectivly.

This method is a wrapper for the isGreen method in OIntersection


qbIPOLRed

public boolean qbIPOLRed(java.lang.Integer qnum,
                         java.lang.Integer lnum)
Get the Uquery overlap red data. This is the dynamic data created by normal traffic flow. This method is called by subQuery reflectivly.

This method is a wrapper for the isOLRed method in OIntersection


qbIPOLYel

public boolean qbIPOLYel(java.lang.Integer qnum,
                         java.lang.Integer lnum)
Get the Uquery overlap yellow data. This is the dynamic data created by normal traffic flow. This method is called by subQuery reflectivly.

This method is a wrapper for the isOLYellow method in OIntersection


qbIPOLGreen

public boolean qbIPOLGreen(java.lang.Integer qnum,
                           java.lang.Integer lnum)
Get the Uquery overlap green data. This is the dynamic data created by normal traffic flow. This method is called by subQuery reflectivly.

This method is a wrapper for the isOLGreen method in OIntersection


qbIPLoopHit

public boolean qbIPLoopHit(java.lang.Integer qnum,
                           java.lang.Integer lnum)
Get the Uquery loop actuation data. This is the dynamic data created by normal traffic flow. This method is called by subQuery reflectivly.

This method is a wrapper for the isLoopHit method in OIntersection


qbIPRecall

public boolean qbIPRecall(java.lang.Integer qnum,
                          java.lang.Integer lnum)
Get the Uquery recall called data. This is the dynamic data created by normal traffic flow. This method is called by subQuery reflectivly.

This method is a wrapper for the isActTripped method in OIntersection


qiSFVehCnt

public int qiSFVehCnt(java.lang.Integer qnum,
                      java.lang.Integer lnum)
Get the Uquery vehicle count data. This is the dynamic data created by normal traffic flow. This method is called by subQuery reflectivly.

This method is a wrapper for the getVehCount method in OFragment


qiSFVeh0Spd

public int qiSFVeh0Spd(java.lang.Integer qnum,
                       java.lang.Integer lnum)
Get the Uquery first vehicle speed data. This is the dynamic data created by normal traffic flow. This method is called by subQuery reflectivly.

This method is a wrapper for the getSpeed method in OVehicle


qiSFVeh0Loc

public int qiSFVeh0Loc(java.lang.Integer qnum,
                       java.lang.Integer lnum)
Get the Uquery first vehicle location data. This is the dynamic data created by normal traffic flow. This method is called by subQuery reflectivly.

This method is a wrapper for the getLocation method in OVehicle


subQuery

public java.lang.Object subQuery(int qnbr,
                                 int lnbr,
                                 int mnbr)
This method reflectivly invokes the methods whose names start with 'q'. It is called from an array of threads in JavaDriver.