|
Neo4j Community | |||||||||
PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES |
See:
Description
Interface Summary | |
---|---|
ValueMatcher | Deprecated. |
Class Summary | |
---|---|
AbstractPatternObject<T extends PropertyContainer> | Deprecated. |
ArrayPropertyUtil | Deprecated. |
CommonValueMatchers | Deprecated. |
PatternElement | Deprecated. |
PatternGroup | Deprecated. |
PatternMatch | Deprecated. |
PatternMatcher | Deprecated. |
PatternNode | Deprecated. |
PatternRelationship | Deprecated. |
PatternUtil | Deprecated. |
Facilities for finding occurrences of patterns in a Neo4j graph.
The main classes for defining a graph pattern is the
PatternNode
and the
PatternRelationship
. The actual matching
is performed by the PatternMatcher
.
A simple example of matching a friend of a friend pattern:
PatternNode
me = new PatternNode()
,
myFriend = new PatternNode()
,
friendOfMyFriend = new PatternNode()
;
me.createRelationshipTo
( myFriend, FoafDomain.FRIEND
, Direction.BOTH
);
myFriend.createRelationshipTo
( friendOfMyFriend, FoafDomain.FRIEND
, Direction.BOTH
);
PatternMatcher
matcher = PatternMatcher.getMatcher()
;
for ( PatternMatch
match : matcher.match
( me, startNode
) )
{
Node
foaf = match.getNodeFor
( friendOfMyFriend );
}
|
Neo4j Community | |||||||||
PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES |