BEA Systems, Inc.

com.bea.rfid.workflow.epcis
Class AggregationEventGenerator

java.lang.Object
  extended by com.bea.rfid.workflow.epcis.EventGenerator
      extended by com.bea.rfid.workflow.epcis.AggregationEventGenerator

public class AggregationEventGenerator
extends EventGenerator

Java class to generate EPCIS Aggregation Events for input tags. This contains include and exclude EPC patterns for parent and children elements of the aggregation event. These will be applied on the input tags to determine the parent and children to use on the generated aggregation event. If the template event contains a parent id, that will be used as the parent id on the generated event.

This uses the super class for populating the common EPCIS event fields. It contains action field in addition, which will be used on the generated event if the template event is not an aggregation event or does not have action specified.

This implementation assumes single threaded operation and is not synchronized. If multiple threads access this concurrently, it must be synchronized externally.


Constructor Summary
AggregationEventGenerator()
           
 
Method Summary
 com.connecterra.epcis.impl.AbstractEPCISEvent createSpecificEPCISEvent(List tags)
          Creates Aggregation Event for the given input tags.
 String getAction()
          Returns the action specified on this event generator.
 void setAction(String action)
          Specified the action that must be used on the generated event, if one cannot be obtained from the template event.
 void setChildrenExcludePatterns(List childrenExcludePats)
          Specifies EPC Pattern URI strings that must be used to exclude EPCs from children list.
 void setChildrenIncludePatterns(List childrenIncludePats)
          Specifies EPC Pattern URI strings that must be used to include EPCs to the event's children list.
 void setParentExcludePatterns(List parentExcludePats)
          Specifies EPC Pattern URI strings that must be used to exclude an input tag from being the parent on the aggregation event.
 void setParentIncludePatterns(List parentPats)
          Specifies EPC Pattern URI strings that must be used to include an input tag as the parent on the aggregation event.
 
Methods inherited from class com.bea.rfid.workflow.epcis.EventGenerator
addBusinessTransaction, addBusinessTransaction, addEventExtension, convertToEPC, convertToEPCList, createEPCISDocument, getBusinessLocation, getBusinessStep, getBusinessTransactionList, getDisposition, getEventExtensionList, getReadPoint, getTemplate, getTemplateAction, getTemplateEvent, isProcessing, populateAbstractEPCISEvent, setBusinessLocation, setBusinessStep, setBusinessTransactionList, setDisposition, setEventExtensionList, setReadPoint, setTemplate, startProcessing, stopProcessing
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AggregationEventGenerator

public AggregationEventGenerator()
Method Detail

createSpecificEPCISEvent

public com.connecterra.epcis.impl.AbstractEPCISEvent createSpecificEPCISEvent(List tags)
                                                                       throws com.connecterra.epcis.api.EPCISException
Creates Aggregation Event for the given input tags. Parent and children include/exclude patterns will be used to determine the parent and children IDs from the input. Action field on the event will also be set. Action on the template event will be used if the template event is an aggregation event and has action specified. If not, action specified on this AggregationEventGenerator object will be used.

Specified by:
createSpecificEPCISEvent in class EventGenerator
Parameters:
tags - list of com.connecterra.ale.api.ECReportGroupListMember for which Aggregation Event must be generated
Returns:
the generated EPCIS Object Event
Throws:
com.connecterra.epcis.api.EPCISException - if an error occurs trying to create the event
IllegalStateException - if action cannot be obtained from the template event and none is set on this
See Also:
EventGenerator.createEPCISDocument(List)

getAction

public String getAction()
Returns the action specified on this event generator. This will be used on the generated aggregation event if one cannot be obtained from the template event.

Returns:
the action that will be used in generated aggregation events if one cannot be obtained from the template event

setAction

public void setAction(String action)
Specified the action that must be used on the generated event, if one cannot be obtained from the template event.

Parameters:
action - string with the action value

setChildrenExcludePatterns

public void setChildrenExcludePatterns(List childrenExcludePats)
                                throws com.connecterra.ale.epc.EPCPatternException,
                                       com.connecterra.ale.epc.EPCFieldDecodingException,
                                       com.connecterra.ale.epc.EPCException,
                                       URISyntaxException
Specifies EPC Pattern URI strings that must be used to exclude EPCs from children list. These patterns will be applied on the input tags to generate the children list.

Parameters:
childrenExcludePats - list of EPC Pattern URI strings
Throws:
com.connecterra.ale.epc.EPCPatternException - if an invalid EPC pattern is specified
com.connecterra.ale.epc.EPCFieldDecodingException - if any pattern field in the specified pattern URI is not correct or missing
com.connecterra.ale.epc.EPCException - if an invalid tag is specified
URISyntaxException - if an incorrect URI is passed in

setChildrenIncludePatterns

public void setChildrenIncludePatterns(List childrenIncludePats)
                                throws com.connecterra.ale.epc.EPCPatternException,
                                       com.connecterra.ale.epc.EPCFieldDecodingException,
                                       com.connecterra.ale.epc.EPCException,
                                       URISyntaxException
Specifies EPC Pattern URI strings that must be used to include EPCs to the event's children list. These patterns will be applied on the input tags to generate the children list.

Parameters:
childrenIncludePats - list of EPC Pattern URI strings
Throws:
com.connecterra.ale.epc.EPCPatternException - if an invalid EPC pattern is specified
com.connecterra.ale.epc.EPCFieldDecodingException - if any pattern field in the specified pattern URI is not correct or missing
com.connecterra.ale.epc.EPCException - if an invalid tag is specified
URISyntaxException - if an incorrect URI is passed in

setParentIncludePatterns

public void setParentIncludePatterns(List parentPats)
                              throws com.connecterra.epcis.api.EPCISException
Specifies EPC Pattern URI strings that must be used to include an input tag as the parent on the aggregation event. Full tag URIs or pure identity form of tags or EPC patterns or EPC patterns in pure identity format may be specified here.

Parameters:
parentPats - list of EPC Pattern URI strings
Throws:
com.connecterra.ale.epc.EPCPatternException - if an invalid EPC pattern is specified
com.connecterra.ale.epc.EPCFieldDecodingException - if any pattern field in the specified pattern URI is not correct or missing
com.connecterra.ale.epc.EPCException - if an invalid tag is specified
URISyntaxException - if an incorrect URI is passed in
com.connecterra.epcis.api.EPCISException

setParentExcludePatterns

public void setParentExcludePatterns(List parentExcludePats)
                              throws com.connecterra.ale.epc.EPCPatternException,
                                     com.connecterra.ale.epc.EPCFieldDecodingException,
                                     com.connecterra.ale.epc.EPCException,
                                     URISyntaxException
Specifies EPC Pattern URI strings that must be used to exclude an input tag from being the parent on the aggregation event.

Parameters:
parentExcludePats - list of EPC Pattern URI strings
Throws:
com.connecterra.ale.epc.EPCPatternException - if an invalid EPC pattern is specified
com.connecterra.ale.epc.EPCFieldDecodingException - if any pattern field in the specified pattern URI is not correct or missing
com.connecterra.ale.epc.EPCException - if an invalid tag is specified
URISyntaxException - if an incorrect URI is passed in

Documentation is available at
${DOCSWEBROOT}
Copyright 2007 BEA Systems Inc.