Package org.apache.uima.taeconfigurator

Examples of org.apache.uima.taeconfigurator.InternalErrorCDE


          return SearchEngine.createHierarchyScope(getCollectionReaderIType());
        case DESCRIPTOR_FLOWCONTROLLER:
          return SearchEngine.createHierarchyScope(getFlowControllerIType());
      }
    } catch (JavaModelException e) {
      throw new InternalErrorCDE("unexpected exception", e);
    }
    return null;
  }
View Full Code Here


    TableTreeItem[] items = (null == parent) ? item.getParent().getItems() : parent.getItems();
    for (int i = items.length - 1; i >= 0; i--) {
      if (items[i] == item)
        return i;
    }
    throw new InternalErrorCDE("invalid state"); //$NON-NLS-1$
  }
View Full Code Here

    TypeOrFeature[] result = new TypeOrFeature[a.length - 1];
    for (int i = 0, j = 0; i < a.length; i++) {
      if (!a[i].getName().equals(s)) {
        // debug
        if (j == a.length - 1)
          throw new InternalErrorCDE("feature or type not found: looking for " + s);
        result[j++] = a[i];
      }
    }
    return result;
  }
View Full Code Here

  }

  public static void swapTableTreeItems(TableTreeItem itemBelow, int newSelection) {
    TableTreeItem parent = itemBelow.getParentItem();
    if (null == parent)
      throw new InternalErrorCDE("invalid arg");
    int i = getIndex(itemBelow);
    TableTreeItem itemAbove = parent.getItems()[i - 1];
    TableTreeItem newItemAbove = new TableTreeItem(parent, SWT.NONE, i - 1);
    copyTableTreeItem(newItemAbove, itemBelow);
    TableTreeItem newItemBelow = new TableTreeItem(parent, SWT.NONE, i);
View Full Code Here

      AnalysisEngineMetaData aemd = ae.getAnalysisEngineMetaData();
      ae.destroy();
      return aemd;
    }
   
    throw new InternalErrorCDE("invalid call");
  }
View Full Code Here

      return createByNameImport(fileName);
    } else
      try {
        return createLocationImport(fileName);
      } catch (MalformedURLException e1) {
        throw new InternalErrorCDE("unhandled exception", e1);
      }
  }
View Full Code Here

      }
    } else {
      try {
        input = new XMLInputSource(new File(fileName));
      } catch (IOException e) {
        throw new InternalErrorCDE("invalid state");
      }
    }
    // read the content and merge into our model
    XMLizable inputDescription;
    try {
View Full Code Here

          oMsg.append(", ");
        else
          oMsg.append("\nOverride being removed: \n");
        oMsg.append(namesToRemove[i]);
      } else
        throw new InternalErrorCDE("invalid state");
    }

    if (giveWarningMsg
            && Window.CANCEL == Utility.popOkCancel("Confirm Remove",
                    "Please confirm remove, or Cancel.\n" + msgGroup.toString() + msg.toString()
                            + oMsg.toString(), MessageDialog.WARNING))
      return false;

    // loop thru all things being removed, and remove them
    for (int i = 0; i < itemsToRemove.length; i++) {
      if (isGroup[i]) {
        removeGroup(itemsToRemove[i], namesToRemove[i]);
      } else if (isParameter(itemsToRemove[i])) { // just a plain parameter being
        // removed
        removeParameter(itemsToRemove[i], namesToRemove[i]);
      } else if (isOverride(itemsToRemove[i])) {
        TreeItem parentItem = itemsToRemove[i].getParentItem();
        ConfigurationParameter cp = getCorrespondingModelParm(parentItem);
        cp.setOverrides(removeOverride(cp, getItemIndex(parentItem, itemsToRemove[i])));
        itemsToRemove[i].dispose();
        if (cp.getOverrides().length == 0) {
          removeParameter(parentItem, getName(parentItem));
        }
      } else
        throw new InternalErrorCDE("Invalid state");
    }
    return true;
  }
View Full Code Here

    commonActionFinish();
  }

  private ConfigurationGroup getConfigurationGroup(String groupName) {
    if (groupName.equals(COMMON_GROUP))
      throw new InternalErrorCDE("invalid call");
    ConfigurationGroup[] groups = cpd.getConfigurationGroups();
    for (int i = 0; i < groups.length; i++) {
      if (groupName.equals(groupNameArrayToString(groups[i].getNames())))
        return groups[i];
    }
    throw new InternalErrorCDE("invalid state");
  }
View Full Code Here

      } else {
        ConfigurationGroup cg = getConfigurationGroup(groupName);
        cg.setConfigurationParameters(addParmToArray(cg.getConfigurationParameters(), newCP));
      }
    } else { // no groups
      throw new InternalErrorCDE("invalid state");
    }
    addNewConfigurationParameterToGUI(newCP, group);
    return newCP;
  }
View Full Code Here

TOP

Related Classes of org.apache.uima.taeconfigurator.InternalErrorCDE

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.