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

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

public class DirectionAnalyzer
extends Object
implements IAnalyzer

Analyzer for the Strings representing a direction.

Author:
AGH CAST Team

Constructor Summary
DirectionAnalyzer()
           
 
Method Summary
 List<Object> analyze(String tokenToAnalyze)
          Analyzes a given token and returns an appropriate object.
 IAnalyzer createCopy()
          Creates a copy of the current analyzer.
 boolean equals(Object obj)
          
 List<String> getInboundDirections()
           
 List<String> getOutboundDirections()
           
 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.
 void setDirections(List<String> inboundDirs, List<String> outboundDirs)
          Sets the inbound and outbound direction texts.
 String toString()
          
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DirectionAnalyzer

public DirectionAnalyzer()
Method Detail

analyze

public List<Object> analyze(String tokenToAnalyze)
                     throws UnsupportedTokenException
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()

setDirections

public void setDirections(List<String> inboundDirs,
                          List<String> outboundDirs)
Sets the inbound and outbound direction texts.

Parameters:
inboundDirs - the inbound direction texts
outboundDirs - the outbound directions texts

getInboundDirections

public List<String> getInboundDirections()

getOutboundDirections

public List<String> getOutboundDirections()

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.