本文整理了Java中org.vertexium.Graph.getMetadataWithPrefix()
方法的一些代码示例,展示了Graph.getMetadataWithPrefix()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Graph.getMetadataWithPrefix()
方法的具体详情如下:
包路径:org.vertexium.Graph
类名称:Graph
方法名:getMetadataWithPrefix
[英]Gets all metadata with the given prefix.
[中]获取具有给定前缀的所有元数据。
代码示例来源:origin: org.vertexium/vertexium-elasticsearch5
public Collection<String> getHashes(Graph graph, Authorizations authorizations) {
List<String> hashes = new ArrayList<>();
for (GraphMetadataEntry metadata : graph.getMetadataWithPrefix(HASH_TO_VISIBILITY)) {
Visibility visibility = getVisibility((String) metadata.getValue());
if (authorizations.canRead(visibility)) {
String hash = metadata.getKey().substring(HASH_TO_VISIBILITY.length());
hashes.add(hash);
}
}
return hashes;
}
代码示例来源:origin: visallo/vertexium
public Collection<String> getHashes(Graph graph, Authorizations authorizations) {
List<String> hashes = new ArrayList<>();
for (GraphMetadataEntry metadata : graph.getMetadataWithPrefix(HASH_TO_VISIBILITY)) {
Visibility visibility = getVisibility((String) metadata.getValue());
if (authorizations.canRead(visibility)) {
String hash = metadata.getKey().substring(HASH_TO_VISIBILITY.length());
hashes.add(hash);
}
}
return hashes;
}
代码示例来源:origin: visallo/vertexium
public Collection<String> getHashes(Graph graph, String propertyName, Authorizations authorizations) {
List<String> results = new ArrayList<>();
String prefix = getPropertyNameVisibilityToHashPrefix(propertyName);
for (GraphMetadataEntry metadata : graph.getMetadataWithPrefix(prefix)) {
String visibilityString = metadata.getKey().substring(prefix.length());
Visibility visibility = getVisibility(visibilityString);
if (authorizations.canRead(visibility)) {
String hash = (String) metadata.getValue();
results.add(hash);
}
}
return results;
}
代码示例来源:origin: org.vertexium/vertexium-elasticsearch5
public Collection<String> getHashesWithAuthorization(Graph graph, String authorization, Authorizations authorizations) {
List<String> hashes = new ArrayList<>();
for (GraphMetadataEntry metadata : graph.getMetadataWithPrefix(HASH_TO_VISIBILITY)) {
Visibility visibility = getVisibility((String) metadata.getValue());
if (authorizations.canRead(visibility) && visibility.hasAuthorization(authorization)) {
String hash = metadata.getKey().substring(HASH_TO_VISIBILITY.length());
hashes.add(hash);
}
}
return hashes;
}
代码示例来源:origin: org.vertexium/vertexium-elasticsearch-singledocument
public Collection<String> getHashesWithAuthorization(Graph graph, String authorization, Authorizations authorizations) {
List<String> hashes = new ArrayList<>();
for (GraphMetadataEntry metadata : graph.getMetadataWithPrefix(HASH_TO_VISIBILITY)) {
Visibility visibility = getVisibility((String) metadata.getValue());
if (authorizations.canRead(visibility) && visibility.hasAuthorization(authorization)) {
String hash = metadata.getKey().substring(HASH_TO_VISIBILITY.length());
hashes.add(hash);
}
}
return hashes;
}
代码示例来源:origin: visallo/vertexium
public Collection<String> getHashesWithAuthorization(Graph graph, String authorization, Authorizations authorizations) {
List<String> hashes = new ArrayList<>();
for (GraphMetadataEntry metadata : graph.getMetadataWithPrefix(HASH_TO_VISIBILITY)) {
Visibility visibility = getVisibility((String) metadata.getValue());
if (authorizations.canRead(visibility) && visibility.hasAuthorization(authorization)) {
String hash = metadata.getKey().substring(HASH_TO_VISIBILITY.length());
hashes.add(hash);
}
}
return hashes;
}
代码示例来源:origin: org.vertexium/vertexium-elasticsearch5
public Collection<String> getHashes(Graph graph, String propertyName, Authorizations authorizations) {
List<String> results = new ArrayList<>();
String prefix = getPropertyNameVisibilityToHashPrefix(propertyName);
for (GraphMetadataEntry metadata : graph.getMetadataWithPrefix(prefix)) {
String visibilityString = metadata.getKey().substring(prefix.length());
Visibility visibility = getVisibility(visibilityString);
if (authorizations.canRead(visibility)) {
String hash = (String) metadata.getValue();
results.add(hash);
}
}
return results;
}
代码示例来源:origin: org.vertexium/vertexium-elasticsearch-singledocument
public Collection<String> getHashes(Graph graph, String propertyName, Authorizations authorizations) {
List<String> results = new ArrayList<>();
String prefix = getPropertyNameVisibilityToHashPrefix(propertyName);
for (GraphMetadataEntry metadata : graph.getMetadataWithPrefix(prefix)) {
String visibilityString = metadata.getKey().substring(prefix.length());
Visibility visibility = getVisibility(visibilityString);
if (authorizations.canRead(visibility)) {
String hash = (String) metadata.getValue();
results.add(hash);
}
}
return results;
}
代码示例来源:origin: org.vertexium/vertexium-elasticsearch2
public Collection<String> getHashes(Graph graph, String propertyName, Authorizations authorizations) {
List<String> results = new ArrayList<>();
String prefix = getPropertyNameVisibilityToHashPrefix(propertyName);
for (GraphMetadataEntry metadata : graph.getMetadataWithPrefix(prefix)) {
String visibilityString = metadata.getKey().substring(prefix.length());
Visibility visibility = getVisibility(visibilityString);
if (authorizations.canRead(visibility)) {
String hash = (String) metadata.getValue();
results.add(hash);
}
}
return results;
}
内容来源于网络,如有侵权,请联系作者删除!