public abstract class PMMLModel extends Object
Modifier and Type | Class and Description |
---|---|
static class |
PMMLModel.MiningFunction
Enumeration of values for the "functionName" attribute
|
Modifier | Constructor and Description |
---|---|
protected |
PMMLModel()
Default constructor.
|
protected |
PMMLModel(PMMLModelSpec objectSpec)
Create a model, specifying a model spec.
|
Modifier and Type | Method and Description |
---|---|
protected abstract 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.
|
String |
getAnnotationText()
Returns the value of the
Annotation sub-element. |
protected abstract String |
getModelElementName()
Return the element name of the primary model element associated with
this PMML
|
ModelExplanation |
getModelExplanation()
Returns the value of the
ModelExplanation sub-element. |
PMMLModelSpec |
getModelSpec()
Returns the meta-information associated with this PMML model
|
PMMLVersion |
getVersion()
Returns the PMML version used by this model
|
protected void |
parse(Document document)
To be invoked by subclasses constructor.
|
protected abstract void |
parseModelElement(Element element)
Parse the given model element into the respective model object.
|
void |
setAnnotationText(String annotationText)
Sets the value of the
Annotation sub-element. |
void |
setModelExplanation(ModelExplanation modelExplanation)
Sets the value of the
ModelExplanation sub-element. |
void |
setVersion(PMMLVersion version)
Sets the PMML version used by this model
|
Document |
toPMML()
Returns a PMML document from this PMMLModel.
|
protected PMMLModel(PMMLModelSpec objectSpec)
objectSpec
- the model specprotected PMMLModel()
Document
, invokes this constructor and then invokes parse(Document)
.public PMMLVersion getVersion()
public void setVersion(PMMLVersion version)
version
- the PMML versionpublic final PMMLModelSpec getModelSpec()
public ModelExplanation getModelExplanation()
ModelExplanation
sub-element.public void setModelExplanation(ModelExplanation modelExplanation)
ModelExplanation
sub-element.modelExplanation
- the model explanationpublic final String getAnnotationText()
Annotation
sub-element.Annotation
sub-element.public final void setAnnotationText(String annotationText)
Annotation
sub-element.annotationText
- the value of the Annotation
sub-element.public final Document toPMML()
protected final void parse(Document document)
Document
.document
- the PMML documentprotected abstract String getModelElementName()
protected abstract void buildModelElement(Element element)
element
- the model elementprotected abstract void parseModelElement(Element element)
element
- root element of model objectprotected Element findModelElement(Document document)
the model
element name
. In general the default implementation is sufficient; this is
primarily intended for PMMLModels whose model element is a PMML extension.document
- The PMML document.Copyright © 2020 Actian Corporation. All rights reserved.