org.gradoop.common.model.impl.pojo.Vertex.setProperties()方法的使用及代码示例

x33g5p2x  于2022-02-01 转载在 其他  
字(3.2k)|赞(0)|评价(0)|浏览(109)

本文整理了Java中org.gradoop.common.model.impl.pojo.Vertex.setProperties()方法的一些代码示例,展示了Vertex.setProperties()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Vertex.setProperties()方法的具体详情如下:
包路径:org.gradoop.common.model.impl.pojo.Vertex
类名称:Vertex
方法名:setProperties

Vertex.setProperties介绍

暂无

代码示例

代码示例来源:origin: dbs-leipzig/gradoop

/**
 * Creates a new instance of this JSON string to vertex converting function.
 *
 * @param vertexFactory The vertex factory used to create new vertices.
 */
public MinimalJsonToVertex(EPGMVertexFactory<Vertex> vertexFactory) {
 this.reuse = Objects.requireNonNull(vertexFactory).createVertex(JSON_VERTEX_LABEL);
 this.reuse.setProperties(Properties.create());
}

代码示例来源:origin: dbs-leipzig/gradoop

@Override
 public GraphTransaction map(GraphTransaction transaction) throws Exception {

  for (Vertex vertex : transaction.getVertices()) {
   vertex.setProperties(null);
   vertex.setGraphIds(null);
  }

  for (Edge edge : transaction.getEdges()) {
   edge.setProperties(null);
   edge.setGraphIds(null);
  }

  return transaction;
 }
}

代码示例来源:origin: dbs-leipzig/gradoop

/**
 * Constructs a vertex from a given JSON string representation.
 *
 * @param jsonString The String representation of a JSON object.
 * @return A new vertex from the JSON object.
 */
@Override
public Vertex map(String jsonString) throws Exception {
 JSONObject jsonVertex = new JSONObject(jsonString);
 Properties properties = reuse.getProperties();
 if (properties == null) {
  properties = Properties.create();
  reuse.setProperties(properties);
 }
 properties.clear();
 for (Iterator it = jsonVertex.keys(); it.hasNext();) {
  String key = (String) it.next();
  PropertyValue propertyValue = getPropertyValue(jsonVertex, key);
  properties.set(key, propertyValue);
 }
 return reuse;
}

代码示例来源:origin: org.gradoop/gradoop-flink

@Override
 public GraphTransaction map(GraphTransaction transaction) throws Exception {

  for (Vertex vertex : transaction.getVertices()) {
   vertex.setProperties(null);
   vertex.setGraphIds(null);
  }

  for (Edge edge : transaction.getEdges()) {
   edge.setProperties(null);
   edge.setGraphIds(null);
  }

  return transaction;
 }
}

代码示例来源:origin: dbs-leipzig/gradoop

@Override
 public Tuple2<Vertex, GradoopId> map(GraphHead hid) throws Exception {
  reusable.f0.setId(GradoopId.get());
  reusable.f0.setLabel(hid.getLabel());
  reusable.f0.setProperties(hid.getProperties());
  reusable.f1 = hid.getId();
  return reusable;
 }
}

代码示例来源:origin: org.gradoop/gradoop-flink

@Override
 public Vertex cross(GraphHead searchGraphHead, GraphHead patternGraphSeachHead) throws Exception {
  REUSABLE_VERTEX.setLabel(patternGraphSeachHead.getLabel());
  REUSABLE_VERTEX.setProperties(patternGraphSeachHead.getProperties());
  REUSABLE_VERTEX.setId(newVertexId);
  REUSABLE_VERTEX.addGraphId(searchGraphHead.getId());
  return REUSABLE_VERTEX;
 }
}

代码示例来源:origin: dbs-leipzig/gradoop

@Override
 public Vertex cross(GraphHead searchGraphHead, GraphHead patternGraphSeachHead) throws Exception {
  REUSABLE_VERTEX.setLabel(patternGraphSeachHead.getLabel());
  REUSABLE_VERTEX.setProperties(patternGraphSeachHead.getProperties());
  REUSABLE_VERTEX.setId(newVertexId);
  REUSABLE_VERTEX.addGraphId(searchGraphHead.getId());
  return REUSABLE_VERTEX;
 }
}

代码示例来源:origin: org.gradoop/gradoop-flink

@Override
 public Tuple2<Vertex, GradoopId> map(GraphHead hid) throws Exception {
  reusable.f0.setId(GradoopId.get());
  reusable.f0.setLabel(hid.getLabel());
  reusable.f0.setProperties(hid.getProperties());
  reusable.f1 = hid.getId();
  return reusable;
 }
}

相关文章