data class PathPrefix
(source)
This model is used for defining a search-query.
It needs at least a pathId to know the edge labels along the path we are querying. It also has a constructor where nodes can be given as params. These nodes will be a prefix of the path, and don't need to have the same length as the edges plus one.
Example: Luuk - knows - Giedo - drinksWith - Schaap
.
We have a pathId which corresponds to the array ["knows", "drinksWith"]
.
If our pathPrefix only has this pathId, it will query for all tuples which are connected through these two edges.
When we have ["Luuk"]
as the nodes property. It will query only for tuples which have "Luuk"
as its first element.
See https://github.com/maxsumrall/PathDB/blob/master/src/main/java/com/pathdb/pathIndex/PathPrefix.java for the implementation in PathDB.
PathPrefix(pathId: Long, nodes: List<Node> = emptyList<Node>())
Creates a PathPrefix with only the list of edges known through the pathId. |
val nodes: List<Node>
Ordered list of nodes along the path we want to restrict our query with. |
|
val pathId: Long
The ID given to a specific Path. We can use the PathIdentifierStore to get the list of edges. |