Package org.kie.pmml.compiler.api.dto
Class CommonCompilationDTO<T extends org.dmg.pmml.Model>
java.lang.Object
org.kie.pmml.compiler.api.dto.CommonCompilationDTO<T>
- All Implemented Interfaces:
Serializable,CompilationDTO<T>
public class CommonCompilationDTO<T extends org.dmg.pmml.Model>
extends Object
implements CompilationDTO<T>
DTO meant to bring around all information needed for compilation, embedding/hiding helper methods
- See Also:
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptioncompileClasses(Map<String, String> sourcesMap) Compile the given sources and add them to givenClassloaderof the current instance.static <T extends org.dmg.pmml.Model>
CommonCompilationDTO<T>fromGeneratedPackageNameAndFields(String packageName, org.dmg.pmml.PMML pmml, T model, PMMLCompilationContext pmmlContext, String fileName) Builder that create the packageName name from the given one and retrieve fields from pmml and modelstatic <T extends org.dmg.pmml.Model>
CommonCompilationDTO<T>fromPackageNameAndFields(org.dmg.pmml.PMML pmml, T model, PMMLCompilationContext pmmlContext, String fileName, String packageName, List<org.dmg.pmml.Field<?>> fields) Builder that preserve given packageName and fieldsCompilationDTOList<org.dmg.pmml.Field<?>>Should contain all fields retrieved from model, i.e.Returns the name of the file containing theModel, without the suffix `.pmml`org.dmg.pmml.LocalTransformationsorg.dmg.pmml.MiningFunctionorg.dmg.pmml.MiningSchemagetModel()Returns the model name of the underlyingModelorg.dmg.pmml.OpTypeorg.dmg.pmml.OutputList<org.dmg.pmml.OutputField>Returns the full, canonical, sanitized class nameThe sanitized base package nameorg.dmg.pmml.PMMLgetPmml()The originalPMMLReturns the simple, sanitized class nameorg.dmg.pmml.DataFieldorg.dmg.pmml.Targetsorg.dmg.pmml.TransformationDictionaryMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.kie.pmml.compiler.api.dto.CompilationDTO
getKieMiningFields, getKieOutputFields, getKieTargetFields
-
Field Details
-
packageName
-
-
Method Details
-
fromGeneratedPackageNameAndFields
public static <T extends org.dmg.pmml.Model> CommonCompilationDTO<T> fromGeneratedPackageNameAndFields(String packageName, org.dmg.pmml.PMML pmml, T model, PMMLCompilationContext pmmlContext, String fileName) Builder that create the packageName name from the given one and retrieve fields from pmml and model- Parameters:
packageName-pmml-model-pmmlContext-fileName-
-
fromPackageNameAndFields
public static <T extends org.dmg.pmml.Model> CommonCompilationDTO<T> fromPackageNameAndFields(org.dmg.pmml.PMML pmml, T model, PMMLCompilationContext pmmlContext, String fileName, String packageName, List<org.dmg.pmml.Field<?>> fields) Builder that preserve given packageName and fieldsCompilationDTO- Parameters:
pmml-model-pmmlContext-fileName-packageName-fields-
-
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
- 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
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
Description copied from interface:CompilationDTOReturns the model name of the underlyingModel- Specified by:
getModelNamein interfaceCompilationDTO<T extends org.dmg.pmml.Model>- Returns:
-
getFileName
Description copied from interface:CompilationDTOReturns the name of the file containing theModel, without the suffix `.pmml`- Specified by:
getFileNamein interfaceCompilationDTO<T extends org.dmg.pmml.Model>- Returns:
-
getTargetFieldName
- Specified by:
getTargetFieldNamein interfaceCompilationDTO<T extends org.dmg.pmml.Model>
-
getPackageName
Description copied from interface:CompilationDTOThe sanitized base package name- Specified by:
getPackageNamein interfaceCompilationDTO<T extends org.dmg.pmml.Model>- Returns:
-
getSimpleClassName
Description copied from interface:CompilationDTOReturns the simple, sanitized class name- Specified by:
getSimpleClassNamein interfaceCompilationDTO<T extends org.dmg.pmml.Model>- Returns:
-
getPackageCanonicalClassName
Description copied from interface:CompilationDTOReturns the full, canonical, sanitized class name- Specified by:
getPackageCanonicalClassNamein interfaceCompilationDTO<T extends org.dmg.pmml.Model>- Returns:
-
compileClasses
Description copied from interface:CompilationDTOCompile the given sources and add them to givenClassloaderof the current instance. Returns theClasswith the current canonicalClassName- Specified by:
compileClassesin interfaceCompilationDTO<T extends org.dmg.pmml.Model>- Returns:
-
getPmmlContext
- Specified by:
getPmmlContextin interfaceCompilationDTO<T extends org.dmg.pmml.Model>
-
getPMML_MODEL
- Specified by:
getPMML_MODELin interfaceCompilationDTO<T extends org.dmg.pmml.Model>
-
getMINING_FUNCTION
- Specified by:
getMINING_FUNCTIONin interfaceCompilationDTO<T extends org.dmg.pmml.Model>
-
getOutputFields
-