gov.sandia.cognition.text.convert
Class AbstractSingleTextualConverter<InputType,OutputType extends Textual>

java.lang.Object
  extended by gov.sandia.cognition.util.AbstractCloneableSerializable
      extended by gov.sandia.cognition.data.convert.AbstractDataConverter<InputType,OutputType>
          extended by gov.sandia.cognition.text.convert.AbstractSingleTextualConverter<InputType,OutputType>
Type Parameters:
InputType - The type of input object to convert to text.
OutputType - The type of output textual representation.
All Implemented Interfaces:
DataConverter<InputType,OutputType>, Evaluator<InputType,OutputType>, SingleTextualConverter<InputType,OutputType>, TextualConverter<InputType,OutputType>, CloneableSerializable, Serializable, Cloneable
Direct Known Subclasses:
DocumentFieldConcatenator, DocumentSingleFieldConverter, ObjectToStringTextualConverter

public abstract class AbstractSingleTextualConverter<InputType,OutputType extends Textual>
extends AbstractDataConverter<InputType,OutputType>
implements SingleTextualConverter<InputType,OutputType>

An abstract implementation of the SingleTextualConverter interface. It implements the convert and convertAll methods to call the evaluate method.

Since:
3.1
Author:
Justin Basilico
See Also:
Serialized Form

Constructor Summary
AbstractSingleTextualConverter()
          Creates a new AbstractSingleTextualConverter.
 
Method Summary
 OutputType convert(InputType input)
          Convert an input into its single textual form.
 List<OutputType> convertAll(Iterable<? extends InputType> inputs)
          Convert the given input objects into zero or more textual objects.
 
Methods inherited from class gov.sandia.cognition.util.AbstractCloneableSerializable
clone
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface gov.sandia.cognition.evaluator.Evaluator
evaluate
 

Constructor Detail

AbstractSingleTextualConverter

public AbstractSingleTextualConverter()
Creates a new AbstractSingleTextualConverter.

Method Detail

convert

public OutputType convert(InputType input)
Description copied from interface: SingleTextualConverter
Convert an input into its single textual form.

Specified by:
convert in interface SingleTextualConverter<InputType,OutputType extends Textual>
Parameters:
input - The input to convert.
Returns:
The output textual object.

convertAll

public List<OutputType> convertAll(Iterable<? extends InputType> inputs)
Description copied from interface: TextualConverter
Convert the given input objects into zero or more textual objects. Typically the result is the concatenation of calls to the single convert methods.

Specified by:
convertAll in interface TextualConverter<InputType,OutputType extends Textual>
Parameters:
inputs - The inputs to convert.
Returns:
Zero or more textual objects.