gov.sandia.cognition.framework.learning.converter
Class CogxelVectorCollectionConverter

java.lang.Object
  extended by gov.sandia.cognition.framework.learning.converter.CogxelVectorCollectionConverter
All Implemented Interfaces:
CogxelConverter<Collection<Vector>>, CloneableSerializable, Serializable, Cloneable

public class CogxelVectorCollectionConverter
extends Object
implements CogxelConverter<Collection<Vector>>

Converts a Collection of Vectors to and from a CogxelState

Since:
2.0
Author:
Kevin R. Dixon
See Also:
Serialized Form

Constructor Summary
CogxelVectorCollectionConverter(CogxelVectorCollectionConverter other)
          Copy Constructor
CogxelVectorCollectionConverter(CogxelVectorConverter... vectorConverters)
          Creates a new instance of CogxelVectorCollectionConverter
CogxelVectorCollectionConverter(Collection<CogxelVectorConverter> cogxelVectorConverters)
          Creates a new instance of CogxelVectorCollectionConverter
 
Method Summary
 CogxelVectorCollectionConverter clone()
          Creates a new clone (shallow copy) of this object.
 ArrayList<Vector> fromCogxels(CogxelState cogxels)
          Converts from a CogxelState object to an object of type DataType.
 Collection<CogxelVectorConverter> getCogxelVectorConverters()
          Getter for cogxelVectorConverters
 int getNumVectors()
          Gets the number of Vectors that this class converts
 SemanticIdentifierMap getSemanticIdentifierMap()
          Gets the SemanticIdentifierMap used by this converter.
protected  void setCogxelVectorConverters(Collection<CogxelVectorConverter> cogxelVectorConverters)
          Setter for cogxelVectorConverters
 void setSemanticIdentifierMap(SemanticIdentifierMap semanticIdentifierMap)
          Sets the SemanticIdentifierMap that the converter is to use.
 void toCogxels(Collection<Vector> data, CogxelState cogxels)
          Converts from an object of type DataType to an updated CogxelState.
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CogxelVectorCollectionConverter

public CogxelVectorCollectionConverter(Collection<CogxelVectorConverter> cogxelVectorConverters)
Creates a new instance of CogxelVectorCollectionConverter

Parameters:
cogxelVectorConverters - Collection of CogxelVectorConverters that do the heavy lifting

CogxelVectorCollectionConverter

public CogxelVectorCollectionConverter(CogxelVectorConverter... vectorConverters)
Creates a new instance of CogxelVectorCollectionConverter

Parameters:
vectorConverters - Array of CogxelVectorConverters that do the heavy lifting

CogxelVectorCollectionConverter

public CogxelVectorCollectionConverter(CogxelVectorCollectionConverter other)
Copy Constructor

Parameters:
other - CogxelVectorCollectionConverter to copy
Method Detail

clone

public CogxelVectorCollectionConverter clone()
Creates a new clone (shallow copy) of this object.

Specified by:
clone in interface CogxelConverter<Collection<Vector>>
Specified by:
clone in interface CloneableSerializable
Overrides:
clone in class Object
Returns:
A new clone (shallow copy) of this object.

fromCogxels

public ArrayList<Vector> fromCogxels(CogxelState cogxels)
Converts from a CogxelState object to an object of type DataType.

Specified by:
fromCogxels in interface CogxelConverter<Collection<Vector>>
Parameters:
cogxels - The CogxelState to convert to DataType.
Returns:
An object of DataType extracted from the given CogxelState.

toCogxels

public void toCogxels(Collection<Vector> data,
                      CogxelState cogxels)
Converts from an object of type DataType to an updated CogxelState.

Specified by:
toCogxels in interface CogxelConverter<Collection<Vector>>
Parameters:
data - The object to convert into the CogxelState.
cogxels - The CogxelState to update with the converted data.

getSemanticIdentifierMap

public SemanticIdentifierMap getSemanticIdentifierMap()
Gets the SemanticIdentifierMap used by this converter.

Specified by:
getSemanticIdentifierMap in interface CogxelConverter<Collection<Vector>>
Returns:
The SemanticIdentifierMap used by this converter.

setSemanticIdentifierMap

public void setSemanticIdentifierMap(SemanticIdentifierMap semanticIdentifierMap)
Sets the SemanticIdentifierMap that the converter is to use.

Specified by:
setSemanticIdentifierMap in interface CogxelConverter<Collection<Vector>>
Parameters:
semanticIdentifierMap - The SemanticIdentifierMap the converter is to use.

getNumVectors

public int getNumVectors()
Gets the number of Vectors that this class converts

Returns:
number of Vectors that this class converts

getCogxelVectorConverters

public Collection<CogxelVectorConverter> getCogxelVectorConverters()
Getter for cogxelVectorConverters

Returns:
Collection of CogxelVectorConverters that do the heavy lifting

setCogxelVectorConverters

protected void setCogxelVectorConverters(Collection<CogxelVectorConverter> cogxelVectorConverters)
Setter for cogxelVectorConverters

Parameters:
cogxelVectorConverters - Collection of CogxelVectorConverters that do the heavy lifting