Skip to content

Commit

Permalink
Update Processor.java
Browse files Browse the repository at this point in the history
  • Loading branch information
rac021 authored Nov 8, 2017
1 parent 7ec61d4 commit 9f69561
Showing 1 changed file with 14 additions and 13 deletions.
27 changes: 14 additions & 13 deletions src/main/java/org/inra/yedgen/processor/Processor.java
Original file line number Diff line number Diff line change
Expand Up @@ -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 */

Expand Down Expand Up @@ -513,8 +514,8 @@ private void updatePrefixs(String prefixFile, Map<String, String> prefixMap ) {
.replace(">","")) ;
}) ;

} catch (IOException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace() ;
}
}

Expand All @@ -525,17 +526,17 @@ private void updateConnection(String connecFile, Map<String, String> sourceDecla

try (Stream<String> 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() ;
}
}

Expand Down

0 comments on commit 9f69561

Please sign in to comment.