Search in sources :

Example 1 with PropertyEntityProto

use of com.alibaba.maxgraph.Message.PropertyEntityProto in project GraphScope by alibaba.

the class ResultParserUtils method parseVertex.

private static VertexResult parseVertex(Message.RawMessageProto message, GraphSchema schema, Graph graph) {
    long id = message.getId();
    int typeId = message.getTypeId();
    int storeId = message.getStoreId();
    VertexResult v = parseVertex(id, typeId, schema, graph, storeId);
    for (PropertyEntityProto p : message.getExtra().getExtraValueProp().getPropListList()) {
        Object value = parseValue(p.getPropValue(), schema, graph);
        String name = getPropertyName(p.getPropId(), schema);
        v.addProperty(new VertexPropertyResult(p.getPropId(), name, value, null));
    }
    return v;
}
Also used : VertexResult(com.alibaba.maxgraph.result.VertexResult) PropertyEntityProto(com.alibaba.maxgraph.Message.PropertyEntityProto) ByteString(com.google.protobuf.ByteString) VertexPropertyResult(com.alibaba.maxgraph.result.VertexPropertyResult)

Aggregations

PropertyEntityProto (com.alibaba.maxgraph.Message.PropertyEntityProto)1 VertexPropertyResult (com.alibaba.maxgraph.result.VertexPropertyResult)1 VertexResult (com.alibaba.maxgraph.result.VertexResult)1 ByteString (com.google.protobuf.ByteString)1