org.formaria.editor.data.pojo
Class PropertiesRetriever

java.lang.Object
  extended by org.formaria.editor.data.pojo.PropertiesRetriever
All Implemented Interfaces:
PropertiesAccessor

public class PropertiesRetriever
extends java.lang.Object
implements PropertiesAccessor

Used for storing the additional data of the visualiser tree model nodes.

Copyright (c) Formaria Ltd., 2001-2007, This software is licensed under the GNU Public License (GPL), please see license.txt for more details. If you make commercial use of this software you must purchase a commercial license from Formaria.


Field Summary
protected  java.util.Hashtable attributeHash
           
protected  java.util.Hashtable propertyHash
           
 
Constructor Summary
PropertiesRetriever()
           
 
Method Summary
 boolean containsProperty(PojoModelVis model, java.lang.String property)
          Indicates whether the property of the given model has been stored
protected  java.lang.String getModelPath(DataModel model)
           
 java.lang.Object getPropertyValue(PojoModelVis model, java.lang.String property)
          Retrieves the value of the given property for the given model node
 void removeProperty(PojoModelVis model, java.lang.String property)
          Removes the given property
 void setPropertyValue(PojoModelVis model, java.lang.String property, java.lang.Object value)
          Saves the given property value
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

propertyHash

protected java.util.Hashtable propertyHash

attributeHash

protected java.util.Hashtable attributeHash
Constructor Detail

PropertiesRetriever

public PropertiesRetriever()
Method Detail

getPropertyValue

public java.lang.Object getPropertyValue(PojoModelVis model,
                                         java.lang.String property)
Description copied from interface: PropertiesAccessor
Retrieves the value of the given property for the given model node

Specified by:
getPropertyValue in interface PropertiesAccessor
Parameters:
model - model which property is to be returned
property - property to be returned
Returns:
value of the property

setPropertyValue

public void setPropertyValue(PojoModelVis model,
                             java.lang.String property,
                             java.lang.Object value)
Description copied from interface: PropertiesAccessor
Saves the given property value

Specified by:
setPropertyValue in interface PropertiesAccessor
Parameters:
model - model which property is to be saved
property - the name of the property to be saved
value - value to be saved

removeProperty

public void removeProperty(PojoModelVis model,
                           java.lang.String property)
Description copied from interface: PropertiesAccessor
Removes the given property

Specified by:
removeProperty in interface PropertiesAccessor
Parameters:
model - model whose property is to be removed
property - the name of the property

containsProperty

public boolean containsProperty(PojoModelVis model,
                                java.lang.String property)
Description copied from interface: PropertiesAccessor
Indicates whether the property of the given model has been stored

Specified by:
containsProperty in interface PropertiesAccessor
Parameters:
model - the model which property is to be queried
Returns:
true if the property value has been set, false otherwise

getModelPath

protected java.lang.String getModelPath(DataModel model)