GPF Operator Development Guideline

Skip to end of metadata
Go to start of metadata

Metadata Declaration

  • Minimum attribute for parameter annotations is description
  • The Useage of the alias attribute of the parameter annotation is discouraged. Instead the parameter field should be named meaningful. If in the user interface a special name is needed use the label attribute.

Validation

During the initialisation phase of an operator all parameters ands source products shall be validated.

  • Validating a source product means to check if all components accessed by the operator are present and valid. No RuntimeException (e.g. NullPointerException, IllegalArgumentException )should happen in any case. If validation fails an OperatorException shall be thrown. The excception message shall clearly indicate what the cause of the exception is.
  • As far as possible the constraints for parameters shall be declared in the Parameter annotation. Consider also to define the validator attribute and implement the Validator interface. Dependencies between two parameters cannot be validated using annotation attribute, these must be checked for consistency during programatically.
  • Whether a source product is valid or not shall preferrably be done by checking the presence of product components such as specific bands, tie-point grids. It is usually not a good practice to only check the product type string (Product.getProductType()).

Unclassified

  • If exceptions are wrapped the cause shall be specified.
  • Prefer accessing {{TiePointGrid}}s as {{RasterDataNode}}s. This has the advantage that it will work also for projected products.
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.