org.vertexium.Edge.getPropertyValue()方法的使用及代码示例

x33g5p2x  于2022-01-19 转载在 其他  
字(4.2k)|赞(0)|评价(0)|浏览(226)

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

Edge.getPropertyValue介绍

暂无

代码示例

代码示例来源:origin: org.visallo/visallo-tools-migration-workspace-to-workproduct

private int positionForProperty(Edge edge, String name) {
    Integer val = (Integer) edge.getPropertyValue(name);
    if (val == null) return 0;
    return val;
  }
}

代码示例来源:origin: visallo/vertexium

@Test
public void testAddEdgeWithProperties() {
  Vertex v1 = graph.addVertex("v1", VISIBILITY_A, AUTHORIZATIONS_A);
  Vertex v2 = graph.addVertex("v2", VISIBILITY_A, AUTHORIZATIONS_A);
  Edge addedEdge = graph.prepareEdge("e1", v1, v2, LABEL_LABEL1, VISIBILITY_A)
      .setProperty("propA", "valueA", VISIBILITY_A)
      .setProperty("propB", "valueB", VISIBILITY_B)
      .save(AUTHORIZATIONS_A_AND_B);
  graph.flush();
  Edge e = graph.getEdge("e1", AUTHORIZATIONS_A);
  Assert.assertEquals(1, count(e.getProperties()));
  assertEquals("valueA", e.getPropertyValues("propA").iterator().next());
  Assert.assertEquals(0, count(e.getPropertyValues("propB")));
  e = graph.getEdge("e1", AUTHORIZATIONS_A_AND_B);
  Assert.assertEquals(2, count(e.getProperties()));
  assertEquals("valueA", e.getPropertyValues("propA").iterator().next());
  assertEquals("valueB", e.getPropertyValues("propB").iterator().next());
  assertEquals("valueA", e.getPropertyValue("propA"));
  assertEquals("valueB", e.getPropertyValue("propB"));
  graph.flush();
  assertEvents(
      new AddVertexEvent(graph, v1),
      new AddVertexEvent(graph, v2),
      new AddEdgeEvent(graph, addedEdge),
      new AddPropertyEvent(graph, addedEdge, addedEdge.getProperty("propA")),
      new AddPropertyEvent(graph, addedEdge, addedEdge.getProperty("propB"))
  );
}

代码示例来源:origin: org.vertexium/vertexium-test

@Test
public void testAddEdgeWithProperties() {
  Vertex v1 = graph.addVertex("v1", VISIBILITY_A, AUTHORIZATIONS_A);
  Vertex v2 = graph.addVertex("v2", VISIBILITY_A, AUTHORIZATIONS_A);
  Edge addedEdge = graph.prepareEdge("e1", v1, v2, LABEL_LABEL1, VISIBILITY_A)
      .setProperty("propA", "valueA", VISIBILITY_A)
      .setProperty("propB", "valueB", VISIBILITY_B)
      .save(AUTHORIZATIONS_A_AND_B);
  graph.flush();
  Edge e = graph.getEdge("e1", AUTHORIZATIONS_A);
  Assert.assertEquals(1, count(e.getProperties()));
  assertEquals("valueA", e.getPropertyValues("propA").iterator().next());
  Assert.assertEquals(0, count(e.getPropertyValues("propB")));
  e = graph.getEdge("e1", AUTHORIZATIONS_A_AND_B);
  Assert.assertEquals(2, count(e.getProperties()));
  assertEquals("valueA", e.getPropertyValues("propA").iterator().next());
  assertEquals("valueB", e.getPropertyValues("propB").iterator().next());
  assertEquals("valueA", e.getPropertyValue("propA"));
  assertEquals("valueB", e.getPropertyValue("propB"));
  graph.flush();
  assertEvents(
      new AddVertexEvent(graph, v1),
      new AddVertexEvent(graph, v2),
      new AddEdgeEvent(graph, addedEdge),
      new AddPropertyEvent(graph, addedEdge, addedEdge.getProperty("propA")),
      new AddPropertyEvent(graph, addedEdge, addedEdge.getProperty("propB"))
  );
}

代码示例来源:origin: org.vertexium/vertexium-test

for (Edge e : edges) {
  if (e.getId().equals("e1")) {
    assertEquals("e1", e.getPropertyValue("prop1"));
    foundE1 = true;
  } else if (e.getId().equals("e2")) {
    assertEquals("e2", e.getPropertyValue("prop1"));
    foundE2 = true;
  } else {

代码示例来源:origin: visallo/vertexium

for (Edge e : edges) {
  if (e.getId().equals("e1")) {
    assertEquals("e1", e.getPropertyValue("prop1"));
    foundE1 = true;
  } else if (e.getId().equals("e2")) {
    assertEquals("e2", e.getPropertyValue("prop1"));
    foundE2 = true;
  } else {

代码示例来源:origin: org.visallo/visallo-tools-migration-workspace-to-workproduct

if (edge != null && edge.getPropertyValue(GRAPH_VISIBLE).equals(true)) {
  LOGGER.info("\tCreating entity: %s", edgeInfo.getVertexId());

相关文章