- java.lang.Object
-
- com.pervasive.datarush.analytics.pmml.PMMLModel
-
- com.pervasive.datarush.analytics.pmml.GenericPMMLModel
-
public final class GenericPMMLModel extends PMMLModel
A pass-through PMML Model. Useful in contexts that don't care about specifics of the PMML structure.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.pervasive.datarush.analytics.pmml.PMMLModel
PMMLModel.MiningFunction
-
-
Constructor Summary
Constructors Constructor Description GenericPMMLModel(Document document)
Create a PMMLModel object from a document
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
buildModelElement(Element element)
Subclasses must implement this method to fill-in the contents of the model element.protected Element
findModelElement(Document document)
Subclasses that require custom selection of their model element should override this method.protected String
getModelElementName()
Return the element name of the primary model element associated with this PMMLprotected void
parseModelElement(Element element)
Parse the given model element into the respective model object.-
Methods inherited from class com.pervasive.datarush.analytics.pmml.PMMLModel
getAnnotationText, getModelExplanation, getModelSpec, getVersion, parse, setAnnotationText, setModelExplanation, setVersion, toPMML
-
-
-
-
Constructor Detail
-
GenericPMMLModel
public GenericPMMLModel(Document document)
Create a PMMLModel object from a document- Parameters:
document
- the pmml document
-
-
Method Detail
-
buildModelElement
protected void buildModelElement(Element element)
Description copied from class:PMMLModel
Subclasses must implement this method to fill-in the contents of the model element. At the time this method is invoked, the element will have its name and MiningSchema sub-element populated.- Specified by:
buildModelElement
in classPMMLModel
- Parameters:
element
- the model element
-
getModelElementName
protected String getModelElementName()
Description copied from class:PMMLModel
Return the element name of the primary model element associated with this PMML- Specified by:
getModelElementName
in classPMMLModel
- Returns:
- the element name of the primary model element
-
parseModelElement
protected void parseModelElement(Element element)
Description copied from class:PMMLModel
Parse the given model element into the respective model object.- Specified by:
parseModelElement
in classPMMLModel
- Parameters:
element
- root element of model object
-
findModelElement
protected Element findModelElement(Document document)
Description copied from class:PMMLModel
Subclasses that require custom selection of their model element should override this method. By default, we find the first element that matchesthe model element name
. In general the default implementation is sufficient; this is primarily intended for PMMLModels whose model element is a PMML extension.- Overrides:
findModelElement
in classPMMLModel
- Parameters:
document
- The PMML document.- Returns:
- The model element.
-
-