Class CommonCompilationDTO<T extends org.dmg.pmml.Model>

  • All Implemented Interfaces:
    java.io.Serializable, CompilationDTO<T>

    public class CommonCompilationDTO<T extends org.dmg.pmml.Model>
    extends java.lang.Object
    implements CompilationDTO<T>
    DTO meant to bring around all information needed for compilation, embedding/hiding helper methods
    See Also:
    Serialized Form
    • Field Detail

      • packageName

        protected final java.lang.String packageName
    • Method Detail

      • fromGeneratedPackageNameAndFields

        public static <T extends org.dmg.pmml.Model> CommonCompilationDTO<T> fromGeneratedPackageNameAndFields​(java.lang.String packageName,
                                                                                                               org.dmg.pmml.PMML pmml,
                                                                                                               T model,
                                                                                                               org.kie.pmml.api.compilation.PMMLCompilationContext pmmlContext,
                                                                                                               java.lang.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,
                                                                                                      org.kie.pmml.api.compilation.PMMLCompilationContext pmmlContext,
                                                                                                      java.lang.String fileName,
                                                                                                      java.lang.String packageName,
                                                                                                      java.util.List<org.dmg.pmml.Field<?>> fields)
        Builder that preserve given packageName and fields CompilationDTO
        Parameters:
        pmml -
        model -
        pmmlContext -
        fileName -
        packageName -
        fields -
      • getPmml

        public org.dmg.pmml.PMML getPmml()
        Description copied from interface: CompilationDTO
        The original PMML
        Specified by:
        getPmml in interface CompilationDTO<T extends org.dmg.pmml.Model>
        Returns:
      • getMiningSchema

        public org.dmg.pmml.MiningSchema getMiningSchema()
        Specified by:
        getMiningSchema in interface CompilationDTO<T extends org.dmg.pmml.Model>
      • getMiningFunction

        public org.dmg.pmml.MiningFunction getMiningFunction()
        Specified by:
        getMiningFunction in interface CompilationDTO<T extends org.dmg.pmml.Model>
      • getLocalTransformations

        public org.dmg.pmml.LocalTransformations getLocalTransformations()
        Specified by:
        getLocalTransformations in interface CompilationDTO<T extends org.dmg.pmml.Model>
      • getOutput

        public org.dmg.pmml.Output getOutput()
        Specified by:
        getOutput in interface CompilationDTO<T extends org.dmg.pmml.Model>
      • getTargets

        public org.dmg.pmml.Targets getTargets()
        Specified by:
        getTargets in interface CompilationDTO<T extends org.dmg.pmml.Model>
      • getFields

        public java.util.List<org.dmg.pmml.Field<?>> getFields()
        Description copied from interface: CompilationDTO
        Should contain all fields retrieved from model, i.e. DataFields from DataDictionary, DerivedFields from Transformations/LocalTransformations, OutputFields
        Specified by:
        getFields in interface CompilationDTO<T extends org.dmg.pmml.Model>
        Returns:
      • getTargetDataField

        public org.dmg.pmml.DataField getTargetDataField()
        Specified by:
        getTargetDataField in interface CompilationDTO<T extends org.dmg.pmml.Model>
      • getOpType

        public org.dmg.pmml.OpType getOpType()
        Specified by:
        getOpType in interface CompilationDTO<T extends org.dmg.pmml.Model>
      • getModelName

        public java.lang.String getModelName()
        Description copied from interface: CompilationDTO
        Returns the model name of the underlying Model
        Specified by:
        getModelName in interface CompilationDTO<T extends org.dmg.pmml.Model>
        Returns:
      • getFileName

        public java.lang.String getFileName()
        Description copied from interface: CompilationDTO
        Returns the name of the file containing the Model, without the suffix `.pmml`
        Specified by:
        getFileName in interface CompilationDTO<T extends org.dmg.pmml.Model>
        Returns:
      • getPackageName

        public java.lang.String getPackageName()
        Description copied from interface: CompilationDTO
        The sanitized base package name
        Specified by:
        getPackageName in interface CompilationDTO<T extends org.dmg.pmml.Model>
        Returns:
      • getSimpleClassName

        public java.lang.String getSimpleClassName()
        Description copied from interface: CompilationDTO
        Returns the simple, sanitized class name
        Specified by:
        getSimpleClassName in interface CompilationDTO<T extends org.dmg.pmml.Model>
        Returns:
      • getPackageCanonicalClassName

        public java.lang.String getPackageCanonicalClassName()
        Description copied from interface: CompilationDTO
        Returns the full, canonical, sanitized class name
        Specified by:
        getPackageCanonicalClassName in interface CompilationDTO<T extends org.dmg.pmml.Model>
        Returns:
      • compileClasses

        public java.util.Map<java.lang.String,​byte[]> compileClasses​(java.util.Map<java.lang.String,​java.lang.String> sourcesMap)
        Description copied from interface: CompilationDTO
        Compile the given sources and add them to given Classloader of the current instance. Returns the Class with the current canonicalClassName
        Specified by:
        compileClasses in interface CompilationDTO<T extends org.dmg.pmml.Model>
        Returns:
      • getPmmlContext

        public org.kie.pmml.api.compilation.PMMLCompilationContext getPmmlContext()
        Specified by:
        getPmmlContext in interface CompilationDTO<T extends org.dmg.pmml.Model>
      • getPMML_MODEL

        public org.kie.pmml.api.enums.PMML_MODEL getPMML_MODEL()
        Specified by:
        getPMML_MODEL in interface CompilationDTO<T extends org.dmg.pmml.Model>
      • getMINING_FUNCTION

        public org.kie.pmml.api.enums.MINING_FUNCTION getMINING_FUNCTION()
        Specified by:
        getMINING_FUNCTION in interface CompilationDTO<T extends org.dmg.pmml.Model>
      • getOutputFields

        public java.util.List<org.dmg.pmml.OutputField> getOutputFields()