org.fosstrak.ale.server
Class Pattern

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

public class Pattern
extends java.lang.Object

This class represents an tag, filter or group pattern.

Author:
regli

Constructor Summary
Pattern(java.lang.String pattern, PatternUsage usage)
          Contructor sets the usage and parses the pattern.
 
Method Summary
 PatternDataField getCompany()
          This method returns the company of this pattern.
 java.util.List<PatternDataField> getDataFields()
          This method returns the data fields of this pattern.
 PatternDataField getFilter()
          This method returns the filter of this pattern.
 java.lang.String getGroupName(java.lang.String tagURI)
          This method returns the group name for a tag depending on this group pattern.
 PatternDataField getItem()
          This method returns the item of this pattern.
 PatternDataField getSerial()
          This method returns the serial of this patern.
 PatternType getType()
          This method returns the type of this pattern.
 boolean isDisjoint(Pattern pattern)
          This method indicates if this pattern is disjoint to the specified pattern.
 boolean isDisjoint(java.lang.String pattern)
          This method indicates if this pattern is disjoint to the specified pattern.
 boolean isMember(java.lang.String tagURI)
          This method indicates if a tag is member of this filter or group pattern.
 java.lang.String toString()
          This method returns a string representation of this pattern.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Pattern

public Pattern(java.lang.String pattern,
               PatternUsage usage)
        throws org.fosstrak.ale.wsdl.ale.epcglobal.ECSpecValidationExceptionResponse
Contructor sets the usage and parses the pattern.

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

getType

public PatternType getType()
This method returns the type of this pattern.

Returns:
type of pattern

getFilter

public PatternDataField getFilter()
This method returns the filter of this pattern.

Returns:
filter of pattern

getCompany

public PatternDataField getCompany()
This method returns the company of this pattern.

Returns:
company of pattern

getItem

public PatternDataField getItem()
This method returns the item of this pattern.

Returns:
item of pattern

getSerial

public PatternDataField getSerial()
This method returns the serial of this patern.

Returns:
serial of pattern

getDataFields

public java.util.List<PatternDataField> getDataFields()
This method returns the data fields of this pattern.

Returns:
list of data fields

isDisjoint

public boolean isDisjoint(java.lang.String pattern)
                   throws org.fosstrak.ale.wsdl.ale.epcglobal.ECSpecValidationExceptionResponse,
                          org.fosstrak.ale.wsdl.ale.epcglobal.ImplementationExceptionResponse
This method indicates if this pattern is disjoint to the specified pattern.

Parameters:
pattern - to check disjointness
Returns:
true if the patterns are disjoint and false otherwise
Throws:
org.fosstrak.ale.wsdl.ale.epcglobal.ECSpecValidationException - if the pattern is invalid
org.fosstrak.ale.wsdl.ale.epcglobal.ImplementationException - if an implementation exception occurs
org.fosstrak.ale.wsdl.ale.epcglobal.ECSpecValidationExceptionResponse
org.fosstrak.ale.wsdl.ale.epcglobal.ImplementationExceptionResponse

isDisjoint

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

Parameters:
pattern - to chek disjointness
Returns:
true if the patterns are disjoint and false otherwise
Throws:
org.fosstrak.ale.wsdl.ale.epcglobal.ImplementationException - if an implementation exception occures
org.fosstrak.ale.wsdl.ale.epcglobal.ImplementationExceptionResponse

isMember

public boolean isMember(java.lang.String tagURI)
                 throws org.fosstrak.ale.wsdl.ale.epcglobal.ECSpecValidationExceptionResponse,
                        org.fosstrak.ale.wsdl.ale.epcglobal.ImplementationExceptionResponse
This method indicates if a tag is member of this filter or group pattern. If the pattern is a tag pattern, the return value is null.

Parameters:
tagURI - to check for member
Returns:
true if tag is member of this pattern and false otherwise
Throws:
org.fosstrak.ale.wsdl.ale.epcglobal.ECSpecValidationException - if the tag pattern is invalid
org.fosstrak.ale.wsdl.ale.epcglobal.ImplementationException - if an implementation exception occurs
org.fosstrak.ale.wsdl.ale.epcglobal.ECSpecValidationExceptionResponse
org.fosstrak.ale.wsdl.ale.epcglobal.ImplementationExceptionResponse

getGroupName

public java.lang.String getGroupName(java.lang.String tagURI)
                              throws org.fosstrak.ale.wsdl.ale.epcglobal.ImplementationExceptionResponse,
                                     org.fosstrak.ale.wsdl.ale.epcglobal.ECSpecValidationExceptionResponse
This method returns the group name for a tag depending on this group pattern. If the pattern is not a group pattern or the tag is not a member of this group pattern, the return value is null.

Parameters:
tagURI - to get the group name from
Returns:
group name
Throws:
org.fosstrak.ale.wsdl.ale.epcglobal.ImplementationException - if an implementation exception occurs
org.fosstrak.ale.wsdl.ale.epcglobal.ECSpecValidationException - if the tag pattern is invalid
org.fosstrak.ale.wsdl.ale.epcglobal.ImplementationExceptionResponse
org.fosstrak.ale.wsdl.ale.epcglobal.ECSpecValidationExceptionResponse

toString

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

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


Copyright © 2009. All Rights Reserved.