Examples of FlowControllerDeclaration


Examples of org.apache.uima.analysis_engine.metadata.FlowControllerDeclaration

    else { // is aggregate
      for (Iterator it = editor.getResolvedDelegates().entrySet().iterator(); it.hasNext();) {
        Map.Entry item = (Map.Entry) it.next();
        addDelegateToGUI("", (String) item.getKey(), (ResourceSpecifier) item.getValue());
      }
      FlowControllerDeclaration fcd = editor.getResolvedFlowControllerDeclaration();
      if (null != fcd) {
        addDelegateToGUI("", fcd.getKey(), fcd.getSpecifier());
      }
    }
    enable();
    table.getParent().setRedraw(true);
  }
View Full Code Here

Examples of org.apache.uima.analysis_engine.metadata.FlowControllerDeclaration

                .hasNext();) {
          Map.Entry item = (Map.Entry) it.next();
          addDelegateToGUI(keys + newKey + "/", (String) item.getKey(), (ResourceSpecifier) item
                  .getValue());
        }
        FlowControllerDeclaration fcd = getFlowControllerDeclaration();
        if (null != fcd) {
          addPrimitiveToGUI(keys + fcd.getKey() + "/", ((ResourceCreationSpecifier) editor
                  .getResolvedFlowControllerDeclaration().getSpecifier()));
        }
      }
    }
  }
View Full Code Here

Examples of org.apache.uima.analysis_engine.metadata.FlowControllerDeclaration

  public TypePriorities getMergedTypePriorities() {
    return mergedTypePriorities;
  }

  public void setResolvedFlowControllerDeclaration() throws InvalidXMLException {
    FlowControllerDeclaration fcDecl = aeDescription.getFlowControllerDeclaration();
    if (null != fcDecl) {
      resolvedFlowControllerDeclaration = (FlowControllerDeclaration) fcDecl.clone();
      resolvedFlowControllerDeclaration.resolveImports(createResourceManager());
    } else
      resolvedFlowControllerDeclaration = null;
  }
View Full Code Here

Examples of org.apache.uima.analysis_engine.metadata.FlowControllerDeclaration

              new Capability[] { new Capability_impl() });
      delegateTaeMap.put("Empty", primDesc2);
      URISpecifier uriSpec = new URISpecifier_impl();
      uriSpec.setUri("http://incubator.apache.org/uima");
      uriSpec.setProtocol(Constants.PROTOCOL_SOAP);
      FlowControllerDeclaration fcDecl = new FlowControllerDeclaration_impl();
      fcDecl.setKey("TestFlowController");
      FlowControllerDescription fcDesc = new FlowControllerDescription_impl();
      fcDesc.getMetaData().setName("MyTestFlowController");
      fcDecl.setSpecifier(fcDesc);
      aggregateDesc.setFlowControllerDeclaration(fcDecl);

      ExternalResourceDependency dep = UIMAFramework.getResourceSpecifierFactory()
              .createExternalResourceDependency();
      dep.setKey("ResourceKey");
View Full Code Here

