Package org.apache.uima.aae.deployment

Examples of org.apache.uima.aae.deployment.AEDeploymentMetaData


    Map mapDelegateAEs = aeDescription.getDelegateAnalysisEngineSpecifiers(aResourceManager);
    List<XMLizable> list = getDelegates().getDelegates();
    for (XMLizable xmlizable : list) {
      if (xmlizable instanceof AEDeploymentMetaData) {
        AEDeploymentMetaData meta = (AEDeploymentMetaData) xmlizable;
        if (mapDelegateAEs.containsKey(meta.getKey())) {
          // Recursive
          // Trace.err(4, "Match2: " + meta.getKey());
          ResourceSpecifier rs = (ResourceSpecifier) mapDelegateAEs.get(meta.getKey());
          meta.setResourceSpecifier(rs, aResourceManager, recursive);
        } else {
          // Trace.err("NOT match: " + meta.getKey());
          throw new DDEInvalidXMLException(DDEInvalidXMLException.DELEGATE_KEY_NOT_FOUND, new
                  Object[] {meta.getKey(), aeDescription.getSourceUrlString() });
        }

      } else if (xmlizable instanceof RemoteAEDeploymentMetaData) {
        RemoteAEDeploymentMetaData meta = (RemoteAEDeploymentMetaData) xmlizable;
        if (mapDelegateAEs.containsKey(meta.getKey())) {
          // Trace.err(4, "match: " + meta.getKey());
          ResourceSpecifier rs = (ResourceSpecifier) mapDelegateAEs.get(meta.getKey());
          meta.setResourceSpecifier(rs, aResourceManager, recursive);

        } else {
          Trace.err("NOT Match: " + meta.getKey());
          throw new DDEInvalidXMLException(DDEInvalidXMLException.DELEGATE_KEY_NOT_FOUND, new
                  Object[] {meta.getKey(), aeDescription.getSourceUrlString() });
        }
      }

    } // for
  }
View Full Code Here


      }
      multiPageEditor.setFileDirty();
    }

  protected void changeToAsyncAggregate(boolean toAsyncAggreagte) {
    AEDeploymentMetaData metaData = (AEDeploymentMetaData) currentMetaDataObject;
    if (toAsyncAggreagte) {
      // Resolve delegates
      try {
        metaData.resolveDelegates(multiPageEditor.cde.createResourceManager(), false);
      } catch (InvalidXMLException e) {
        e.printStackTrace();
        Utility.popMessage(Messages.getString("InvalidXMLException"), //$NON-NLS-1$
                multiPageEditor.cde.getMessagesToRootCause(e), MessageDialog.ERROR);
        multiPageEditor.switchToBadSource(false);
        return;
      }
      if (metaData.getNumberOfInstances() != 1) {
        metaData.setNumberOfInstances(1);
      }
    }
    metaData.setAsync(toAsyncAggreagte);
   
    // Enable/Disable CAS Pool Size Control
    multiPageEditor.getOverviewPage().enableCasPoolSizeSettings(toAsyncAggreagte);
    if (!toAsyncAggreagte) {
      // Set CAS pool size to the number of instances
      multiPageEditor.getOverviewPage().setCasPoolSize(metaData.getNumberOfInstances());

      // Set number of listeners to default value (=1)
      inputQueueScaleout.setSelection(1);
      replyQueueListenersForCoLocated.setSelection(1);
    }
View Full Code Here

TOP

Related Classes of org.apache.uima.aae.deployment.AEDeploymentMetaData

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.