public class MultiEvent extends Object implements IResource, IWithAnnotations, Iterable<Event>
COPY_ALL, COPY_CONTENT, COPY_PROPERTIES, COPY_SEGMENTATION, COPY_SEGMENTED_CONTENT, CREATE_EMPTY| Constructor and Description |
|---|
MultiEvent()
Creates a new empty MultiEvent object.
|
MultiEvent(List<Event> events)
Creates a new MultiEvent object with a list of given events.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addEvent(Event event)
Adds an event to this object.
|
void |
addEvent(Event event,
int index)
Inserts an event in this object at the specified position.
|
<A extends IAnnotation> |
getAnnotation(Class<A> annotationType)
Gets the annotation object for a given class for this resource.
|
Iterable<IAnnotation> |
getAnnotations()
Gets the iterable list of the annotations for this resource.
|
String |
getId()
Gets the identifier of the resource.
|
ISkeleton |
getSkeleton()
Always throws an exception as there is never a skeleton associated to a RawDocument.
|
boolean |
isPropagateAsSingleEvent()
Do we send this
Event by itself or does the Pipeline break the individual Events and end them
singly. |
Iterator<Event> |
iterator()
Creates an iterator for the events in this resource.
|
void |
setAnnotation(IAnnotation annotation)
Sets an annotation object for this resource.
|
void |
setId(String id)
Sets the identifier of this resource.
|
void |
setPropagateAsSingleEvent(boolean propagateAsSingleEvent)
Set Propagate As Single Event flag.
|
void |
setSkeleton(ISkeleton skeleton)
This method has no effect as there is never a skeleton for a Document.
|
int |
size()
Returns the number of events in this object.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcopyforEach, spliteratorpublic void addEvent(Event event)
event - the event to add.public void addEvent(Event event, int index)
event - the event to insert.index - index at which the event is to be inserted.public <A extends IAnnotation> A getAnnotation(Class<A> annotationType)
IWithAnnotationsgetAnnotation in interface IWithAnnotationsA - the type of the class.annotationType - the class of the annotation object to retrieve.public String getId()
IResourcepublic ISkeleton getSkeleton()
getSkeleton in interface IResourceOkapiNotImplementedException - this method is not implemented.public void setAnnotation(IAnnotation annotation)
IWithAnnotationssetAnnotation in interface IWithAnnotationsannotation - the annotation object to set.public void setId(String id)
IResourcesetId in interface IResourceid - the new identifier value.IResource.getId()public void setSkeleton(ISkeleton skeleton)
setSkeleton in interface IResourceskeleton - the skeleton.OkapiNotImplementedException - this method is not implemented.public void setPropagateAsSingleEvent(boolean propagateAsSingleEvent)
propagateAsSingleEvent - true if we want to propagate as single event.public boolean isPropagateAsSingleEvent()
Event by itself or does the Pipeline break the individual Events and end them
singly. Default is false - we send each Event singly.public Iterable<IAnnotation> getAnnotations()
IWithAnnotationsgetAnnotations in interface IWithAnnotationspublic int size()
Copyright © 2021. All rights reserved.