net.sourceforge.idrs.core
Class IDRSReport

java.lang.Object
  |
  +--net.sourceforge.idrs.core.IDRSReport
All Implemented Interfaces:
IDRSScript

public class IDRSReport
extends java.lang.Object
implements IDRSScript

Parses an RML document and produces a full HTML or JSP document


Field Summary
(package private)  boolean checkIsChange
           
(package private)  java.util.Hashtable color1
           
(package private)  java.util.Hashtable color2
           
(package private)  boolean connLoaded
           
(package private)  java.util.Hashtable conns
           
(package private)  int currentPos
           
(package private)  java.util.Hashtable DBcache
           
(package private)  java.lang.String DBDriver
           
(package private)  java.lang.String DBName
           
(package private)  java.util.Hashtable DBs
           
(package private)  int docID
           
(package private)  IDRSScriptLanguage idrs
           
(package private)  java.lang.String IdrsUrl
           
(package private)  java.io.BufferedReader in
           
(package private)  boolean isChanged
           
(package private)  boolean isFile
           
(package private)  boolean isHTML
           
(package private)  int lineNum
           
(package private)  java.util.Hashtable lineNums
           
(package private)  IDRSShell me
           
(package private)  int numDBsPaged
           
(package private)  java.util.Hashtable objects
           
(package private)  java.io.PrintWriter out
           
(package private)  java.util.Hashtable pageSizes
           
(package private)  java.util.Hashtable pageStart
           
(package private)  net.sourceforge.idrs.core.HttpServletRequest request
           
(package private)  net.sourceforge.idrs.core.HttpSession session
           
(package private)  java.lang.String source
           
(package private)  java.util.StringTokenizer tok
           
(package private)  java.util.Hashtable tracking
           
(package private)  int userNum
           
(package private)  java.util.Hashtable varLists
           
(package private)  java.util.Hashtable vars
           
(package private)  java.util.Hashtable varsNames
           
 
Constructor Summary
IDRSReport(java.lang.String scriptClass)
           
 
Method Summary
 void addVar(java.lang.String val, java.lang.String ID)
          adds a value to a variable list
 void addVarList(java.lang.String ID)
          adds a list of parameters
 void addVarName(java.lang.String val, java.lang.String ID)
          Needed for the idrs servlet in order to generate next and previouse links
 void buildReport()
          Public method for building the report.
 void cleanUp()
          Cleans up the report for destruction, caches all cached db's and extracts all connections
 void clearVarList()
          clears the var list
 void clearVars(java.lang.String ID)
          clears a variable list for a db
 void editVar(int index, java.lang.String val, java.lang.String ID)
          changes a value in a variable list
 java.util.Hashtable getCacheDBs()
           
 java.util.Hashtable getConns()
          Retrieves all connections used by the report
 java.lang.String getFieldData(java.lang.String db, java.lang.String field)
          Used to retrieve a piece of data from a particuler DB without format
 java.lang.String getFieldData(java.lang.String db, java.lang.String field, java.lang.String format)
          Used to retrieve a piece of data from a particuler DB with a given format
 int getInputResults(java.lang.String db)
          Used to retrieve the results of an update
 java.lang.Object getObject(java.lang.String obj)
          Used to retrieve a refrence to an object created in an IDRS report
 java.io.PrintWriter getOut()
          retrieves printwriter used by the IDRS
 net.sourceforge.idrs.core.HttpServletRequest getRequest()
          Retrieves request object from webserver
 net.sourceforge.idrs.core.HttpSession getSession()
          Retrieves the session object from webserver
 void init(java.io.PrintWriter out, java.lang.String source, boolean isFile, int UserNum, java.util.Hashtable conns, int docId, java.lang.String url, net.sourceforge.idrs.core.HttpSession session, net.sourceforge.idrs.core.HttpServletRequest request)
          Pre:out is a valid PrintStream, soucre contains either a filename for or the source of an RML document , isFile says if source is a filename Post:initializes as instance variables
 boolean moveTo(java.lang.String db, int record)
          Used to move to a particuler record
 boolean next(java.lang.String db)
          Used to move to the next record in a selected db
 void removeVar(int index, java.lang.String ID)
          removes a value from a variable list
 void removeVarList(java.lang.String ID)
          removes a list of variables
 void setCache(java.util.Hashtable cache)
           
 void setPageFirst(java.lang.String db, int first)
          Sets the first record for a report's db
 void setPageSize(java.lang.String db, int size)
          Sets the pagesize for a report's db
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

docID

int docID

numDBsPaged

int numDBsPaged

out

java.io.PrintWriter out

source

java.lang.String source

isFile

boolean isFile

in

java.io.BufferedReader in

currentPos

int currentPos

lineNum

int lineNum

DBName

java.lang.String DBName

DBDriver

java.lang.String DBDriver

DBs

java.util.Hashtable DBs

vars

java.util.Hashtable vars

lineNums

java.util.Hashtable lineNums

tok

java.util.StringTokenizer tok

userNum

int userNum

conns

java.util.Hashtable conns

connLoaded

boolean connLoaded

color1

java.util.Hashtable color1

color2

java.util.Hashtable color2

tracking

java.util.Hashtable tracking

objects

java.util.Hashtable objects

checkIsChange

boolean checkIsChange

isChanged

boolean isChanged

varLists

java.util.Hashtable varLists

pageSizes

java.util.Hashtable pageSizes

pageStart

java.util.Hashtable pageStart

varsNames

java.util.Hashtable varsNames

DBcache

java.util.Hashtable DBcache

isHTML

boolean isHTML

IdrsUrl

java.lang.String IdrsUrl

session

net.sourceforge.idrs.core.HttpSession session

request

net.sourceforge.idrs.core.HttpServletRequest request

idrs

IDRSScriptLanguage idrs

me

IDRSShell me
Constructor Detail

IDRSReport

public IDRSReport(java.lang.String scriptClass)
           throws java.lang.Exception
Method Detail

init

public void init(java.io.PrintWriter out,
                 java.lang.String source,
                 boolean isFile,
                 int UserNum,
                 java.util.Hashtable conns,
                 int docId,
                 java.lang.String url,
                 net.sourceforge.idrs.core.HttpSession session,
                 net.sourceforge.idrs.core.HttpServletRequest request)
          throws java.lang.Exception
Pre:out is a valid PrintStream, soucre contains either a filename for or the source of an RML document , isFile says if source is a filename Post:initializes as instance variables

setCache

public void setCache(java.util.Hashtable cache)
              throws java.lang.Exception

buildReport

public void buildReport()
                 throws java.lang.Exception
Public method for building the report. once completed the report has benn fully built

cleanUp

public void cleanUp()
             throws java.lang.Exception
Cleans up the report for destruction, caches all cached db's and extracts all connections

getConns

public java.util.Hashtable getConns()
                             throws java.lang.Exception
Retrieves all connections used by the report

addVarList

public void addVarList(java.lang.String ID)
                throws java.lang.Exception
adds a list of parameters

removeVarList

public void removeVarList(java.lang.String ID)
                   throws java.lang.Exception
removes a list of variables

clearVarList

public void clearVarList()
                  throws java.lang.Exception
clears the var list

addVar

public void addVar(java.lang.String val,
                   java.lang.String ID)
            throws java.lang.Exception
adds a value to a variable list

addVarName

public void addVarName(java.lang.String val,
                       java.lang.String ID)
                throws java.lang.Exception
Needed for the idrs servlet in order to generate next and previouse links

removeVar

public void removeVar(int index,
                      java.lang.String ID)
               throws java.lang.Exception
removes a value from a variable list

editVar

public void editVar(int index,
                    java.lang.String val,
                    java.lang.String ID)
             throws java.lang.Exception
changes a value in a variable list

clearVars

public void clearVars(java.lang.String ID)
               throws java.lang.Exception
clears a variable list for a db

setPageSize

public void setPageSize(java.lang.String db,
                        int size)
                 throws java.lang.Exception
Sets the pagesize for a report's db

setPageFirst

public void setPageFirst(java.lang.String db,
                         int first)
                  throws java.lang.Exception
Sets the first record for a report's db

getCacheDBs

public java.util.Hashtable getCacheDBs()
                                throws java.lang.Exception

getFieldData

public java.lang.String getFieldData(java.lang.String db,
                                     java.lang.String field,
                                     java.lang.String format)
                              throws java.lang.Exception
Used to retrieve a piece of data from a particuler DB with a given format
Specified by:
getFieldData in interface IDRSScript

getFieldData

public java.lang.String getFieldData(java.lang.String db,
                                     java.lang.String field)
                              throws java.lang.Exception
Used to retrieve a piece of data from a particuler DB without format
Specified by:
getFieldData in interface IDRSScript

next

public boolean next(java.lang.String db)
             throws java.lang.Exception
Used to move to the next record in a selected db
Specified by:
next in interface IDRSScript

moveTo

public boolean moveTo(java.lang.String db,
                      int record)
               throws java.lang.Exception
Used to move to a particuler record
Specified by:
moveTo in interface IDRSScript

getObject

public java.lang.Object getObject(java.lang.String obj)
                           throws java.lang.Exception
Used to retrieve a refrence to an object created in an IDRS report
Specified by:
getObject in interface IDRSScript

getOut

public java.io.PrintWriter getOut()
                           throws java.lang.Exception
retrieves printwriter used by the IDRS
Specified by:
getOut in interface IDRSScript

getSession

public net.sourceforge.idrs.core.HttpSession getSession()
                                                 throws java.lang.Exception
Retrieves the session object from webserver
Specified by:
getSession in interface IDRSScript

getRequest

public net.sourceforge.idrs.core.HttpServletRequest getRequest()
                                                        throws java.lang.Exception
Retrieves request object from webserver
Specified by:
getRequest in interface IDRSScript

getInputResults

public int getInputResults(java.lang.String db)
                    throws java.lang.Exception
Used to retrieve the results of an update
Specified by:
getInputResults in interface IDRSScript