Neo4j Community

Package org.neo4j.graphmatching

Facilities for finding occurrences of patterns in a Neo4j graph.

See:
          Description

Interface Summary
ValueMatcher An interface which abstracts value matching.
 

Class Summary
AbstractPatternObject<T extends PropertyContainer> The base class for PatternNode and PatternRelationship.
ArrayPropertyUtil Just a temporary utility for dealing with Neo4j properties that are arrays.
CommonValueMatchers This class contain factory methods for some common ValueMatchers.
PatternElement Represents a part of a match.
PatternGroup Represents a group in SPARQL.
PatternMatch Represents one match found by the PatternMatcher.
PatternMatcher The PatternMatcher is the engine that performs the matching of a graph pattern with the actual graph.
PatternNode Represents a pattern for matching a Node.
PatternRelationship Represents a pattern for matching a Relationship.
PatternUtil Utility methods for working with a pattern graph.
 

Package org.neo4j.graphmatching Description

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

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