本文整理了Java中org.vertexium.Edge.getProperties()
方法的一些代码示例,展示了Edge.getProperties()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Edge.getProperties()
方法的具体详情如下:
包路径:org.vertexium.Edge
类名称:Edge
方法名:getProperties
暂无
代码示例来源:origin: org.vertexium/vertexium-core
@Override
public Iterable<Property> getProperties() {
return getEdge().getProperties();
}
代码示例来源:origin: visallo/vertexium
@Override
public Iterable<Property> getProperties() {
return getEdge().getProperties();
}
代码示例来源:origin: org.vertexium/vertexium-cypher
private String columnEdgeToString(VertexiumCypherQueryContext ctx, Edge edge) {
StringBuilder result = new StringBuilder();
result.append("[");
result.append(":");
result.append(edge.getLabel());
if (count(edge.getProperties()) > 0) {
result.append(" ");
result.append(elementPropertiesToString(ctx, edge));
}
result.append("]");
return result.toString();
}
代码示例来源:origin: visallo/vertexium
private String columnEdgeToString(VertexiumCypherQueryContext ctx, Edge edge) {
StringBuilder result = new StringBuilder();
result.append("[");
result.append(":");
result.append(edge.getLabel());
if (count(edge.getProperties()) > 0) {
result.append(" ");
result.append(elementPropertiesToString(ctx, edge));
}
result.append("]");
return result.toString();
}
代码示例来源:origin: visallo/vertexium
VertexiumScript.getContextProperties().clear();
int propIndex = 0;
for (Property prop : e.getProperties()) {
String propertyIndexString = "p" + propIndex;
String valueString = VertexiumScript.valueToString(prop.getValue(), false);
代码示例来源:origin: org.vertexium/vertexium-test
Assert.assertEquals(1, count(e.getProperties()));
assertEquals("valueA", e.getPropertyValues("propA").iterator().next());
Assert.assertEquals(0, count(e.getProperties()));
Assert.assertEquals(0, count(e.getPropertyValues("propA")));
Assert.assertEquals(1, count(e.getProperties()));
assertEquals("valueA_changed", e.getPropertyValues("propA").iterator().next());
Assert.assertEquals(2, count(e.getProperties()));
Assert.assertEquals(2, count(e.getPropertyValues("propA")));
代码示例来源:origin: visallo/vertexium
Assert.assertEquals(1, count(e.getProperties()));
assertEquals("valueA", e.getPropertyValues("propA").iterator().next());
Assert.assertEquals(0, count(e.getProperties()));
Assert.assertEquals(0, count(e.getPropertyValues("propA")));
Assert.assertEquals(1, count(e.getProperties()));
assertEquals("valueA_changed", e.getPropertyValues("propA").iterator().next());
Assert.assertEquals(2, count(e.getProperties()));
Assert.assertEquals(2, count(e.getPropertyValues("propA")));
代码示例来源: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: 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: visallo/vertexium
@Test
public void testSoftDeletePropertyOnEdgeNotIndexed() {
Vertex v1 = graph.addVertex("v1", VISIBILITY_A, AUTHORIZATIONS_A_AND_B);
Vertex v2 = graph.addVertex("v2", VISIBILITY_B, AUTHORIZATIONS_A_AND_B);
ElementBuilder<Edge> elementBuilder = graph.prepareEdge("e1", v1, v2, LABEL_LABEL1, VISIBILITY_B)
.setProperty("prop1", "value1", VISIBILITY_B);
elementBuilder.setIndexHint(IndexHint.DO_NOT_INDEX);
Edge e1 = elementBuilder.save(AUTHORIZATIONS_A_AND_B);
graph.flush();
ExistingElementMutation<Edge> m = e1.prepareMutation();
m.softDeleteProperty("prop1", VISIBILITY_B);
m.setIndexHint(IndexHint.DO_NOT_INDEX);
m.save(AUTHORIZATIONS_A_AND_B);
graph.flush();
e1 = graph.getEdge("e1", AUTHORIZATIONS_A_AND_B);
assertEquals(0, IterableUtils.count(e1.getProperties()));
}
代码示例来源:origin: org.vertexium/vertexium-test
@Test
public void testSoftDeletePropertyOnEdgeNotIndexed() {
Vertex v1 = graph.addVertex("v1", VISIBILITY_A, AUTHORIZATIONS_A_AND_B);
Vertex v2 = graph.addVertex("v2", VISIBILITY_B, AUTHORIZATIONS_A_AND_B);
ElementBuilder<Edge> elementBuilder = graph.prepareEdge("e1", v1, v2, LABEL_LABEL1, VISIBILITY_B)
.setProperty("prop1", "value1", VISIBILITY_B);
elementBuilder.setIndexHint(IndexHint.DO_NOT_INDEX);
Edge e1 = elementBuilder.save(AUTHORIZATIONS_A_AND_B);
graph.flush();
ExistingElementMutation<Edge> m = e1.prepareMutation();
m.softDeleteProperty("prop1", VISIBILITY_B);
m.setIndexHint(IndexHint.DO_NOT_INDEX);
m.save(AUTHORIZATIONS_A_AND_B);
graph.flush();
e1 = graph.getEdge("e1", AUTHORIZATIONS_A_AND_B);
assertEquals(0, IterableUtils.count(e1.getProperties()));
}
代码示例来源:origin: org.visallo/visallo-common-rdf
for (Edge edge : results.getEdges()) {
workQueueRepository.broadcastElement(edge, workspaceId);
for (Property prop : edge.getProperties()) {
workQueueRepository.pushGraphPropertyQueue(edge, prop, priority);
代码示例来源:origin: org.visallo/visallo-core
edgeExistingElementMutation.alterElementVisibility(visalloVisibility.getVisibility());
for (Property property : edge.getProperties()) {
boolean userVisible;
if (VisalloProperties.JUSTIFICATION.getPropertyName().equals(property.getName())) {
代码示例来源:origin: org.visallo/visallo-core
public void updateVisibility(Vertex termMention, Visibility newVisibility, Authorizations authorizations) {
Authorizations authorizationsWithTermMention = getAuthorizations(authorizations);
Visibility newVisibilityWithTermMention = VisalloVisibility.and(newVisibility, VISIBILITY_STRING);
ExistingElementMutation<Vertex> m = termMention.prepareMutation();
m.alterElementVisibility(newVisibilityWithTermMention);
for (Property property : termMention.getProperties()) {
m.alterPropertyVisibility(property, newVisibilityWithTermMention);
}
Property refPropertyVisibility = VisalloProperties.TERM_MENTION_REF_PROPERTY_VISIBILITY.getProperty(termMention);
if (refPropertyVisibility != null) {
VisalloProperties.TERM_MENTION_REF_PROPERTY_VISIBILITY.setProperty(
m,
newVisibility.getVisibilityString(),
refPropertyVisibility.getMetadata(),
newVisibilityWithTermMention
);
}
m.save(authorizationsWithTermMention);
for (Edge edge : termMention.getEdges(Direction.BOTH, authorizationsWithTermMention)) {
ExistingElementMutation<Edge> edgeMutation = edge.prepareMutation();
edgeMutation.alterElementVisibility(newVisibilityWithTermMention);
for (Property property : edge.getProperties()) {
edgeMutation.alterPropertyVisibility(property, newVisibilityWithTermMention);
}
edgeMutation.save(authorizationsWithTermMention);
}
}
代码示例来源:origin: org.vertexium/vertexium-test
Assert.assertEquals(1, count(e.getProperties()));
assertEquals("valueA", e.getPropertyValues("propA").iterator().next());
Assert.assertEquals(1, count(v1.getEdges(Direction.OUT, AUTHORIZATIONS_A)));
e = graph.getEdge("e1", AUTHORIZATIONS_A);
assertEquals(LABEL_LABEL2, e.getLabel());
Assert.assertEquals(1, count(e.getProperties()));
assertEquals("valueA", e.getPropertyValues("propA").iterator().next());
v1 = graph.getVertex("v1", AUTHORIZATIONS_A);
e = graph.getEdge("e1", AUTHORIZATIONS_A);
assertEquals("label3", e.getLabel());
Assert.assertEquals(1, count(e.getProperties()));
assertEquals("valueA", e.getPropertyValues("propA").iterator().next());
v1 = graph.getVertex("v1", AUTHORIZATIONS_A);
代码示例来源:origin: visallo/vertexium
Assert.assertEquals(1, count(e.getProperties()));
assertEquals("valueA", e.getPropertyValues("propA").iterator().next());
Assert.assertEquals(1, count(v1.getEdges(Direction.OUT, AUTHORIZATIONS_A)));
e = graph.getEdge("e1", AUTHORIZATIONS_A);
assertEquals(LABEL_LABEL2, e.getLabel());
Assert.assertEquals(1, count(e.getProperties()));
assertEquals("valueA", e.getPropertyValues("propA").iterator().next());
v1 = graph.getVertex("v1", AUTHORIZATIONS_A);
e = graph.getEdge("e1", AUTHORIZATIONS_A);
assertEquals("label3", e.getLabel());
Assert.assertEquals(1, count(e.getProperties()));
assertEquals("valueA", e.getPropertyValues("propA").iterator().next());
v1 = graph.getVertex("v1", AUTHORIZATIONS_A);
代码示例来源:origin: org.vertexium/vertexium-test
.save(AUTHORIZATIONS_A_AND_B);
graph.flush();
Assert.assertEquals(0, count(e1.getProperties()));
e1 = graph.getEdge("e1", AUTHORIZATIONS_A);
Assert.assertEquals(0, count(e1.getProperties()));
assertEvents(
new DeletePropertyEvent(graph, e1, edgeProperty)
代码示例来源:origin: visallo/vertexium
.save(AUTHORIZATIONS_A_AND_B);
graph.flush();
Assert.assertEquals(0, count(e1.getProperties()));
e1 = graph.getEdge("e1", AUTHORIZATIONS_A);
Assert.assertEquals(0, count(e1.getProperties()));
assertEvents(
new DeletePropertyEvent(graph, e1, edgeProperty)
代码示例来源:origin: visallo/vertexium
assertEquals(1, IterableUtils.count(e1_default.getProperties()));
assertEquals("v1", e1_default.getVertexId(Direction.OUT));
assertEquals("v2", e1_default.getVertexId(Direction.IN));
assertEquals(1, IterableUtils.count(e1_properties.getProperties()));
assertEquals("v1", e1_properties.getVertexId(Direction.OUT));
assertEquals("v2", e1_properties.getVertexId(Direction.IN));
代码示例来源:origin: org.vertexium/vertexium-test
assertEquals(1, IterableUtils.count(e1_default.getProperties()));
assertEquals("v1", e1_default.getVertexId(Direction.OUT));
assertEquals("v2", e1_default.getVertexId(Direction.IN));
assertEquals(1, IterableUtils.count(e1_properties.getProperties()));
assertEquals("v1", e1_properties.getVertexId(Direction.OUT));
assertEquals("v2", e1_properties.getVertexId(Direction.IN));
内容来源于网络,如有侵权,请联系作者删除!