pl.edu.agh.cast.data.converter
Class ConverterSpecification

java.lang.Object
  extended by pl.edu.agh.cast.data.converter.ConverterSpecification
Direct Known Subclasses:
GDM2SchemaConverterSpecification

public abstract class ConverterSpecification
extends Object

A class for encapsulating converter specification. Contains information such as expected input data sets and the type of output data set.

Author:
AGH CAST Team

Constructor Summary
ConverterSpecification(List<ConverterInputEntry> inputEntries, Type outputType)
          Constructor.
 
Method Summary
abstract  IConverter createConverter()
          Creates a new instance of converter.
 boolean equals(Object that)
          
 List<ConverterInputEntry> getInputEntries()
          Returns a list of input entries expected by this converter.
 Type getOutputType()
          Returns the type of conversion output data set.
 int hashCode()
          
 MultiMap<ConverterInputEntry,IDataSet<IElement>> listToInputEntries(List<? extends IDataSet<? extends IElement>> dsList)
          Converts a list of data sets into a map indexed by input entries.
protected  void setInputEntries(List<ConverterInputEntry> inputEntries)
           
protected  void setOutputType(Type outputType)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConverterSpecification

public ConverterSpecification(List<ConverterInputEntry> inputEntries,
                              Type outputType)
Constructor.

Parameters:
inputEntries - a list of input entries expected by this converter
outputType - the type of conversion output data set
Method Detail

getInputEntries

public final List<ConverterInputEntry> getInputEntries()
Returns a list of input entries expected by this converter.

Returns:
a list of input entries expected by this converter

getOutputType

public final Type getOutputType()
Returns the type of conversion output data set.

Returns:
the type of conversion output data set

setInputEntries

protected final void setInputEntries(List<ConverterInputEntry> inputEntries)

setOutputType

protected final void setOutputType(Type outputType)

createConverter

public abstract IConverter createConverter()
Creates a new instance of converter.

Returns:
new converter instance

listToInputEntries

public MultiMap<ConverterInputEntry,IDataSet<IElement>> listToInputEntries(List<? extends IDataSet<? extends IElement>> dsList)
Converts a list of data sets into a map indexed by input entries. If conversion is not possible then an exception is thrown.

Parameters:
dsList - list of data sets
Returns:
map of data sets indexed by input entries
Throws:
ConverterException - if list conversion is not possible

equals

public final boolean equals(Object that)

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

hashCode

public final int hashCode()

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


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