gpt4 book ai didi

org.esa.snap.engine_utilities.util.ZipUtils.findInZip()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-16 12:57:31 25 4
gpt4 key购买 nike

本文整理了Java中org.esa.snap.engine_utilities.util.ZipUtils.findInZip()方法的一些代码示例,展示了ZipUtils.findInZip()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ZipUtils.findInZip()方法的具体详情如下:
包路径:org.esa.snap.engine_utilities.util.ZipUtils
类名称:ZipUtils
方法名:findInZip

ZipUtils.findInZip介绍

暂无

代码示例

代码示例来源:origin: senbox-org/s1tbx

static void validateInput(final File file) throws IOException {
  if (ZipUtils.isZip(file)) {
    if(!ZipUtils.findInZip(file, "s1", ".tiff")) {
      throw new IOException("measurement folder is missing in product");
    }
  } else {
    final File baseFolder = file.getParentFile();
    final File annotationFolder = new File(baseFolder, ANNOTATION);
    if (!annotationFolder.exists()) {
      throw new IOException("annotation folder is missing in product");
    }
  }
}

代码示例来源:origin: senbox-org/s1tbx

static boolean isLevel1(final File file) {
  if (ZipUtils.isZip(file)) {
    if(ZipUtils.findInZip(file, "s1", ".tiff")) {
      return true;
    }
    final String name = file.getName().toUpperCase();
    return name.contains("_1AS") || name.contains("_1AD") || name.contains("_1SS") || name.contains("_1SD");
  } else {
    final File baseFolder = file.getParentFile();
    final File annotationFolder = new File(baseFolder, ANNOTATION);
    return annotationFolder.exists() && checkFolder(annotationFolder, ".xml");
  }
}

代码示例来源:origin: senbox-org/s1tbx

static boolean isLevel2(final File file) {
  if (ZipUtils.isZip(file)) {
    return ZipUtils.findInZip(file, "s1", ".nc");
  } else {
    final File baseFolder = file.getParentFile();
    final File measurementFolder = new File(baseFolder, MEASUREMENT);
    return measurementFolder.exists() && checkFolder(measurementFolder, ".nc");
  }
}

代码示例来源:origin: senbox-org/s1tbx

static boolean isLevel0(final File file) {
  if (ZipUtils.isZip(file)) {
    return ZipUtils.findInZip(file, "s1", ".dat");
  } else {
    final File baseFolder = file.getParentFile();
    return checkFolder(baseFolder, ".dat");
  }
}

代码示例来源:origin: senbox-org/s1tbx

@Override
protected DecodeQualification checkProductQualification(File file) {
  final String name = file.getName().toUpperCase();
  if(name.contains("ALOS2")) {
    for (String prefix : constants.getVolumeFilePrefix()) {
      if (name.startsWith(prefix)) {
        final Alos2ProductReader reader = new Alos2ProductReader(this);
        return reader.checkProductQualification(file);
      }
    }
  }
  if (name.endsWith(".ZIP") && (ZipUtils.findInZip(file, "vol-alos2", ""))) {
    return DecodeQualification.INTENDED;
  }
  return DecodeQualification.UNABLE;
}

代码示例来源:origin: senbox-org/s1tbx

/**
 * Checks whether the given object is an acceptable input for this product reader and if so, the method checks if it
 * is capable of decoding the input's content.
 *
 * @param input any input object
 * @return true if this product reader can decode the given input, otherwise false.
 */
public DecodeQualification getDecodeQualification(final Object input) {
  final File file = ReaderUtils.getFileFromInput(input);
  if (file != null) {
    final File metadataFile = findMetadataFile(file);
    if (metadataFile != null) {
      return DecodeQualification.INTENDED;
    }
    final String filename = file.getName().toLowerCase();
    if (filename.endsWith(".zip") && ZipUtils.findInZip(file, "", Risat1Constants.BAND_HEADER_NAME)) {
      return DecodeQualification.INTENDED;
    }
  }
  //todo zip stream
  return DecodeQualification.UNABLE;
}

代码示例来源:origin: senbox-org/s1tbx

ZipUtils.findInZip(file, "", Radarsat2Constants.PRODUCT_HEADER_NAME)) {
return DecodeQualification.INTENDED;

代码示例来源:origin: senbox-org/s1tbx

/**
 * Checks whether the given object is an acceptable input for this product reader and if so, the method checks if it
 * is capable of decoding the input's content.
 *
 * @param input any input object
 * @return true if this product reader can decode the given input, otherwise false.
 */
public DecodeQualification getDecodeQualification(final Object input) {
  final File file = ReaderUtils.getFileFromInput(input);
  if (file != null) {
    final String filename = file.getName().toUpperCase();
    if (filename.startsWith(SeaSatConstants.PRODUCT_HEADER_PREFIX)) {
      if (filename.endsWith(SeaSatConstants.getIndicationKey()) && !filename.endsWith(".ISO.XML")) {
        return DecodeQualification.INTENDED;
      }
      if (filename.endsWith(".ZIP") &&
          ZipUtils.findInZip(file, SeaSatConstants.PRODUCT_HEADER_PREFIX, SeaSatConstants.getIndicationKey())) {
        return DecodeQualification.INTENDED;
      }
    }
  }
  //todo zip stream
  return DecodeQualification.UNABLE;
}

代码示例来源:origin: senbox-org/s1tbx

if (filename.endsWith(".zip") && filename.startsWith("s1") && (ZipUtils.findInZip(file, "s1", Sentinel1Constants.PRODUCT_HEADER_NAME) ||
    ZipUtils.findInZip(file, "rs2", Sentinel1Constants.PRODUCT_HEADER_NAME))) {
  return DecodeQualification.INTENDED;

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com