Uploaded image for project: 'Drools'
  1. Drools
  2. DROOLS-5272

Re-evaluate/refactor KiePMML AST factories

XMLWordPrintable

    • Icon: Task Task
    • Resolution: Done
    • Icon: Major Major
    • None
    • None
    • None
    • 5
    • Medium
    • NEW
    • NEW

      Re-evaluate implementation of KiePMML AST factories in the view of the mining model specifications.

      Reevaluate usage of fieldTypeMap - types.

       

      E.g.: inside 

      DroolsModelProvider.getKiePMMLDroolsASTCommon the 

      Map<String, KiePMMLOriginalTypeGeneratedType> fieldTypeMap is populated invoking 

      addTransformationsDerivedFields. Then, a  List<KiePMMLDroolsType> is created out of this map.

      Later the same map is also populated by 

      KiePMMLDataDictionaryASTFactory.factory(fieldTypeMap).declareTypes(dataDictionary).

      and the List<KiePMMLDroolsType> retrieved by the latter are added to the one created before.

      That means it is not needed to have KiePMMLDerivedFieldASTFactory and KiePMMLDataDictionaryASTFactory returning List<KiePMMLDroolsType> - they can simply instantiate and return a Map<String, KiePMMLOriginalTypeGeneratedType>; the maps may be merged together, and the List<KiePMMLDroolsType> may be created out of that (merged) map.

      So

      1) KiePMMLDataDictionaryASTFactory and KiePMMLDerivedFieldASTFactory should return only a newly instantiated Map<String, KiePMMLOriginalTypeGeneratedType>

      2) inside DroolsModelProvider.getKiePMMLDroolsASTCommon those maps should be merged 

      3) List<KiePMMLDroolsType> should be created out of the merged map 

      4) merged map and  List<KiePMMLDroolsType> should be propagated as parameters

            gcardosi Gabriele Cardosi (Inactive)
            gcardosi Gabriele Cardosi (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: