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 Details

    • packageName

      protected final String 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 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:
    • getTransformationDictionary

      public org.dmg.pmml.TransformationDictionary getTransformationDictionary()
      Specified by:
      getTransformationDictionary in interface CompilationDTO<T extends org.dmg.pmml.Model>
    • getModel

      public T getModel()
      Specified by:
      getModel in interface CompilationDTO<T extends org.dmg.pmml.Model>
    • 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 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 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 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:
    • getTargetFieldName

      public String getTargetFieldName()
      Specified by:
      getTargetFieldName in interface CompilationDTO<T extends org.dmg.pmml.Model>
    • getPackageName

      public 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 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 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 Map<String,byte[]> compileClasses(Map<String,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 PMMLCompilationContext getPmmlContext()
      Specified by:
      getPmmlContext in interface CompilationDTO<T extends org.dmg.pmml.Model>
    • getPMML_MODEL

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

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

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