Beispiel #1
0
  /** Loads the bitmask expression for an AATSR product from the request */
  private void loadAatsrBitmaskExpression() {
    Request request = getRequest();
    Parameter paramNadir = request.getParameter(SmacConstants.BITMASK_NADIR_PARAM_NAME);
    if (paramNadir != null) {
      _bitMaskExpression = paramNadir.getValueAsText();
    } else {
      _bitMaskExpression = "";
    }

    Parameter paramForward = request.getParameter(SmacConstants.BITMASK_FORWARD_PARAM_NAME);
    if (paramForward != null) {
      _bitMaskExpressionForward = paramForward.getValueAsText();
    } else {
      _bitMaskExpressionForward = "";
    }
  }
Beispiel #2
0
 /** Loads the bitmask expression for a MERIS product from the request */
 private void loadMerisBitmaskExpression() {
   Parameter param = getRequest().getParameter(SmacConstants.BITMASK_PARAM_NAME);
   if (param != null) {
     _bitMaskExpression = param.getValueAsText();
   } else {
     _bitMaskExpression = "";
   }
 }
Beispiel #3
0
 private void updateParamOutputFormat(final Request request) {
   final Parameter parameter = request.getParameter(OUTPUT_FORMAT_PARAM_NAME);
   if (parameter != null) {
     final String format = parameter.getValueAsText();
     final ProductIOPlugInManager instance = ProductIOPlugInManager.getInstance();
     final String[] allowedformats = instance.getAllProductWriterFormatStrings();
     if (ArrayUtils.isMemberOf(format, allowedformats)) {
       getParamGroup().getParameter(OUTPUT_FORMAT_PARAM_NAME).setValue(format, null);
     }
   }
 }
Beispiel #4
0
  /**
   * Fills the given {@link Request request} with parameters.
   *
   * @param request the request to fill
   * @throws ProcessorException if an error occurred
   */
  @Override
  public void initRequestFromUI(final Request request) throws ProcessorException {
    request.addInputProduct(createInputProductRef());
    final Parameter outputProductParam = getParamGroup().getParameter(OUTPUT_PRODUCT_PARAM_NAME);
    if (StringUtils.isNullOrEmpty(outputProductParam.getValueAsText())) {
      throw new ProcessorException("No output product specified."); /*I18N*/
    }

    request.addOutputProduct(createOutputProductRef());
    request.addParameter(createOutputFormatParamForRequest());
    request.addParameter(getParamGroup().getParameter(LOG_PREFIX_PARAM_NAME));
    request.addParameter(getParamGroup().getParameter(LOG_TO_OUTPUT_PARAM_NAME));
  }