Package org.kie.pmml.compiler.api.dto
Class AbstractSpecificCompilationDTO<T extends org.dmg.pmml.Model>
- java.lang.Object
-
- org.kie.pmml.compiler.api.dto.AbstractSpecificCompilationDTO<T>
-
- All Implemented Interfaces:
Serializable,CompilationDTO<T>
public abstract class AbstractSpecificCompilationDTO<T extends org.dmg.pmml.Model> extends Object implements CompilationDTO<T>
Abstract class to be extended by all model-specific compilation dtos- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedAbstractSpecificCompilationDTO(org.dmg.pmml.PMML pmml, T model, org.kie.pmml.commons.model.HasClassLoader hasClassloader, String packageName, List<org.dmg.pmml.Field<?>> fields)Protected constructor that generate aCommonCompilationDTOpreserving given packageName and fieldsprotectedAbstractSpecificCompilationDTO(CompilationDTO<T> source)Protected constructor that use givenCompilationDTO
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddFields(List<org.dmg.pmml.Field<?>> toAdd)AddFields to current instance, eventually replacing them if already presentClass<?>compileAndLoadClass(Map<String,String> sourcesMap)Compile the given sources and add them to givenClassloaderof the current instance.List<org.dmg.pmml.Field<?>>getFields()Should contain all fields retrieved from model, i.e.org.kie.pmml.commons.model.HasClassLoadergetHasClassloader()org.dmg.pmml.LocalTransformationsgetLocalTransformations()org.kie.pmml.api.enums.MINING_FUNCTIONgetMINING_FUNCTION()org.dmg.pmml.MiningFunctiongetMiningFunction()org.dmg.pmml.MiningSchemagetMiningSchema()TgetModel()StringgetModelName()Returns the model name of the underlyingModelorg.dmg.pmml.OpTypegetOpType()org.dmg.pmml.OutputgetOutput()StringgetPackageCanonicalClassName()Returns the full, canonical, sanitized class nameStringgetPackageName()The sanitized base package nameorg.dmg.pmml.PMMLgetPmml()The originalPMMLorg.kie.pmml.api.enums.PMML_MODELgetPMML_MODEL()StringgetSimpleClassName()Returns the simple, sanitized class nameprotected CompilationDTO<T>getSource()org.dmg.pmml.DataFieldgetTargetDataField()StringgetTargetFieldName()org.dmg.pmml.TargetsgetTargets()org.dmg.pmml.TransformationDictionarygetTransformationDictionary()
-
-
-
Constructor Detail
-
AbstractSpecificCompilationDTO
protected AbstractSpecificCompilationDTO(org.dmg.pmml.PMML pmml, T model, org.kie.pmml.commons.model.HasClassLoader hasClassloader, String packageName, List<org.dmg.pmml.Field<?>> fields)Protected constructor that generate aCommonCompilationDTOpreserving given packageName and fields- Parameters:
pmml-model-hasClassloader-packageName-
-
AbstractSpecificCompilationDTO
protected AbstractSpecificCompilationDTO(CompilationDTO<T> source)
Protected constructor that use givenCompilationDTO- Parameters:
source-
-
-
Method Detail
-
getPmml
public org.dmg.pmml.PMML getPmml()
Description copied from interface:CompilationDTOThe originalPMML- Specified by:
getPmmlin interfaceCompilationDTO<T extends org.dmg.pmml.Model>- Returns:
-
getTransformationDictionary
public org.dmg.pmml.TransformationDictionary getTransformationDictionary()
- Specified by:
getTransformationDictionaryin interfaceCompilationDTO<T extends org.dmg.pmml.Model>
-
getModel
public T getModel()
- Specified by:
getModelin interfaceCompilationDTO<T extends org.dmg.pmml.Model>
-
getMiningSchema
public org.dmg.pmml.MiningSchema getMiningSchema()
- Specified by:
getMiningSchemain interfaceCompilationDTO<T extends org.dmg.pmml.Model>
-
getMiningFunction
public org.dmg.pmml.MiningFunction getMiningFunction()
- Specified by:
getMiningFunctionin interfaceCompilationDTO<T extends org.dmg.pmml.Model>
-
getLocalTransformations
public org.dmg.pmml.LocalTransformations getLocalTransformations()
- Specified by:
getLocalTransformationsin interfaceCompilationDTO<T extends org.dmg.pmml.Model>
-
getOutput
public org.dmg.pmml.Output getOutput()
- Specified by:
getOutputin interfaceCompilationDTO<T extends org.dmg.pmml.Model>
-
getTargets
public org.dmg.pmml.Targets getTargets()
- Specified by:
getTargetsin interfaceCompilationDTO<T extends org.dmg.pmml.Model>
-
getFields
public List<org.dmg.pmml.Field<?>> getFields()
Description copied from interface:CompilationDTOShould contain all fields retrieved from model, i.e. DataFields from DataDictionary, DerivedFields from Transformations/LocalTransformations, OutputFields- Specified by:
getFieldsin interfaceCompilationDTO<T extends org.dmg.pmml.Model>- Returns:
-
getTargetDataField
public org.dmg.pmml.DataField getTargetDataField()
- Specified by:
getTargetDataFieldin interfaceCompilationDTO<T extends org.dmg.pmml.Model>
-
getOpType
public org.dmg.pmml.OpType getOpType()
- Specified by:
getOpTypein interfaceCompilationDTO<T extends org.dmg.pmml.Model>
-
getModelName
public String getModelName()
Description copied from interface:CompilationDTOReturns the model name of the underlyingModel- Specified by:
getModelNamein interfaceCompilationDTO<T extends org.dmg.pmml.Model>- Returns:
-
getTargetFieldName
public String getTargetFieldName()
- Specified by:
getTargetFieldNamein interfaceCompilationDTO<T extends org.dmg.pmml.Model>
-
getPackageName
public String getPackageName()
Description copied from interface:CompilationDTOThe sanitized base package name- Specified by:
getPackageNamein interfaceCompilationDTO<T extends org.dmg.pmml.Model>- Returns:
-
getSimpleClassName
public String getSimpleClassName()
Description copied from interface:CompilationDTOReturns the simple, sanitized class name- Specified by:
getSimpleClassNamein interfaceCompilationDTO<T extends org.dmg.pmml.Model>- Returns:
-
getPackageCanonicalClassName
public String getPackageCanonicalClassName()
Description copied from interface:CompilationDTOReturns the full, canonical, sanitized class name- Specified by:
getPackageCanonicalClassNamein interfaceCompilationDTO<T extends org.dmg.pmml.Model>- Returns:
-
compileAndLoadClass
public Class<?> compileAndLoadClass(Map<String,String> sourcesMap)
Description copied from interface:CompilationDTOCompile the given sources and add them to givenClassloaderof the current instance. Returns theClasswith the current canonicalClassName- Specified by:
compileAndLoadClassin interfaceCompilationDTO<T extends org.dmg.pmml.Model>- Returns:
- See Also:
HasClassLoader.compileAndLoadClass(Map, String)
-
getHasClassloader
public org.kie.pmml.commons.model.HasClassLoader getHasClassloader()
- Specified by:
getHasClassloaderin interfaceCompilationDTO<T extends org.dmg.pmml.Model>
-
getPMML_MODEL
public org.kie.pmml.api.enums.PMML_MODEL getPMML_MODEL()
- Specified by:
getPMML_MODELin interfaceCompilationDTO<T extends org.dmg.pmml.Model>
-
getMINING_FUNCTION
public org.kie.pmml.api.enums.MINING_FUNCTION getMINING_FUNCTION()
- Specified by:
getMINING_FUNCTIONin interfaceCompilationDTO<T extends org.dmg.pmml.Model>
-
addFields
public void addFields(List<org.dmg.pmml.Field<?>> toAdd)
AddFields to current instance, eventually replacing them if already present- Parameters:
toAdd-
-
getSource
protected CompilationDTO<T> getSource()
-
-