use of org.drools.verifier.misc.DrlPackageParser in project drools by kiegroup.
the class VerifierImpl method addDrlData.
/**
* Adds meta data from DRL to package and rule.
*
* @param drl Package DRL
*/
private void addDrlData(String drl) {
List<DrlRuleParser> rules;
try {
DrlPackageParser pData = addDrlPackageData(drl);
rules = pData.getRules();
} catch (ParseException e) {
rules = DrlRuleParser.findRulesDataFromDrl(drl);
}
addDrlRulesData(rules);
}
use of org.drools.verifier.misc.DrlPackageParser in project drools by kiegroup.
the class VerifierImpl method addDrlPackageData.
private DrlPackageParser addDrlPackageData(String drl) throws ParseException {
DrlPackageParser pData = DrlPackageParser.findPackageDataFromDrl(drl);
RulePackage rPackage = this.result.getVerifierData().getPackageByName(pData.getName());
rPackage.getGlobals().addAll(pData.getGlobals());
rPackage.setDescription(pData.getDescription());
rPackage.getMetadata().addAll(pData.getMetadata());
rPackage.getOtherInfo().putAll(pData.getOtherInformation());
return pData;
}
Aggregations