nz.ac.waikato.mcennis.rat.graph.property
Class InstanceFactory

java.lang.Object
  extended by nz.ac.waikato.mcennis.rat.graph.property.InstanceFactory
All Implemented Interfaces:
PropertyValueFactory<weka.core.Instance>

public class InstanceFactory
extends java.lang.Object
implements PropertyValueFactory<weka.core.Instance>

Factory object for serializing and deserializing weka Instance objects


Constructor Summary
InstanceFactory()
           
 
Method Summary
 java.lang.String exportToString(weka.core.Instance type, Graph g)
          Create a string representing the contents of this object.
 weka.core.Instance importFromString(java.lang.String data, Graph g)
          Create an instance of this type from a string.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InstanceFactory

public InstanceFactory()
Method Detail

importFromString

public weka.core.Instance importFromString(java.lang.String data,
                                           Graph g)
Description copied from interface: PropertyValueFactory
Create an instance of this type from a string.

Specified by:
importFromString in interface PropertyValueFactory<weka.core.Instance>
Parameters:
data - string containing the data used to create the object
g - graph context of the string
Returns:
newly constructed object

exportToString

public java.lang.String exportToString(weka.core.Instance type,
                                       Graph g)
Description copied from interface: PropertyValueFactory
Create a string representing the contents of this object.

Specified by:
exportToString in interface PropertyValueFactory<weka.core.Instance>
Parameters:
type - object to be serialized
g - graph context of the object
Returns:
string representing the content of the object