pl.edu.agh.cast.importer.base.parser.analyzer
Class StringAnalyzer

java.lang.Object
  extended by pl.edu.agh.cast.importer.base.parser.analyzer.StringAnalyzer
All Implemented Interfaces:
IAnalyzer

public class StringAnalyzer
extends Object
implements IAnalyzer

Analyzer for the String objects.

Author:
AGH CAST Team

Constructor Summary
StringAnalyzer()
           
 
Method Summary
 List<Object> analyze(String tokenToAnalyze)
          Returns list containing String object which is equal to trimmed token.
 IAnalyzer createCopy()
          Creates a copy of the current analyzer.
 boolean equals(Object obj)
          
 List<Class<?>> getReturnTypes()
          Retrieves the return types of the IAnalyzer.analyze(String) method.
 int hashCode()
          
 boolean isComplete()
          Checks whether current analyzer is fully configured - all necessary parameters are present and the the analysis process can be performed.
 void setDefaultValue(String defaultValue)
          Sets the default value for the analyzer.
 String toString()
          
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

StringAnalyzer

public StringAnalyzer()
Method Detail

analyze

public List<Object> analyze(String tokenToAnalyze)
                     throws UnsupportedTokenException
Returns list containing String object which is equal to trimmed token. If token is null or empty ( trim().length == 0), null is returned. Analyzes a given token and returns an appropriate object.

Specified by:
analyze in interface IAnalyzer
Parameters:
tokenToAnalyze - the token to analyze
Returns:
the list of analyzed objects
Throws:
UnsupportedTokenException
See Also:
IAnalyzer.analyze(java.lang.String)

getReturnTypes

public List<Class<?>> getReturnTypes()
Retrieves the return types of the IAnalyzer.analyze(String) method.

Specified by:
getReturnTypes in interface IAnalyzer
Returns:
analysis return types
See Also:
IAnalyzer.getReturnTypes()

setDefaultValue

public void setDefaultValue(String defaultValue)
Sets the default value for the analyzer.

Specified by:
setDefaultValue in interface IAnalyzer
Parameters:
defaultValue - the analyzer's default value
See Also:
IAnalyzer.setDefaultValue(java.lang.String)

createCopy

public IAnalyzer createCopy()
Creates a copy of the current analyzer.

Specified by:
createCopy in interface IAnalyzer
Returns:
analyzer of the same type and parameters set
See Also:
IAnalyzer.createCopy()

isComplete

public boolean isComplete()
Checks whether current analyzer is fully configured - all necessary parameters are present and the the analysis process can be performed.

Specified by:
isComplete in interface IAnalyzer
Returns:
flag indicating the analyzer's completion state
See Also:
IAnalyzer.isComplete()

toString

public String toString()

Overrides:
toString in class Object
See Also:
Object.toString()

equals

public boolean equals(Object obj)

Overrides:
equals in class Object
See Also:
Object.equals(java.lang.Object)

hashCode

public int hashCode()

Overrides:
hashCode in class Object
See Also:
Object.hashCode()


Copyright © 2007-2009 IISG AGH-UST Krakow, Poland. All Rights Reserved.