Examples of org.apache.uima.analysis_engine.metadata.FlowControllerDeclaration

      getSection().setDescription(Messages.getString("FlowSection.onlyForAggregates")); //$NON-NLS-1$
    } else {
      getSection().setText(Messages.getString("FlowSection.ComponentEngineFlowTitle")); //$NON-NLS-1$
      getSection().setDescription(Messages.getString("FlowSection.ComponentEngineFlowDescription")); //$NON-NLS-1$

      FlowControllerDeclaration fcd = getFlowControllerDeclaration();
      flowList.setEnabled(true);
      FlowConstraints flowConstraints = getModelFlow();
      FlowNodes nodesModel = new FlowNodes(flowConstraints);
      String[] nodes = nodesModel.getFlow();
      if (null == nodes)
View Full Code Here

Examples of org.apache.uima.analysis_engine.metadata.FlowControllerDeclaration

      String flowTypeGUI = flowControllerChoice.getText();
      if (null == flowTypeGUI || flowTypeGUI.equals(S_))
        return;

      String prevFlowTypeGUI;
      FlowControllerDeclaration fcd = getFlowControllerDeclaration();
      FlowConstraints modelFlow = getModelFlow();
      if (null != fcd)
        prevFlowTypeGUI = USER_DEFINED_FLOW;
      else {
        if (null == modelFlow)
          prevFlowTypeGUI = "";
        else {
          String prevFlowType = modelFlow.getFlowConstraintsType();
          if (CapabilityLanguageFlow.FLOW_CONSTRAINTS_TYPE.equals(prevFlowType))
            prevFlowTypeGUI = CAPABILITY_LANGUAGE_FLOW;
          else
            prevFlowTypeGUI = FIXED_FLOW;
        }
      }

      if (prevFlowTypeGUI.equals(flowTypeGUI))
        return;

      CapabilityLanguageFlow clf = null;
      FixedFlow ff = null;

      String[] nodes = new FlowNodes(modelFlow).getFlow();

      if (flowTypeGUI.equals(CAPABILITY_LANGUAGE_FLOW)) {
        setFlowControllerDeclaration(null);
        getAnalysisEngineMetaData().setFlowConstraints(clf = new CapabilityLanguageFlow_impl());
        clf.setCapabilityLanguageFlow(nodes);
      } else if (flowTypeGUI.equals(FIXED_FLOW)) {
        setFlowControllerDeclaration(null);
        getAnalysisEngineMetaData().setFlowConstraints(ff = new FixedFlow_impl());
        ff.setFixedFlow(nodes);
      } else if (flowTypeGUI.equals(USER_DEFINED_FLOW)) {
        // use case: user set user-defined-flow from some other state.
        // user will have to fill in the import (CDE only supports that format)
        // flow nodes kept, put under "Fixed Flow" arbitrarily
        FlowControllerDeclaration newFcd = new FlowControllerDeclaration_impl();
        setFlowControllerDeclaration(newFcd);
        refreshFcd(newFcd);
        getAnalysisEngineMetaData().setFlowConstraints(ff = new FixedFlow_impl());
        ff.setFixedFlow(nodes);
      }
View Full Code Here

Examples of org.apache.uima.analysis_engine.metadata.FlowControllerDeclaration

    }
  }

  private void handleHoverHelp(Event event) {
    String sDesc = "";
    FlowControllerDeclaration fcd = editor.getResolvedFlowControllerDeclaration();
    String text = flowControllerGUI.getText();
    if (null != fcd && !"".equals(text) && null != fcd.getSpecifier()) {
      sDesc = getDescriptionForDescriptor(flowControllerGUI.getText(), fcd.getSpecifier());
    }
    flowControllerGUI.setToolTipText(sDesc);
  }
View Full Code Here

Examples of org.apache.uima.analysis_engine.metadata.FlowControllerDeclaration

      downButton.setEnabled(false);
      flowChoiceLabel.setEnabled(false);
      flowControllerChoice.setEnabled(false);
      enableFlowControllerGUI(false);
    } else {
      FlowControllerDeclaration fcd = getFlowControllerDeclaration();
      enableFlowControllerGUI(null != fcd);
      flowControllerChoice.setEnabled(true);
      flowChoiceLabel.setEnabled(true);
      int items = flowList.getItemCount();
      int selection = flowList.getSelectionIndex();
View Full Code Here

Examples of org.apache.uima.analysis_engine.metadata.FlowControllerDeclaration

    Import imp = createImport(fullPathFileName, isImportByName);

    // key is shortName plus a suffix if needed to make it unique.
    // The set of existing keys is obtained from the model,
    // not from the GUI table (as was the case in earlier design)
    FlowControllerDeclaration oldFcd = getFlowControllerDeclaration();
    setFlowControllerDeclaration(null);

    String keyName = produceUniqueComponentKey(shortName);
    if (null == keyName) {
      setFlowControllerDeclaration(oldFcd); // revert
      return;
    }

    XMLizable inputDescription = readImport(imp, fullPathFileName, isImportByName);
    if (null == inputDescription) {
      setFlowControllerDeclaration(oldFcd); // revert
      return;
    }

    if (!(inputDescription instanceof FlowControllerDescription)) {
      Utility.popMessage("Invalid kind of descriptor", MessageFormat.format(
              "Operation cancelled: The descriptor ''{0}'' being added is not a FlowController.",
              new Object[] { maybeShortenFileName(fullPathFileName) }), MessageDialog.ERROR);
      setFlowControllerDeclaration(oldFcd); // revert
      return;
    }

    FlowControllerDeclaration fcd = new FlowControllerDeclaration_impl();
    fcd.setKey(keyName);
    fcd.setImport(imp);
    setFlowControllerDeclaration(fcd);

    // before adding the import, see if the merge type system is OK
    if (!isValidAggregateChange()) {
      setFlowControllerDeclaration(oldFcd); // revert
View Full Code Here

Examples of org.apache.uima.analysis_engine.metadata.FlowControllerDeclaration

      cpd = getAnalysisEngineMetaData().getConfigurationParameterDeclarations();
      for (Iterator it = editor.getResolvedDelegates().entrySet().iterator(); it.hasNext();) {
        addDelegateToGUI((Map.Entry) it.next());
      }
      FlowControllerDeclaration fcd = editor.getResolvedFlowControllerDeclaration();
      if (null != fcd) {
        addDelegateToGUI(fcd.getKey(), fcd.getSpecifier());
      }
      TreeItem[] items = tree.getItems();
      if (items.length > 0)
        // scrolls to top, also
        tree.setSelection(new TreeItem[] { items[0] });
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.