protected class GoraGVertexVertexWriter extends GoraVertexWriter {
@Override
protected Persistent getGoraVertex(
Vertex<LongWritable, DoubleWritable, FloatWritable> vertex) {
GVertexResult tmpGVertex = new GVertexResult();
tmpGVertex.setVertexId(vertex.getId().toString());
tmpGVertex.setVertexValue(Float.parseFloat(vertex.getValue().toString()));
Iterator<Edge<LongWritable, FloatWritable>> it =
vertex.getEdges().iterator();
while (it.hasNext()) {
Edge<LongWritable, FloatWritable> edge = it.next();
tmpGVertex.getEdges().put(
edge.getTargetVertexId().toString(),
edge.getValue().toString());
}
getLogger().debug("GoraObject created: " + tmpGVertex.toString());
return tmpGVertex;
}