Package org.apache.uima.collection.metadata

Examples of org.apache.uima.collection.metadata.CasProcessorDeploymentParams


   *          Cas Process configuration from the CPE descriptor
   */
  public CasObjectNetworkCasProcessorImpl(CpeCasProcessor aCasProcessor)
          throws ResourceConfigurationException {
    if (aCasProcessor.getDeploymentParams() != null) {
      CasProcessorDeploymentParams params = aCasProcessor.getDeploymentParams();
      try {
        CasProcessorDeploymentParam transportParameter = params.get("transport");
        transport = pluginTransport(transportParameter.getParameterValue());
      } catch (Exception e) {
        throw new ResourceConfigurationException(InvalidXMLException.INVALID_CLASS,
                new Object[] { "transport" }, e);
      }

      CasProcessorDeploymentParam[] deployParameters = params.getAll();
      for (int i = 0; deployParameters != null && i < deployParameters.length; i++) {
        try {
          if ("transport".equalsIgnoreCase(deployParameters[i].getParameterName())) {
            String transportClass = deployParameters[i].getParameterValue();
            transport = pluginTransport(transportClass);
View Full Code Here


   *          name of the param to find.
   *
   * @return - position in the list as int, -1 if not found
   */
  private int deleteParam(String aParamName) throws CpeDescriptorException {
    CasProcessorDeploymentParams depParams = getDeploymentParameters();
    if (depParams != null) {
      CasProcessorDeploymentParam[] paramArray = depParams.getAll();
      for (int i = 0; paramArray != null && i < paramArray.length; i++) {
        if (aParamName.equals(paramArray[i].getParameterName())) {
          depParams.remove(paramArray[i]);
          return i;
        }
      }
    }
    return -1;
View Full Code Here

  }

  protected void addDefaults() {
    try {
      CasProcessorDeploymentParams deployParams = CpeDescriptorFactory.produceDeployParams();
      super.setDeploymentParams(deployParams);
      super.addDefaults();
    } catch (Exception e) {
      e.printStackTrace();
    }
View Full Code Here

      sepProcess.setExecutable(exe);
      setRunInSeperateProcess(sepProcess);
    }
    if (getDeploymentParams() == null) {
      CasProcessorDeploymentParams deployParams = CpeDescriptorFactory.produceDeployParams();
      CasProcessorDeploymentParam param = CpeDescriptorFactory.produceDeployParam();
      param.setParameterName("vnsHost");
      param.setParameterType("String");
      param.setParameterValue("127.0.0.1");
      deployParams.add(param);
      param = CpeDescriptorFactory.produceDeployParam();
      param.setParameterName("vnsPort");
      param.setParameterType("String");
      param.setParameterValue("9904");
      deployParams.add(param);
      this.setDeploymentParams(deployParams);
    }

    super.addDefaults();
View Full Code Here

   *
   */
  protected void addDefaults() {
    try {
      if (super.getDeploymentParams() == null) {
        CasProcessorDeploymentParams deployParams = CpeDescriptorFactory.produceDeployParams();
        super.setDeploymentParams(deployParams);
      }
      super.addDefaults();
    } catch (Exception e) {
      e.printStackTrace();
View Full Code Here

          "<casProcessor>", "<casProcessors>" }, new Exception(CpmLocalizedMessage
              .getLocalizedMessage(CPMUtils.CPM_LOG_RESOURCE_BUNDLE,
                      "UIMA_CPM_EXP_bad_cpe_descriptor_no_cp__WARNING", new Object[] { Thread
                              .currentThread().getName() })));
    }
    CasProcessorDeploymentParams deployParams = aCasProcessorConfig.getDeploymentParams();

    if (deployParams != null) {
      CasProcessorDeploymentParam[] parameters = deployParams.getAll();
      for (int i = 0; parameters != null && i < parameters.length; i++) {
        try {
          if (UIMAFramework.getLogger().isLoggable(Level.FINEST)) {
            UIMAFramework.getLogger(this.getClass()).logrb(
                    Level.FINEST,
View Full Code Here

 
  protected void addDefaults() {
    try {
      if (super.getDeploymentParams() == null) {
        CasProcessorDeploymentParams deployParams = CpeDescriptorFactory.produceDeployParams();
        super.setDeploymentParams(deployParams);
      }
      super.addDefaults();
    } catch (Exception e) {
      e.printStackTrace();
View Full Code Here

   *          Cas Process configuration from the CPE descriptor
   */
  public CasObjectNetworkCasProcessorImpl(CpeCasProcessor aCasProcessor)
          throws ResourceConfigurationException {
    if (aCasProcessor.getDeploymentParams() != null) {
      CasProcessorDeploymentParams params = aCasProcessor.getDeploymentParams();
      try {
        CasProcessorDeploymentParam transportParameter = params.get("transport");
        transport = pluginTransport(transportParameter.getParameterValue());
      } catch (Exception e) {
        throw new ResourceConfigurationException(InvalidXMLException.INVALID_CLASS,
                new Object[] { "transport" }, e);
      }

      CasProcessorDeploymentParam[] deployParameters = params.getAll();
      for (int i = 0; deployParameters != null && i < deployParameters.length; i++) {
        try {
          if ("transport".equalsIgnoreCase(deployParameters[i].getParameterName())) {
            String transportClass = deployParameters[i].getParameterValue();
            transport = pluginTransport(transportClass);
View Full Code Here

   *          name of the param to find.
   *
   * @return - position in the list as int, -1 if not found
   */
  private int deleteParam(String aParamName) throws CpeDescriptorException {
    CasProcessorDeploymentParams depParams = getDeploymentParameters();
    if (depParams != null) {
      CasProcessorDeploymentParam[] paramArray = depParams.getAll();
      for (int i = 0; paramArray != null && i < paramArray.length; i++) {
        if (aParamName.equals(paramArray[i].getParameterName())) {
          depParams.remove(paramArray[i]);
          return i;
        }
      }
    }
    return -1;
View Full Code Here

          "<casProcessor>", "<casProcessors>" }, new Exception(CpmLocalizedMessage
              .getLocalizedMessage(CPMUtils.CPM_LOG_RESOURCE_BUNDLE,
                      "UIMA_CPM_EXP_bad_cpe_descriptor_no_cp__WARNING", new Object[] { Thread
                              .currentThread().getName() })));
    }
    CasProcessorDeploymentParams deployParams = aCasProcessorConfig.getDeploymentParams();

    if (deployParams != null) {
      CasProcessorDeploymentParam[] parameters = deployParams.getAll();
      for (int i = 0; parameters != null && i < parameters.length; i++) {
        try {
          if (UIMAFramework.getLogger().isLoggable(Level.FINEST)) {
            UIMAFramework.getLogger(this.getClass()).logrb(
                    Level.FINEST,
View Full Code Here

TOP

Related Classes of org.apache.uima.collection.metadata.CasProcessorDeploymentParams

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.