示例#1
0
  // Retrieves the output product name from request
  private String getOutputProductNameSafe() throws ProcessorException {
    Request request = getRequest();
    ProductRef prod = request.getOutputProductAt(0);
    if (prod == null) {
      throw new ProcessorException(ProcessorConstants.LOG_MSG_NO_OUTPUT_IN_REQUEST);
    }
    File prodFile = new File(prod.getFilePath());

    return FileUtils.getFilenameWithoutExtension(prodFile);
  }
示例#2
0
  /** Tries to load the <code>ProductRef</code> for the output product from the request. */
  protected void loadOutputProductFromRequest() throws ProcessorException {
    Request request;
    request = getRequest();

    if (request.getNumOutputProducts() > 0) {
      ProductRef ref = request.getOutputProductAt(0);
      if (ref == null) {
        handleError(ProcessorConstants.LOG_MSG_NO_OUTPUT_IN_REQUEST);
      }
      outputProductRef = ref;
    } else {
      handleError(ProcessorConstants.LOG_MSG_NO_OUTPUT_IN_REQUEST);
    }
  }
示例#3
0
 private void updateParamOutputFile(final Request request) {
   final File file = new File(request.getOutputProductAt(0).getFilePath());
   getParamGroup().getParameter(OUTPUT_PRODUCT_PARAM_NAME).setValue(file, null);
 }