ReutersXmlReader Class Reference

Inheritance diagram for ReutersXmlReader:
Collaboration diagram for ReutersXmlReader:

List of all members.

Public Methods

boolean supportsContent (InputStream input)
Result run () throws IOException
void getPreview (InputStream input, OutputStream output, String encoding) throws IOException

Protected Methods

String handleState (XMLStreamReader r, int state) throws XMLStreamException
void processText (InputStream in, OutputStream out, boolean writeAnnotations, String docId, String encoding) throws IOException

Protected Static Methods

static String deleteNullsFromString (String toProcess)

Protected Attributes

ISignalOutputAdapter< String > signalWriter
ISignalInputAdapter sa

Package Types

enum  Category {
  TOPICS, PLACES, PEOPLE, ORGS,
  EXCHANGES, COMPANIES, NONE
}

Member Enumeration Documentation

enum Category [package]
Enumerator:
TOPICS 
PLACES 
PEOPLE 
ORGS 
EXCHANGES 
COMPANIES 
NONE 

Method Details

static String deleteNullsFromString ( String  toProcess) [static, protected, inherited]
void getPreview ( InputStream  input,
OutputStream  output,
String  encoding 
) throws IOException [inherited]
String handleState ( XMLStreamReader  r,
int  state 
) throws XMLStreamException [protected]

Default implementation returns all text found in the xml document. Subclasses should override this method.

Parameters:
rthe XMLStreamReader
statethe current state, as returned by XMLStreamReader#getEventType()
Returns:
the String to append to the content of the document, or null if the current element does not contain document content.
Exceptions:
XMLStreamException

Reimplemented from XmlReader.

void processText ( InputStream  in,
OutputStream  out,
boolean  writeAnnotations,
String  docId,
String  encoding 
) throws IOException [protected]

Reimplemented from XmlReader.

Result run ( ) throws IOException [inherited]

Reimplemented in TwitterArchiveReader.

boolean supportsContent ( InputStream  input)

Reimplemented from XmlReader.


Field Details

ISignalInputAdapter sa [protected, inherited]

Reimplemented in TwitterArchiveReader.

ISignalOutputAdapter<String> signalWriter [protected, inherited]

Reimplemented in TwitterArchiveReader.