@Override public boolean isSingleFile(String id) throws FormatException, IOException { if (!checkSuffix(id, FLEX_SUFFIX)) return false; return serverMap.isEmpty() || !isGroupFiles(); }
@Override public boolean isSingleFile(String id) throws FormatException, IOException { if (!checkSuffix(id, FLEX_SUFFIX)) return false; return serverMap.isEmpty() || !isGroupFiles(); }
/** * Search for files that correspond to the given file. * If the given file is a .mea file, then the corresponding files will be * .res and .flex files. * If the given file is a .flex file, then the corresponding files will be * .res and .mea files. */ private String[] findFiles(Location baseFile) throws IOException { String[] suffixes = new String[0]; if (checkSuffix(baseFile.getName(), FLEX_SUFFIX)) { suffixes = new String[] {MEA_SUFFIX, RES_SUFFIX}; LOGGER.debug("Looking for files with the suffix '{}' or '{}'.", MEA_SUFFIX, RES_SUFFIX); } else if (checkSuffix(baseFile.getName(), MEA_SUFFIX)) { suffixes = new String[] {FLEX_SUFFIX, RES_SUFFIX}; LOGGER.debug("Looking for files with the suffix '{}' or '{}'.", FLEX_SUFFIX, RES_SUFFIX); } return findFiles(baseFile, suffixes); }
/** * Search for files that correspond to the given file. * If the given file is a .mea file, then the corresponding files will be * .res and .flex files. * If the given file is a .flex file, then the corresponding files will be * .res and .mea files. */ private String[] findFiles(Location baseFile) throws IOException { String[] suffixes = new String[0]; if (checkSuffix(baseFile.getName(), FLEX_SUFFIX)) { suffixes = new String[] {MEA_SUFFIX, RES_SUFFIX}; LOGGER.debug("Looking for files with the suffix '{}' or '{}'.", MEA_SUFFIX, RES_SUFFIX); } else if (checkSuffix(baseFile.getName(), MEA_SUFFIX)) { suffixes = new String[] {FLEX_SUFFIX, RES_SUFFIX}; LOGGER.debug("Looking for files with the suffix '{}' or '{}'.", FLEX_SUFFIX, RES_SUFFIX); } return findFiles(baseFile, suffixes); }
@Override protected void initFile(String id) throws FormatException, IOException { super.initFile(id); measurementFiles = new ArrayList<String>(); acquisitionDates = new HashMap<Integer, Timestamp>(); if (checkSuffix(id, FLEX_SUFFIX)) { initFlexFile(id); } else if (checkSuffix(id, RES_SUFFIX)) { initResFile(id); } else initMeaFile(id); if (plateCount == flexFiles.size()) { plateCount /= wellCount; if ((plateCount % fieldCount) == 0) { plateCount /= fieldCount; } } }
@Override protected void initFile(String id) throws FormatException, IOException { super.initFile(id); measurementFiles = new ArrayList<String>(); acquisitionDates = new HashMap<Integer, Timestamp>(); if (checkSuffix(id, FLEX_SUFFIX)) { initFlexFile(id); } else if (checkSuffix(id, RES_SUFFIX)) { initResFile(id); } else initMeaFile(id); if (plateCount == flexFiles.size()) { plateCount /= wellCount; if ((plateCount % fieldCount) == 0) { plateCount /= fieldCount; } } }
if (files != null) { for (String f : files) { if (checkSuffix(f, FLEX_SUFFIX)) flex.add(f);
if (checkSuffix(f, RES_SUFFIX)) { parseResFile(f);
if (files != null) { for (String f : files) { if (checkSuffix(f, FLEX_SUFFIX)) flex.add(f);
/** Initialize the dataset from a .res file. */ private void initResFile(String id) throws FormatException, IOException { LOGGER.debug("initResFile({})", id); parseResFile(id); Location thisFile = new Location(id).getAbsoluteFile(); Location parent = thisFile.getParentFile(); LOGGER.debug(" Looking for an .mea file in {}", parent.getAbsolutePath()); String[] list = parent.list(); for (String file : list) { if (checkSuffix(file, MEA_SUFFIX)) { String mea = new Location(parent, file).getAbsolutePath(); LOGGER.debug(" Found .mea file {}", mea); initMeaFile(mea); if (!measurementFiles.contains(thisFile.getAbsolutePath())) { measurementFiles.add(thisFile.getAbsolutePath()); } return; } } throw new FormatException("Could not find an .mea file."); }
/** Initialize the dataset from a .res file. */ private void initResFile(String id) throws FormatException, IOException { LOGGER.debug("initResFile({})", id); parseResFile(id); Location thisFile = new Location(id).getAbsoluteFile(); Location parent = thisFile.getParentFile(); LOGGER.debug(" Looking for an .mea file in {}", parent.getAbsolutePath()); String[] list = parent.list(); for (String file : list) { if (checkSuffix(file, MEA_SUFFIX)) { String mea = new Location(parent, file).getAbsolutePath(); LOGGER.debug(" Found .mea file {}", mea); initMeaFile(mea); if (!measurementFiles.contains(thisFile.getAbsolutePath())) { measurementFiles.add(thisFile.getAbsolutePath()); } return; } } throw new FormatException("Could not find an .mea file."); }
if (checkSuffix(f, RES_SUFFIX)) { parseResFile(f);
String lfile = file.toLowerCase(); String path = new Location(plateDir, file).getAbsolutePath(); if (checkSuffix(file, suffixes)) { fileList.add(path); LOGGER.debug("Found file {}", path); boolean foundSuffix = false; for (String file : fileList) { if (checkSuffix(file, suffix)) { foundSuffix = true; break; for (String file : fileList) { LOGGER.debug(" {}", file); if (checkSuffix(file, MEASUREMENT_SUFFIXES) && !measurementFiles.contains(file)) for (String file : fileList) { LOGGER.debug(" {}", file); if (checkSuffix(file, MEASUREMENT_SUFFIXES) && !measurementFiles.contains(file))
String lfile = file.toLowerCase(); String path = new Location(plateDir, file).getAbsolutePath(); if (checkSuffix(file, suffixes)) { fileList.add(path); LOGGER.debug("Found file {}", path); boolean foundSuffix = false; for (String file : fileList) { if (checkSuffix(file, suffix)) { foundSuffix = true; break; for (String file : fileList) { LOGGER.debug(" {}", file); if (checkSuffix(file, MEASUREMENT_SUFFIXES) && !measurementFiles.contains(file)) for (String file : fileList) { LOGGER.debug(" {}", file); if (checkSuffix(file, MEASUREMENT_SUFFIXES) && !measurementFiles.contains(file))