private boolean isSpotProduct(Product product) { return StringHelper.startsWithIgnoreCase(product.getProductType(), "SPOTSCENE"); }
private boolean isSentinelProduct(Product product) { return StringHelper.startsWithIgnoreCase(product.getProductType(), "S2_MSI_Level"); }
public static boolean isSentinelProduct(Product product) { return StringHelper.startsWithIgnoreCase(product.getProductType(), "S2_MSI_Level"); }
/** * Find the incidence angle of a Spot product. * @param product the Spot product * @return the incidence angle of a Spot product */ public static float extractIncidenceAngleFromSpotProduct(Product product) { MetadataElement metadataRoot = product.getMetadataRoot(); MetadataElement[] elements = metadataRoot.getElements(); MetadataElement currentElement = null; for (MetadataElement element : elements) { String name = element.getName(); if (StringHelper.startsWithIgnoreCase(name, "SPOTSCENE")) { currentElement = element; break; } } String[] pathElement = {"Dataset_Sources", "Source_Information", "Scene_Source"}; currentElement = findTreeElementByNameAttribute(currentElement, pathElement); MetadataAttribute incidenceAngleAttribute = currentElement.getAttribute("INCIDENCE_ANGLE"); ProductData data = incidenceAngleAttribute.getData(); return Float.parseFloat(data.getElemString()); }
for (MetadataElement element : elements) { String name = element.getName(); if (StringHelper.startsWithIgnoreCase(name, "SPOTSCENE")) { currentElement = element; break;
Product selectedProduct = getSelectedProduct(); if (selectedProduct != null) { boolean isSentinel2 = StringHelper.startsWithIgnoreCase(selectedProduct.getProductType(), "S2_MSI_Level"); boolean isSpot = StringHelper.startsWithIgnoreCase(selectedProduct.getProductType(), "SPOTSCENE"); BindingContext bindingContext = getBindingContext(); PropertySet propertySet = bindingContext.getPropertySet();