RGBImageProfile implements ConfigurableExtension { public boolean isApplicableTo(final Product product) { Guardian.assertNotNull("product", product); if (!isValid()) { return false; } final Parser parser = product.createBandArithmeticParser(); final String[] expressions = getRgbExpressions(); for (final String expression : expressions) { if (!expression.equals("")) { if (!product.isCompatibleBandArithmeticExpression(expression, parser)) { return false; } } } return true; } RGBImageProfile();  RGBImageProfile(final String name);  RGBImageProfile(final String name, String[] rgbaExpressions);  RGBImageProfile(final String name, String[] rgbaExpressions, String pattern[]); String getName(); void setName(String name); boolean isInternal(); void setInternal(final boolean internal); boolean equalExpressions(RGBImageProfile profile); boolean equalExpressions(String[] rgbaExpressions); boolean isValid(); String[] getRgbExpressions(); void setRgbExpressions(String[] rgbExpressions); String[] getRgbaExpressions(); void setRgbaExpressions(String[] rgbaExpressions); String getRedExpression(); void setRedExpression(String expression); String getGreenExpression(); void setGreenExpression(String expression); String getBlueExpression(); void setBlueExpression(String expression); String getAlphaExpression(); void setAlphaExpression(String expression); boolean hasAlpha(); String[] getPattern(); void setPattern(String[] pattern); boolean isApplicableTo(final Product product); static RGBImageProfile getCurrentProfile(final Product product); static RGBImageProfile loadProfile(final File file); static RGBImageProfile loadProfile(final URL url); void store(final File file); void getProperties(final Properties properties); @SuppressWarnings("LocalVariableHidesMemberVariable") void setProperties(Properties properties); static void storeRgbaExpressions(final Product product, final String[] rgbaExpressions); @Override int hashCode(); @Override boolean equals(Object obj); @Override String toString(); void configure(ConfigurationElement config); static final String RED_BAND_NAME; static final String GREEN_BAND_NAME; static final String BLUE_BAND_NAME; static final String ALPHA_BAND_NAME; static final String[] RGB_BAND_NAMES; static final String[] RGBA_BAND_NAMES; static final String FILENAME_EXTENSION; static final String PROPERTY_KEY_NAME; static final String PROPERTY_KEY_RED; static final String PROPERTY_KEY_GREEN; static final String PROPERTY_KEY_BLUE; static final String PROPERTY_KEY_ALPHA; static final String PROPERTY_KEY_INTERNAL; final static String PROPERTY_KEY_PREFIX_RGB_PROFILE; }
@Test public void testApplicabilityOfEmptyProfile() { final RGBImageProfile profile = new RGBImageProfile("X"); assertEquals(false, profile.isApplicableTo(createTestProduct())); }