org.nodal.nav
Class OpaqueOp

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

public class OpaqueOp
extends PathOp

A document PathOperator for an opaque scheme type.

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
 
Method Summary
 Path applyTo(Path path)
          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 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, isAbsolute
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

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

applyTo

public Path applyTo(Path path)
             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