diff --git a/rdf2graphml/src/main/java/uk/ac/rothamsted/kg/rdf2pg/graphml/export/support/GraphMLRelationExportHandler.java b/rdf2graphml/src/main/java/uk/ac/rothamsted/kg/rdf2pg/graphml/export/support/GraphMLRelationExportHandler.java index f9a9fec..54a8560 100644 --- a/rdf2graphml/src/main/java/uk/ac/rothamsted/kg/rdf2pg/graphml/export/support/GraphMLRelationExportHandler.java +++ b/rdf2graphml/src/main/java/uk/ac/rothamsted/kg/rdf2pg/graphml/export/support/GraphMLRelationExportHandler.java @@ -72,10 +72,13 @@ public void accept ( Set relRecords ) .map ( Integer::valueOf ) .orElse ( -1 ); -if ( ondexIds.contains ( relOndexId ) ) - log.warn ( "==== DUPED ID {} IN PROCESSOR", relOndexId ); -else - ondexIds.add ( relOndexId ); +if ( relOndexId != -1 ) +{ + if ( ondexIds.contains ( relOndexId ) ) + log.warn ( "==== DUPED ID {} IN HANDLER", relOndexId ); + else + ondexIds.add ( relOndexId ); +} String type = pgRelation.getType (); diff --git a/rdf2graphml/src/main/java/uk/ac/rothamsted/kg/rdf2pg/graphml/export/support/GraphMLRelationExportProcessor.java b/rdf2graphml/src/main/java/uk/ac/rothamsted/kg/rdf2pg/graphml/export/support/GraphMLRelationExportProcessor.java index b7e2cb7..e3b6a77 100644 --- a/rdf2graphml/src/main/java/uk/ac/rothamsted/kg/rdf2pg/graphml/export/support/GraphMLRelationExportProcessor.java +++ b/rdf2graphml/src/main/java/uk/ac/rothamsted/kg/rdf2pg/graphml/export/support/GraphMLRelationExportProcessor.java @@ -60,11 +60,13 @@ public void process ( RdfDataManager rdfMgr, Object...opts ) .map ( Literal::getInt ) .orElse ( -1 ); -if ( ondexIds.contains ( relOndexId ) ) - log.warn ( "==== DUPED ID {} IN HANDLER", relOndexId ); -else - ondexIds.add ( relOndexId ); - +if ( relOndexId != -1 ) +{ + if ( ondexIds.contains ( relOndexId ) ) + log.warn ( "==== DUPED ID {} IN PROCESSOR", relOndexId ); + else + ondexIds.add ( relOndexId ); +} solProc.accept ( qsol ); } );