org.knime.base.node.mine.decisiontree2
Class PMMLDecisionTreePortObject

java.lang.Object
  extended by org.knime.core.node.port.pmml.PMMLPortObject
      extended by org.knime.base.node.mine.decisiontree2.PMMLDecisionTreePortObject
All Implemented Interfaces:
PortObject

public class PMMLDecisionTreePortObject
extends PMMLPortObject
implements PortObject

Author:
Christian Albrecht, University of Konstanz

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.knime.core.node.port.PortObject
PortObject.PortObjectSerializer<T extends PortObject>
 
Field Summary
static PortType TYPE
           
 
Fields inherited from class org.knime.core.node.port.pmml.PMMLPortObject
CDATA, DATA_DICT, DATA_FIELD, PMML_V3_0, PMML_V3_1, PMML_V3_2, VALUE
 
Constructor Summary
PMMLDecisionTreePortObject()
           
PMMLDecisionTreePortObject(DecisionTree tree, PMMLPortObjectSpec spec)
           
 
Method Summary
 String getSummary()
          Get a short summary of this PortObject.
 DecisionTree getTree()
           
 void loadFrom(PMMLPortObjectSpec spec, InputStream stream, String version)
          
protected  void writePMMLModel(TransformerHandler handler)
          
 
Methods inherited from class org.knime.core.node.port.pmml.PMMLPortObject
addPMMLContentHandler, getLocalSchemaLocation, getModelType, getPMMLContentHandler, getPortObjectSerializer, getSpec, getViews, save
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.knime.core.node.port.PortObject
getSpec, getViews
 

Field Detail

TYPE

public static final PortType TYPE
Constructor Detail

PMMLDecisionTreePortObject

public PMMLDecisionTreePortObject(DecisionTree tree,
                                  PMMLPortObjectSpec spec)
Parameters:
tree - underlying decision tree
spec - pmml mining schema of the tree

PMMLDecisionTreePortObject

public PMMLDecisionTreePortObject()
Method Detail

writePMMLModel

protected void writePMMLModel(TransformerHandler handler)
                       throws SAXException

Specified by:
writePMMLModel in class PMMLPortObject
Parameters:
handler - the handler responsible for writing the PMML
Throws:
SAXException - if something goes wrong during writing the PMML

loadFrom

public void loadFrom(PMMLPortObjectSpec spec,
                     InputStream stream,
                     String version)
              throws ParserConfigurationException,
                     SAXException,
                     IOException

Overrides:
loadFrom in class PMMLPortObject
Parameters:
spec - the referring spec of this object
stream - the input stream to write to
version - the version (3.0 - 3.1)
Throws:
ParserConfigurationException - if the parser cannot be instantiated
SAXException - if something goes wrong during writing
IOException - if the file cannot be found

getTree

public DecisionTree getTree()
Returns:
loaded classification tree object

getSummary

public String getSummary()
Get a short summary of this PortObject. The return value will be shown in a node port's tooltip, for instance.

Specified by:
getSummary in interface PortObject
Specified by:
getSummary in class PMMLPortObject
Returns:
Summary of the object's content, suitable for a tooltip. Empty strings and null result values are ok (though not encouraged).


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.