@@ -240,6 +240,31 @@ private void applySchemaChanges(JanusGraphManagement jgm)
240
240
// Add property constraints
241
241
applyPropertyConstraints (jgm );
242
242
243
+ // Add connection constraints
244
+ applyConnectionConstraints (jgm );
245
+ }
246
+
247
+ private void applyConnectionConstraints (JanusGraphManagement jgm )
248
+ {
249
+ jgm .addConnection (jgm .getEdgeLabel (ARTIFACT_HAS_ARTIFACT_COORDINATES ),
250
+ jgm .getVertexLabel (ARTIFACT ),
251
+ jgm .getVertexLabel (GENERIC_ARTIFACT_COORDINATES ));
252
+
253
+ jgm .addConnection (jgm .getEdgeLabel (ARTIFACT_HAS_TAGS ),
254
+ jgm .getVertexLabel (ARTIFACT ),
255
+ jgm .getVertexLabel (ARTIFACT_TAG ));
256
+
257
+ jgm .addConnection (jgm .getEdgeLabel (REMOTE_ARTIFACT_INHERIT_ARTIFACT ),
258
+ jgm .getVertexLabel (REMOTE_ARTIFACT ),
259
+ jgm .getVertexLabel (ARTIFACT ));
260
+
261
+ jgm .addConnection (jgm .getEdgeLabel (ARTIFACT_COORDINATES_INHERIT_GENERIC_ARTIFACT_COORDINATES ),
262
+ jgm .getVertexLabel (GENERIC_ARTIFACT_COORDINATES ),
263
+ jgm .getVertexLabel (GENERIC_ARTIFACT_COORDINATES ));
264
+
265
+ jgm .addConnection (jgm .getEdgeLabel (ARTIFACT_GROUP_HAS_ARTIFACTS ),
266
+ jgm .getVertexLabel (ARTIFACT_ID_GROUP ),
267
+ jgm .getVertexLabel (ARTIFACT ));
243
268
}
244
269
245
270
private void applyPropertyConstraints (JanusGraphManagement jgm )
0 commit comments