本文整理了Java中org.securegraph.Vertex.getId()
方法的一些代码示例,展示了Vertex.getId()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Vertex.getId()
方法的具体详情如下:
包路径:org.securegraph.Vertex
类名称:Vertex
方法名:getId
暂无
代码示例来源:origin: org.securegraph/securegraph-test
@Override
protected String convert(Vertex o) {
return o.getId();
}
});
代码示例来源:origin: lumifyio/securegraph
@Override
protected String convert(Vertex o) {
return o.getId();
}
};
代码示例来源:origin: lumifyio/securegraph
@Override
protected String convert(Vertex o) {
return o.getId();
}
};
代码示例来源:origin: lumifyio/securegraph
@Override
protected String convert(Vertex o) {
return o.getId();
}
};
代码示例来源:origin: lumifyio/securegraph
@Override
protected String convert(Vertex o) {
return o.getId();
}
});
代码示例来源:origin: org.securegraph/securegraph-core
@Override
public int compare(Vertex v1, Vertex v2) {
Integer i1 = vertexIds.indexOf(v1.getId());
Integer i2 = vertexIds.indexOf(v2.getId());
return i1.compareTo(i2);
}
});
代码示例来源:origin: lumifyio/securegraph
@Override
public int compare(Vertex v1, Vertex v2) {
Integer i1 = vertexIds.indexOf(v1.getId());
Integer i2 = vertexIds.indexOf(v2.getId());
return i1.compareTo(i2);
}
});
代码示例来源:origin: lumifyio/securegraph
@Override
protected boolean isIncluded(Vertex vertex) {
if (seenIds.contains(vertex.getId())) {
return false;
}
seenIds.add(vertex.getId());
return super.isIncluded(vertex);
}
};
代码示例来源:origin: org.securegraph/securegraph-core
@Override
protected boolean isIncluded(Vertex vertex) {
if (seenIds.contains(vertex.getId())) {
return false;
}
seenIds.add(vertex.getId());
return super.isIncluded(vertex);
}
};
代码示例来源:origin: org.securegraph/securegraph-core
@Override
public Map<String, Boolean> doVerticesExist(List<String> ids, Authorizations authorizations) {
Map<String, Boolean> results = new HashMap<String, Boolean>();
for (String id : ids) {
results.put(id, false);
}
for (Vertex vertex : getVertices(ids, FetchHint.NONE, authorizations)) {
results.put(vertex.getId(), true);
}
return results;
}
代码示例来源:origin: lumifyio/securegraph
@Override
public Vertex getVertex(String vertexId, EnumSet<FetchHint> fetchHints, Authorizations authorizations) {
LOGGER.warn("Performing scan of all vertices! Override getVertex.");
for (Vertex vertex : getVertices(fetchHints, authorizations)) {
if (vertex.getId().equals(vertexId)) {
return vertex;
}
}
return null;
}
代码示例来源:origin: lumifyio/securegraph
@Override
public Edge save(Authorizations authorizations) {
return savePreparedEdge(this, getOutVertex().getId(), getInVertex().getId(), authorizations);
}
};
代码示例来源:origin: org.securegraph/securegraph-core
@Override
public Vertex getVertex(String vertexId, EnumSet<FetchHint> fetchHints, Authorizations authorizations) {
LOGGER.warn("Performing scan of all vertices! Override getVertex.");
for (Vertex vertex : getVertices(fetchHints, authorizations)) {
if (vertex.getId().equals(vertexId)) {
return vertex;
}
}
return null;
}
代码示例来源:origin: lumifyio/securegraph
@Override
public Map<String, Boolean> doVerticesExist(List<String> ids, Authorizations authorizations) {
Map<String, Boolean> results = new HashMap<String, Boolean>();
for (String id : ids) {
results.put(id, false);
}
for (Vertex vertex : getVertices(ids, FetchHint.NONE, authorizations)) {
results.put(vertex.getId(), true);
}
return results;
}
代码示例来源:origin: org.securegraph.examples/examples-base
public static JSONObject vertexToJson(Vertex vertex) {
JSONObject json = new JSONObject();
json.put("id", vertex.getId());
JSONArray propertiesJson = new JSONArray();
for (Property property : vertex.getProperties()) {
propertiesJson.put(propertyYoJson(property));
}
json.put("properties", propertiesJson);
return json;
}
代码示例来源:origin: lumifyio/securegraph
@Override
protected boolean isIncluded(Edge edge) {
return edge.getOtherVertexId(getId()).equals(otherVertex.getId());
}
};
代码示例来源:origin: lumifyio/securegraph
@Override
protected boolean isIncluded(Edge edge) {
return edge.getOtherVertexId(getId()).equals(otherVertex.getId());
}
};
代码示例来源:origin: org.securegraph/securegraph-test
protected void assertVertexIds(Iterable<Vertex> vertices, String[] expectedIds) {
String verticesIdsString = idsToString(vertices);
String expectedIdsString = idsToString(expectedIds);
List<Vertex> verticesList = toList(vertices);
assertEquals("ids length mismatch found:[" + verticesIdsString + "] expected:[" + expectedIdsString + "]", expectedIds.length, verticesList.size());
for (int i = 0; i < expectedIds.length; i++) {
assertEquals("at offset: " + i + " found:[" + verticesIdsString + "] expected:[" + expectedIdsString + "]", expectedIds[i], verticesList.get(i).getId());
}
}
代码示例来源:origin: org.securegraph/securegraph-test
@Test
public void testBlankVisibilityString() {
Vertex v = graph.addVertex("v1", VISIBILITY_EMPTY, AUTHORIZATIONS_EMPTY);
assertNotNull(v);
assertEquals("v1", v.getId());
v = graph.getVertex("v1", AUTHORIZATIONS_EMPTY);
assertNotNull(v);
assertEquals("v1", v.getId());
assertEquals(VISIBILITY_EMPTY, v.getVisibility());
}
代码示例来源:origin: lumifyio/securegraph
@Test
public void testBlankVisibilityString() {
Vertex v = graph.addVertex("v1", VISIBILITY_EMPTY, AUTHORIZATIONS_EMPTY);
assertNotNull(v);
assertEquals("v1", v.getId());
v = graph.getVertex("v1", AUTHORIZATIONS_EMPTY);
assertNotNull(v);
assertEquals("v1", v.getId());
assertEquals(VISIBILITY_EMPTY, v.getVisibility());
}
内容来源于网络,如有侵权,请联系作者删除!