本文整理了Java中com.tinkerpop.blueprints.Edge.getLabel()
方法的一些代码示例,展示了Edge.getLabel()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Edge.getLabel()
方法的具体详情如下:
包路径:com.tinkerpop.blueprints.Edge
类名称:Edge
方法名:getLabel
[英]Return the label associated with the edge.
[中]返回与边关联的标签。
代码示例来源:origin: SciGraph/SciGraph
@Override
public String transform(Edge edge) {
return edge.getLabel();
}
};
代码示例来源:origin: com.tinkerpop.blueprints/blueprints-core
public String getLabel() {
return ((Edge) this.baseElement).getLabel();
}
代码示例来源:origin: com.tinkerpop.blueprints/blueprints-core
public String getLabel() {
return ((Edge) this.baseElement).getLabel();
}
}
代码示例来源:origin: tinkerpop/furnace
public String getLabel() {
return ((Edge) this.baseElement).getLabel();
}
代码示例来源:origin: tinkerpop/furnace
@Override
public Double compute(final Edge argument) {
final Double d = edgeLabelBiasMap.get(argument.getLabel());
return (null == d) ? 0.0d : d;
}
};
代码示例来源:origin: joshsh/ripple
@Override
public int compare(Edge o1, Edge o2, ModelConnection mc) {
String otherLabel = o2.getLabel();
int cmp = o1.getLabel().compareTo(otherLabel);
if (0 == cmp) {
return ((Integer) o1.getId().hashCode()).compareTo(o2.hashCode());
} else {
return cmp;
}
}
代码示例来源:origin: com.tinkerpop/pipes
protected Edge processNextStart() {
while (true) {
final Edge edge = this.starts.next();
if (this.predicate.evaluate(edge.getLabel(), this.label))
return edge;
}
}
代码示例来源:origin: BrynCooke/totorom
/**
* @return The label associated with this edge
*/
protected String getLabel() {
return element().getLabel();
}
代码示例来源:origin: JHUAPL/AccumuloGraph
public BaseEdgeMutator(Edge edge) {
this(edge.getId().toString(),
edge.getVertex(Direction.OUT).getId().toString(),
edge.getVertex(Direction.IN).getId().toString(),
edge.getLabel());
}
public BaseEdgeMutator(String id, String outVertexId, String inVertexId, String label) {
代码示例来源:origin: edu.jhuapl.tinkerpop/blueprints-accumulo-graph
public BaseEdgeMutator(Edge edge) {
this(edge.getId().toString(),
edge.getVertex(Direction.OUT).getId().toString(),
edge.getVertex(Direction.IN).getId().toString(),
edge.getLabel());
}
public BaseEdgeMutator(String id, String outVertexId, String inVertexId, String label) {
代码示例来源:origin: com.tinkerpop.blueprints/blueprints-core
public boolean isLegal(final Element element) {
if (this.key.equals(StringFactory.ID)) {
return this.predicate.evaluate(element.getId(), this.value);
} else if (this.key.equals(StringFactory.LABEL) && element instanceof Edge) {
return this.predicate.evaluate(((Edge) element).getLabel(), this.value);
} else {
return this.predicate.evaluate(element.getProperty(this.key), this.value);
}
}
}
代码示例来源:origin: apache/incubator-atlas
@Override
public Boolean compute(Edge edge) {
String type = edge.getVertex(Direction.OUT).getProperty(Constants.ENTITY_TYPE_PROPERTY_KEY);
VertexWrapper v = new TermVertexWrapper(edge.getVertex(Direction.IN));
return edge.getLabel().startsWith(type) && v.getPropertyKeys().contains("available_as_tag");
}
}));
代码示例来源:origin: org.jboss.windup.legacy.application/grapher
private void writeGraphEdges(OutputStream os) throws IOException {
for(Edge edge : graph.getEdges()) {
String label = edge.getLabel();
String source = ""+edge.getVertex(Direction.IN).getId().hashCode();
String target = ""+edge.getVertex(Direction.OUT).getId().hashCode();
writeGraphEdge(label, source, target, os);
}
}
代码示例来源:origin: org.jboss.windup/windup-grapher
private void writeGraphEdges(OutputStream os) throws IOException {
for(Edge edge : graph.getEdges()) {
String id = ""+edge.getId().hashCode();
String source = ""+edge.getVertex(Direction.IN).getId().hashCode();
String target = ""+edge.getVertex(Direction.OUT).getId().hashCode();
String label = ""+edge.getLabel();
writeGraphEdge(id, source, target, label, os);
}
}
代码示例来源:origin: org.jboss.windup.legacy.application/grapher
private void writeGraphEdges(OutputStream os) throws IOException {
for(Edge edge : graph.getEdges()) {
String id = ""+edge.getId().hashCode();
String source = ""+edge.getVertex(Direction.IN).getId().hashCode();
String target = ""+edge.getVertex(Direction.OUT).getId().hashCode();
String label = ""+edge.getLabel();
writeGraphEdge(id, source, target, label, os);
}
}
代码示例来源:origin: org.jboss.windup/windup-grapher
private void writeGraphEdges(OutputStream os) throws IOException {
for(Edge edge : graph.getEdges()) {
String label = edge.getLabel();
String source = ""+edge.getVertex(Direction.IN).getId().hashCode();
String target = ""+edge.getVertex(Direction.OUT).getId().hashCode();
writeGraphEdge(label, source, target, os);
}
}
代码示例来源:origin: apache/incubator-atlas
@Override
public Boolean compute(Edge edge) {
String name = edge.getVertex(Direction.OUT).getProperty(Constants.ENTITY_TYPE_PROPERTY_KEY);
if (edge.getLabel().startsWith(name)) {
VertexWrapper v = new TermVertexWrapper(edge.getVertex(Direction.IN));
return v.getPropertyKeys().contains("available_as_tag") && ! isDeleted(v.getVertex());
} else {
return false;
}
}
});
代码示例来源:origin: apache/incubator-atlas
@Override
public Boolean compute(Edge edge) {
String name = edge.getVertex(Direction.OUT).getProperty(Constants.ENTITY_TYPE_PROPERTY_KEY);
if (edge.getLabel().startsWith(name)) {
VertexWrapper v = new TermVertexWrapper(edge.getVertex(Direction.IN));
return ! v.getPropertyKeys().contains("available_as_tag") && ! isDeleted(v.getVertex());
} else {
return false;
}
}
});
代码示例来源:origin: SciGraph/SciGraph
public static void dumpRelationship(Edge relationship) {
System.out.println(String.format("%s [%s->%s] (%s)",
relationship.getId(), relationship.getVertex(Direction.OUT).getId(),
relationship.getVertex(Direction.IN).getId(),
relationship.getLabel()));
dumpProperties(relationship);
}
代码示例来源:origin: SciGraph/SciGraph
Edge addEdge(Edge edge) {
Edge newEdge = graph.getEdge(edge.getId());
if (null == newEdge) {
Vertex outVertex = addNode(edge.getVertex(Direction.OUT));
Vertex inVertex = addNode(edge.getVertex(Direction.IN));
String label = edge.getLabel();
newEdge = graph.addEdge(edge.getId(), outVertex, inVertex, label);
copyProperties(edge, edge);
}
return newEdge;
}
内容来源于网络,如有侵权,请联系作者删除!