本文整理了Java中org.esa.snap.core.util.io.FileUtils.getFilenameWithoutExtension()
方法的一些代码示例,展示了FileUtils.getFilenameWithoutExtension()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。FileUtils.getFilenameWithoutExtension()
方法的具体详情如下:
包路径:org.esa.snap.core.util.io.FileUtils
类名称:FileUtils
方法名:getFilenameWithoutExtension
暂无
代码示例来源:origin: senbox-org/snap-desktop
@Override
public boolean accept(File pathname) {
return FileUtils.getFilenameWithoutExtension(pathname).equals(classifierName);
}
});
代码示例来源:origin: senbox-org/s1tbx
private File getImageFile(final File parFile) {
return new File(parFile.getParentFile(), FileUtils.getFilenameWithoutExtension(parFile));
}
代码示例来源:origin: senbox-org/s1tbx
private File[] findImageFiles(final File parFile) {
final File[] files = parFile.getParentFile().listFiles();
final String baseName = FileUtils.getFilenameWithoutExtension(parFile);
final List<File> fileList = new ArrayList<>();
if (files != null) {
for (File file : files) {
if (file.getName().startsWith(baseName) && !file.getName().equals(parFile.getName())) {
fileList.add(file);
}
}
}
return fileList.toArray(new File[fileList.size()]);
}
代码示例来源:origin: senbox-org/s1tbx
private boolean isComplex(final File file) {
String name = file.getName().toLowerCase();
name = FileUtils.getFilenameWithoutExtension(name);
String ext = FileUtils.getExtension(name);
return ext != null && (ext.endsWith("slc") || ext.endsWith("diff"));
}
代码示例来源:origin: senbox-org/s1tbx
private boolean isCoregistered(final File file) {
String name = file.getName().toLowerCase();
name = FileUtils.getFilenameWithoutExtension(name);
String ext = FileUtils.getExtension(name);
return ext != null && ext.endsWith("rslc");
}
代码示例来源:origin: senbox-org/s1tbx
private static String createName(final File file, final int n) {
return FileUtils.getFilenameWithoutExtension(file) + '_' + n + FileUtils.getExtension(file);
}
代码示例来源:origin: senbox-org/s1tbx
private File createParFile(final File file) {
String name = FileUtils.getFilenameWithoutExtension(file);
String ext = FileUtils.getExtension(name);
String newExt = GammaConstants.PAR_EXTENSION;
if (ext == null) {
if (isComplex) {
if (isCoregistered) {
newExt = ".rslc" + newExt;
} else {
newExt = ".slc" + newExt;
}
}
}
name += newExt;
return new File(file.getParent(), name);
}
}
代码示例来源:origin: senbox-org/snap-desktop
private void populateClassifierNames() {
final Path classifierDir = getClassifierFolder();
final File folder = new File(classifierDir.toString());
final File[] listOfFiles = folder.listFiles(new FileFilter() {
public boolean accept(File pathname) {
return pathname.isFile() && pathname.getName().endsWith(BaseClassifier.CLASSIFIER_FILE_EXTENSION);
}
});
if (listOfFiles != null && listOfFiles.length > 0) {
for (File file : listOfFiles) {
classifierNameComboBox.addItem(FileUtils.getFilenameWithoutExtension(file));
}
classifierNameComboBox.setSelectedIndex(0);
} else {
trainBtn.setSelected(true);
}
}
代码示例来源:origin: senbox-org/s2tbx
@Override
public String getProductName() {
return FileUtils.getFilenameWithoutExtension(getInputXml().getFileName().toString());
}
代码示例来源:origin: senbox-org/s1tbx
private void ensureNamingConvention() {
if (_outputFile != null) {
getSourceProduct().setName(FileUtils.getFilenameWithoutExtension(_outputFile));
}
}
代码示例来源:origin: senbox-org/s2tbx
private void ensureNamingConvention() {
if (this.outputFile != null) {
getSourceProduct().setName(FileUtils.getFilenameWithoutExtension(this.outputFile) + JP2Constants.FILE_EXTENSIONS[0]);
}
}
代码示例来源:origin: senbox-org/snap-desktop
private static String createDefaultFileName(final Product raster, String maskName) {
String productName = FileUtils.getFilenameWithoutExtension(raster.getProduct().getName());
return productName + "_" + maskName + "_Mask.txt";
}
代码示例来源:origin: senbox-org/snap-desktop
public AOI(final File file) {
this.aoiFile = file;
if (!aoiFile.exists() || !load(aoiFile)) {
this.name = FileUtils.getFilenameWithoutExtension(file);
this.inputFolder = AOIManager.getLastInputPath();
this.outputFolder = AOIManager.getLastOutputPath();
this.processingGraph = null; //todo VisatApp.getApp().getPreferences().getPropertyString(AOIManager.LAST_GRAPH_PATH,
}
}
代码示例来源:origin: senbox-org/snap-desktop
private static String createDefaultFileName(final RasterDataNode raster) {
return FileUtils.getFilenameWithoutExtension(raster.getProduct().getName()) + "_TRANSECT.txt";
}
代码示例来源:origin: senbox-org/s2tbx
@Override
public String getProductName() {
if(getInputXml().getParent() != null) {
return FileUtils.getFilenameWithoutExtension(getInputXml().getParent().getFileName().toString());
}
return FileUtils.getFilenameWithoutExtension(getInputXml().getFileName().toString());
}
代码示例来源:origin: senbox-org/s2tbx
@Override
public String getProductName() {
if(getInputXml().getParent() != null) {
return FileUtils.getFilenameWithoutExtension(getInputXml().getParent().getFileName().toString());
}
return FileUtils.getFilenameWithoutExtension(getInputXml().getFileName().toString());
}
代码示例来源:origin: senbox-org/s1tbx
private void writeMetadataXML() {
final MetadataElement absRoot = AbstractMetadata.getAbstractedMetadata(getSourceProduct());
File file = ReaderUtils.getFileFromInput(getOutput());
AbstractMetadataIO.saveExternalMetadata(getSourceProduct(), absRoot, new File(file.getParentFile(),
FileUtils.getFilenameWithoutExtension(file.getName()) + ".xml"));
}
}
代码示例来源:origin: senbox-org/snap-desktop
public Range getRangeFromFile() {
final ComboBoxModel<ColorPaletteWrapper> model = getModel();
final int selectedIndex = getSelectedIndex();
final ColorPaletteWrapper paletteWrapper = model.getElementAt(selectedIndex);
String name = paletteWrapper.name;
final ColorPaletteDef cpd;
if (name.startsWith(DERIVED_FROM)) {
name = name.substring(DERIVED_FROM.length()).trim();
if (name.toLowerCase().endsWith(".cpd")) {
name = FileUtils.getFilenameWithoutExtension(name);
}
cpd = findColorPalette(name);
} else {
cpd = paletteWrapper.cpd;
}
return new Range(cpd.getMinDisplaySample(), cpd.getMaxDisplaySample());
}
代码示例来源:origin: senbox-org/snap-desktop
private String createDefaultFileName(MetadataViewTopComponent productMetadataView) {
return FileUtils.getFilenameWithoutExtension(productMetadataView.getDocument().getProduct().getName()) + "_" +
productMetadata.getName() +
".txt";
}
代码示例来源:origin: senbox-org/snap-desktop
void updateForm() {
if (form.getSettingsFile() != null) {
optionsWindow.setTitle(DIALOG_TITLE + " - " + FileUtils.getFilenameWithoutExtension(form.getSettingsFile()));
} else {
optionsWindow.setTitle(DIALOG_TITLE);
}
form.getBindingContext().adjustComponents();
form.updateState();
}
内容来源于网络,如有侵权,请联系作者删除!