congrats Icon
New! Tabnine Pro 14-day free trial
Start a free trial
Tabnine Logo
JanusGraphManagement.addConnection
Code IndexAdd Tabnine to your IDE (free)

How to use
addConnection
method
in
org.janusgraph.core.schema.JanusGraphManagement

Best Java code snippets using org.janusgraph.core.schema.JanusGraphManagement.addConnection (Showing top 5 results out of 315)

origin: JanusGraph/janusgraph

private void createStrictSchemaForComplexConnections() {
  clopen(option(AUTO_TYPE), "none", option(SCHEMA_CONSTRAINTS), true);
  VertexLabel v1 = mgmt.makeVertexLabel("V1").make();
  VertexLabel v2 = mgmt.makeVertexLabel("V2").make();
  VertexLabel v3 = mgmt.makeVertexLabel("V3").make();
  VertexLabel v4 = mgmt.makeVertexLabel("V4").make();
  EdgeLabel e1 = mgmt.makeEdgeLabel("E1").make();
  EdgeLabel e2 = mgmt.makeEdgeLabel("E2").make();
  mgmt.addConnection(e1, v1, v2);
  mgmt.addConnection(e1, v3, v4);
  mgmt.addConnection(e2, v1, v4);
  mgmt.addConnection(e2, v3, v2);
  finishSchema();
}
origin: JanusGraph/janusgraph

private void createStrictSchemaForConnections() {
  clopen(option(AUTO_TYPE), "none", option(SCHEMA_CONSTRAINTS), true);
  VertexLabel user = mgmt.makeVertexLabel("user").make();
  VertexLabel company = mgmt.makeVertexLabel("company").make();
  EdgeLabel edge = mgmt.makeEdgeLabel("knows").make();
  mgmt.makeEdgeLabel("buys").make();
  mgmt.addConnection(edge, user, company);
  finishSchema();
}
origin: JanusGraph/janusgraph

private GraphTraversalSource prepareGraphForDirectCommitTests() {
  clopen(option(AUTO_TYPE), "none", option(SCHEMA_CONSTRAINTS), true);
  GraphTraversalSource g = graph.traversal();
  VertexLabel user = mgmt.makeVertexLabel("user").make();
  EdgeLabel edge = mgmt.makeEdgeLabel("knows").make();
  PropertyKey id = mgmt.makePropertyKey("id").cardinality(Cardinality.SINGLE).dataType(Integer.class).make();
  mgmt.addProperties(edge, id);
  mgmt.addConnection(edge, user, user);
  mgmt.commit();
  return g;
}
origin: JanusGraph/janusgraph

private void createStrictSchemaForEdgeProperties() {
  clopen(option(AUTO_TYPE), "none", option(SCHEMA_CONSTRAINTS), true);
  VertexLabel user = mgmt.makeVertexLabel("user").make();
  EdgeLabel edge = mgmt.makeEdgeLabel("knows").make();
  PropertyKey id = mgmt.makePropertyKey("id").cardinality(Cardinality.SINGLE).dataType(Integer.class).make();
  mgmt.makePropertyKey("test").cardinality(Cardinality.SINGLE).dataType(Integer.class).make();
  mgmt.addProperties(edge, id);
  mgmt.addConnection(edge, user, user);
  finishSchema();
}
origin: JanusGraph/janusgraph

@Test
public void testSupportChangeNameOfEdgeAndUpdateConnections() {
  clopen(option(AUTO_TYPE), "none", option(SCHEMA_CONSTRAINTS), true);
  VertexLabel user = mgmt.makeVertexLabel("V1").make();
  VertexLabel company = mgmt.makeVertexLabel("V2").make();
  EdgeLabel edge = mgmt.makeEdgeLabel("E1").make();
  mgmt.addConnection(edge, user, company);
  finishSchema();
  JanusGraphVertex v1 = tx.addVertex("V1");
  JanusGraphVertex v2 = tx.addVertex("V2");
  v1.addEdge("E1", v2);
  newTx();
  edge = mgmt.getEdgeLabel("E1");
  mgmt.changeName(edge, "E2");
  mgmt.commit();
  JanusGraphVertex v3 = tx.addVertex("V1");
  JanusGraphVertex v4 = tx.addVertex("V2");
  v3.addEdge("E2", v4);
}
org.janusgraph.core.schemaJanusGraphManagementaddConnection

Popular methods of JanusGraphManagement

  • buildIndex
  • commit
  • makePropertyKey
  • makeEdgeLabel
  • getGraphIndex
  • getPropertyKey
  • makeVertexLabel
  • buildEdgeIndex
    Identical to #buildEdgeIndex(org.janusgraph.core.EdgeLabel,String,org.apache.tinkerpop.gremlin.struc
  • getRelationIndex
  • containsPropertyKey
  • getEdgeLabel
  • getRelationType
  • getEdgeLabel,
  • getRelationType,
  • getRelationTypes,
  • rollback,
  • addIndexKey,
  • changeName,
  • containsGraphIndex,
  • get,
  • getGraphIndexes,
  • getVertexLabel

Popular in Java

  • Reactive rest calls using spring rest template
  • startActivity (Activity)
  • addToBackStack (FragmentTransaction)
  • scheduleAtFixedRate (Timer)
  • FileOutputStream (java.io)
    An output stream that writes bytes to a file. If the output file exists, it can be replaced or appen
  • ByteBuffer (java.nio)
    A buffer for bytes. A byte buffer can be created in either one of the following ways: * #allocate
  • BitSet (java.util)
    The BitSet class implements abit array [http://en.wikipedia.org/wiki/Bit_array]. Each element is eit
  • ResourceBundle (java.util)
    ResourceBundle is an abstract class which is the superclass of classes which provide Locale-specifi
  • Modifier (javassist)
    The Modifier class provides static methods and constants to decode class and member access modifiers
  • JComboBox (javax.swing)
  • 21 Best Atom Packages for 2021
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now