Product extends ProductNode { public boolean addProductNodeListener(final ProductNodeListener listener) { if (listener != null) { if (listeners == null) { listeners = new ArrayList<>(); } if (!listeners.contains(listener)) { listeners.add(listener); return true; } } return false; } Product(final String name, final String type, final int sceneRasterWidth, final int sceneRasterHeight);  Product(final String name, final String type, final int sceneRasterWidth, final int sceneRasterHeight,
                   final ProductReader reader); private  Product(final File fileLocation,
                    final String name,
                    final String type,
                    final int sceneRasterWidth,
                    final int sceneRasterHeight,
                    final ProductReader reader); File getFileLocation(); void setFileLocation(final File fileLocation); @Override void setOwner(final ProductNode owner); String getProductType(); void setProductType(final String productType); void setProductReader(final ProductReader reader); @Override ProductReader getProductReader(); void setProductWriter(final ProductWriter writer); @Override ProductWriter getProductWriter(); void writeHeader(Object output); void closeProductReader(); void closeProductWriter(); void closeIO(); @Override void dispose(); PointingFactory getPointingFactory(); void setPointingFactory(PointingFactory pointingFactory); void setGeoCoding(final GeoCoding geoCoding); GeoCoding getGeoCoding(); boolean isUsingSingleGeoCoding(); boolean transferGeoCodingTo(final Product destProduct, final ProductSubsetDef subsetDef); int getSceneRasterWidth(); int getSceneRasterHeight(); ProductData.UTC getStartTime(); void setStartTime(final ProductData.UTC startTime); ProductData.UTC getEndTime(); void setEndTime(final ProductData.UTC endTime); MetadataElement getMetadataRoot(); ProductNodeGroup<ProductNodeGroup> getGroups(); ProductNodeGroup getGroup(String name); ProductNodeGroup<TiePointGrid> getTiePointGridGroup(); void addTiePointGrid(final TiePointGrid tiePointGrid); boolean removeTiePointGrid(final TiePointGrid tiePointGrid); int getNumTiePointGrids(); TiePointGrid getTiePointGridAt(final int index); String[] getTiePointGridNames(); TiePointGrid[] getTiePointGrids(); TiePointGrid getTiePointGrid(final String name); boolean containsTiePointGrid(final String name); ProductNodeGroup<Band> getBandGroup(); void addBand(final Band band); Band addBand(final String bandName, final int dataType); Band addBand(final String bandName, final String expression); Band addBand(final String bandName, final String expression, final int dataType); boolean removeBand(final Band band); int getNumBands(); Band getBandAt(final int index); String[] getBandNames(); Band[] getBands(); Band getBand(final String name); int getBandIndex(final String name); boolean containsBand(final String name); boolean containsRasterDataNode(final String name); RasterDataNode getRasterDataNode(final String name); ProductNodeGroup<Mask> getMaskGroup(); ProductNodeGroup<VectorDataNode> getVectorDataGroup(); ProductNodeGroup<FlagCoding> getFlagCodingGroup(); ProductNodeGroup<IndexCoding> getIndexCodingGroup(); boolean containsPixel(final float x, final float y); boolean containsPixel(final PixelPos pixelPos); PlacemarkGroup getGcpGroup(); synchronized PlacemarkGroup getPinGroup(); int getNumResolutionsMax(); void setNumResolutionsMax(int numResolutionsMax); boolean isCompatibleProduct(final Product product, final float eps); Term parseExpression(final String expression); @Override void acceptVisitor(final ProductVisitor visitor); boolean addProductNodeListener(final ProductNodeListener listener); void removeProductNodeListener(final ProductNodeListener listener); ProductNodeListener[] getProductNodeListeners(); int getRefNo(); void setRefNo(final int refNo); void resetRefNo(); ProductManager getProductManager(); boolean isCompatibleBandArithmeticExpression(final String expression); boolean isCompatibleBandArithmeticExpression(final String expression, Parser parser); Parser createBandArithmeticParser(); WritableNamespace createBandArithmeticDefaultNamespace(); Product createSubset(final ProductSubsetDef subsetDef, final String name, final String desc); Product createFlippedProduct(final int flipType, final String name, final String desc); @Override void setModified(final boolean modified); @Override long getRawStorageSize(final ProductSubsetDef subsetDef); String getQuicklookBandName(); void setQuicklookBandName(String quicklookBandName); String createPixelInfoString(final int pixelX, final int pixelY); ProductNode[] getRemovedChildNodes(); boolean canBeOrthorectified(); Dimension getPreferredTileSize(); void setPreferredTileSize(int tileWidth, int tileHeight); void setPreferredTileSize(Dimension preferredTileSize); String[] getAllFlagNames(); AutoGrouping getAutoGrouping(); void setAutoGrouping(AutoGrouping autoGrouping); void setAutoGrouping(String pattern); Mask addMask(String maskName, Mask.ImageType imageType); Mask addMask(String maskName, String expression, String description, Color color, double transparency); Mask addMask(String maskName, VectorDataNode vectorDataNode, String description, Color color,
                        double transparency); @Deprecated void addBitmaskDef(final BitmaskDef bitmaskDef); @Deprecated String[] getBitmaskDefNames(); @Deprecated BitmaskDef getBitmaskDef(final String name); @Deprecated BitRaster getValidMask(final String id); @Deprecated void setValidMask(final String id, final BitRaster validMask); @Deprecated BitRaster createValidMask(final String expression, final ProgressMonitor pm); @Deprecated BitRaster createValidMask(final Term term, final ProgressMonitor pm); @Deprecated void readBitmask(final int offsetX,
                            final int offsetY,
                            final int width,
                            final int height,
                            final Term bitmaskTerm,
                            final boolean[] bitmask, ProgressMonitor pm); @Deprecated synchronized void readBitmask(final int offsetX,
                                         final int offsetY,
                                         final int width,
                                         final int height,
                                         final Term bitmaskTerm,
                                         final byte[] bitmask,
                                         final byte trueValue,
                                         final byte falseValue,
                                         ProgressMonitor pm); static final String METADATA_ROOT_NAME; static final String HISTORY_ROOT_NAME; @Deprecated
    static final String PIN_MASK_NAME; @Deprecated
    static final String GCP_MASK_NAME; static final String PROPERTY_NAME_GEOCODING; static final String PROPERTY_NAME_PRODUCT_TYPE; static final String GEOMETRY_FEATURE_TYPE_NAME; }
@Test public void testAddProductNodeListener() { ProductNodeListener listener = new DummyProductNodeListener(); assertEquals("addProductNodeListener null", false, product.addProductNodeListener(null)); assertEquals("addProductNodeListener", true, product.addProductNodeListener(listener)); assertEquals("addProductNodeListener contained listener", false, product.addProductNodeListener(listener)); }