Search in sources :

Example 1 with FactTypes

use of org.drools.workbench.services.verifier.plugin.client.api.FactTypes in project drools-wb by kiegroup.

the class FieldTypeProducer method getFactTypes.

public FactTypes getFactTypes() {
    final FactTypes factTypes = new FactTypes();
    final Map<String, ModelField[]> filteredFactTypes = ((AsyncPackageDataModelOracleImpl) oracle).getFilteredFactTypes();
    for (final String factTypeName : filteredFactTypes.keySet()) {
        final Set<FactTypes.Field> fields = new HashSet<>();
        for (final ModelField modelField : filteredFactTypes.get(factTypeName)) {
            fields.add(new FactTypes.Field(modelField.getName(), modelField.getType()));
        }
        factTypes.add(new FactTypes.FactType(factTypeName, fields));
    }
    return factTypes;
}
Also used : ModelField(org.kie.soup.project.datamodel.oracle.ModelField) AsyncPackageDataModelOracleImpl(org.kie.workbench.common.widgets.client.datamodel.AsyncPackageDataModelOracleImpl) ModelField(org.kie.soup.project.datamodel.oracle.ModelField) FactTypes(org.drools.workbench.services.verifier.plugin.client.api.FactTypes) HashSet(java.util.HashSet)

Aggregations

HashSet (java.util.HashSet)1 FactTypes (org.drools.workbench.services.verifier.plugin.client.api.FactTypes)1 ModelField (org.kie.soup.project.datamodel.oracle.ModelField)1 AsyncPackageDataModelOracleImpl (org.kie.workbench.common.widgets.client.datamodel.AsyncPackageDataModelOracleImpl)1