org.concord.util
Class LogProcess

java.lang.Object
  |
  +--org.xml.sax.helpers.DefaultHandler
        |
        +--org.concord.util.LogProcess
All Implemented Interfaces:
org.xml.sax.ContentHandler, org.xml.sax.DTDHandler, org.xml.sax.EntityResolver, org.xml.sax.ErrorHandler

public class LogProcess
extends org.xml.sax.helpers.DefaultHandler


Field Summary
protected static int ACTION
           
protected  java.lang.String activity
           
protected static int ACTIVITY
           
protected  java.util.Stack answers
           
protected  java.lang.String className
           
protected static int COHORTS
           
protected  java.lang.String currentText
           
protected  java.io.PrintWriter dataOutput
           
protected static int DATE
           
protected static int DOMAIN
           
protected  java.lang.String fileLocate
           
protected  java.lang.String firstDate
           
protected  java.lang.String firstTime
           
protected  int hasBeenHere
           
protected  float indexInteraction
           
protected  java.lang.String lastTime
           
protected  boolean noOthers
           
protected  int numberOfActions
           
protected  int numberOfAnswers
           
protected  int numberOfQuestions
           
protected  int numberOfWords
           
protected  java.io.PrintWriter output
           
protected  org.apache.xerces.parsers.SAXParser parser
           
protected static int QUESTION
           
protected  java.io.FileReader reader
           
protected  java.io.PrintWriter reportOutput
           
protected static int RESPONSE
           
protected  boolean rightAct
           
protected  boolean rightFile
           
protected static int SESSION
           
protected  java.lang.String singleAct
           
protected  java.lang.String singleStudent
           
protected  java.util.Stack strings
           
protected static int STUDENT
           
protected  java.lang.String studentName
           
protected  java.lang.String theClassName
           
protected static int TIME
           
protected  java.text.SimpleDateFormat timeFormat
           
protected  int wordsInAnswers
           
 
Constructor Summary
LogProcess(java.lang.String clsName, java.lang.String acts, java.lang.String sName, java.lang.String cls)
           
 
Method Summary
 void characters(char[] ch, int start, int length)
          Receive notification of character data inside an element.
protected  java.lang.String elapsedTime()
           
 void endDocument()
          Receive notification of the end of the document.
 void endElement(java.lang.String namespaceURI, java.lang.String localName, java.lang.String qName)
          Receive notification of the end of an element.
 java.lang.String getFileLocate()
           
protected  java.lang.String[] getFileNames(java.lang.String dirName)
           
protected  java.lang.String[] getFileNames(java.lang.String cls, java.lang.String act, java.lang.String stu)
           
protected  java.util.Vector getFileNames(java.lang.String dirName, java.util.Vector fileList)
           
static void main(java.lang.String[] args)
           
protected  void printSessionData(java.lang.String fileName)
           
protected  java.lang.String process(int type, java.lang.String value)
           
 void startDocument()
          Receive notification of the beginning of the document.
 void startElement(java.lang.String namespaceURI, java.lang.String localName, java.lang.String qName, org.xml.sax.Attributes atts)
          Receive notification of the start of an element.
 
Methods inherited from class org.xml.sax.helpers.DefaultHandler
endPrefixMapping, error, fatalError, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, setDocumentLocator, skippedEntity, startPrefixMapping, unparsedEntityDecl, warning
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DOMAIN

protected static final int DOMAIN

ACTIVITY

protected static final int ACTIVITY

STUDENT

protected static final int STUDENT

SESSION

protected static final int SESSION

COHORTS

protected static final int COHORTS

DATE

protected static final int DATE

TIME

protected static final int TIME

ACTION

protected static final int ACTION

QUESTION

protected static final int QUESTION

RESPONSE

protected static final int RESPONSE

rightFile

protected boolean rightFile

rightAct

protected boolean rightAct

parser

protected org.apache.xerces.parsers.SAXParser parser

output

protected java.io.PrintWriter output

dataOutput

protected java.io.PrintWriter dataOutput

reportOutput

protected java.io.PrintWriter reportOutput

reader

protected java.io.FileReader reader

answers

protected java.util.Stack answers

strings

protected java.util.Stack strings

noOthers

protected boolean noOthers

firstDate

protected java.lang.String firstDate

firstTime

protected java.lang.String firstTime

lastTime

protected java.lang.String lastTime

currentText

protected java.lang.String currentText

numberOfActions

protected int numberOfActions

numberOfQuestions

protected int numberOfQuestions

numberOfAnswers

protected int numberOfAnswers

numberOfWords

protected int numberOfWords

wordsInAnswers

protected int wordsInAnswers

hasBeenHere

protected int hasBeenHere

