本文整理汇总了Java中com.tinkerpop.blueprints.util.ExceptionFactory.edgeLabelCanNotBeNull方法的典型用法代码示例。如果您正苦于以下问题:Java ExceptionFactory.edgeLabelCanNotBeNull方法的具体用法?Java ExceptionFactory.edgeLabelCanNotBeNull怎么用?Java ExceptionFactory.edgeLabelCanNotBeNull使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.tinkerpop.blueprints.util.ExceptionFactory
的用法示例。
在下文中一共展示了ExceptionFactory.edgeLabelCanNotBeNull方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: addEdge
import com.tinkerpop.blueprints.util.ExceptionFactory; //导入方法依赖的package包/类
public CachedChronoEdge addEdge(final Long outVertexIdx, final Long inVertexIdx, final Long labelIdx) {
if (labelIdx == null)
throw ExceptionFactory.edgeLabelCanNotBeNull();
CachedEdgeID edgeID = new CachedEdgeID(outVertexIdx, labelIdx, inVertexIdx);
CachedChronoEdge edge = this.edges.get(edgeID);
if (edge == null) {
CachedChronoVertex out = getChronoVertex(outVertexIdx);
CachedChronoVertex in = getChronoVertex(inVertexIdx);
edge = new CachedChronoEdge(out, in, labelIdx, this);
this.edges.put(edgeID, edge);
out.addOutEdge(labelIdx, in);
in.addInEdge(labelIdx, out);
}
return edge;
}
示例2: addEdge
import com.tinkerpop.blueprints.util.ExceptionFactory; //导入方法依赖的package包/类
/**
* Add an edge as with {@link #addEdge(String, Vertex)},
* but with a specified edge id.
* @param id
* @param label
* @param inVertex
* @return
*/
public Edge addEdge(Object id, String label, Vertex inVertex) {
if (label == null) {
throw ExceptionFactory.edgeLabelCanNotBeNull();
}
if (id == null) {
id = AccumuloGraphUtils.generateId();
}
String myID = id.toString();
AccumuloEdge edge = new AccumuloEdge(globals, myID, inVertex, this, label);
// TODO we arent suppose to make sure the given edge ID doesn't already
// exist?
globals.getEdgeWrapper().writeEdge(edge);
globals.getVertexWrapper().writeEdgeEndpoints(edge);
globals.checkedFlush();
globals.getCaches().cache(edge, Edge.class);
return edge;
}
示例3: addEdge
import com.tinkerpop.blueprints.util.ExceptionFactory; //导入方法依赖的package包/类
@Override
public Edge addEdge(Object id, Vertex outVertex, Vertex inVertex, String label) {
if (label == null)
throw ExceptionFactory.edgeLabelCanNotBeNull();
TitanikVertex titanikOutVertex = (TitanikVertex) outVertex;
TitanikVertex titanikInVertex = (TitanikVertex) inVertex;
TitanikEdge outEdge = titanikOutVertex.getOutEdge(label, titanikInVertex.getId());
if (outEdge == null) {
NewTitanikEdge edge = new NewTitanikEdge(this, titanikOutVertex, titanikInVertex, label);
titanikOutVertex.addOutEdge(edge);
titanikInVertex.addInEdge(edge);
return edge;
} else {
return outEdge;
}
}
示例4: addEdge
import com.tinkerpop.blueprints.util.ExceptionFactory; //导入方法依赖的package包/类
@Override
public Edge addEdge(Object id, Vertex outVertex, Vertex inVertex, String label) {
if (label == null) {
throw ExceptionFactory.edgeLabelCanNotBeNull();
}
return ArangoDBEdge.create(this, id, outVertex, inVertex, label);
}
示例5: addEdge
import com.tinkerpop.blueprints.util.ExceptionFactory; //导入方法依赖的package包/类
@Override
public Edge addEdge(String label, Vertex inVertex) {
if (label == null) {
throw ExceptionFactory.edgeLabelCanNotBeNull();
}
return ArangoDBEdge.create(this.graph, null, this, inVertex, label);
}