org.knime.core.data.xml
Class PMMLCellContent

java.lang.Object
  extended by org.knime.core.data.xml.XMLCellContent
      extended by org.knime.core.data.xml.PMMLCellContent
All Implemented Interfaces:
DataValue, PMMLValue, XMLValue

public class PMMLCellContent
extends XMLCellContent
implements PMMLValue

Author:
morent

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.knime.core.data.xml.XMLValue
XMLValue.XMLUtilityFactory
 
Nested classes/interfaces inherited from interface org.knime.core.data.DataValue
DataValue.UtilityFactory
 
Field Summary
 
Fields inherited from interface org.knime.core.data.xml.XMLValue
UTILITY
 
Constructor Summary
PMMLCellContent(Document doc)
          Creates a new instance which encapsulates the passed XML document.
PMMLCellContent(InputStream is)
          Creates a Document by parsing the contents of the passed InputStream.
PMMLCellContent(String xmlString)
          Creates a Document by parsing the passed string.
 
Method Summary
 List<Node> getModels()
          
 List<Node> getModels(org.knime.core.pmml.PMMLModelType type)
          
 Set<org.knime.core.pmml.PMMLModelType> getModelTypes()
          
 String getPMMLVersion()
          
(package private)  String getStringValue()
          Returns the XML Document as a string.
 
Methods inherited from class org.knime.core.data.xml.XMLCellContent
equals, getDocument, hashCode, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.knime.core.data.xml.XMLValue
getDocument
 

Constructor Detail

PMMLCellContent

PMMLCellContent(String xmlString)
          throws IOException,
                 ParserConfigurationException,
                 SAXException,
                 XMLStreamException
Creates a Document by parsing the passed string. It must contain a valid XML document.

Parameters:
xmlString - an XML document
Throws:
IOException - If any IO errors occur.
ParserConfigurationException - If DocumentBuilder cannot be created.
SAXException - If xmlString cannot be parsed
XMLStreamException

PMMLCellContent

PMMLCellContent(InputStream is)
          throws IOException,
                 ParserConfigurationException,
                 SAXException,
                 XMLStreamException
Creates a Document by parsing the contents of the passed InputStream. It must contain a valid XML document.

Parameters:
is - an XML document
Throws:
IOException - If any IO errors occur.
ParserConfigurationException - If DocumentBuilder cannot be created.
SAXException - If xmlString cannot be parsed.
XMLStreamException

PMMLCellContent

PMMLCellContent(Document doc)
Creates a new instance which encapsulates the passed XML document.

Parameters:
doc - an XML document
Method Detail

getPMMLVersion

public String getPMMLVersion()

Specified by:
getPMMLVersion in interface PMMLValue
Returns:
the PMML Version

getModelTypes

public Set<org.knime.core.pmml.PMMLModelType> getModelTypes()

Specified by:
getModelTypes in interface PMMLValue
Returns:
the types of the contained PMML models
See Also:
PMMLModelType

getModels

public List<Node> getModels(org.knime.core.pmml.PMMLModelType type)

Specified by:
getModels in interface PMMLValue
Parameters:
type - the model type of the models
Returns:
a list with all nodes of the specified model type or an empty list if there is no model of such a type

getModels

public List<Node> getModels()

Specified by:
getModels in interface PMMLValue
Returns:
a list with all pmml models

getStringValue

String getStringValue()
Description copied from class: XMLCellContent
Returns the XML Document as a string.

Overrides:
getStringValue in class XMLCellContent
Returns:
The XML Document as a string.


Copyright, 2003 - 2012. 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.