Package org.apache.uima.aae.deployment

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


                + "\" is not valid for the aggregate \"" + parentKey + "\"", IMessageProvider.ERROR);
      }
      return cls;

    } else if (object instanceof RemoteAEDeploymentMetaData) {
      RemoteAEDeploymentMetaData metaData = (RemoteAEDeploymentMetaData) object;

      Class cls = null;
      ResourceSpecifier rs = metaData.getResourceSpecifier();
      if (rs != null) {
        if (rs instanceof AnalysisEngineDescription) {
          cls = AsyncAggregateErrorConfiguration.class;
        }
      } else {
        String parentKey = metaData.getParent().getKey();
        if (parentKey == null) {
          parentKey = "Top Analysis Engine";
        }
        updateStatus("The analysis engine's key=\"" + metaData.getKey()
                + "\" is not valid for the aggregate \"" + parentKey + "\"", IMessageProvider.ERROR);
      }
      return cls;
      // return AsyncPrimitiveErrorConfiguration.class;
    } else {
View Full Code Here


          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

   * @return RemoteAEDeploymentMetaData
   */
  static public RemoteAEDeploymentMetaData createRemoteAEDeploymentMetaData(
          AEDeploymentMetaData metaData) {
    ResourceSpecifierFactory factory = UIMAFramework.getResourceSpecifierFactory();
    RemoteAEDeploymentMetaData remoteMetaData = (RemoteAEDeploymentMetaData) factory
            .createObject(RemoteAEDeploymentMetaData.class);
    remoteMetaData.setParent(metaData.getParent());
    remoteMetaData.setKey(metaData.getKey());
    remoteMetaData.setCasMultiplierPoolSize(metaData.getCasMultiplierPoolSize());
    remoteMetaData.setRemoteReplyQueueScaleout(-1);
    try {
      remoteMetaData.setResourceSpecifier(metaData.getResourceSpecifier(), null, false);
    } catch (InvalidXMLException e) {
      // TODO Auto-generated catch block
      e.printStackTrace();
    }

    // Clone OR Create a new AsyncAggregateErrorConfiguration
    AsyncAEErrorConfiguration aggErrorConfig = null;
    AsyncAEErrorConfiguration errorConfig = metaData.getAsyncAEErrorConfiguration();
    if (errorConfig instanceof AsyncAggregateErrorConfiguration_Impl) {
      // Clone
      aggErrorConfig = errorConfig.clone();
    } else {
      // Create a new AsyncAggregateErrorConfiguration
      aggErrorConfig = new AsyncAggregateErrorConfiguration_Impl();
      aggErrorConfig.setGetMetadataErrors(new GetMetadataErrors_Impl(errorConfig));
      aggErrorConfig.setProcessCasErrors(errorConfig.getProcessCasErrors().clone(aggErrorConfig));
      aggErrorConfig.setCollectionProcessCompleteErrors(errorConfig
              .getCollectionProcessCompleteErrors().clone(aggErrorConfig));
    }
    remoteMetaData.setErrorConfiguration(aggErrorConfig);
    errorConfig.sParentObject((DeploymentMetaData_Impl)remoteMetaData);
    // Set TimeOut for Remote
    aggErrorConfig.getGetMetadataErrors().setTimeout(AEDeploymentConstants.DEFAULT_GETMETADATA_TIMEOUT);
    return remoteMetaData;
  }
View Full Code Here

          List list = metaData.getDelegates().getDelegates();
          return list.toArray();
        }
      }
    } else if (parent instanceof RemoteAEDeploymentMetaData) {
      RemoteAEDeploymentMetaData metaData = (RemoteAEDeploymentMetaData) parent;

    } else if (parent instanceof AEDelegates_Impl) {
      return ((AEDelegates_Impl) parent).getDelegates().toArray();

    } else if (parent instanceof AsyncAggregateErrorConfiguration) {
View Full Code Here

          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

   * @return RemoteAEDeploymentMetaData
   */
  static public RemoteAEDeploymentMetaData createRemoteAEDeploymentMetaData(
          AEDeploymentMetaData metaData) {
    ResourceSpecifierFactory factory = UIMAFramework.getResourceSpecifierFactory();
    RemoteAEDeploymentMetaData remoteMetaData = (RemoteAEDeploymentMetaData) factory
            .createObject(RemoteAEDeploymentMetaData.class);
    remoteMetaData.setParent(metaData.getParent());
    remoteMetaData.setKey(metaData.getKey());
    remoteMetaData.setCasMultiplierPoolSize(metaData.getCasMultiplierPoolSize());
    try {
      remoteMetaData.setResourceSpecifier(metaData.getResourceSpecifier(), null, false);
    } catch (InvalidXMLException e) {
      // TODO Auto-generated catch block
      e.printStackTrace();
    }

    // Clone OR Create a new AsyncAggregateErrorConfiguration
    AsyncAEErrorConfiguration aggErrorConfig = null;
    AsyncAEErrorConfiguration errorConfig = metaData.getAsyncAEErrorConfiguration();
    if (errorConfig instanceof AsyncAggregateErrorConfiguration_Impl) {
      // Clone
      aggErrorConfig = errorConfig.clone();
    } else {
      // Create a new AsyncAggregateErrorConfiguration
      aggErrorConfig = new AsyncAggregateErrorConfiguration_Impl();
      aggErrorConfig.setGetMetadataErrors(new GetMetadataErrors_Impl(errorConfig));
      aggErrorConfig.setProcessCasErrors(errorConfig.getProcessCasErrors().clone(aggErrorConfig));
      aggErrorConfig.setCollectionProcessCompleteErrors(errorConfig
              .getCollectionProcessCompleteErrors().clone(aggErrorConfig));
    }
    remoteMetaData.setErrorConfiguration(aggErrorConfig);
    errorConfig.sParentObject((DeploymentMetaData_Impl)remoteMetaData);
    // Set TimeOut for Remote
    aggErrorConfig.getGetMetadataErrors().setTimeout(AEDeploymentConstants.DEFAULT_GETMETADATA_TIMEOUT);
    return remoteMetaData;
  }
View Full Code Here

          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

TOP

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

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.