Map<String, String> vertexProperties = new HashMap<String, String>();
for (String key : vertex.getPropertyKeys()) {
vertexProperties.put(key, vertex.<String>getProperty(key));
}
RelationshipType vertexType = RelationshipType.fromString(
vertex.<String>getProperty(RelationshipProperty.TYPE.getName()));
// get the properties from relationships
if (captureRelationships && (vertexType == RelationshipType.FEED_INSTANCE
|| vertexType == RelationshipType.PROCESS_INSTANCE)) {
for (Edge edge : vertex.getEdges(Direction.OUT)) {