|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.fosstrak.epcis.captureclient.CaptureClientHelper
public class CaptureClientHelper
This is a helper class which encapsulates common functionality used within the capture client classes.
Nested Class Summary | |
---|---|
static class |
CaptureClientHelper.EpcisEventType
|
static class |
CaptureClientHelper.ExampleEvents
Implements a class that holds examples for the EPCIS Capture Interface Client. |
Field Summary | |
---|---|
static String[] |
ACTIONS
The possible values for the "actions" parameter. |
static String[] |
EPCIS_EVENT_NAMES
The four possible event types, in human readable form. |
static String |
toolTipBizTransID
|
static String |
toolTipBizTransType
|
static String |
toolTipDate
The various tooltips. |
static String |
toolTipInteger
|
static String |
toolTipOptional
|
static String |
toolTipUri
|
static String |
toolTipUris
|
static DecimalFormat |
XX_FORMAT
Miscellaneous numeric formats used in formatting. |
static DecimalFormat |
XXX_FORMAT
|
static DecimalFormat |
XXXX_FORMAT
|
Constructor Summary | |
---|---|
CaptureClientHelper()
|
Method Summary | |
---|---|
static boolean |
addAction(Document document,
Element root,
String action)
Adds the given action value as <action> element to the XML
document. |
static boolean |
addBizLocation(Document document,
Element root,
String bizLocation)
Adds the given bizLocation as <id> element inside a <bizLocation> element to the XML document. |
static boolean |
addBizStep(Document document,
Element root,
String bizStep)
Adds the given bizStep value as <bizStep> element to the XML
document. |
static boolean |
addBizTransactions(Document document,
Element root,
Map<String,String> bizTransactions)
Adds the given mapping of business transactions ([business transaction IDs] -> [business transaction types]) as part of a <bizTransactionList> element to the XML document. |
static boolean |
addChildEpcList(Document document,
Element root,
String childEPCs)
Adds the EPCs from the given list of childEPCs as <epc> elements
inside an <childEPCs> element to the XML document. |
static boolean |
addDisposition(Document document,
Element root,
String disposition)
Adds the given disposition value as <disposition> element to the
XML document. |
static boolean |
addEpcClass(Document document,
Element root,
String epcClass)
Adds the given epcClass value as <epcClass> element to the XML
document. |
static boolean |
addEpcList(Document document,
Element root,
String epcList)
Adds the EPCs from the given epcList as <epc> elements inside an
<epcList> element to the XML document. |
static boolean |
addEventTime(Document document,
Element root,
String eventTime)
Adds the given eventTime value as <eventTime> element to the XML
document. |
static boolean |
addEventTimeZoneOffset(Document document,
Element root,
String eventTimeZoneOffset)
Adds the given eventTimeZoneOffset value as <eventTimeZoneOffset>
element to the XML document. |
static boolean |
addParentId(Document document,
Element root,
String parentID)
Adds the given parentID value as <parentID> element to the XML
document. |
static boolean |
addQuantity(Document document,
Element root,
String quantity)
Adds the given quantity value as <quantity> element to the XML
document. |
static boolean |
addReadPoint(Document document,
Element root,
String readPoint)
Adds the given readPoint as <id> element inside a <readPoint> element to the XML document. |
static String |
format(Calendar cal)
Formats a Calendar value into an ISO8601-compliant date/time
string. |
static ImageIcon |
getImageIcon(String filename)
Loads ImageIcon from either JAR or filesystem. |
static String |
getTimeZone(Calendar cal)
Returns the time zone designator in a ISO6601-compliant format from the given Calendar value. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final DecimalFormat XX_FORMAT
public static final DecimalFormat XXX_FORMAT
public static final DecimalFormat XXXX_FORMAT
public static final String toolTipDate
public static final String toolTipUri
public static final String toolTipUris
public static final String toolTipInteger
public static final String toolTipOptional
public static final String toolTipBizTransType
public static final String toolTipBizTransID
public static final String[] ACTIONS
public static final String[] EPCIS_EVENT_NAMES
Constructor Detail |
---|
public CaptureClientHelper()
Method Detail |
---|
public static String getTimeZone(Calendar cal)
Calendar
value.
cal
- The Calendar to be formatted.
public static String format(Calendar cal)
Calendar
value into an ISO8601-compliant date/time
string.
cal
- The time value to be formatted into a date/time string.
public static ImageIcon getImageIcon(String filename)
filename
- The name of the file holding the image icon.
public static boolean addQuantity(Document document, Element root, String quantity)
<quantity>
element to the XML
document.
document
- The Document to generate the <quantity>
element from.root
- The root Element under which the <quantity>
element
should be generated.quantity
- The value for the <quantity>
element.
<quantity>
element was successfully
created, false
otherwise.public static boolean addEpcClass(Document document, Element root, String epcClass)
<epcClass>
element to the XML
document.
document
- The Document to generate the <epcClass>
element from.root
- The root Element under which the <epcClass>
element
should be generated.epcClass
- The value for the <epcClass>
element.
<epcClass>
element was successfully
created, false
otherwise.public static boolean addChildEpcList(Document document, Element root, String childEPCs)
<epc>
elements
inside an <childEPCs>
element to the XML document.
document
- The Document to generate the <epc>
and <childEPCs>
element from.root
- The root Element under which the <childEPCs>
element
should be generated.childEPCs
- A space-separated list of EPCs.
<childEPCs>
element was successfully
created, false
otherwise.public static boolean addBizTransactions(Document document, Element root, Map<String,String> bizTransactions)
<bizTransactionList>
element to the XML document.
document
- The Document to generate the <bizTransactionList>
element from.root
- The root Element under which the <bizTransactionList>
element should be generated.bizTransactions
- A mapping of business transaction IDs to business transaction
types.
<bizTransactionList>
element was
successfully created, false
otherwise.public static boolean addBizLocation(Document document, Element root, String bizLocation)
<id>
element inside a <bizLocation>
element to the XML document.
document
- The Document to generate the <id>
and <bizLocation>
elements from.root
- The root Element under which the <bizLocation>
element
should be generated.bizLocation
- The value for the <id>
element.
<bizLocation>
element was successfully
created, false
otherwise.public static boolean addReadPoint(Document document, Element root, String readPoint)
<id>
element inside a <readPoint>
element to the XML document.
document
- The Document to generate the <id>
and <readPoint>
elements from.root
- The root Element under which the <readPoint>
element
should be generated.readPoint
- The value for the <id>
element.
<readPoint>
element was successfully
created, false
otherwise.public static boolean addDisposition(Document document, Element root, String disposition)
<disposition>
element to the
XML document.
document
- The Document to generate the <disposition>
element
from.root
- The root Element under which the <disposition>
element
should be generated.disposition
- The value for the <disposition>
element.
<disposition>
element was successfully
created, false
otherwise.public static boolean addBizStep(Document document, Element root, String bizStep)
<bizStep>
element to the XML
document.
document
- The Document to generate the <bizStep>
element from.root
- The root Element under which the <bizStep>
element
should be generated.bizStep
- The value for the <bizStep>
element.
<bizStep>
element was successfully created,
false
otherwise.public static boolean addAction(Document document, Element root, String action)
<action>
element to the XML
document.
document
- The Document to generate the <action>
element from.root
- The root Element under which the <action>
element
should be generated.action
- The value for the <action>
element.
<action>
element was successfully created,
false
otherwise.public static boolean addEpcList(Document document, Element root, String epcList)
<epc>
elements inside an
<epcList>
element to the XML document.
document
- The Document to generate the <epc>
and <epcList>
element from.root
- The root Element under which the <childEPCs>
element
should be generated.epcList
- A space-separated list of EPCs.
<epcList>
element was successfully created,
false
otherwise.public static boolean addParentId(Document document, Element root, String parentID)
<parentID>
element to the XML
document.
document
- The Document to generate the <parentID>
element from.root
- The root Element under which the <parentID>
element
should be generated.parentID
- The value for the <parentID>
element.
<parentID>
element was successfully
created, false
otherwise.public static boolean addEventTime(Document document, Element root, String eventTime)
<eventTime>
element to the XML
document.
document
- The Document to generate the <eventTime>
element from.root
- The root Element under which the <eventTime>
element
should be generated.eventTime
- The value for the <eventTime>
element.
<eventTime>
element was successfully
created, false
otherwise.public static boolean addEventTimeZoneOffset(Document document, Element root, String eventTimeZoneOffset)
<eventTimeZoneOffset>
element to the XML document.
document
- The Document to generate the <eventTimeZoneOffset>
element from.root
- The root Element under which the <eventTimeZoneOffset>
element should be generated.eventTimeZoneOffset
- The value for the <eventTimeZoneOffset>
element.
<eventTimeZoneOffset>
element was
successfully created, false
otherwise.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |