From 9f6956155ed170a9d9ecfd163d913bfb7e8cbae5 Mon Sep 17 00:00:00 2001 From: Yahiaoui Rachid Date: Wed, 8 Nov 2017 14:16:02 +0100 Subject: [PATCH] Update Processor.java --- .../org/inra/yedgen/processor/Processor.java | 27 ++++++++++--------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/src/main/java/org/inra/yedgen/processor/Processor.java b/src/main/java/org/inra/yedgen/processor/Processor.java index a7f010a..48c81c5 100644 --- a/src/main/java/org/inra/yedgen/processor/Processor.java +++ b/src/main/java/org/inra/yedgen/processor/Processor.java @@ -200,7 +200,8 @@ public boolean processOnlyGraphVariables ( String outputFile , extension ; try { - if( graphExtractor.getMagicFilter() != null ) { + if ( graphExtractor.getMagicFilter() != null && + ! graphExtractor.getMagicFilter().trim().isEmpty() ) { /* Split if MagicFilter Enabled */ @@ -513,8 +514,8 @@ private void updatePrefixs(String prefixFile, Map prefixMap ) { .replace(">","")) ; }) ; - } catch (IOException e) { - e.printStackTrace(); + } catch (IOException e) { + e.printStackTrace() ; } } @@ -525,17 +526,17 @@ private void updateConnection(String connecFile, Map sourceDecla try (Stream lines = Files.lines(Paths.get(connecFile))) { - lines.forEach ( line -> { - if(line.replaceAll(" +", " ").trim().startsWith("obda-") && line.contains(":")) { - String[] splitedLines = line.replaceAll(" +", "").trim().split(":", 2) ; - if( splitedLines.length >= 2 ) - sourceDeclarationMap.put( splitedLines[0].trim().replace("obda-", "") , - splitedLines[1].trim()) ; - } - }) ; + lines.forEach ( line -> { + if(line.replaceAll(" +", " ").trim().startsWith("obda-") && line.contains(":")) { + String[] splitedLines = line.replaceAll(" +", "").trim().split(":", 2) ; + if( splitedLines.length >= 2 ) + sourceDeclarationMap.put( splitedLines[0].trim().replace("obda-", "") , + splitedLines[1].trim()) ; + } + }) ; - } catch (IOException e) { - e.printStackTrace(); + } catch (IOException e) { + e.printStackTrace() ; } }