Skip to content
Snippets Groups Projects
Commit 6caea5cc authored by marvin's avatar marvin
Browse files

...

parent ad6afb55
No related merge requests found
...@@ -91,12 +91,12 @@ public class Adapter extends XMLHelper { ...@@ -91,12 +91,12 @@ public class Adapter extends XMLHelper {
case "Custom": case "Custom":
List<Attribute> sensorList = xQueryAttributes(featureModel, "//sensor/@name"); List<Attribute> sensorList = xQueryAttributes(featureModel, "//sensor/@name");
List<String> scAutoList = getFileNames(scAutoPath); // List<String> scAutoList = getFileNames(scAutoPath);
List<String> scOtherList = getFileNames(scOtherPath); // List<String> scOtherList = getFileNames(scOtherPath);
List<String> scList = new ArrayList<String>(); // List<String> scList = new ArrayList<String>();
scList.addAll(scAutoList); // scList.addAll(scAutoList);
scList.addAll(scOtherList); // scList.addAll(scOtherList);
//
// for(Attribute sensor : sensorList) { // for(Attribute sensor : sensorList) {
// boolean inDirectory = false; // boolean inDirectory = false;
// for(String fileName : scList) { // for(String fileName : scList) {
......
...@@ -84,7 +84,8 @@ public class XMLHelper { ...@@ -84,7 +84,8 @@ public class XMLHelper {
} }
/** /**
* Check whether the given directory exists and if not, create it. * Check whether the given directory exists and if not, create it including all possibly
* nonexisting parent directories.
* *
* @param path Path to directory as String * @param path Path to directory as String
* @return false if directory denoted by path does not exist and could not be created; true otherwise * @return false if directory denoted by path does not exist and could not be created; true otherwise
...@@ -92,7 +93,7 @@ public class XMLHelper { ...@@ -92,7 +93,7 @@ public class XMLHelper {
public static boolean checkDirectory(String path) { public static boolean checkDirectory(String path) {
File directory = new File(path); File directory = new File(path);
if(!directory.exists()) { if(!directory.exists()) {
boolean created = directory.mkdir(); boolean created = directory.mkdirs();
if(!created) { if(!created) {
System.err.println("Error: Directory \'"+directory.getPath()+"\' does not exist and could not be created."); System.err.println("Error: Directory \'"+directory.getPath()+"\' does not exist and could not be created.");
return false; return false;
......
...@@ -91,12 +91,12 @@ public class Adapter extends XMLHelper { ...@@ -91,12 +91,12 @@ public class Adapter extends XMLHelper {
case "Custom": case "Custom":
List<Attribute> sensorList = xQueryAttributes(featureModel, "//sensor/@name"); List<Attribute> sensorList = xQueryAttributes(featureModel, "//sensor/@name");
List<String> scAutoList = getFileNames(scAutoPath); // List<String> scAutoList = getFileNames(scAutoPath);
List<String> scOtherList = getFileNames(scOtherPath); // List<String> scOtherList = getFileNames(scOtherPath);
List<String> scList = new ArrayList<String>(); // List<String> scList = new ArrayList<String>();
scList.addAll(scAutoList); // scList.addAll(scAutoList);
scList.addAll(scOtherList); // scList.addAll(scOtherList);
//
// for(Attribute sensor : sensorList) { // for(Attribute sensor : sensorList) {
// boolean inDirectory = false; // boolean inDirectory = false;
// for(String fileName : scList) { // for(String fileName : scList) {
......
...@@ -84,7 +84,8 @@ public class XMLHelper { ...@@ -84,7 +84,8 @@ public class XMLHelper {
} }
/** /**
* Check whether the given directory exists and if not, create it. * Check whether the given directory exists and if not, create it including all possibly
* nonexisting parent directories.
* *
* @param path Path to directory as String * @param path Path to directory as String
* @return false if directory denoted by path does not exist and could not be created; true otherwise * @return false if directory denoted by path does not exist and could not be created; true otherwise
...@@ -92,7 +93,7 @@ public class XMLHelper { ...@@ -92,7 +93,7 @@ public class XMLHelper {
public static boolean checkDirectory(String path) { public static boolean checkDirectory(String path) {
File directory = new File(path); File directory = new File(path);
if(!directory.exists()) { if(!directory.exists()) {
boolean created = directory.mkdir(); boolean created = directory.mkdirs();
if(!created) { if(!created) {
System.err.println("Error: Directory \'"+directory.getPath()+"\' does not exist and could not be created."); System.err.println("Error: Directory \'"+directory.getPath()+"\' does not exist and could not be created.");
return false; return false;
......
...@@ -91,12 +91,12 @@ public class Adapter extends XMLHelper { ...@@ -91,12 +91,12 @@ public class Adapter extends XMLHelper {
case "Custom": case "Custom":
List<Attribute> sensorList = xQueryAttributes(featureModel, "//sensor/@name"); List<Attribute> sensorList = xQueryAttributes(featureModel, "//sensor/@name");
List<String> scAutoList = getFileNames(scAutoPath); // List<String> scAutoList = getFileNames(scAutoPath);
List<String> scOtherList = getFileNames(scOtherPath); // List<String> scOtherList = getFileNames(scOtherPath);
List<String> scList = new ArrayList<String>(); // List<String> scList = new ArrayList<String>();
scList.addAll(scAutoList); // scList.addAll(scAutoList);
scList.addAll(scOtherList); // scList.addAll(scOtherList);
//
// for(Attribute sensor : sensorList) { // for(Attribute sensor : sensorList) {
// boolean inDirectory = false; // boolean inDirectory = false;
// for(String fileName : scList) { // for(String fileName : scList) {
......
...@@ -84,7 +84,8 @@ public class XMLHelper { ...@@ -84,7 +84,8 @@ public class XMLHelper {
} }
/** /**
* Check whether the given directory exists and if not, create it. * Check whether the given directory exists and if not, create it including all possibly
* nonexisting parent directories.
* *
* @param path Path to directory as String * @param path Path to directory as String
* @return false if directory denoted by path does not exist and could not be created; true otherwise * @return false if directory denoted by path does not exist and could not be created; true otherwise
...@@ -92,7 +93,7 @@ public class XMLHelper { ...@@ -92,7 +93,7 @@ public class XMLHelper {
public static boolean checkDirectory(String path) { public static boolean checkDirectory(String path) {
File directory = new File(path); File directory = new File(path);
if(!directory.exists()) { if(!directory.exists()) {
boolean created = directory.mkdir(); boolean created = directory.mkdirs();
if(!created) { if(!created) {
System.err.println("Error: Directory \'"+directory.getPath()+"\' does not exist and could not be created."); System.err.println("Error: Directory \'"+directory.getPath()+"\' does not exist and could not be created.");
return false; return false;
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment