com.ibm.rfid.premises.app.entities.supplychain.printing
Class Label

java.lang.Object
  extended by com.ibm.rfid.premises.app.entities.AbstractXmlObject
      extended by com.ibm.rfid.premises.app.entities.supplychain.printing.Label

public class Label
extends AbstractXmlObject

This class represents an actual label/tag being printed/written to during a print job. The details of the tag bring written to are defined in an EpcData object stored within the class. Any optional details regarding label layout or text printed on the actual label are defined in FormData objects stored within the class.

Within a print job submission, Label objects are stored in a LabelList object. There must be atleast one Label per LabelList.

See Also:
LabelList, EpcData, FormData

Field Summary
static java.lang.String LABEL
          xml tag name used to describe a Label
 
Fields inherited from class com.ibm.rfid.premises.app.entities.AbstractXmlObject
attributes_, EQ, GT, LT, QUOTE, SLASH, tagName_, XML_START
 
Constructor Summary
Label()
          Basic Constructor
Label(java.lang.String xml)
          Creates a Label object using specified XML content
 
Method Summary
 void addFormData(FormData fd)
          Add a FormData
 void addFormData(java.lang.String name, java.lang.String value)
          Add a FormData custom property to this Label
 void addProperties(java.util.Properties p)
          Add a set of properties as FormData objects in this label
 java.lang.String getCompanyPrefix()
          Gets the company prefix
 EpcData getEpcData()
          Gets the EPC data
 java.lang.String getEpcEncoding()
          Gets the EPC encoding
 FormData getFormData(java.lang.String name)
          Gets a FormData object based on specified FormData name
 java.util.Enumeration getFormDatas()
          Return all the FormData objects associated with this Label object.
 java.lang.String getQuantity()
          Gets the quantity of labels that are to be printed
 java.lang.String getTemplateBarcodeKey()
          Gets the template barcode key
 java.lang.String getTemplateEpcKey()
          Gets the template EPC key
 java.lang.String getTemplateName()
          Gets the template name
 java.lang.String getUnitType()
          Gets the unit type
 void setEpcData(EpcData ed)
          Sets the EpcData object for this Label to the parameter.
 void setQuantity(int i)
          Set the number of labels you want printed
 void setTemplateBarcodeKey(java.lang.String s)
          Sets the new template barcode key
 void setTemplateEpcKey(java.lang.String s)
          Sets the new template EPC key
 void setTemplateName(java.lang.String s)
          Sets the template name
 void setUnitType(java.lang.String s)
          Sets the new unit type
 java.lang.String toXmlString(boolean isTop)
          Creates an XML string representation of this AbsstractXMLObject
 
Methods inherited from class com.ibm.rfid.premises.app.entities.AbstractXmlObject
getEndTag, getNodeListFromString, getStartTag, getStringFromElement
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LABEL

public static final java.lang.String LABEL
xml tag name used to describe a Label

See Also:
toXmlString(boolean), Constant Field Values
Constructor Detail

Label

public Label()
Basic Constructor


Label

public Label(java.lang.String xml)
      throws XmlConvertException
Creates a Label object using specified XML content

Parameters:
xml -
Throws:
XmlConvertException
Method Detail

setQuantity

public void setQuantity(int i)
Set the number of labels you want printed

Parameters:
i - number of labels to print

addProperties

public void addProperties(java.util.Properties p)
Add a set of properties as FormData objects in this label

Parameters:
p - Properties to add to this label
See Also:
addFormData(FormData)

getQuantity

public java.lang.String getQuantity()
Gets the quantity of labels that are to be printed

Returns:
current number of labels that are to be printed for this Label object

setTemplateBarcodeKey

public void setTemplateBarcodeKey(java.lang.String s)
Sets the new template barcode key

Parameters:
s - new template barcode key

getTemplateBarcodeKey

public java.lang.String getTemplateBarcodeKey()
Gets the template barcode key

Returns:
the template barcode key

setTemplateEpcKey

public void setTemplateEpcKey(java.lang.String s)
Sets the new template EPC key

Parameters:
s - new template EPC key

getTemplateEpcKey

public java.lang.String getTemplateEpcKey()
Gets the template EPC key

Returns:
the template EPC key

setTemplateName

public void setTemplateName(java.lang.String s)
Sets the template name

Parameters:
s - the print template that is to be used for this Label object

getTemplateName

public java.lang.String getTemplateName()
Gets the template name

Returns:
print template name that is to be used for the Label objec

setUnitType

public void setUnitType(java.lang.String s)
Sets the new unit type

Parameters:
s - the new unit type for this Label

getUnitType

public java.lang.String getUnitType()
Gets the unit type

Returns:
the unit type for this label

addFormData

public void addFormData(java.lang.String name,
                        java.lang.String value)
Add a FormData custom property to this Label

Parameters:
name - name of FormData to be added
value - value of FormData to be added

addFormData

public void addFormData(FormData fd)
Add a FormData

Parameters:
fd - FormData to be added to Label

getFormData

public FormData getFormData(java.lang.String name)
Gets a FormData object based on specified FormData name

Parameters:
name - name of FormData to search for
Returns:
a FormData

getFormDatas

public java.util.Enumeration getFormDatas()
Return all the FormData objects associated with this Label object.

Returns:
Enumeration of FormData objects

getCompanyPrefix

public java.lang.String getCompanyPrefix()
Gets the company prefix

Returns:
company prefix for this Label

getEpcEncoding

public java.lang.String getEpcEncoding()
Gets the EPC encoding

Returns:
EPC encoding for this Label

getEpcData

public EpcData getEpcData()
Gets the EPC data

Returns:
the EpcData object used to describe tag information for this Label

setEpcData

public void setEpcData(EpcData ed)
Sets the EpcData object for this Label to the parameter.

Parameters:
ed - the new EpcData object

toXmlString

public java.lang.String toXmlString(boolean isTop)
Description copied from class: AbstractXmlObject
Creates an XML string representation of this AbsstractXMLObject

Specified by:
toXmlString in class AbstractXmlObject
Parameters:
isTop - decides whether or not the XML_START field is appended to the output of this method. Should be true if this AbstractXmlObject is the root element.
Returns:
an XML String representing this AbstractXmlObject.
See Also:
AbstractXmlObject.toXmlString(boolean)


Copyright © 2005 - 2009 IBM Corp. All Rights Reserved.