org.neo4j.kernel
Class StandardExpander

java.lang.Object
  extended by org.neo4j.kernel.StandardExpander
All Implemented Interfaces:
Expander, PathExpander, RelationshipExpander
Direct Known Subclasses:
OrderedByTypeExpander

public abstract class StandardExpander
extends Object
implements Expander, PathExpander


Field Summary
static StandardExpander DEFAULT
           
 
Method Summary
 StandardExpander add(RelationshipType type)
          Add a RelationshipType to the Expander.
abstract  StandardExpander add(RelationshipType type, Direction direction)
          Add a RelationshipType with a Direction to the Expander.
 StandardExpander addNodeFilter(Predicate<? super Node> filter)
          Add a Node filter.
 StandardExpander addRelationshipFilter(Predicate<? super Relationship> filter)
          Add a Relationship filter.
 Expander addRelationsipFilter(Predicate<? super Relationship> filter)
          Add a Relationship filter.
 org.neo4j.kernel.Expansion<Relationship> expand(Node node)
          Returns relationships for a Node.
 org.neo4j.kernel.Expansion<Relationship> expand(Path path, BranchState state)
          Returns relationships for a Path, most commonly from the Path.endNode().
abstract  StandardExpander remove(RelationshipType type)
          Remove a RelationshipType from the Expander.
abstract  StandardExpander reverse()
          Returns a new instance with the exact expansion logic, but reversed.
abstract  StandardExpander reversed()
          Returns a new instance with the exact expansion logic, but reversed.
static PathExpander toPathExpander(RelationshipExpander expander)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

DEFAULT

public static final StandardExpander DEFAULT
Method Detail

expand

public final org.neo4j.kernel.Expansion<Relationship> expand(Node node)
Description copied from interface: RelationshipExpander
Returns relationships for a Node.

Specified by:
expand in interface RelationshipExpander
Parameters:
node - the node to expand.
Returns:
the relationships to return for the node.

expand

public final org.neo4j.kernel.Expansion<Relationship> expand(Path path,
                                                             BranchState state)
Description copied from interface: PathExpander
Returns relationships for a Path, most commonly from the Path.endNode().

Specified by:
expand in interface PathExpander
Parameters:
path - the path to expand (most commonly the end node).
state - the state of this branch in the current traversal. BranchState.getState() returns the state and BranchState.setState(Object) optionally sets the state for the children of this branch. If state isn't altered the children of this path will see the state of the parent.
Returns:
the relationships to return for the path.

toString

public final String toString()
Overrides:
toString in class Object

add

public final StandardExpander add(RelationshipType type)
Description copied from interface: Expander
Add a RelationshipType to the Expander.

Specified by:
add in interface Expander
Parameters:
type - relationship type
Returns:
new instance

add

public abstract StandardExpander add(RelationshipType type,
                                     Direction direction)
Description copied from interface: Expander
Add a RelationshipType with a Direction to the Expander.

Specified by:
add in interface Expander
Parameters:
type - relationship type
direction - expanding direction
Returns:
new instance

remove

public abstract StandardExpander remove(RelationshipType type)
Description copied from interface: Expander
Remove a RelationshipType from the Expander.

Specified by:
remove in interface Expander
Parameters:
type - relationship type
Returns:
new instance

reverse

public abstract StandardExpander reverse()
Description copied from interface: PathExpander
Returns a new instance with the exact expansion logic, but reversed. TODO example

Specified by:
reverse in interface PathExpander
Returns:
a reversed PathExpander.

reversed

public abstract StandardExpander reversed()
Description copied from interface: RelationshipExpander
Returns a new instance with the exact expansion logic, but reversed. For example if this expander is set to expand: Then the reversed expander will be set to expand:

Specified by:
reversed in interface Expander
Specified by:
reversed in interface RelationshipExpander
Returns:
a reversed RelationshipExpander.

addNodeFilter

public StandardExpander addNodeFilter(Predicate<? super Node> filter)
Description copied from interface: Expander
Add a Node filter.

Specified by:
addNodeFilter in interface Expander
Parameters:
filter - filter to use
Returns:
new instance

addRelationsipFilter

public final Expander addRelationsipFilter(Predicate<? super Relationship> filter)
Description copied from interface: Expander
Add a Relationship filter.

Specified by:
addRelationsipFilter in interface Expander
Parameters:
filter - filter to use
Returns:
new instance

addRelationshipFilter

public StandardExpander addRelationshipFilter(Predicate<? super Relationship> filter)
Description copied from interface: Expander
Add a Relationship filter.

Specified by:
addRelationshipFilter in interface Expander
Parameters:
filter - filter to use
Returns:
new instance

toPathExpander

public static PathExpander toPathExpander(RelationshipExpander expander)


Copyright © 2002-2012 The Neo4j Graph Database Project. All Rights Reserved.