本文整理了Java中org.vertexium.Vertex.getId()
方法的一些代码示例,展示了Vertex.getId()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Vertex.getId()
方法的具体详情如下:
包路径:org.vertexium.Vertex
类名称:Vertex
方法名:getId
暂无
代码示例来源:origin: org.visallo/visallo-core
public PingLongRunningProcessQueueItem(Vertex vertex) {
type = TYPE;
id = vertex.getId();
vertexId = vertex.getId();
}
代码示例来源:origin: org.vertexium/vertexium-test
@Override
protected String convert(Vertex o) {
return o.getId();
}
});
代码示例来源:origin: org.vertexium/vertexium-core
@Override
protected String convert(Vertex vertex) {
return vertex.getId();
}
};
代码示例来源:origin: org.visallo/visallo-model-vertexium
@Nullable
@Override
public String apply(Vertex v) {
return v.getId();
}
});
代码示例来源:origin: org.visallo/visallo-core
public static Map<String, Vertex> verticesToMapById(Iterable<Vertex> vertices) {
Map<String, Vertex> results = new HashMap<>();
for (Vertex vertex : vertices) {
results.put(vertex.getId(), vertex);
}
return results;
}
代码示例来源:origin: org.vertexium/vertexium-core
@Override
public Vertex getVertex(String vertexId, FetchHints fetchHints, Long endTime, Authorizations authorizations) {
for (Vertex vertex : getVertices(fetchHints, endTime, authorizations)) {
if (vertex.getId().equals(vertexId)) {
return vertex;
}
}
return null;
}
代码示例来源:origin: org.vertexium/vertexium-core
@Override
protected boolean isIncluded(Vertex otherVertex) {
return otherVertex.getId().equals(getOtherVertexId());
}
};
代码示例来源:origin: org.visallo/visallo-core
public GraphUpdateContext.UpdateFuture<Edge> addOrUpdateProductEdgeToEntity(GraphUpdateContext ctx, Vertex productVertex, String entityId, UpdateProductEdgeOptions options, Visibility visibility) {
return addOrUpdateProductEdgeToEntity(
ctx,
getEdgeId(productVertex.getId(), entityId),
productVertex,
entityId,
options,
visibility
);
}
代码示例来源:origin: org.visallo/visallo-core
/**
* If this is a resolved term mention. This allows setting that information.
*
* @param resolvedToVertex The vertex this term mention resolves to.
* @param resolvedEdge The edge that links the source vertex to the resolved vertex.
*/
public TermMentionBuilder resolvedTo(Vertex resolvedToVertex, Edge resolvedEdge) {
return resolvedTo(resolvedToVertex.getId(), resolvedEdge.getId());
}
代码示例来源:origin: org.visallo/visallo-core
public String search(Graph graph, Authorizations authorizations) {
Query query = graph.query(authorizations).limit(1);
List<Vertex> vertices = Lists.newArrayList(query.vertices());
if (vertices.size() == 0) {
throw new VisalloException("query returned no vertices");
} else if (vertices.size() > 1) {
throw new VisalloException("query returned more than one vertex");
}
return vertices.get(0).getId();
}
代码示例来源:origin: org.visallo/visallo-model-vertexium
public VertexiumUser(Vertex userVertex) {
this.userId = userVertex.getId();
for (Property property : userVertex.getProperties()) {
this.properties.put(property.getName(), property.getValue());
}
}
代码示例来源:origin: org.vertexium/vertexium-accumulo
@Override
public Iterable<String> getEdgeIds(final Vertex otherVertex, final Direction direction, final String[] labels, final Authorizations authorizations) {
getFetchHints().validateHasEdgeFetchHints(direction, labels);
return getEdgeIdsWithOtherVertexId(otherVertex.getId(), direction, labels, authorizations);
}
代码示例来源:origin: org.vertexium/vertexium-elasticsearch-singledocument
private FilterBuilder getDirectionInEdgeFilter() {
FilterBuilder outVertexIdFilter = FilterBuilders.termFilter(ElasticsearchSingleDocumentSearchIndex.IN_VERTEX_ID_FIELD_NAME, sourceVertex.getId());
if (otherVertexId != null) {
FilterBuilder inVertexIdFilter = FilterBuilders.termFilter(ElasticsearchSingleDocumentSearchIndex.OUT_VERTEX_ID_FIELD_NAME, otherVertexId);
return FilterBuilders.andFilter(outVertexIdFilter, inVertexIdFilter);
}
return outVertexIdFilter;
}
代码示例来源:origin: org.vertexium/vertexium-elasticsearch-singledocument
private FilterBuilder getDirectionOutEdgeFilter() {
FilterBuilder outVertexIdFilter = FilterBuilders.termFilter(ElasticsearchSingleDocumentSearchIndex.OUT_VERTEX_ID_FIELD_NAME, sourceVertex.getId());
if (otherVertexId != null) {
FilterBuilder inVertexIdFilter = FilterBuilders.termFilter(ElasticsearchSingleDocumentSearchIndex.IN_VERTEX_ID_FIELD_NAME, otherVertexId);
return FilterBuilders.andFilter(outVertexIdFilter, inVertexIdFilter);
}
return outVertexIdFilter;
}
代码示例来源:origin: org.visallo/visallo-core
private void unresolveTermMentionsForProperty(Vertex vertex, Property property, Authorizations authorizations) {
for (Vertex termMention : termMentionRepository.findResolvedTo(vertex.getId(), authorizations)) {
String key = VisalloProperties.TERM_MENTION_REF_PROPERTY_KEY.getPropertyValue(termMention);
String name = VisalloProperties.TERM_MENTION_REF_PROPERTY_NAME.getPropertyValue(termMention);
String visibility = VisalloProperties.TERM_MENTION_REF_PROPERTY_VISIBILITY.getPropertyValue(termMention);
if (property.getKey().equals(key) && property.getName().equals(name) &&
property.getVisibility().getVisibilityString().equals(visibility)) {
unresolveTerm(termMention, authorizations);
}
}
}
代码示例来源:origin: org.visallo/visallo-model-vertexium
@Override
public void updatePropertyDependentIris(OntologyProperty property, Collection<String> newDependentPropertyIris, User user, String workspaceId) {
VertexiumOntologyProperty vertexiumProperty = (VertexiumOntologyProperty) property;
if (!isPublic(workspaceId) || property.getSandboxStatus() == SandboxStatus.PRIVATE) {
throw new UnsupportedOperationException("Sandboxed updating of dependent iris is not currently supported for properties");
}
saveDependentProperties(vertexiumProperty.getVertex().getId(), newDependentPropertyIris, user, workspaceId);
graph.flush();
vertexiumProperty.setDependentProperties(newDependentPropertyIris);
}
代码示例来源:origin: org.vertexium/vertexium-accumulo
@Override
public Iterable<Edge> getEdges(final Vertex otherVertex, Direction direction, FetchHints fetchHints, Authorizations authorizations) {
getFetchHints().validateHasEdgeFetchHints(direction);
return getGraph().getEdges(getEdgeIdsWithOtherVertexId(otherVertex.getId(), direction, null, authorizations), fetchHints, authorizations);
}
代码示例来源:origin: org.visallo/visallo-model-vertexium
public static ClientApiSearch toClientApiSearch(Vertex searchVertex, ClientApiSearch.Scope scope) {
ClientApiSearch result = new ClientApiSearch();
result.id = searchVertex.getId();
result.name = SearchProperties.NAME.getPropertyValue(searchVertex);
result.url = SearchProperties.URL.getPropertyValue(searchVertex);
result.scope = scope;
result.parameters = ClientApiConverter.toClientApiValue(SearchProperties.PARAMETERS.getPropertyValue(
searchVertex));
return result;
}
代码示例来源:origin: org.vertexium/vertexium-elasticsearch2
private QueryBuilder getDirectionInEdgeFilter() {
QueryBuilder outVertexIdFilter = QueryBuilders.termQuery(Elasticsearch2SearchIndex.IN_VERTEX_ID_FIELD_NAME, sourceVertex.getId());
if (otherVertexId != null) {
QueryBuilder inVertexIdFilter = QueryBuilders.termQuery(Elasticsearch2SearchIndex.OUT_VERTEX_ID_FIELD_NAME, otherVertexId);
return QueryBuilders.boolQuery()
.must(outVertexIdFilter)
.must(inVertexIdFilter);
}
return outVertexIdFilter;
}
代码示例来源:origin: org.vertexium/vertexium-test
@Test
public void testBlankVisibilityString() {
Vertex v = graph.addVertex("v1", VISIBILITY_EMPTY, AUTHORIZATIONS_EMPTY);
assertNotNull(v);
assertEquals("v1", v.getId());
graph.flush();
v = graph.getVertex("v1", AUTHORIZATIONS_EMPTY);
assertNotNull(v);
assertEquals("v1", v.getId());
assertEquals(VISIBILITY_EMPTY, v.getVisibility());
}
内容来源于网络,如有侵权,请联系作者删除!