Here are the examples of the java api grakn.core.traversal.Traversal.playing() taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.
1 Examples
19
Source : RelationConstraint.java
with GNU Affero General Public License v3.0
from graknlabs
with GNU Affero General Public License v3.0
from graknlabs
@Override
public void addTo(Traversal traversal) {
for (RolePlayer rolePlayer : rolePlayers) {
ThingVariable player = rolePlayer.player();
int rep = rolePlayer.repereplacedion();
if (rolePlayer.roleType().isPresent()) {
TypeVariable roleType = rolePlayer.roleType().get();
if (roleType.reference().isName()) {
Identifier.Scoped role = Identifier.Scoped.of(owner.id(), roleType.id(), player.id(), rep);
traversal.relating(owner.id(), role);
traversal.playing(player.id(), role);
traversal.isa(role, roleType.id());
} else {
replacedert roleType.reference().isLabel() && !roleType.resolvedTypes().isEmpty();
traversal.rolePlayer(owner.id(), player.id(), roleType.resolvedTypes(), rep);
}
} else {
traversal.rolePlayer(owner.id(), player.id(), rep);
}
}
}