public static Node create(ProductNode productNode) { if (productNode instanceof FlagCoding) { return new PNNode.FC((FlagCoding) productNode); } else if (productNode instanceof IndexCoding) { return new PNNode.IC((IndexCoding) productNode); } else if (productNode instanceof MetadataElement) { return new PNNode.ME((MetadataElement) productNode); } else if (productNode instanceof VectorDataNode) { return new PNNode.VDN((VectorDataNode) productNode); } else if (productNode instanceof TiePointGrid) { return new PNNode.TPG((TiePointGrid) productNode); } else if (productNode instanceof Mask) { return new PNNode.M((Mask) productNode); } else if (productNode instanceof Band) { return new PNNode.B((Band) productNode); } else if (productNode instanceof Quicklook) { return new PNNode.QL((Quicklook) productNode); } throw new IllegalStateException("unhandled product node type: " + productNode.getClass() + " named '" + productNode.getName() + "'"); }
public FC(FlagCoding flagCoding) { super(flagCoding); setIconBaseWithExtension("org/esa/snap/rcp/icons/RsBandFlags16.gif"); }
@Override protected PNNode createNodeForKey(FlagCoding key) { return new PNNode.FC(key); } }
@Override public void destroy() throws IOException { deleteProductNode(getProductNode().getProduct(), getProductNode().getProduct().getFlagCodingGroup(), getProductNode()); }