nz.ac.waikato.mcennis.rat.graph.property
Class InstancesFactory
java.lang.Object
nz.ac.waikato.mcennis.rat.graph.property.InstancesFactory
- All Implemented Interfaces:
- PropertyValueFactory<weka.core.Instances>
public class InstancesFactory
- extends java.lang.Object
- implements PropertyValueFactory<weka.core.Instances>
Factory for serializing and deserializing Instances objects.
Method Summary |
java.lang.String |
exportToString(weka.core.Instances type,
Graph g)
Create a string representing the contents of this object. |
weka.core.Instances |
importFromString(java.lang.String data,
Graph g)
Create an instance of this type from a string. |
protected void |
outputAttribute(java.lang.StringBuffer ret,
weka.core.Attribute value)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
InstancesFactory
public InstancesFactory()
importFromString
public weka.core.Instances 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.Instances>
- Parameters:
data
- string containing the data used to create the objectg
- graph context of the string
- Returns:
- newly constructed object
exportToString
public java.lang.String exportToString(weka.core.Instances 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.Instances>
- Parameters:
type
- object to be serializedg
- graph context of the object
- Returns:
- string representing the content of the object
outputAttribute
protected void outputAttribute(java.lang.StringBuffer ret,
weka.core.Attribute value)