org.fosstrak.ale.server
Class PatternDataField

java.lang.Object
  extended by org.fosstrak.ale.server.PatternDataField

public class PatternDataField
extends java.lang.Object

This clas represents a data field of a tag, filter or group pattern.

Author:
regli

Constructor Summary
PatternDataField(java.lang.String stringRepresentation, PatternUsage usage)
          Constructor parses and validates the string representation of the data field.
 
Method Summary
 int getHigh()
          This method returns the higher limit of the range of this data field if this data field contains a range and throws an exception otherwise.
 int getLow()
          This method returns the lower limit of the range of this data field if this data field contains a range and throws an exception otherwise.
 int getValue()
          This method returns the value of this data field if this data field contains an int and throws an exception otherwise.
 boolean isAsterisk()
          This method indicates if this data field contains an asterisk.
 boolean isDisjoint(PatternDataField field)
          This method indicates if this data field is disjoint to the specified data field.
 boolean isInt()
          This method indicates if this data field contains an int.
 boolean isMember(int fieldValue)
          This method indicates if the specified field value is a member of this data field.
 boolean isRange()
          This method indicates if this data field contains a range.
 boolean isX()
          This method indicates if this data field contains an X.
 java.lang.String toString()
          This method returns a string representation of this data field.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PatternDataField

public PatternDataField(java.lang.String stringRepresentation,
                        PatternUsage usage)
                 throws org.fosstrak.ale.wsdl.ale.epcglobal.ECSpecValidationExceptionResponse
Constructor parses and validates the string representation of the data field.

Parameters:
stringRepresentation - of the data field
usage - of the pattern this data field belongs to
Throws:
org.fosstrak.ale.wsdl.ale.epcglobal.ECSpecValidationException - if the data field is invalid
org.fosstrak.ale.wsdl.ale.epcglobal.ECSpecValidationExceptionResponse
Method Detail

isAsterisk

public boolean isAsterisk()
This method indicates if this data field contains an asterisk.

Returns:
true if this data field contains an asterisk and false otherwise

isX

public boolean isX()
This method indicates if this data field contains an X.

Returns:
true if this data field contains an X and false otherwise

isInt

public boolean isInt()
This method indicates if this data field contains an int.

Returns:
true if this data field contains an int and false otherwise

isRange

public boolean isRange()
This method indicates if this data field contains a range.

Returns:
true if this data field contains a range and false otherwise

getValue

public int getValue()
             throws org.fosstrak.ale.wsdl.ale.epcglobal.ImplementationExceptionResponse
This method returns the value of this data field if this data field contains an int and throws an exception otherwise.

Returns:
value of data field
Throws:
org.fosstrak.ale.wsdl.ale.epcglobal.ImplementationException - if the data field contains not an int
org.fosstrak.ale.wsdl.ale.epcglobal.ImplementationExceptionResponse

getLow

public int getLow()
           throws org.fosstrak.ale.wsdl.ale.epcglobal.ImplementationExceptionResponse
This method returns the lower limit of the range of this data field if this data field contains a range and throws an exception otherwise.

Returns:
lower limit of the range of this data field
Throws:
org.fosstrak.ale.wsdl.ale.epcglobal.ImplementationException - if the data field contains not a range
org.fosstrak.ale.wsdl.ale.epcglobal.ImplementationExceptionResponse

getHigh

public int getHigh()
            throws org.fosstrak.ale.wsdl.ale.epcglobal.ImplementationExceptionResponse
This method returns the higher limit of the range of this data field if this data field contains a range and throws an exception otherwise.

Returns:
higher limit of the range of this data field
Throws:
org.fosstrak.ale.wsdl.ale.epcglobal.ImplementationException - if the data field contains not a range
org.fosstrak.ale.wsdl.ale.epcglobal.ImplementationExceptionResponse

isDisjoint

public boolean isDisjoint(PatternDataField field)
                   throws org.fosstrak.ale.wsdl.ale.epcglobal.ImplementationExceptionResponse
This method indicates if this data field is disjoint to the specified data field.

Parameters:
field - to check disjointness
Returns:
true if the data field are disjoint and false otherwise
Throws:
org.fosstrak.ale.wsdl.ale.epcglobal.ImplementationException - if an implementation exception occurs
org.fosstrak.ale.wsdl.ale.epcglobal.ImplementationExceptionResponse

isMember

public boolean isMember(int fieldValue)
This method indicates if the specified field value is a member of this data field.

Parameters:
fieldValue - to check for member.
Returns:
true if the specified value is member of this data field

toString

public java.lang.String toString()
This method returns a string representation of this data field.

Overrides:
toString in class java.lang.Object
Returns:
string representation


Copyright © 2009. All Rights Reserved.