use of org.drools.core.xml.ChangeSetSemanticModule in project drools by kiegroup.
the class KnowledgeBuilderConfigurationImpl method initSemanticModules.
public void initSemanticModules() {
this.semanticModules = new SemanticModules();
RulesSemanticModule ruleModule = new RulesSemanticModule("http://ddefault");
this.semanticModules.addSemanticModule(new WrapperSemanticModule("http://drools.org/drools-5.0", ruleModule));
this.semanticModules.addSemanticModule(new WrapperSemanticModule("http://drools.org/drools-5.2", ruleModule));
this.semanticModules.addSemanticModule(new ChangeSetSemanticModule());
// split on each space
String[] locations = this.chainedProperties.getProperty("semanticModules", "").split("\\s");
// load each SemanticModule
for (String moduleLocation : locations) {
// trim leading/trailing spaces and quotes
moduleLocation = moduleLocation.trim();
if (moduleLocation.startsWith("\"")) {
moduleLocation = moduleLocation.substring(1);
}
if (moduleLocation.endsWith("\"")) {
moduleLocation = moduleLocation.substring(0, moduleLocation.length() - 1);
}
if (!moduleLocation.equals("")) {
loadSemanticModule(moduleLocation);
}
}
}
Aggregations