I am using Gremlin to handle Titan Graph. And I am trying to find a way to get a very specific relationship.
I have the label, the properties and a list of possible start and endNodes.
And I want all relationships matching this.
I have this already to get all relationships matching label and property:
GraphTraversal<Edge, Edge> tempOutput = g.E().hasLabel(relationshipStorage.getId());
if(relationshipStorage.getProperties() != null)
{
for (Map.Entry<String, Object> entry : relationshipStorage.getProperties().entrySet())
{
if (tempOutput == null)
{
break;
}
tempOutput = tempOutput.has(entry.getKey(), entry.getValue());
}
}
But I didn't find a way to get it with a specific start and endNode. I don't want to get multiple edges between two nodes. I only want one edge with the specific vertices.