Class MultiEvent

    • Constructor Detail

      • MultiEvent

        public MultiEvent()
        Creates a new empty MultiEvent object.
      • MultiEvent

        public MultiEvent​(List<Event> events)
        Creates a new MultiEvent object with a list of given events.
        Parameters:
        events - the list of initial events.
    • Method Detail

      • getId

        public String getId()
        Description copied from interface: IResource
        Gets the identifier of the resource. This identifier is unique per extracted document and by type of resource. This value is filter-specific. It and may be different from one extraction of the same document to the next. It can a sequential number or not, incremental or not, and it can be not a number. It has no correspondence in the source document ("IDs" coming from the source document are "names" and not available for all resources).
        Specified by:
        getId in interface IResource
        Returns:
        the identifier of this resource.
      • setId

        public void setId​(String id)
        Description copied from interface: IResource
        Sets the identifier of this resource.
        Specified by:
        setId in interface IResource
        Parameters:
        id - the new identifier value.
        See Also:
        IResource.getId()
      • addEvent

        public void addEvent​(Event event)
        Adds an event to this object.
        Parameters:
        event - the event to add.
      • addEvent

        public void addEvent​(Event event,
                             int index)
        Inserts an event in this object at the specified position.
        Parameters:
        event - the event to insert.
        index - index at which the event is to be inserted.
      • setPropagateAsSingleEvent

        public void setPropagateAsSingleEvent​(boolean propagateAsSingleEvent)
        Set Propagate As Single Event flag.
        Parameters:
        propagateAsSingleEvent - true if we want to propagate as single event.
      • isPropagateAsSingleEvent

        public boolean isPropagateAsSingleEvent()
        Do we send this Event by itself or does the Pipeline break the individual Events and end them singly. Default is false - we send each Event singly.
        Returns:
        true if we send the Event as-is, false to send the individual Events continued here.
      • size

        public int size()
        Returns the number of events in this object.
        Returns:
        number of events