fixed tree

This commit is contained in:
gexce
2017-10-17 17:05:21 +02:00
parent 9397cd17ee
commit f9cb742495
4 changed files with 17 additions and 15 deletions
@@ -1,4 +1,4 @@
# TRACE, DEBUG, INFO, WARN, ERROR, FATAL, OFF
logging.level.com.bayer=DEBUG
logging.pattern.console=%d{yyyy-MM-dd HH:mm:ss} %-5level- %msg%n
logging.file=entryDownload.log
logging.file=application.log
@@ -29,7 +29,7 @@ import com.bayer.edam.migration.mam.Entry.Download;
import com.bayer.edam.migration.mam.Entrylist;
import com.fasterxml.jackson.databind.ObjectMapper;
@SpringBootApplication
//@SpringBootApplication
@PropertySource("file:secret.properties")
public class EntryDownloader implements CommandLineRunner {
@@ -34,7 +34,7 @@ import com.bayer.edam.migration.adam.WriteRecord;
import com.bayer.edam.migration.mam.Entry;
import com.fasterxml.jackson.databind.ObjectMapper;
//@SpringBootApplication
@SpringBootApplication
@PropertySource("file:secret.properties")
public class MamMigrationSelective implements CommandLineRunner {
@@ -42,7 +42,7 @@ public class MamMigrationSelective implements CommandLineRunner {
static final String adamHost = "https://edam-q.bayer.com:2015";
static final String mamHost = "https://service.media-assistant.animalhealth.bayer.com";
static final int[] selection = { /*71948, 71048, 70778, 70746, 70142,*/ 70361, /*63924, 71263, 63201, 56942, 57641, 70745, 70440, 70340,
static final int[] selection = { 71948, /*71048, 70778, 70746, 70142,*/ 70361, /*63924, 71263, 63201, 56942, 57641, 70745, 70440, 70340,
70288, 71725*/ };
static final File entryLog = new File("C:\\Temp\\Migration AH\\entry.log");
@@ -130,7 +130,7 @@ public class MamMigrationSelective implements CommandLineRunner {
// TODO HIER GEHT'S WEITER
// process table
Set<String> keywords = new HashSet<String>();
String status = "Status.Released";
@@ -81,8 +81,8 @@ public class CategoryTree {
for (String[] row : inputRows) {
rowNum++;
if (row[0] == null) {
log.info(rowNum + " - skipping, first cell ist empty");
if (row[0] == null || row[0].equals("Action")) {
log.info(rowNum + " - skipping, first cell ist empty or heading");
continue;
}
@@ -97,13 +97,15 @@ public class CategoryTree {
}
currentPath[rowLevel] = row[rowLevel + 3].trim();
// int i = 1;
// System.out.print("[" + currentPath[0]);
// while (i < currentPath.length && currentPath[i] != null) {
// System.out.print(", " + currentPath[i]);
// i++;
// }
// System.out.println("]");
/* // print node
int i = 1;
System.out.print("[" + currentPath[0]);
while (i < currentPath.length && currentPath[i] != null) {
System.out.print(", " + currentPath[i]);
i++;
}
System.out.println("]");
*/
Node node = getNode(currentPath);
@@ -204,7 +206,7 @@ public class CategoryTree {
public static void main(String[] args) {
try {
new CategoryTree("C:\\Temp\\Migration AH\\categories.json", "C:\\Temp\\Migration AH\\Media Assistant Categories - Code.csv");
new CategoryTree("C:\\Temp\\Migration AH\\2017-10-17_categories.json", "C:\\Temp\\Migration AH\\Media_Assistant_Categories_131017_EDITED.csv");
} catch (IOException e) {
e.printStackTrace();
}