更新时间:2022-06-30 GMT+08:00
添加Property
您可以使用GES提供的接口添加Property。示例代码如下:
public static void addProperties(GraphClient graphClient) throws ApiException { AddPropertiesReq req = new AddPropertiesReq(); req.setLabelName("stop"); List<Property> properties = new ArrayList<Property>(); Property property = new Property(); property.put("name", "a"); property.put("cardinality", "single"); property.put("dataType", "int"); properties.add(property); req.setProperties(properties); Map<String, Object> result = graphClient.addProperties(req); System.out.println(MapUtils.map2json(result)); }
父主题: 使用业务面SDK