public interface StringGraph
| Modifier and Type | Method and Description |
|---|---|
EdgeLabels |
edgeLabels() |
default EdgeLabels |
edgeLabelsFrom(Node node) |
EdgeLabels |
edgeLabelsFromNode(String fromNode) |
default EdgeLabels |
edgeLabelsTo(Node node) |
EdgeLabels |
edgeLabelsToNode(String toNode) |
Edges |
edges() |
Edges |
edges(@Nullable String from,
@Nullable String label,
@Nullable String to)
Returns the
Edges according to the query given by the arguments. |
default Edges |
edgesFrom(Node node) |
Edges |
edgesFromNode(String fromNode) |
Edges |
edgesLabeled(String edgeLabel) |
default Edges |
edgesTo(Node node) |
Edges |
edgesToNode(String toNode) |
Edges |
edgesWith(Predicate<Edge> edgePredicate) |
Nodes |
fromNodes() |
default boolean |
getBooleanNodePropertyValue(String node,
String propertyName) |
Properties |
getNodeProperties(String node) |
Property |
getNodeProperty(String node,
String propertyName) |
String |
getNodePropertyValue(String node,
String propertyName) |
String |
getNodePropertyValueOrElse(String node,
String propertyName,
String defaultValue)
Return the value of the property
propertyName of the given
node or, defaultValue when the node does not
exist or does not have the requested property. |
default Optional<String> |
getOptionalNodePropertyValue(String node,
String propertyName) |
default Properties |
getProperties(Node node) |
default Property |
getProperty(Node node,
String propertyName) |
default String |
getPropertyValue(Node node,
String propertyName) |
default String |
getPropertyValueOrElse(Node node,
String propertyName,
String defaultValue)
Return the value of the property
propertyName of the given
node or, defaultValue when the node does not
exist or does not have the requested property. |
default boolean |
hasEdge(Node fromNode,
String edgeLabel,
Node toNode) |
boolean |
hasEdge(String fromNode,
String edgeLabel,
String toNode) |
boolean |
hasNode(String node) |
boolean |
hasNodeProperty(String node,
String propertyName) |
default boolean |
hasProperty(Node node,
String propertyName) |
Nodes |
nodes()
Returns all
Nodes of this StringGraph |
Nodes |
nodes(@Nullable String fromPattern,
@Nullable String labelPattern,
@Nullable String toPattern)
Returns the
Nodes according to the query given by the arguments. |
default Nodes |
nodesFrom(Node node) |
Nodes |
nodesFromNode(String fromNode) |
default Nodes |
nodesFromNodeViaEdgeLabeled(Node node,
String edgeLabel) |
Nodes |
nodesFromNodeViaEdgeLabeled(String fromNode,
String edgeLabel) |
default Nodes |
nodesTo(Node node) |
Nodes |
nodesToNode(String toNode) |
default Nodes |
nodesViaEdgeLabeledTo(String edgeLabel,
Node node) |
Nodes |
nodesViaEdgeLabeledToNode(String edgeLabel,
String toNode) |
Nodes |
toNodes() |
boolean hasNode(String node)
Nodes nodes()
Nodes of this StringGraphNodes nodes(@Nullable String fromPattern, @Nullable String labelPattern, @Nullable String toPattern)
Nodes according to the query given by the arguments.
Each of the arguments defines a pattern for the corresponding part of an edge (from, label, to). It can either
"?" to indicate Nodes of this part are
queried (should be returned when an edge is selected according
to the query), or"?" in which case only
those edges are considered that have the given string
as their value that part, ornull to allow any possible value for that part.The following combinations are supported:
| Call | Result |
|---|---|
nodes("?", null, null) | all nodes used at the "from" side (like fromNodes()) |
nodes(null, null, "?") | all nodes used at the "to" side (like toNodes()) |
nodes("?", null, "?") | all nodes (like nodes()) |
nodes("?", null, "ABC") | all nodes that reference "ABC" (like nodesToNode(String)) |
nodes("ABC", null, "?") | all nodes that are referenced by "ABC" (like nodesFromNode(String)) |
nodes("?", "lab", "ABC") | all nodes that reference "ABC" through an edge with label "lab" (like nodesViaEdgeLabeledToNode(String, String)) |
nodes("ABC", "lab", "?") | all nodes that are referenced by "ABC" through an edge with label "lab" (like nodesFromNodeViaEdgeLabeled(String, String)) |
nodes("?", "lab", null) | all nodes referencing something through an edge with label "lab" |
nodes(null, "lab", "?") | all nodes that are referenced through an edge with label "lab" |
nodes("?", "lab", "?") | all nodes used in edges with label "lab" |
Nodes fromNodes()
Nodes toNodes()
Edges edges()
Edges edges(@Nullable String from, @Nullable String label, @Nullable String to)
Edges according to the query given by the arguments.
Each of the arguments defines a String required for the corresponding
part of an edge (from, label, to) to be selected. When the argument is
null the selection is not restricted for this part.
Examples
| Call | Result |
|---|---|
edges("ABC", null, null) | all edges from "ABC" |
edges(null, "lab", null) | all edges labeled "lab" |
edges(null, null, "ABC") | all edges to "ABC" |
edges("ABC", "lab", null) | all edges from "ABC" labeled "lab" |
edges("ABC", "lab", "DEF") | the edge from "ABC" to "DEF" labeled "lab" | (if it exists)
edges(null, null, null) | all edges |
EdgeLabels edgeLabels()
EdgeLabels edgeLabelsFromNode(String fromNode)
default EdgeLabels edgeLabelsFrom(Node node)
EdgeLabels edgeLabelsToNode(String toNode)
default EdgeLabels edgeLabelsTo(Node node)
Properties getNodeProperties(String node)
default Properties getProperties(Node node)
default boolean getBooleanNodePropertyValue(String node, String propertyName)
String getNodePropertyValueOrElse(String node, String propertyName, String defaultValue)
propertyName of the given
node or, defaultValue when the node does not
exist or does not have the requested property.default String getPropertyValueOrElse(Node node, String propertyName, String defaultValue)
propertyName of the given
node or, defaultValue when the node does not
exist or does not have the requested property.Copyright © 2023 abego Software GmbH, Germany. All rights reserved.