this); if (metadata != null) { product.setProductType(metadata.getMetadataProfile()); product.setStartTime(metadata.getProductStartTime()); product.setEndTime(metadata.getProductEndTime());
protected static void updateProduct(final Product product, final MetadataElement newRoot) { final MetadataElement root = product.getMetadataRoot(); for(MetadataElement elem : newRoot.getElements()) { root.addElement(elem); } final MetadataElement absRoot = AbstractMetadata.getAbstractedMetadata(product); product.setStartTime(absRoot.getAttributeUTC(AbstractMetadata.first_line_time)); product.setEndTime(absRoot.getAttributeUTC(AbstractMetadata.last_line_time)); product.setProductType(absRoot.getAttributeString(AbstractMetadata.PRODUCT_TYPE)); product.setDescription(absRoot.getAttributeString(AbstractMetadata.SPH_DESCRIPTOR)); }
this); if (metadata != null) { product.setProductType("Generic NITF"); product.setStartTime(metadata.getFileDate()); product.setEndTime(metadata.getFileDate());
product.setEndTime(metadataFile.getProductEndTime()); product.setProductType(metadataFile.getMetadataProfile()); product.setDescription(metadataFile.getProductDescription());
final String type = absRoot.getAttributeString(AbstractMetadata.PRODUCT_TYPE); if (!type.isEmpty()) product.setProductType(type);
public Product createProduct() throws Exception { final MetadataElement newRoot = addMetaData(); findImages(newRoot); Dimension dim = getProductDimensions(newRoot); final Product product = new Product(getProductName(), getProductType(), dim.width, dim.height); updateProduct(product, newRoot); addBands(product); InputProductValidator validator = new InputProductValidator(product); isMapProjected = validator.isMapProjected(); addGeoCoding(product); addTiePointGrids(product); product.setName(getProductName()); product.setProductType(getProductType()); product.setDescription(getProductDescription()); ReaderUtils.addMetadataIncidenceAngles(product); ReaderUtils.addMetadataProductSize(product); return product; }
@Override public Product createProduct() throws IOException { final MetadataElement newRoot = addMetaData(); addBinaryDataToProduct(newRoot); findImages(newRoot); final MetadataElement absRoot = newRoot.getElement(AbstractMetadata.ABSTRACT_METADATA_ROOT); final int sceneWidth = absRoot.getAttributeInt(AbstractMetadata.num_samples_per_line); final int sceneHeight = absRoot.getAttributeInt(AbstractMetadata.num_output_lines); final Product product = new Product(getProductName(), getProductType(), sceneWidth, sceneHeight); updateProduct(product, newRoot); addTiePointGrids(product); // empty addBands(product); addGeoCoding(product); product.setName(getProductName()); product.setProductType(getProductType()); product.setDescription(getProductDescription()); product.setFileLocation(getBaseDir()); ReaderUtils.addMetadataProductSize(product); return product; } }