Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Neo4j Community
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.neo4j.graphmatching
Class PatternMatcher

    java.lang.Object
      org.neo4j.graphmatching.PatternMatcher

    public class PatternMatcher

extends Object

The PatternMatcher is the engine that performs the matching of a graph pattern with the actual graph.

Method Summary
`static PatternMatcher` | `getMatcher()` Get the sole instance of the `PatternMatcher`.
`Iterable<PatternMatch>` | `match(PatternNode start, Map<String,PatternNode> objectVariables, Collection<PatternNode> optional)` Find occurrences of the pattern defined by the given `PatternNode` where the given `PatternNode` starts matching at the given `Node`.
`Iterable<PatternMatch>` | `match(PatternNode start, Map<String,PatternNode> objectVariables, PatternNode... optional)` Find occurrences of the pattern defined by the given `PatternNode` where the given `PatternNode` starts matching at the given `Node`.
`Iterable<PatternMatch>` | `match(PatternNode start, Node startNode)` Find occurrences of the pattern defined by the given `PatternNode` where the given `PatternNode` starts matching at the given `Node`.
`Iterable<PatternMatch>` | `match(PatternNode start, Node startNode, Map<String,PatternNode> objectVariables)` Find occurrences of the pattern defined by the given `PatternNode` where the given `PatternNode` starts matching at the given `Node`.
`Iterable<PatternMatch>` | `match(PatternNode start, Node startNode, Map<String,PatternNode> objectVariables, Collection<PatternNode> optional)` Find occurrences of the pattern defined by the given `PatternNode` where the given `PatternNode` starts matching at the given `Node`.
`Iterable<PatternMatch>` | `match(PatternNode start, Node startNode, Map<String,PatternNode> objectVariables, PatternNode... optional)` Find occurrences of the pattern defined by the given `PatternNode` where the given `PatternNode` starts matching at the given `Node`.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Method Detail

### getMatcher

    public static PatternMatcher getMatcher()

  Get the sole instance of the `PatternMatcher`.

  Returns:
    the instance of `PatternMatcher`.

### match

    public Iterable<PatternMatch> match(PatternNode start,
                                        Node startNode)

  Find occurrences of the pattern defined by the given `PatternNode` where the given `PatternNode` starts matching at the given `Node`.

  Parameters:
    `start` - the `PatternNode` to start matching at.
    `startNode` - the `Node` to start matching at.
  Returns:
    all matching instances of the pattern.

### match

    public Iterable<PatternMatch> match(PatternNode start,
                                        Node startNode,
                                        Map<String,PatternNode> objectVariables)

  Find occurrences of the pattern defined by the given `PatternNode` where the given `PatternNode` starts matching at the given `Node`.

  Parameters:
    `start` - the `PatternNode` to start matching at.
    `startNode` - the `Node` to start matching at.
    `objectVariables` - mapping from names to `PatternNode`s.
  Returns:
    all matching instances of the pattern.

### match

    public Iterable<PatternMatch> match(PatternNode start,
                                        Map<String,PatternNode> objectVariables,
                                        PatternNode... optional)

  Find occurrences of the pattern defined by the given `PatternNode` where the given `PatternNode` starts matching at the given `Node`.

  Parameters:
    `start` - the `PatternNode` to start matching at.
    `objectVariables` - mapping from names to `PatternNode`s.
    `optional` - nodes that form sub-patterns connected to this pattern.
  Returns:
    all matching instances of the pattern.

### match

    public Iterable<PatternMatch> match(PatternNode start,
                                        Map<String,PatternNode> objectVariables,
                                        Collection<PatternNode> optional)

  Find occurrences of the pattern defined by the given `PatternNode` where the given `PatternNode` starts matching at the given `Node`.

  Parameters:
    `start` - the `PatternNode` to start matching at.
    `objectVariables` - mapping from names to `PatternNode`s.
    `optional` - nodes that form sub-patterns connected to this pattern.
  Returns:
    all matching instances of the pattern.

### match

    public Iterable<PatternMatch> match(PatternNode start,
                                        Node startNode,
                                        Map<String,PatternNode> objectVariables,
                                        Collection<PatternNode> optional)

  Find occurrences of the pattern defined by the given `PatternNode` where the given `PatternNode` starts matching at the given `Node`.

  Parameters:
    `start` - the `PatternNode` to start matching at.
    `startNode` - the `Node` to start matching at.
    `objectVariables` - mapping from names to `PatternNode`s.
    `optional` - nodes that form sub-patterns connected to this pattern.
  Returns:
    all matching instances of the pattern.

### match

    public Iterable<PatternMatch> match(PatternNode start,
                                        Node startNode,
                                        Map<String,PatternNode> objectVariables,
                                        PatternNode... optional)

  Find occurrences of the pattern defined by the given `PatternNode` where the given `PatternNode` starts matching at the given `Node`.

  Parameters:
    `start` - the `PatternNode` to start matching at.
    `startNode` - the `Node` to start matching at.
    `objectVariables` - mapping from names to `PatternNode`s.
    `optional` - nodes that form sub-patterns connected to this pattern.
  Returns:
    all matching instances of the pattern.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Neo4j Community
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2011 The Neo4j Graph Database Project. All Rights Reserved.