|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnet.sf.okapi.common.Event
public class Event
Represents an event generated by a filter that implements IFilter.
| Field Summary | |
|---|---|
static Event |
END_BATCH_EVENT
|
static Event |
NOOP_EVENT
|
| Constructor Summary | |
|---|---|
Event(EventType filterEventType)
Creates a new event without any associated resource. |
|
Event(EventType filterEventType,
IResource resource)
Creates a new event with an associated resource. |
|
Event(EventType filterEventType,
IResource resource,
ISkeleton skeleton)
Creates a new event with an associated resource and a skeleton object. |
|
| Method Summary | |
|---|---|
DocumentPart |
getDocumentPart()
Convenience method returns the IResource as a DocumentPart. |
Ending |
getEndGroup()
Convenience method returns the IResource as a Ending. |
Ending |
getEnding()
Convenience method returns the Ending resource. |
EventType |
getEventType()
Gets the type of this event. |
MultiEvent |
getMultiEvent()
Convenience method returns the IResource as a MultiEvent. |
PipelineParameters |
getPipelineParameters()
Convenience method returns the IResource as a PipelineParameters. |
RawDocument |
getRawDocument()
Convenience method returns the IResource as a RawDocument. |
IResource |
getResource()
Gets the resource associated to this event. |
StartDocument |
getStartDocument()
Convenience method returns the IResource as a StartDocument. |
StartGroup |
getStartGroup()
Convenience method returns the IResource as a StartGroup. |
ITextUnit |
getTextUnit()
Convenience method returns the IResource as a ITextUnit. |
boolean |
isDocumentPart()
Convenience method to tell if this Event carries a DocumentPart |
boolean |
isEndGroup()
Convenience method to tell if this Event carries a group Ending |
boolean |
isMultiEvent()
Convenience method to tell if this Event is a MULTI_EVENT |
boolean |
isNoop()
|
boolean |
isPipelineParametersEvent()
Indicates if this event carries a PipelineParameters resource. |
boolean |
isRawDocument()
Convenience method to tell if this Event carries a RawDocument |
boolean |
isStartDocument()
Convenience method to tell if this Event carries a StartDocument |
boolean |
isStartGroup()
Convenience method to tell if this Event carries a StartGroup |
boolean |
isTextUnit()
Convenience method to tell if this Event carries a ITextUnit |
void |
setResource(IResource resource)
Sets the resource associated to this event. |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final Event END_BATCH_EVENT
public static final Event NOOP_EVENT
| Constructor Detail |
|---|
public Event(EventType filterEventType)
filterEventType - the type of event to create.
public Event(EventType filterEventType,
IResource resource)
filterEventType - the type of event to create.resource - the resource to associate to the event.
public Event(EventType filterEventType,
IResource resource,
ISkeleton skeleton)
filterEventType - the type of event to create.resource - the resource to associate to the event.skeleton - the skeleton to associate to the event.| Method Detail |
|---|
public EventType getEventType()
public IResource getResource()
public void setResource(IResource resource)
public boolean isTextUnit()
ITextUnit
ITextUnit, false otherwisepublic boolean isDocumentPart()
DocumentPart
DocumentPart, false otherwisepublic boolean isStartGroup()
StartGroup
StartGroup, false otherwisepublic boolean isEndGroup()
Ending
Ending, false otherwisepublic boolean isRawDocument()
RawDocument
RawDocument, false otherwisepublic boolean isStartDocument()
StartDocument
StartDocument, false otherwisepublic boolean isMultiEvent()
MultiEvent, false otherwisepublic ITextUnit getTextUnit()
IResource as a ITextUnit.
The caller should confirm the Event type using isTextUnit before
calling this method.
ITextUnit
OkapiUnexpectedResourceTypeException - if the IResource is not a ITextUnitpublic DocumentPart getDocumentPart()
IResource as a DocumentPart.
The caller should confirm the Event type using isDocumentPart before calling
this method.
DocumentPart
OkapiUnexpectedResourceTypeException - if the IResource is not a DocumentPartpublic StartGroup getStartGroup()
IResource as a StartGroup. The
caller should confirm the Event type using isStartGroup before calling this
method.
StartGroup
OkapiUnexpectedResourceTypeException - if the IResource is not a StartGrouppublic Ending getEndGroup()
IResource as a Ending. The caller
should confirm the Event type using isEndGroup before calling this method.
Ending
OkapiUnexpectedResourceTypeException - if the IResource is not a Endingpublic Ending getEnding()
public RawDocument getRawDocument()
IResource as a RawDocument. The
caller should confirm the Event type using isRawDocument before calling
this method.
RawDocument
OkapiUnexpectedResourceTypeException - if the IResource is not a RawDocumentpublic StartDocument getStartDocument()
IResource as a StartDocument. The
caller should confirm the Event type using isStartDocument before calling
this method.
RawDocument
OkapiUnexpectedResourceTypeException - if the IResource is not a RawDocumentpublic MultiEvent getMultiEvent()
IResource as a MultiEvent. The
caller should confirm the EventType using isMultiEvent before calling
this method.
RawDocument
OkapiUnexpectedResourceTypeException - if the IResource is not a RawDocumentpublic boolean isPipelineParametersEvent()
PipelineParameters resource.
PipelineParameters resource, false otherwise.public PipelineParameters getPipelineParameters()
IResource as a PipelineParameters.
PipelineParameters
OkapiUnexpectedResourceTypeException - if the IResource is not a PipelineParameterspublic java.lang.String toString()
toString in class java.lang.Objectpublic boolean isNoop()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||