Package org.openiaml.model.drools

Examples of org.openiaml.model.drools.DroolsInferenceEngine$RuleBaseCache


   * Refresh the mappings manually. Also useful for test cases.
   *
   * @throws InferenceException
   */
  public void refreshMappings(EObject resolved, ICreateElementsFactory handler, IProgressMonitor monitor) throws InferenceException {
    DroolsInferenceEngine engine = getEngine(handler);
    engine.create(resolved, new SubProgressMonitor(monitor, 100));
  }
View Full Code Here


  public void refreshContainedMappings(EObject root,
      CreateElementsWithinContainer handler, IProgressMonitor monitor) throws InferenceException {
    monitor.beginTask("Inferring contained elements", 150);
   
    // infer like normal...
    DroolsInferenceEngine engine = getEngine(handler);
    engine.create(root, new SubProgressMonitor(monitor, 100));
   
    // but our handler will remove any incorrect elements
    monitor.subTask("Removing uncontained elements");
    handler.removeUncontainedElements(engine, new SubProgressMonitor(monitor, 50));
   
View Full Code Here

 
  public static final String DROOLS_PLUGIN_ROOT = "../org.openiaml.model.drools/";
 
  public void testPackages() throws Exception {
   
    DroolsInferenceEngine engine =
      new CreateMissingElementsWithDrools(null, false);
   
    Map<String,String> foundPackages = new HashMap<String,String>();
   
    for (String file : engine.getRuleFiles()) {
      // check file
      String input = readFile(new File(DROOLS_PLUGIN_ROOT + file));
      String[] split = input.split("\n");
     
      for (String line : split) {
View Full Code Here

    }
    monitor.worked(10);

    // do inference on the model
    monitor.subTask("Perfoming inference");
    DroolsInferenceEngine ce = getEngine(new EcoreInferenceHandlerFactory());
    ce.create(model, new SubProgressMonitor(monitor, 45));

    if (monitor.isCanceled())
      return Status.CANCEL_STATUS;

    monitor.subTask("Writing to temporary file");
View Full Code Here

    monitor.worked(10);
   
    // use the inference action
    monitor.subTask("Initialising inference engine");
    InferEntireModelAction action = new InferEntireModelAction();
    DroolsInferenceEngine ce = action.getEngine(new EcoreInferenceHandlerFactory());
    monitor.worked(10);

    // do inference
    monitor.subTask("Executing model completion");
    ce.create(target, new SubProgressMonitor(monitor, 80));
   
    // return
    return target;
  }
View Full Code Here

TOP

Related Classes of org.openiaml.model.drools.DroolsInferenceEngine$RuleBaseCache

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.