org.fosstrak.capturingapp.util
Class SimpleEPCISDocument

java.lang.Object
  extended by org.fosstrak.capturingapp.util.SimpleEPCISDocument

public class SimpleEPCISDocument
extends java.lang.Object

Helper class to assemble an EPCIS document. you can add object events and when you have all the events together, you can compile the final EPCIS document for further processing.

Author:
sawielan

Field Summary
protected  java.util.LinkedList<org.fosstrak.epcis.model.ObjectEventType> objectEvents
          a list of all the object events in the EPCIS document.
 
Constructor Summary
SimpleEPCISDocument()
           
 
Method Summary
 void addObjectEvent(java.util.List<java.lang.Object> epcs, org.fosstrak.epcis.model.ActionType action, java.lang.String bizSteps, java.lang.String disposition, java.lang.String readPointId, java.lang.String bizLocationId)
          add a new object event to the EPCIS document.
 org.fosstrak.epcis.model.EPCISDocumentType getDocument()
           
protected  javax.xml.datatype.XMLGregorianCalendar getNow()
           
protected  java.lang.String getTimeOffset(javax.xml.datatype.XMLGregorianCalendar eventTime)
          returns a string that describes the time offset.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

objectEvents

protected java.util.LinkedList<org.fosstrak.epcis.model.ObjectEventType> objectEvents
a list of all the object events in the EPCIS document.

Constructor Detail

SimpleEPCISDocument

public SimpleEPCISDocument()
Method Detail

addObjectEvent

public void addObjectEvent(java.util.List<java.lang.Object> epcs,
                           org.fosstrak.epcis.model.ActionType action,
                           java.lang.String bizSteps,
                           java.lang.String disposition,
                           java.lang.String readPointId,
                           java.lang.String bizLocationId)
add a new object event to the EPCIS document.

Parameters:
epcs - a list of EPCs to put into the report.
action - the kind of action triggered by this object even.
bizSteps - the bizsteps to set in the event.
disposition - the disposition.
readPointId - the id of the read point.
bizLocationId - the id of the location.

getTimeOffset

protected java.lang.String getTimeOffset(javax.xml.datatype.XMLGregorianCalendar eventTime)
returns a string that describes the time offset.

Parameters:
eventTime - a gregorian calendar holding a time.
Returns:
a time offset string.

getNow

protected javax.xml.datatype.XMLGregorianCalendar getNow()
Returns:
a gregorian calendar describing the current time.

getDocument

public org.fosstrak.epcis.model.EPCISDocumentType getDocument()
Returns:
the assembled EPCIS document.


Copyright © 2009. All Rights Reserved.