|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.knime.core.node.port.pmml.PMMLPortObject
public abstract class PMMLPortObject
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface org.knime.core.node.port.PortObject |
---|
PortObject.PortObjectSerializer<T extends PortObject> |
Field Summary | |
---|---|
protected static String |
CDATA
Constant for CDATA. |
protected static String |
DATA_DICT
Constant for DataDictionary. |
protected static String |
DATA_FIELD
Constant for DataField. |
static String |
PMML_V3_0
Constant for version 3.0. |
static String |
PMML_V3_1
Constant for version 3.1. |
static String |
PMML_V3_2
Constant for version 3.2. |
protected static String |
VALUE
Constant for Value. |
Constructor Summary | |
---|---|
PMMLPortObject()
Default constructor necessary for loading. |
|
PMMLPortObject(PMMLPortObjectSpec spec,
PMMLModelType type)
|
Method Summary | |
---|---|
boolean |
addPMMLContentHandler(String id,
PMMLContentHandler defaultHandler)
Adds a content handler to the master content handler. |
static String |
getLocalSchemaLocation(String version)
Based on the version number the local schema location is returned. |
PMMLModelType |
getModelType()
|
PMMLContentHandler |
getPMMLContentHandler(String id)
|
static PortObject.PortObjectSerializer<PMMLPortObject> |
getPortObjectSerializer()
Static serializer as demanded from PortObject framework. |
PMMLPortObjectSpec |
getSpec()
Get specification to this port object. |
abstract String |
getSummary()
Get a short summary of this PortObject . |
JComponent[] |
getViews()
The returned views are displayed in the out port view of the referring node. |
void |
loadFrom(PMMLPortObjectSpec spec,
InputStream in,
String version)
|
void |
save(OutputStream out)
Writes the port object to valid PMML. |
protected abstract void |
writePMMLModel(TransformerHandler handler)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static final String CDATA
protected static final String DATA_DICT
protected static final String DATA_FIELD
protected static final String VALUE
public static final String PMML_V3_0
public static final String PMML_V3_1
public static final String PMML_V3_2
Constructor Detail |
---|
public PMMLPortObject()
public PMMLPortObject(PMMLPortObjectSpec spec, PMMLModelType type)
spec
- the referring PMMLPortObjectSpec
type
- the type of the PMML modelMethod Detail |
---|
public static String getLocalSchemaLocation(String version)
version
- version 3.0 - 3.2
public static final PortObject.PortObjectSerializer<PMMLPortObject> getPortObjectSerializer()
PortObject
framework.
public boolean addPMMLContentHandler(String id, PMMLContentHandler defaultHandler)
id
- to later on retrieve the registered content handlerdefaultHandler
- specialized content handler interested in certain
parts of the PMML file (ClusteringModel, TreeModel, etc.)
public PMMLContentHandler getPMMLContentHandler(String id)
id
- the id which was used for registration of the handler
public PMMLModelType getModelType()
PMMLModelType
public void save(OutputStream out) throws SAXException, IOException, TransformerConfigurationException
writePMMLModel(TransformerHandler)
instead.
out
- zipped stream which reads the PMML file
SAXException
- if something goes wrong during writing of PMML
IOException
- if the file cannot be written to the directory
TransformerConfigurationException
- if something goes wrong with
the transformation handlerpublic abstract String getSummary()
PortObject
.
The return value will be shown in a node port's tooltip, for instance.
getSummary
in interface PortObject
public void loadFrom(PMMLPortObjectSpec spec, InputStream in, String version) throws SAXException, ParserConfigurationException, IOException
spec
- the referring spec of this objectin
- the input stream to write toversion
- the version (3.0 - 3.1)
SAXException
- if something goes wrong during writing
ParserConfigurationException
- if the parser cannot be instantiated
IOException
- if the file cannot be foundpublic PMMLPortObjectSpec getSpec()
PortObjectSpec
which is used to configure any successor node
after execution, e.g. a BufferedDataTable
can return a
DataTableSpec
.
Subclasses should narrow the return type if possible.
getSpec
in interface PortObject
PortObjectSpec
or any derived spec,
never null
.protected abstract void writePMMLModel(TransformerHandler handler) throws SAXException
handler
- the handler responsible for writing the PMML
SAXException
- if something goes wrong during writing the PMMLpublic JComponent[] getViews()
getViews
in interface PortObject
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |