/** * Accepts the given visitor. This method implements the well known 'Visitor' design pattern of the gang-of-four. * The visitor pattern allows to define new operations on the product data model without the need to add more code * to it. The new operation is implemented by the visitor. * <p/> * <p>The method subsequentially visits (calls <code>acceptVisitor</code> for) all bands, tie-point grids and flag * codings. Finally it visits product metadata root element and calls <code>visitor.visit(this)</code>. * * @param visitor the visitor, must not be <code>null</code> */ @Override public void acceptVisitor(final ProductVisitor visitor) { Guardian.assertNotNull("visitor", visitor); bandGroup.acceptVisitor(visitor); tiePointGridGroup.acceptVisitor(visitor); flagCodingGroup.acceptVisitor(visitor); indexCodingGroup.acceptVisitor(visitor); vectorDataGroup.acceptVisitor(visitor); bitmaskDefGroup.acceptVisitor(visitor); maskGroup.acceptVisitor(visitor); metadataRoot.acceptVisitor(visitor); visitor.visit(this); }