Package org.apache.uima.ruta.explain.tree

Examples of org.apache.uima.ruta.explain.tree.RuleApplyNode


      if (firstElement instanceof BlockApplyNode) {
        BlockApplyNode block = (BlockApplyNode) firstElement;
        inputChange(block.getBlockRuleNode().getFailedNode());
      } else if (firstElement instanceof RuleApplyNode) {
        RuleApplyNode rule = (RuleApplyNode) firstElement;
        inputChange(rule.getFailedNode());
      }

    }
  }
View Full Code Here


    Type ruleType = document.getCAS().getTypeSystem().getType(ExplainConstants.RULE_APPLY_TYPE);
    IExplainTreeNode root = tree.getRoot();
    List<IExplainTreeNode> children = new ArrayList<IExplainTreeNode>(root.getChildren());
    for (IExplainTreeNode each : children) {
      if (each instanceof RuleApplyNode) {
        RuleApplyNode ran = (RuleApplyNode) each;
        Feature f = ruleType.getFeatureByBaseName(ExplainConstants.ELEMENT);
        if (f != null) {
          String v = ran.getFeatureStructure().getStringValue(f);
          if (!StringUtils.isEmpty(manualFilter) && v.indexOf(manualFilter) == -1) {
            root.removeChild(ran);
          }
        }
      }
View Full Code Here

    ISelection selection = event.getSelection();
    if (!selection.isEmpty() && selection instanceof TreeSelection) {
      TreeSelection s = (TreeSelection) selection;
      Object firstElement = s.getFirstElement();
      if (firstElement instanceof RuleApplyNode) {
        RuleApplyNode node = (RuleApplyNode) firstElement;
        FeatureStructure fs = node.getFeatureStructure();
        if (fs.getType().getName().equals(ExplainConstants.RULE_APPLY_TYPE)) {
          Type t = fs.getType();
          Feature featureId = t.getFeatureByBaseName(ExplainConstants.ID);
          Feature featureScript = t.getFeatureByBaseName(ExplainConstants.SCRIPT);
          int id = fs.getIntValue(featureId);
View Full Code Here

      if (firstElement instanceof BlockApplyNode) {
        BlockApplyNode block = (BlockApplyNode) firstElement;
        inputChange(block.getBlockRuleNode().getMatchedChild());
      } else if (firstElement instanceof RuleApplyNode) {
        RuleApplyNode rule = (RuleApplyNode) firstElement;
        inputChange(rule.getMatchedChild());
      }

    }
  }
View Full Code Here

      if (firstElement instanceof BlockApplyNode) {
        BlockApplyNode block = (BlockApplyNode) firstElement;
        inputChange(block.getBlockRuleNode().getFailedNode());
      } else if (firstElement instanceof RuleApplyNode) {
        RuleApplyNode rule = (RuleApplyNode) firstElement;
        inputChange(rule.getFailedNode());
      }

    }
  }
View Full Code Here

      if (firstElement instanceof BlockApplyNode) {
        BlockApplyNode block = (BlockApplyNode) firstElement;
        inputChange(block.getBlockRuleNode().getMatchedChild());
      } else if (firstElement instanceof RuleApplyNode) {
        RuleApplyNode rule = (RuleApplyNode) firstElement;
        inputChange(rule.getMatchedChild());
      }

    }
  }
View Full Code Here

TOP

Related Classes of org.apache.uima.ruta.explain.tree.RuleApplyNode

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.