Package org.apache.uima.analysis_engine.metadata

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


     
      // try an aggregate with no components (tests that empty flow works)
      in = new XMLInputSource(JUnitExtension
              .getFile("TextAnalysisEngineImplTest/EmptyAggregate.xml"));
      desc = UIMAFramework.getXMLParser().parseAnalysisEngineDescription(in);
      FixedFlow emptyFlow = (FixedFlow) desc.getAnalysisEngineMetaData().getFlowConstraints();
      assertNotNull(emptyFlow.getFixedFlow());
      assertTrue(emptyFlow.getFixedFlow().length == 0);
      ae = new AggregateAnalysisEngine_impl();
      ae.initialize(desc, Collections.EMPTY_MAP);
      ae.destroy();
     
      // aggregate with duplicate group overrides
View Full Code Here


      }
      packTable(flowList);

      if (null == fcd) {
        // Not a custom, user-defined flow
        FixedFlow ff;
        if (null == flowConstraints) {
          // force fixed flow if nothing is specified
          getAnalysisEngineMetaData().setFlowConstraints(
                  flowConstraints = ff = new FixedFlow_impl());
          ff.setFixedFlow(stringArray0);
        }
        String modelFlowType = flowConstraints.getFlowConstraintsType();

        flowControllerChoice.setText(modelFlowType
                .equals(CapabilityLanguageFlow.FLOW_CONSTRAINTS_TYPE) ? CAPABILITY_LANGUAGE_FLOW
View Full Code Here

      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);
      }
      enable();
      setFileDirty();
    }
View Full Code Here

    } else {
      // For an aggregate AE we dive into the first aggregation level and add each of the
      // contained AEs separately, thus allowing us to control their properties separately

      Map<String, ResourceSpecifier> delegates = aDesc.getDelegateAnalysisEngineSpecifiers();
      FixedFlow flow = (FixedFlow) aDesc.getAnalysisEngineMetaData().getFlowConstraints();
      for (String key : flow.getFixedFlow()) {
        AnalysisEngineDescription aeDesc = (AnalysisEngineDescription) delegates.get(key);
        // boolean multi = aeDesc.getAnalysisEngineMetaData().getOperationalProperties()
        // .isMultipleDeploymentAllowed();
        // log.info("["+key+"] runs "+ (multi ? "multi-threaded" : "single-threaded"));
        CpeIntegratedCasProcessor proc = createProcessor(key, aeDesc);
View Full Code Here

      FlowControllerDeclaration flowControllerDeclaration = new FlowControllerDeclaration_impl();
      flowControllerDeclaration.setSpecifier(flowControllerDescription);
      desc.setFlowControllerDeclaration(flowControllerDeclaration);
    }

    FixedFlow fixedFlow = new FixedFlow_impl();
    fixedFlow.setFixedFlow(flowNames.toArray(new String[flowNames.size()]));
    desc.getAnalysisEngineMetaData().setFlowConstraints(fixedFlow);

    if (typePriorities != null) {
      desc.getAnalysisEngineMetaData().setTypePriorities(typePriorities);
    }
View Full Code Here

TOP

Related Classes of org.apache.uima.analysis_engine.metadata.FixedFlow

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.