private static boolean isFolderProduct(final ProductEntry entry) { final String mission = entry.getMission(); for (String folderMission : folderMissions) { if (mission.equals(folderMission)) return true; } if(entry.getFile() == null) { return false; } final String fileName = entry.getFile().getName().toLowerCase(); for (String ext : folderExt) { if (fileName.endsWith(ext)) return true; } if (mission.equals("ERS1") || mission.equals("ERS2")) { if (!isSingleFile(entry)) // if not .e1 or .e2 return true; } return false; } }
public int compare(final Object o1, final Object o2) { if (o1 == null && o2 == null) { return 0; } else if (o1 == null) { return -1; } else if (o2 == null) { return 1; } else if (o1 instanceof ProductEntry && o2 instanceof ProductEntry) { final ProductEntry e1 = (ProductEntry) o1; final ProductEntry e2 = (ProductEntry) o2; if (sortBy.equals(SORT_BY.NAME)) { return e1.getName().compareTo(e2.getName()); } else if (sortBy.equals(SORT_BY.TYPE)) { return e1.getProductType().compareTo(e2.getProductType()); } else if (sortBy.equals(SORT_BY.MISSON)) { return e1.getMission().compareTo(e2.getMission()); } else if (sortBy.equals(SORT_BY.DATE)) { return e1.getFirstLineTime().getAsDate().compareTo(e2.getFirstLineTime().getAsDate()); } else if (sortBy.equals(SORT_BY.FILESIZE)) { final Long size1 = e1.getFileSize(); final Long size2 = e2.getFileSize(); return size1.compareTo(size2); } } return o1.toString().compareTo(o2.toString()); } };
text.append('\n'); text.append("Mission: " + entry.getMission() + '\n'); text.append("Mode: " + entry.getAcquisitionMode() + '\n'); text.append("Type: " + entry.getProductType() + '\n');
values = new String[]{ entry.getName(), entry.getMission() + " " + entry.getProductType() + " " + entry.getPass() + " " + polStr + " " + dateString + " " + pixelSpacing, }; file.getName(), entry.getName(), entry.getMission() + " " + entry.getProductType() + " " + entry.getPass() + " " + polStr, dateString + " " + pixelSpacing, entry.getFileFormat() + " " + fileSize values = new String[]{ entry.getName(), entry.getMission() + " " + entry.getProductType() + " " + entry.getPass() + " " + polStr, dateString + " " + pixelSpacing, entry.getFileFormat() + " " + fileSize
final JointSearchDialog dlg = new JointSearchDialog("Joint Search Criteria", selections[0].getMission()); dlg.show(); if (!dlg.IsOK()) {