com.hp.hpl.jena.graph.query
Class PatternStageCompiler

java.lang.Object
  extended by com.hp.hpl.jena.graph.query.PatternStageCompiler
All Implemented Interfaces:
PatternCompiler

public final class PatternStageCompiler
extends Object
implements PatternCompiler

PatternStageCompiler serves two purposes: it contains the standard algorithm for compiling patterns-as-triples to patterns-as-Pattern(s), and it has the standard implementation of PatternCompiler in terms of ordinary Elements.

Author:
kers

Constructor Summary
PatternStageCompiler()
          no state, so the constructor is boring.
 
Method Summary
 Element any()
          Method called to deliver a compiled element from a wildcard ANY.
 Element bind(Node n, int index)
          Method called to deliver a compiled element from a binding occurance of a variable Node allocated at a given index position.
 Element bound(Node n, int index)
          Method called to deliver a compiled element from a bound occurance of a variable Node allocated at a given index position.
static Pattern[] compile(PatternCompiler compiler, Mapping map, Triple[] source)
          to compile an array of triples, compile each triple and form the corresponding array of Patterns.
 Element fixed(Node value)
          Method called to deliver a compiled Element constructed from a constant Node.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PatternStageCompiler

public PatternStageCompiler()
no state, so the constructor is boring.

Method Detail

compile

public static Pattern[] compile(PatternCompiler compiler,
                                Mapping map,
                                Triple[] source)
to compile an array of triples, compile each triple and form the corresponding array of Patterns. *preserve the order*.


fixed

public Element fixed(Node value)
Description copied from interface: PatternCompiler
Method called to deliver a compiled Element constructed from a constant Node.

Specified by:
fixed in interface PatternCompiler

bound

public Element bound(Node n,
                     int index)
Description copied from interface: PatternCompiler
Method called to deliver a compiled element from a bound occurance of a variable Node allocated at a given index position.

Specified by:
bound in interface PatternCompiler

bind

public Element bind(Node n,
                    int index)
Description copied from interface: PatternCompiler
Method called to deliver a compiled element from a binding occurance of a variable Node allocated at a given index position.

Specified by:
bind in interface PatternCompiler

any

public Element any()
Description copied from interface: PatternCompiler
Method called to deliver a compiled element from a wildcard ANY.

Specified by:
any in interface PatternCompiler


Licenced under the Apache License, Version 2.0