use of ai.grakn.graql.VarPattern in project grakn by graknlabs.
the class InstanceMapper method map.
/**
* Map a {@link Relationship} to a var, along with all of the roleplayers
* Exclude any relations that are mapped to an encountered resource
* @param relationship {@link Relationship} to be mapped
* @return var patterns representing the given instance
*/
// TODO resources on relations
private static VarPattern map(Relationship relationship) {
if (relationship.type().isImplicit()) {
return var();
}
VarPattern var = base(relationship);
var = roleplayers(var, relationship);
return var;
}
Aggregations