|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.xml.sax.helpers.DefaultHandler
jimm.datavision.ParameterReader
public class ParameterReader
A parameter reader reads an XML file and sets a Report's parameter
values. This class is used when the report is being run from the
command line and the user has given us the name of an XML file containing
parameter elements.
Unlike a ReportReader, a parameter reader's constructor
takes not only the report but also the input method (file name, stream,
or reader). That way the report object doesn't have to know how to hold
on to those multipule input types.
| Field Summary | |
|---|---|
protected static double |
DEFAULT_DTD_VERSION
If there is no report element dtd-version attribute, this is the default value to use. |
protected java.io.File |
inFile
|
protected org.xml.sax.InputSource |
inInputSource
|
protected Parameter |
parameter
|
protected Report |
report
|
protected java.lang.String |
textData
|
| Constructor Summary | |
|---|---|
ParameterReader(Report report,
java.io.File f)
Constructor. |
|
ParameterReader(Report report,
org.xml.sax.InputSource in)
Constructor. |
|
| Method Summary | |
|---|---|
void |
characters(char[] ch,
int start,
int length)
Reads text data. |
void |
endElement(java.lang.String namespaceURI,
java.lang.String localName,
java.lang.String qName)
|
java.lang.String |
getInputName()
Returns the file name or, if that is null, the class name of
whatever input source was handed to a constructor. |
void |
read()
Reads parameter values from whichever input method was specified in the constructor. |
void |
startElement(java.lang.String namespaceURI,
java.lang.String localName,
java.lang.String qName,
org.xml.sax.Attributes attributes)
|
| Methods inherited from class org.xml.sax.helpers.DefaultHandler |
|---|
endDocument, endPrefixMapping, error, fatalError, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, setDocumentLocator, skippedEntity, startDocument, startPrefixMapping, unparsedEntityDecl, warning |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static final double DEFAULT_DTD_VERSION
protected Report report
protected Parameter parameter
protected java.lang.String textData
protected java.io.File inFile
protected org.xml.sax.InputSource inInputSource
| Constructor Detail |
|---|
public ParameterReader(Report report,
java.io.File f)
report - the report whose parameters we are settingf - the parameter XML file
public ParameterReader(Report report,
org.xml.sax.InputSource in)
new
InputSource("http://...").
report - the report whose parameters we are settingin - the param XML input source| Method Detail |
|---|
public java.lang.String getInputName()
null, the class name of
whatever input source was handed to a constructor.
public void read()
throws java.lang.Exception
java.lang.Exception
public void startElement(java.lang.String namespaceURI,
java.lang.String localName,
java.lang.String qName,
org.xml.sax.Attributes attributes)
throws org.xml.sax.SAXException
startElement in interface org.xml.sax.ContentHandlerstartElement in class org.xml.sax.helpers.DefaultHandlerorg.xml.sax.SAXException
public void endElement(java.lang.String namespaceURI,
java.lang.String localName,
java.lang.String qName)
throws org.xml.sax.SAXException
endElement in interface org.xml.sax.ContentHandlerendElement in class org.xml.sax.helpers.DefaultHandlerorg.xml.sax.SAXException
public void characters(char[] ch,
int start,
int length)
characters in interface org.xml.sax.ContentHandlercharacters in class org.xml.sax.helpers.DefaultHandler
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||