com.simonstl.moe
Interface ComponentOutputI

All Known Implementing Classes:
SAXFactory, SAXFactoryTree

public interface ComponentOutputI

The ComponentOutputI interface defines the bare minimum of functionality needed for programs to present MOE objects.

version 0.01 is the initial release.

Version:
0.01 21 August 2001
Author:
Simon St.Laurent

Field Summary
static int CHUNKS
          CHUNKS means to send larger components.
static int COLLECTING
          COLLECTING indicates that the source is waiting for something to happen.
static int FINISHED
          FINISHED indicates that the source is done.
static int NOTSTARTED
          NOTSTART indicates that the source hasn't started reporting.
static int SAX
          SAX indicates that the source should send information as start/content/end.
 
Method Summary
 CoreComponentI getCurrentComponent()
          getCurrentComponent provides rude access to the component currently being handled, if any.
 int getStatus()
          getStatus allows impatient listeners to find out what's going on.
 void setListener(ComponentInputI listener)
          setListener assigns a ComponentInputI object to listen to events generated by this component.
 boolean setReport(int typeReport)
          setReport tells the outputter whether to report content as the largest objects it knows (0), a SAX-like view of content(1), or some other view (other numbers.) If an outputter doesn't understand a request, it should return false.
 void startEvents()
          startEvents starts the reading, much like parse() in SAX.
 

Field Detail

NOTSTARTED

public static final int NOTSTARTED
NOTSTART indicates that the source hasn't started reporting.

COLLECTING

public static final int COLLECTING
COLLECTING indicates that the source is waiting for something to happen.

FINISHED

public static final int FINISHED
FINISHED indicates that the source is done.

CHUNKS

public static final int CHUNKS
CHUNKS means to send larger components.

SAX

public static final int SAX
SAX indicates that the source should send information as start/content/end.
Method Detail

getStatus

public int getStatus()
getStatus allows impatient listeners to find out what's going on. A status of 0 means that no information has been retrieved yet, a status of 1 means that it's collecting information locally, and maybe I'll come up with other useful bits. 2 means it's done.

setReport

public boolean setReport(int typeReport)
setReport tells the outputter whether to report content as the largest objects it knows (0), a SAX-like view of content(1), or some other view (other numbers.) If an outputter doesn't understand a request, it should return false.

getCurrentComponent

public CoreComponentI getCurrentComponent()
getCurrentComponent provides rude access to the component currently being handled, if any. This one may disappear, as it seems outright dangerous, but there may be cases where it's useful.

setListener

public void setListener(ComponentInputI listener)
setListener assigns a ComponentInputI object to listen to events generated by this component. (This is basically the SAX model, calling them listeners rather than handlers.)

startEvents

public void startEvents()
                 throws MOEException
startEvents starts the reading, much like parse() in SAX.