org.knime.core.data.property
Class ShapeHandler

java.lang.Object
  extended by org.knime.core.data.property.ShapeHandler
All Implemented Interfaces:
PropertyHandler

public final class ShapeHandler
extends Object
implements PropertyHandler

Final ShapeHandler implementation which keeps a ShapeModel to request Shape objects from.

Author:
Thomas Gabriel, University of Konstanz

Nested Class Summary
(package private) static interface ShapeHandler.ShapeModel
          Internal ShapeModel used to request Shape objects by DataCell attribute value.
 
Constructor Summary
ShapeHandler(ShapeHandler.ShapeModel model)
          Creates a new ShapeHandler based on the the given ShapeModel.
 
Method Summary
 boolean equals(Object obj)
          
 ShapeFactory.Shape getShape(DataCell dc)
          Returns a Shape of the given DataCell.
 int hashCode()
          
static ShapeHandler load(ConfigRO config)
          Reads ShapeModel from the given Config and returns a new ShapeHandler.
 void save(ConfigWO config)
          Save the ShapeModel class and settings to the given Config.
 String toString()
          Returns a string summary of the underlying ShapeHandler.ShapeModel.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ShapeHandler

public ShapeHandler(ShapeHandler.ShapeModel model)
Creates a new ShapeHandler based on the the given ShapeModel.

Parameters:
model - The model for shapes.
Throws:
IllegalArgumentException - If the model is null.
Method Detail

getShape

public ShapeFactory.Shape getShape(DataCell dc)
Returns a Shape of the given DataCell.

Parameters:
dc - Value to be used to get a Shape for.
Returns:
A Shape object.

save

public void save(ConfigWO config)
Save the ShapeModel class and settings to the given Config.

Parameters:
config - To write ShapeModel into.
Throws:
NullPointerException - If the config is null.

load

public static ShapeHandler load(ConfigRO config)
                         throws InvalidSettingsException
Reads ShapeModel from the given Config and returns a new ShapeHandler.

Parameters:
config - Read ShapeModel from.
Returns:
A new ShapeHandler object.
Throws:
InvalidSettingsException - The the ShapeModel could not be read.
NullPointerException - If the config is null.

toString

public String toString()
Returns a string summary of the underlying ShapeHandler.ShapeModel.

Overrides:
toString in class Object
Returns:
a string summary

equals

public boolean equals(Object obj)

Overrides:
equals in class Object

hashCode

public int hashCode()

Overrides:
hashCode in class Object


Copyright, 2003 - 2010. All rights reserved.
University of Konstanz, Germany.
Chair for Bioinformatics and Information Mining, Prof. Dr. Michael R. Berthold.
You may not modify, publish, transmit, transfer or sell, reproduce, create derivative works from, distribute, perform, display, or in any way exploit any of the content, in whole or in part, except as otherwise expressly permitted in writing by the copyright owner or as specified in the license file distributed with this product.