use of org.onebusaway.admin.util.NYCFileUtils in project onebusaway-application-modules by camsys.
the class HastusTranslateTask method createScheduleDataDir.
private String createScheduleDataDir(String file) {
NYCFileUtils fu = new NYCFileUtils();
_log.info("expanding " + file);
String dir = fu.parseDirectory(file);
String auxDir = dir + File.separator + AUX_DIR;
fu.unzip(file, auxDir);
File[] files = new File(auxDir).listFiles();
if (files != null) {
for (File checkDir : files) {
if (checkDir.exists() && checkDir.isDirectory()) {
if (checkDir.getName().toUpperCase().contains("SCHEDULES")) {
_log.info("routes data dir=" + checkDir);
return checkDir.toString();
}
}
}
}
_log.error("could not find routes data dir");
return null;
}
use of org.onebusaway.admin.util.NYCFileUtils in project onebusaway-application-modules by camsys.
the class HastusTranslateTask method createGisDataDir.
private String createGisDataDir(String file) {
NYCFileUtils fu = new NYCFileUtils();
_log.info("expanding " + file);
String dir = fu.parseDirectory(file);
String auxDir = dir + File.separator + AUX_DIR;
fu.unzip(file, auxDir);
File[] files = new File(auxDir).listFiles();
if (files != null) {
for (File checkDir : files) {
if (checkDir.exists() && checkDir.isDirectory()) {
if (checkDir.getName().toUpperCase().contains("GIS")) {
_log.info("gis data dir=" + checkDir);
return checkDir.toString();
}
}
}
}
_log.error("could not find gis data dir");
return null;
}
Aggregations