Search in sources :

Example 1 with BaseLabel

use of org.janusgraph.graphdb.types.system.BaseLabel in project janusgraph by JanusGraph.

the class StandardJanusGraphTx method checkPropertyConstraintForEdgeOrCreatePropertyConstraint.

public void checkPropertyConstraintForEdgeOrCreatePropertyConstraint(StandardEdge edge, PropertyKey key) {
    if (config.hasDisabledSchemaConstraints())
        return;
    EdgeLabel edgeLabel = edge.edgeLabel();
    if (edgeLabel instanceof BaseLabel)
        return;
    Collection<PropertyKey> propertyKeys = edgeLabel.mappedProperties();
    if (propertyKeys.contains(key))
        return;
    config.getAutoSchemaMaker().makePropertyConstraintForEdge(edgeLabel, key, this);
}
Also used : EdgeLabel(org.janusgraph.core.EdgeLabel) BaseLabel(org.janusgraph.graphdb.types.system.BaseLabel) PropertyKey(org.janusgraph.core.PropertyKey)

Aggregations

EdgeLabel (org.janusgraph.core.EdgeLabel)1 PropertyKey (org.janusgraph.core.PropertyKey)1 BaseLabel (org.janusgraph.graphdb.types.system.BaseLabel)1