use of org.janusgraph.core.schema.VertexLabelMaker in project janusgraph by JanusGraph.
the class JanusGraphGrpcServerBaseTest method createVertexLabel.
public long createVertexLabel(String graph, VertexLabelOrBuilder vertexLabel) {
JanusGraphManagement management = ((JanusGraph) graphManager.getGraph(graph)).openManagement();
VertexLabelMaker vertexLabelMaker = management.makeVertexLabel(vertexLabel.getName());
if (vertexLabel.getReadOnly()) {
vertexLabelMaker.setStatic();
}
if (vertexLabel.getPartitioned()) {
vertexLabelMaker.partition();
}
VertexLabel createdVertexLabel = vertexLabelMaker.make();
management.commit();
return createdVertexLabel.longId();
}
Aggregations