Package org.apache.uima.ruta.caseditor.view.tree

Examples of org.apache.uima.ruta.caseditor.view.tree.AnnotationTreeNode


  }

  @Override
  public String getText(Object element) {
    if (element instanceof AnnotationTreeNode) {
      AnnotationTreeNode fnNode = (AnnotationTreeNode) element;
      if (fnNode.getAnnotation() != null) {
        String typeName = fnNode.getAnnotation().getType().getName();
        String coveredText = fnNode.getAnnotation().getCoveredText();
        coveredText = coveredText.replaceAll("[\\n]", "").replaceAll("[\\r]", "");
        if (typeName.equals(ICasEvaluator.FALSE_POSITIVE)
                || typeName.equals(ICasEvaluator.FALSE_NEGATIVE)
                || typeName.equals(ICasEvaluator.TRUE_POSITIVE)) {
          return coveredText;
        }
        String name = TextUtils.shrinkNamespace(fnNode.getAnnotation().getType().getName());
        return (name + ": " + coveredText);
      }
    }
    if (element instanceof TypeTreeNode) {
      TypeTreeNode testNode = (TypeTreeNode) element;
View Full Code Here


    if (parentElement instanceof TypeTreeNode) {
      TypeTreeNode node = (TypeTreeNode) parentElement;
      return node.getChildren();
    }
    if (parentElement instanceof AnnotationTreeNode) {
      AnnotationTreeNode node = (AnnotationTreeNode) parentElement;
      return node.getChildren();
    }
    return empty;
  }
View Full Code Here

        TypeTreeNode parentTypeNode = containsTypeNode(fproot, originalfs);
        if (parentTypeNode == null && originalfs != null) {
          parentTypeNode = new TypeTreeNode(fproot, originalfs.getType());
          fproot.addChild(parentTypeNode);
        }
        AnnotationTreeNode newNode = new AnnotationTreeNode(parentTypeNode, a);
        if (parentTypeNode != null) {
          parentTypeNode.addChild(newNode);
        } else {
          RutaAddonsPlugin.error(new IllegalArgumentException(
                  "Trying to display unknown type for " + a));
View Full Code Here

  }

  @Override
  public String getText(Object element) {
    if (element instanceof AnnotationTreeNode) {
      AnnotationTreeNode fnNode = (AnnotationTreeNode) element;
      if (fnNode.getAnnotation() != null) {
        String typeName = fnNode.getAnnotation().getType().getName();
        String coveredText = fnNode.getAnnotation().getCoveredText();
        coveredText = coveredText.replaceAll("[\\n]", "").replaceAll("[\\r]", "");
        if (typeName.equals(ICasEvaluator.FALSE_POSITIVE)
                || typeName.equals(ICasEvaluator.FALSE_NEGATIVE)
                || typeName.equals(ICasEvaluator.TRUE_POSITIVE)) {
          return coveredText;
        }
        String name = TextUtils.shrinkNamespace(fnNode.getAnnotation().getType().getName());
        return (name + ": " + coveredText);
      }
    }
    if (element instanceof TypeTreeNode) {
      TypeTreeNode testNode = (TypeTreeNode) element;
View Full Code Here

TOP

Related Classes of org.apache.uima.ruta.caseditor.view.tree.AnnotationTreeNode

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.