org.nodal.nav
Class SchemeOp

java.lang.Object
  extended byorg.nodal.nav.PathOp
      extended byorg.nodal.nav.SchemeOp
All Implemented Interfaces:
PathOperator

public class SchemeOp
extends PathOp

A document PathOp that encapsulates the absolute components of a URI.

Author:
leei

Nested Class Summary
 
Nested classes inherited from class org.nodal.nav.PathOp
PathOp.Factory
 
Field Summary
 
Fields inherited from class org.nodal.nav.PathOp
NO_ARGS
 
Constructor Summary
SchemeOp(java.lang.String scheme)
          Creator for a PathOperator representing a URL scheme
 
Method Summary
 Path applyTo(Path p)
          Apply this PathOp to the given Path.
 java.lang.Object arg(int i)
          Default implementation of i-th argument.
 java.lang.String[] args()
          Each PathOperator can be described by an operator name and a set of arguments.
 Getter bindFrom(Path pg)
          Apply this PathOp to the binding of a bound Path.
 java.lang.String functionName()
          Each PathOperator can be described by an operator name and a set of arguments.
 boolean isAbsolute()
          In general, a PathOp is relative.
 boolean isDocumentOp()
          Is this PathOperator a document-level operator?
 boolean isFragmentOp()
          Is this PathOperator a fragment-level operator?
 java.lang.String toString()
           
 
Methods inherited from class org.nodal.nav.PathOp
encoded, findDir
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SchemeOp

public SchemeOp(java.lang.String scheme)
Creator for a PathOperator representing a URL scheme

Parameters:
scheme - the URL scheme
Method Detail

isDocumentOp

public boolean isDocumentOp()
Description copied from interface: PathOperator
Is this PathOperator a document-level operator?

All Path operators either select a Document or a location within a Document. Those that select Documents are referred to as "document" operators.

PathOperators may work on both levels (e.g. DerefOp)

Specified by:
isDocumentOp in interface PathOperator
Specified by:
isDocumentOp in class PathOp

isFragmentOp

public boolean isFragmentOp()
Description copied from interface: PathOperator
Is this PathOperator a fragment-level operator?

All Path operators either select a Document or a location within a Document. Those that operate inside Documents are referred to as "fragment" operators.

PathOperators may work on both levels (e.g. DerefOp)

Specified by:
isFragmentOp in interface PathOperator
Specified by:
isFragmentOp in class PathOp

isAbsolute

public boolean isAbsolute()
Description copied from class: PathOp
In general, a PathOp is relative.

Specified by:
isAbsolute in interface PathOperator
Overrides:
isAbsolute in class PathOp

applyTo

public Path applyTo(Path p)
             throws Path.Failure
Description copied from class: PathOp
Apply this PathOp to the given Path. The method call this.applyTo(p) is an inversion of the call p.apply(this).

Specified by:
applyTo in interface PathOperator
Overrides:
applyTo in class PathOp
Returns:
a new Path made by applying this PathOp to the end
Throws:
Path.Failure

bindFrom

public Getter bindFrom(Path pg)
                throws Path.Failure
Description copied from class: PathOp
Apply this PathOp to the binding of a bound Path.

Specified by:
bindFrom in interface PathOperator
Specified by:
bindFrom in class PathOp
Parameters:
pg - the parent Path for this operator
Returns:
a Getter that is the binding of this operator on the parent Path.
Throws:
Path.Failure

toString

public java.lang.String toString()

functionName

public java.lang.String functionName()
Description copied from interface: PathOperator
Each PathOperator can be described by an operator name and a set of arguments. This function returns the name of the function that this PathOperator performs.

Returns:
the name of the PathOperator function

args

public java.lang.String[] args()
Description copied from interface: PathOperator
Each PathOperator can be described by an operator name and a set of arguments. This function returns the arguments of the function that this PathOperator performs.

Returns:
the arguments of the PathOperator function

arg

public java.lang.Object arg(int i)
Description copied from class: PathOp
Default implementation of i-th argument.

Specified by:
arg in interface PathOperator
Overrides:
arg in class PathOp