Created
May 8, 2014 22:22
-
-
Save okram/82ea8aa9dbe8700adfed to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void mergeResults(final Graph original, final Graph computed, final Map<String, String> keyMapping) { | |
computed.V().forEach(v1 -> { | |
Vertex v2 = original.v(v1.getId()); | |
keyMapping.forEach((k, v) -> { | |
if (v1.getProperty(k).isPresent()) { | |
v2.setProperty(v, v1.getProperty(k).get()); | |
} | |
}); | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment