|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.fosstrak.ale.server.Tag
public class Tag
represents a tag that has been read on one of the readers in the Logical Reader API.
Constructor Summary | |
---|---|
Tag()
constructor for a tag. |
|
Tag(java.lang.String origin)
constructor for a tag. |
|
Tag(java.lang.String origin,
byte[] tagId,
java.lang.String tagIDAsPureURI,
long timestamp)
assignment constructor for Tag. |
|
Tag(Tag tag)
constructs a tag from another existing tag. |
Method Summary | |
---|---|
void |
addTrace(java.lang.String suffix)
prepends a trace to the given trace. |
static java.lang.String |
convert_to_LEGACY(java.lang.String tagLength,
java.lang.String filter,
java.lang.String companyPrefixLength,
java.lang.String tag)
converts a given tag through tdt into LEGACY format. |
static java.lang.String |
convert_to_PURE_IDENTITY(java.lang.String tagLength,
java.lang.String filter,
java.lang.String companyPrefixLength,
java.lang.String tag)
converts a given tag through tdt into PURE_IDENTITY format. |
static java.lang.String |
convert_to_TAG_ENCODING(java.lang.String tagLength,
java.lang.String filter,
java.lang.String companyPrefixLength,
java.lang.String tag)
|
boolean |
equals(java.lang.Object obj)
|
boolean |
equals(Tag tag)
|
boolean |
equalsTag(Tag tag)
comparator to check whether two tags are the same. |
java.lang.String |
getCompanyPrefixLength()
|
java.lang.String |
getFilter()
|
java.lang.String |
getOrigin()
returns the name of the baseReader where the tag has been read. |
java.lang.String |
getReader()
gets the name of the reader that read this tag. |
java.lang.String |
getTagAsBinary()
|
byte[] |
getTagID()
returns the id of this tag. |
java.lang.String |
getTagIDAsPureURI()
returns the id of this tag as pure uri. |
java.lang.String |
getTagLength()
|
static org.fosstrak.tdt.TDTEngine |
getTDTEngine()
|
long |
getTimestamp()
returns the timestamp when the tag occured. |
java.lang.String |
getTrace()
returns the trace path of the tag. |
int |
hashCode()
|
void |
prettyPrint(org.apache.log4j.Logger log,
org.apache.log4j.Level level)
prints a pretty print to the provided logger. |
void |
setCompanyPrefixLength(java.lang.String companyPrefixLength)
|
void |
setFilter(java.lang.String filter)
|
void |
setOrigin(java.lang.String origin)
sets the origin (baseReader) where the tag has been read. |
void |
setReader(java.lang.String reader)
sets the name of the reader that read this tag. when a reader is part of a composite reader then the reader will set to the name of the compositeReader. if you want to get the original reader refer to origin. |
void |
setTagAsBinary(java.lang.String binary)
sets the tag in binary format. |
void |
setTagID(byte[] tagID)
sets the tag id. |
void |
setTagIDAsPureURI(java.lang.String tagIDAsPureURI)
sets the tag id as pure uri. |
void |
setTagLength(java.lang.String tagLength)
|
void |
setTimestamp(long timestamp)
sets the timestamp when a tag has been read. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Tag()
public Tag(java.lang.String origin, byte[] tagId, java.lang.String tagIDAsPureURI, long timestamp)
origin
- reader where the tag was read originallytagId
- the tagIDtimestamp
- the timestamppublic Tag(java.lang.String origin)
origin
- the baseReader where the tag has been readpublic Tag(Tag tag)
tag
- the tag to be copied into a new tagMethod Detail |
---|
public java.lang.String getReader()
public void setReader(java.lang.String reader)
reader
- a name of a logicalReaderpublic byte[] getTagID()
public void setTagID(byte[] tagID)
tagID
- a byte[] holding the tag id.public long getTimestamp()
public void setTimestamp(long timestamp)
timestamp
- time when tag has been read.public void addTrace(java.lang.String suffix)
suffix
- a trace path itempublic java.lang.String getTrace()
public void prettyPrint(org.apache.log4j.Logger log, org.apache.log4j.Level level)
log
- log facility to write the pretty print topublic java.lang.String getOrigin()
public void setOrigin(java.lang.String origin)
origin
- the name of the baseReader where the tag has been read.public boolean equalsTag(Tag tag)
tag
- the other tag to be checked.
public boolean equals(Tag tag)
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String getTagIDAsPureURI()
public void setTagIDAsPureURI(java.lang.String tagIDAsPureURI)
tagIDAsPureURI
- a string holding the tag id.public void setTagAsBinary(java.lang.String binary)
binary
- the tag in binary format.public java.lang.String getTagAsBinary()
public void setTagLength(java.lang.String tagLength)
tagLength
- the tagLength to setpublic java.lang.String getTagLength()
public void setFilter(java.lang.String filter)
filter
- the filter to setpublic java.lang.String getFilter()
public void setCompanyPrefixLength(java.lang.String companyPrefixLength)
companyPrefixLength
- the companyPrefixLength to setpublic java.lang.String getCompanyPrefixLength()
public static org.fosstrak.tdt.TDTEngine getTDTEngine()
public static java.lang.String convert_to_LEGACY(java.lang.String tagLength, java.lang.String filter, java.lang.String companyPrefixLength, java.lang.String tag)
tagLength
- the inbound taglength must be specified as "64" or "96".filter
- the inbound filter value must be specified - range
depends on coding scheme.companyPrefixLength
- length of the EAN.UCC Company Prefix must be
specified for GS1 coding schemes. if set to null paramter is ignored.tag
- the tag to convert in binary format or in TAG_ENCODING.
public static java.lang.String convert_to_PURE_IDENTITY(java.lang.String tagLength, java.lang.String filter, java.lang.String companyPrefixLength, java.lang.String tag)
tagLength
- the inbound taglength must be specified as "64" or "96".filter
- the inbound filter value must be specified - range
depends on coding scheme.companyPrefixLength
- length of the EAN.UCC Company Prefix must be
specified for GS1 coding schemes. if set to null paramter is ignored.tag
- the tag to convert in binary format or in TAG_ENCODING.
public static java.lang.String convert_to_TAG_ENCODING(java.lang.String tagLength, java.lang.String filter, java.lang.String companyPrefixLength, java.lang.String tag)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |