|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.xtvdclient.xtvd.parser.AbstractParser
net.sf.xtvdclient.xtvd.parser.WriterParser
public class WriterParser
A parser
implementation that is used to parse the
incoming XML stream, and then write the parsed data back to an
Writer
. This parser is most useful for extracting
the XTVD document
from the SOAP message
and storing to a file
.
Field Summary |
---|
Fields inherited from class net.sf.xtvdclient.xtvd.parser.AbstractParser |
---|
log, reader, sdf |
Fields inherited from interface net.sf.xtvdclient.xtvd.parser.Parser |
---|
END_OF_LINE |
Constructor Summary | |
---|---|
protected |
WriterParser(java.io.Reader in,
java.io.Writer out)
Create a new instance of the parser that reads the data from the specified Reader . |
Method Summary | |
---|---|
protected void |
parseGenres()
Parse the genres top-level element from the
AbstractParser.reader and write the parsed data to the writer . |
protected void |
parseLineups()
Parse the lineups top-level element from the
AbstractParser.reader and write the parsed data to the writer . |
protected void |
parseProductionCrew()
Parse the productionCrew top-level element from the
AbstractParser.reader and write the parsed data to the writer . |
protected void |
parsePrograms()
Parse the programs top-level element from the
AbstractParser.reader and write the parsed data to the writer . |
protected void |
parseRootElement()
Parse an root xtvd record from the
AbstractParser.reader , and write the parsed data to the writer . |
protected void |
parseSchedules()
Parse the schedules top-level element from the
AbstractParser.reader and write the parsed data to the writer . |
protected void |
parseStations()
Parse an individual station record from the
AbstractParser.reader , and write the parsed data to the writer . |
void |
parseXTVD()
Read the SOAP response from the AbstractParser.reader ,
parse the XTVD document from the response and
write the document to the writer . |
Methods inherited from class net.sf.xtvdclient.xtvd.parser.AbstractParser |
---|
getCrew, getCrew, getGenre, getGenre, getLineup, getLineup, getLog, getMap, getMap, getMember, getMember, getMessages, getPart, getPart, getProgram, getProgram, getProgramGenre, getProgramGenre, getSchedule, getSchedule, getStation, getStation, setLog, toStartTag |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected WriterParser(java.io.Reader in, java.io.Writer out) throws DataDirectException
Reader
.
Reader
- in - The Reader from which the XML data
is to be parsed. Make sure that the reader object has the
character encoding
properly set to
UTF-8
.Writer
- out - The writer to which the parsed XTVD XML is
to be written. Make sure that the writer object has the
character encoding
properly set to
UTF-8
.
DataDirectException
- - If errors are encountered while
initialising the parser or reading the data.Method Detail |
---|
public void parseXTVD() throws DataDirectException
SOAP response
from the AbstractParser.reader
,
parse the XTVD document
from the response and
write the document to the writer
.
parseXTVD
in interface Parser
parseXTVD
in class AbstractParser
DataDirectException
- - If errors are encountered while
parsing the XML data stream or while writing to the
writer
.AbstractParser.getMessages()
,
parseRootElement()
,
parseStations()
,
parseLineups()
,
parseSchedules()
,
parsePrograms()
,
parseProductionCrew()
,
parseGenres()
protected void parseRootElement() throws DataDirectException
xtvd
record from the
AbstractParser.reader
, and write the parsed data to the writer
.
Also add the XML declaration at the top of the output.
DataDirectException
- - If errors are encountered while
reading or writing the XML data.protected void parseStations() throws DataDirectException
station
record from the
AbstractParser.reader
, and write the parsed data to the writer
.
DataDirectException
- - If errors are encountered while
reading or writing the XML data.AbstractParser.getStation(Station)
protected void parseLineups() throws DataDirectException
lineups
top-level element from the
AbstractParser.reader
and write the parsed data to the writer
.
DataDirectException
- - If errors are encountered while
reading or writing the XML data.#getLineup(net.sf.xtvdclient.xtvd.Lineup)
protected void parseSchedules() throws DataDirectException
schedules
top-level element from the
AbstractParser.reader
and write the parsed data to the writer
.
DataDirectException
- - If errors are encountered while
reading or writing the XML data.AbstractParser.getSchedule(net.sf.xtvdclient.xtvd.datatypes.Schedule)
protected void parsePrograms() throws DataDirectException
programs
top-level element from the
AbstractParser.reader
and write the parsed data to the writer
.
DataDirectException
- - If errors are encountered while
reading or writing the XML data.AbstractParser.getProgram(net.sf.xtvdclient.xtvd.datatypes.Program)
protected void parseProductionCrew() throws DataDirectException
productionCrew
top-level element from the
AbstractParser.reader
and write the parsed data to the writer
.
DataDirectException
- - If errors are encountered while
reading or writing the XML data.#getCrew(net.sf.xtvdclient.xtvd.Crew)
protected void parseGenres() throws DataDirectException
genres
top-level element from the
AbstractParser.reader
and write the parsed data to the writer
.
DataDirectException
- - If errors are encountered while
reading or writing the XML data.AbstractParser.getProgramGenre(ProgramGenre)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |