Ejemplo n.º 1
0
 /**
  * Implemented as specified by the {@link Importer} interface.
  *
  * @see Importer#importData(ImportableObject)
  */
 public void importData(ImportableObject data) {
   if (model.getState() == DISCARDED) return;
   if (data == null || data.getFiles() == null || data.getFiles().size() == 0) {
     UserNotifier un = ImporterAgent.getRegistry().getUserNotifier();
     un.notifyInfo("Import", "No Files to import.");
     return;
   }
   view.showRefreshMessage(chooser.isRefreshLocation());
   if (data.hasNewTags()) model.setTags(null);
   ImporterUIElement element = view.addImporterElement(data);
   if (model.getState() == IMPORTING) return;
   importData(element);
 }
Ejemplo n.º 2
0
 /**
  * Implemented as specified by the {@link Importer} interface.
  *
  * @see Importer#retryImport()
  */
 public void retryImport() {
   if (model.getState() == DISCARDED) return;
   ImporterUIElement element = view.getSelectedPane();
   if (element == null) return;
   List<FileImportComponent> l = element.getFilesToReimport();
   if (l == null || l.size() == 0) return;
   Iterator<FileImportComponent> i = l.iterator();
   FileImportComponent fc;
   ImportableObject object = element.getData();
   List<File> files = new ArrayList<File>();
   while (i.hasNext()) {
     fc = i.next();
     fc.setReimported(true);
     files.add(fc.getFile());
   }
   object.reImport(files);
   importData(object);
 }
Ejemplo n.º 3
0
 /**
  * Returns <code>true</code> if the extension of the specified file is a HCS files, <code>false
  * </code> otherwise.
  *
  * @param f The file to handle.
  * @return See above.
  */
 public boolean isHCSFile() {
   if (isFolderAsContainer()) return false;
   return ImportableObject.isHCSFile(file);
 }