use of com.vaticle.typedb.core.concept.type.EntityType in project grakn by graknlabs.
the class ThingTypeSteps method thing_type_set_supertype.
@When("{root_label}\\( ?{type_label} ?) set supertype: {type_label}")
public void thing_type_set_supertype(RootLabel rootLabel, String typeLabel, String superLabel) {
switch(rootLabel) {
case ENTITY:
EntityType entitySuperType = tx().concepts().getEntityType(superLabel);
tx().concepts().getEntityType(typeLabel).setSupertype(entitySuperType);
break;
case ATTRIBUTE:
AttributeType attributeSuperType = tx().concepts().getAttributeType(superLabel);
tx().concepts().getAttributeType(typeLabel).setSupertype(attributeSuperType);
break;
case RELATION:
RelationType relationSuperType = tx().concepts().getRelationType(superLabel);
tx().concepts().getRelationType(typeLabel).setSupertype(relationSuperType);
break;
}
}
use of com.vaticle.typedb.core.concept.type.EntityType in project grakn by graknlabs.
the class ConceptService method putEntityType.
private void putEntityType(String label, UUID reqID) {
EntityType entityType = conceptMgr.putEntityType(label);
transactionSvc.respond(putEntityTypeRes(reqID, entityType));
}
Aggregations