Tabnine Logo
ParameterDescriptorFactory.getSourceProductMap
Code IndexAdd Tabnine to your IDE (free)

How to use
getSourceProductMap
method
in
org.esa.snap.core.gpf.annotations.ParameterDescriptorFactory

Best Java code snippets using org.esa.snap.core.gpf.annotations.ParameterDescriptorFactory.getSourceProductMap (Showing top 8 results out of 315)

origin: senbox-org/snap-desktop

protected void initializeOperatorUI(final String operatorName, final Map<String, Object> parameterMap) {
  this.operatorName = operatorName;
  this.paramMap = parameterMap;
  final OperatorSpi operatorSpi = GPF.getDefaultInstance().getOperatorSpiRegistry().getOperatorSpi(operatorName);
  if (operatorSpi == null) {
    throw new IllegalArgumentException("operator " + operatorName + " not found");
  }
  final ParameterDescriptorFactory descriptorFactory = new ParameterDescriptorFactory();
  final OperatorDescriptor operatorDescriptor = operatorSpi.getOperatorDescriptor();
  final PropertySetDescriptor propertySetDescriptor;
  try {
    propertySetDescriptor = PropertySetDescriptorFactory.createForOperator(operatorDescriptor, descriptorFactory.getSourceProductMap());
  } catch (ConversionException e) {
    throw new IllegalStateException("Not able to init OperatorParameterSupport.", e);
  }
  propertySet = PropertyContainer.createMapBacked(paramMap, propertySetDescriptor);
  if (paramMap.isEmpty()) {
    try {
      propertySet.setDefaultValues();
    } catch (IllegalStateException e) {
      // todo - handle exception here
      e.printStackTrace();
    }
  }
}
origin: senbox-org/snap-desktop

public void addParameterToTable(ToolParameterDescriptor param, int index) {
  try {
    operator.getToolParameterDescriptors().add(index, param);
    PropertyDescriptor propertyDescriptor = ParameterDescriptorFactory.convert(param, new ParameterDescriptorFactory().getSourceProductMap());
    propertyDescriptor.setDefaultValue(param.getDefaultValue());
    DefaultPropertySetDescriptor propertySetDescriptor = new DefaultPropertySetDescriptor();
    propertySetDescriptor.addPropertyDescriptor(propertyDescriptor);
    PropertyContainer container = PropertyContainer.createMapBacked(new HashMap<>(), propertySetDescriptor);
    context.getPropertySet().addProperties(container.getProperties());
    createDefaultComponent(param, propertyDescriptor);
    fireTableRowsChanged();
  } catch (Exception ex){
    logger.warning(ex.getMessage());
  }
}
origin: senbox-org/snap-desktop

Object dirAttr = null;
if(oldProp != null) {
  PropertyDescriptor descriptor = ParameterDescriptorFactory.convert(property, new ParameterDescriptorFactory().getSourceProductMap());
  dirAttr = descriptor.getAttribute("directory");
  context.getPropertySet().removeProperty(oldProp);
  descriptor = ParameterDescriptorFactory.convert(property, new ParameterDescriptorFactory().getSourceProductMap());
} catch (Exception ex) {
  property.setDefaultValue(null);
  descriptor = ParameterDescriptorFactory.convert(property, new ParameterDescriptorFactory().getSourceProductMap());
origin: senbox-org/snap-desktop

if (operatorDescriptor != null) {
  try {
    propertySetDescriptor = PropertySetDescriptorFactory.createForOperator(operatorDescriptor, descriptorFactory.getSourceProductMap());
  } catch (ConversionException e) {
    throw new IllegalStateException("Not able to init OperatorParameterSupport.", e);
origin: senbox-org/snap-desktop

  propertyDescriptor = ParameterDescriptorFactory.convert(descriptor, new ParameterDescriptorFactory().getSourceProductMap());
} catch (ConversionException ex) {
  logger.warning(ex.getMessage());
origin: senbox-org/snap-desktop

  propertySet.removeProperty(property);
PropertyDescriptor propertyDescriptor = ParameterDescriptorFactory.convert(this.parameter, new ParameterDescriptorFactory().getSourceProductMap());
origin: senbox-org/snap-desktop

PropertyDescriptor propertyDescriptor = ParameterDescriptorFactory.convert(descriptor, new ParameterDescriptorFactory().getSourceProductMap());
if (defaultValue != null) {
  String defaultValueAsString = ToolParameterEditorDialog.processDefaultValue(defaultValue);
origin: senbox-org/snap-desktop

PropertyDescriptor propertyDescriptor = ParameterDescriptorFactory.convert(this.modifiedParameter, new ParameterDescriptorFactory().getSourceProductMap());
DefaultPropertySetDescriptor propertySetDescriptor = new DefaultPropertySetDescriptor();
propertySetDescriptor.addPropertyDescriptor(propertyDescriptor);
org.esa.snap.core.gpf.annotationsParameterDescriptorFactorygetSourceProductMap

Popular methods of ParameterDescriptorFactory

  • <init>
  • createMapBackedOperatorPropertyContainer
  • convert

Popular in Java

  • Reactive rest calls using spring rest template
  • getExternalFilesDir (Context)
  • setRequestProperty (URLConnection)
  • requestLocationUpdates (LocationManager)
  • InetAddress (java.net)
    An Internet Protocol (IP) address. This can be either an IPv4 address or an IPv6 address, and in pra
  • Iterator (java.util)
    An iterator over a sequence of objects, such as a collection.If a collection has been changed since
  • TimerTask (java.util)
    The TimerTask class represents a task to run at a specified time. The task may be run once or repeat
  • Vector (java.util)
    Vector is an implementation of List, backed by an array and synchronized. All optional operations in
  • Stream (java.util.stream)
    A sequence of elements supporting sequential and parallel aggregate operations. The following exampl
  • Reference (javax.naming)
  • CodeWhisperer alternatives
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now