use of org.drools.verifier.misc.DrlRuleParser 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.DrlRuleParser in project drools by kiegroup.
the class DroolsDocsBuilder method writePDF.
public void writePDF(OutputStream out) {
// TODO: Use i18n!
Document document = new Document();
try {
PdfWriter.getInstance(document, out);
HeaderFooter footer = DroolsDocsComponentFactory.createFooter(packageData.getName());
document.setFooter(footer);
document.addTitle(packageData.getName().toUpperCase());
document.open();
// First page, documentation info.
DroolsDocsComponentFactory.createFirstPage(document, currentDate, packageData);
document.newPage();
// List index of the rules
document.add(new Phrase("Table of Contents"));
document.add(DroolsDocsComponentFactory.createContents(packageData.getRules()));
document.newPage();
for (DrlRuleParser ruleData : packageData.getRules()) {
DroolsDocsComponentFactory.newRulePage(document, packageData.getName(), ruleData);
}
} catch (DocumentException de) {
System.err.println(de.getMessage());
}
document.close();
}
Aggregations