indexInteraction

protected float indexInteraction

className

protected java.lang.String className

theClassName

protected java.lang.String theClassName

activity

protected java.lang.String activity

studentName

protected java.lang.String studentName

singleStudent

protected java.lang.String singleStudent

singleAct

protected java.lang.String singleAct

fileLocate

protected java.lang.String fileLocate

timeFormat

protected java.text.SimpleDateFormat timeFormat
Constructor Detail

LogProcess

public LogProcess(java.lang.String clsName,
                  java.lang.String acts,
                  java.lang.String sName,
                  java.lang.String cls)
Method Detail

startDocument

public void startDocument()
Description copied from class: org.xml.sax.helpers.DefaultHandler
Receive notification of the beginning of the document.

By default, do nothing. Application writers may override this method in a subclass to take specific actions at the beginning of a document (such as allocating the root node of a tree or creating an output file).

Overrides:
startDocument in class org.xml.sax.helpers.DefaultHandler
Following copied from class: org.xml.sax.helpers.DefaultHandler
Throws:
org.xml.sax.SAXException - Any SAX exception, possibly wrapping another exception.
See Also:
ContentHandler.startDocument()

endDocument

public void endDocument()
Description copied from class: org.xml.sax.helpers.DefaultHandler
Receive notification of the end of the document.

By default, do nothing. Application writers may override this method in a subclass to take specific actions at the end of a document (such as finalising a tree or closing an output file).

Overrides:
endDocument in class org.xml.sax.helpers.DefaultHandler
Following copied from class: org.xml.sax.helpers.DefaultHandler
Throws:
org.xml.sax.SAXException - Any SAX exception, possibly wrapping another exception.
See Also:
ContentHandler.endDocument()

characters

public void characters(char[] ch,
                       int start,
                       int length)
Description copied from class: org.xml.sax.helpers.DefaultHandler
Receive notification of character data inside an element.

By default, do nothing. Application writers may override this method to take specific actions for each chunk of character data (such as adding the data to a node or buffer, or printing it to a file).

Overrides:
characters in class org.xml.sax.helpers.DefaultHandler
Following copied from class: org.xml.sax.helpers.DefaultHandler
Parameters:
ch - The characters.
start - The start position in the character array.
length - The number of characters to use from the character array.
Throws:
org.xml.sax.SAXException - Any SAX exception, possibly wrapping another exception.
See Also:
ContentHandler.characters(char[], int, int)

startElement

public void startElement(java.lang.String namespaceURI,
                         java.lang.String localName,
                         java.lang.String qName,
                         org.xml.sax.Attributes atts)
Description copied from class: org.xml.sax.helpers.DefaultHandler
Receive notification of the start of an element.

By default, do nothing. Application writers may override this method in a subclass to take specific actions at the start of each element (such as allocating a new tree node or writing output to a file).

Overrides:
startElement in class org.xml.sax.helpers.DefaultHandler
Following copied from class: org.xml.sax.helpers.DefaultHandler
Parameters:
name - The element type name.
attributes - The specified or defaulted attributes.
Throws:
org.xml.sax.SAXException - Any SAX exception, possibly wrapping another exception.
See Also:
ContentHandler.startElement(java.lang.String, java.lang.String, java.lang.String, org.xml.sax.Attributes)

endElement

public void endElement(java.lang.String namespaceURI,
                       java.lang.String localName,
                       java.lang.String qName)
Description copied from class: org.xml.sax.helpers.DefaultHandler
Receive notification of the end of an element.

By default, do nothing. Application writers may override this method in a subclass to take specific actions at the end of each element (such as finalising a tree node or writing output to a file).

Overrides:
endElement in class org.xml.sax.helpers.DefaultHandler
Following copied from class: org.xml.sax.helpers.DefaultHandler
Parameters:
name - The element type name.
attributes - The specified or defaulted attributes.
Throws:
org.xml.sax.SAXException - Any SAX exception, possibly wrapping another exception.
See Also:
ContentHandler.endElement(java.lang.String, java.lang.String, java.lang.String)

process

protected java.lang.String process(int type,
                                   java.lang.String value)

printSessionData

protected void printSessionData(java.lang.String fileName)

getFileNames

protected java.lang.String[] getFileNames(java.lang.String cls,
                                          java.lang.String act,
                                          java.lang.String stu)

getFileNames

protected java.util.Vector getFileNames(java.lang.String dirName,
                                        java.util.Vector fileList)

elapsedTime

protected java.lang.String elapsedTime()

getFileNames

protected java.lang.String[] getFileNames(java.lang.String dirName)

getFileLocate

public java.lang.String getFileLocate()

main

public static void main(java.lang.String[] args)