Package org.kie.pmml.pmml_4_2.model
Class AbstractModel<T>
- java.lang.Object
-
- org.kie.pmml.pmml_4_2.model.AbstractModel<T>
-
- All Implemented Interfaces:
PMML4Model
- Direct Known Subclasses:
Miningmodel,Regression,ScorecardModel,Treemodel
public abstract class AbstractModel<T> extends Object implements PMML4Model
-
-
Field Summary
Fields Modifier and Type Field Description protected List<ExternalBeanRef>externalMiningFieldsprotected static PMML4Helperhelperprotected static StringMINING_TEMPLATE_NAMEprotected Map<String,org.dmg.pmml.pmml_4_2.descr.MiningField>miningFieldMapprotected static StringOUTPUT_TEMPLATE_NAMEprotected Map<String,org.dmg.pmml.pmml_4_2.descr.OutputField>outputFieldMapstatic StringPMML_JAVA_PACKAGE_NAMEprotected TrawModelprotected static StringRULE_UNIT_TEMPLATE_NAMEprotected static org.mvel2.templates.TemplateRegistrytemplateRegistry
-
Constructor Summary
Constructors Constructor Description AbstractModel(String modelId, PMML4ModelType modelType, PMML4Unit owner, PMML4Model parentModel, T rawModel)AbstractModel(String modelId, PMML4ModelType modelType, PMML4Unit owner, T rawModel)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract voidaddMiningTemplateToRegistry(org.mvel2.templates.TemplateRegistry registry)protected abstract voidaddOutputTemplateToRegistry(org.mvel2.templates.TemplateRegistry registry)protected abstract voidaddRuleUnitTemplateToRegistry(org.mvel2.templates.TemplateRegistry registry)protected org.mvel2.templates.TemplateRegistryaddTemplateToRegistry(String templateId, String templatePath, org.mvel2.templates.TemplateRegistry registry)PMMLMiningFieldfindMiningField(String fieldName)PMMLOutputFieldfindOutputField(String fieldName)List<PMMLMiningField>getActiveMiningFields()Map<String,PMML4Model>getChildModels()Default method returns an empty Maporg.dmg.pmml.pmml_4_2.descr.DataDictionarygetDataDictionary()StringgetExternalBeansMiningRules()protected org.dmg.pmml.pmml_4_2.descr.ExtensiongetExternalClassInfo(List<org.dmg.pmml.pmml_4_2.descr.Extension> extensions)protected List<ExternalBeanDefinition>getExternalMiningClasses()List<ExternalBeanRef>getExternalMiningFields()Map<String,org.dmg.pmml.pmml_4_2.descr.MiningField>getFilteredMiningFieldMap(boolean includeFiltered, org.dmg.pmml.pmml_4_2.descr.FIELDUSAGETYPE... filterTypes)Map.Entry<String,String>getMappedMiningPojo()Map.Entry<String,String>getMappedOutputPojo()Map.Entry<String,String>getMappedRuleUnit()Map<String,org.dmg.pmml.pmml_4_2.descr.MiningField>getMiningFieldMap()List<PMMLMiningField>getMiningFields()protected StringgetMiningPojoTemplateName()StringgetModelId()StringgetModelPackageName()StringgetModelRuleUnitName()PMML4ModelTypegetModelType()Map<String,org.dmg.pmml.pmml_4_2.descr.OutputField>getOutputFieldMap()List<PMMLOutputField>getOutputFields()protected StringgetOutputPojoTemplateName()Map<String,String>getOutputTargetPojos()PMML4UnitgetOwner()PMML4ModelgetParentModel()List<org.dmg.pmml.pmml_4_2.descr.MiningField>getRawMiningFields()SerializablegetRawModel()List<org.dmg.pmml.pmml_4_2.descr.OutputField>getRawOutputFields()protected StringgetRuleUnitTemplateName()protected org.dmg.pmml.pmml_4_2.descr.MiningFieldgetValidMiningField(PMMLDataField dataField)protected voidinitFieldMaps()protected voidinitMiningFieldMap()protected voidinitOutputFieldMap()protected booleanisUseExternalBeanRefs(org.dmg.pmml.pmml_4_2.descr.MiningSchema schema)voidsetParentModel(PMML4Model parentModel)-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.kie.pmml.pmml_4_2.PMML4Model
getMiningPojoClassName, getMiningSchema, getOutput, getOutputPojoClassName, getRuleUnitClassName
-
-
-
-
Field Detail
-
rawModel
protected T rawModel
-
externalMiningFields
protected List<ExternalBeanRef> externalMiningFields
-
helper
protected static PMML4Helper helper
-
MINING_TEMPLATE_NAME
protected static final String MINING_TEMPLATE_NAME
- See Also:
- Constant Field Values
-
OUTPUT_TEMPLATE_NAME
protected static final String OUTPUT_TEMPLATE_NAME
- See Also:
- Constant Field Values
-
RULE_UNIT_TEMPLATE_NAME
protected static final String RULE_UNIT_TEMPLATE_NAME
- See Also:
- Constant Field Values
-
templateRegistry
protected static org.mvel2.templates.TemplateRegistry templateRegistry
-
PMML_JAVA_PACKAGE_NAME
public static final String PMML_JAVA_PACKAGE_NAME
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
AbstractModel
public AbstractModel(String modelId, PMML4ModelType modelType, PMML4Unit owner, T rawModel)
-
AbstractModel
public AbstractModel(String modelId, PMML4ModelType modelType, PMML4Unit owner, PMML4Model parentModel, T rawModel)
-
-
Method Detail
-
addMiningTemplateToRegistry
protected abstract void addMiningTemplateToRegistry(org.mvel2.templates.TemplateRegistry registry)
-
addOutputTemplateToRegistry
protected abstract void addOutputTemplateToRegistry(org.mvel2.templates.TemplateRegistry registry)
-
addRuleUnitTemplateToRegistry
protected abstract void addRuleUnitTemplateToRegistry(org.mvel2.templates.TemplateRegistry registry)
-
initFieldMaps
protected void initFieldMaps() throws IllegalArgumentException- Throws:
IllegalArgumentException
-
initMiningFieldMap
protected void initMiningFieldMap() throws IllegalArgumentException- Throws:
IllegalArgumentException
-
isUseExternalBeanRefs
protected boolean isUseExternalBeanRefs(org.dmg.pmml.pmml_4_2.descr.MiningSchema schema)
-
getExternalClassInfo
protected org.dmg.pmml.pmml_4_2.descr.Extension getExternalClassInfo(List<org.dmg.pmml.pmml_4_2.descr.Extension> extensions)
-
initOutputFieldMap
protected void initOutputFieldMap()
-
getValidMiningField
protected org.dmg.pmml.pmml_4_2.descr.MiningField getValidMiningField(PMMLDataField dataField)
-
getMiningPojoTemplateName
protected String getMiningPojoTemplateName()
-
getOutputPojoTemplateName
protected String getOutputPojoTemplateName()
-
getRuleUnitTemplateName
protected String getRuleUnitTemplateName()
-
getModelPackageName
public String getModelPackageName()
- Specified by:
getModelPackageNamein interfacePMML4Model
-
getMappedMiningPojo
public Map.Entry<String,String> getMappedMiningPojo()
- Specified by:
getMappedMiningPojoin interfacePMML4Model
-
getMappedOutputPojo
public Map.Entry<String,String> getMappedOutputPojo()
- Specified by:
getMappedOutputPojoin interfacePMML4Model
-
getExternalMiningClasses
protected List<ExternalBeanDefinition> getExternalMiningClasses()
-
getExternalMiningFields
public List<ExternalBeanRef> getExternalMiningFields()
-
getExternalBeansMiningRules
public String getExternalBeansMiningRules()
- Specified by:
getExternalBeansMiningRulesin interfacePMML4Model
-
getMappedRuleUnit
public Map.Entry<String,String> getMappedRuleUnit() throws PMML4Exception
- Specified by:
getMappedRuleUnitin interfacePMML4Model- Throws:
PMML4Exception
-
getMiningFields
public List<PMMLMiningField> getMiningFields()
- Specified by:
getMiningFieldsin interfacePMML4Model
-
findMiningField
public PMMLMiningField findMiningField(String fieldName)
- Specified by:
findMiningFieldin interfacePMML4Model
-
findOutputField
public PMMLOutputField findOutputField(String fieldName)
- Specified by:
findOutputFieldin interfacePMML4Model
-
getOutputFields
public List<PMMLOutputField> getOutputFields()
- Specified by:
getOutputFieldsin interfacePMML4Model
-
getModelType
public PMML4ModelType getModelType()
- Specified by:
getModelTypein interfacePMML4Model
-
getModelId
public String getModelId()
- Specified by:
getModelIdin interfacePMML4Model
-
getOwner
public PMML4Unit getOwner()
- Specified by:
getOwnerin interfacePMML4Model
-
getRawMiningFields
public List<org.dmg.pmml.pmml_4_2.descr.MiningField> getRawMiningFields()
- Specified by:
getRawMiningFieldsin interfacePMML4Model
-
getRawOutputFields
public List<org.dmg.pmml.pmml_4_2.descr.OutputField> getRawOutputFields()
- Specified by:
getRawOutputFieldsin interfacePMML4Model
-
getOutputTargetPojos
public Map<String,String> getOutputTargetPojos() throws PMML4Exception
- Specified by:
getOutputTargetPojosin interfacePMML4Model- Throws:
PMML4Exception
-
getChildModels
public Map<String,PMML4Model> getChildModels()
Default method returns an empty Map- Specified by:
getChildModelsin interfacePMML4Model
-
getParentModel
public PMML4Model getParentModel()
- Specified by:
getParentModelin interfacePMML4Model
-
setParentModel
public void setParentModel(PMML4Model parentModel)
- Specified by:
setParentModelin interfacePMML4Model
-
getFilteredMiningFieldMap
public Map<String,org.dmg.pmml.pmml_4_2.descr.MiningField> getFilteredMiningFieldMap(boolean includeFiltered, org.dmg.pmml.pmml_4_2.descr.FIELDUSAGETYPE... filterTypes)
-
getActiveMiningFields
public List<PMMLMiningField> getActiveMiningFields()
-
getModelRuleUnitName
public String getModelRuleUnitName()
- Specified by:
getModelRuleUnitNamein interfacePMML4Model
-
getDataDictionary
public org.dmg.pmml.pmml_4_2.descr.DataDictionary getDataDictionary()
- Specified by:
getDataDictionaryin interfacePMML4Model
-
getRawModel
public Serializable getRawModel()
- Specified by:
getRawModelin interfacePMML4Model
-
-