/** * Add a constraint on which vertices the given edge label can connect using the schema manager. * * @param edgeLabel to which the constraint applies. * @param outVLabel specifies the outgoing vertex for this connection. * @param inVLabel specifies the incoming vertex for this connection. * @param manager is used to update the schema. * @see org.janusgraph.core.schema.SchemaManager */ default void makeConnectionConstraint(EdgeLabel edgeLabel, VertexLabel outVLabel, VertexLabel inVLabel, SchemaManager manager) { manager.addConnection(edgeLabel, outVLabel, inVLabel); }
/** * Add property constraints for a given vertex label using the schema manager. * * @param vertexLabel to which the constraint applies. * @param key defines the property which should be added to the vertex label as a constraint. * @param manager is used to update the schema. * @see org.janusgraph.core.schema.SchemaManager */ default void makePropertyConstraintForVertex(VertexLabel vertexLabel, PropertyKey key, SchemaManager manager) { manager.addProperties(vertexLabel, key); }
/** * Add property constraints for a given edge label using the schema manager. * * @param edgeLabel to which the constraint applies. * @param key defines the property which should be added to the edge label as a constraint. * @param manager is used to update the schema. * @see org.janusgraph.core.schema.SchemaManager */ default void makePropertyConstraintForEdge(EdgeLabel edgeLabel, PropertyKey key, SchemaManager manager) { manager.addProperties(edgeLabel, key); }