org.basex.query.value.node
Class FPI

java.lang.Object
  extended by org.basex.data.ExprInfo
      extended by org.basex.query.expr.Expr
          extended by org.basex.query.value.Value
              extended by org.basex.query.value.item.Item
                  extended by org.basex.query.value.node.ANode
                      extended by org.basex.query.value.node.FNode
                          extended by org.basex.query.value.node.FPI
All Implemented Interfaces:
java.lang.Iterable<Item>

public final class FPI
extends FNode

PI node fragment.

Author:
BaseX Team 2005-12, BSD License, Christian Gruen

Nested Class Summary
 
Nested classes/interfaces inherited from class org.basex.query.expr.Expr
Expr.Flag
 
Field Summary
 
Fields inherited from class org.basex.query.value.node.ANode
id
 
Fields inherited from class org.basex.query.value.item.Item
score, UNDEF
 
Fields inherited from class org.basex.query.value.Value
type
 
Constructor Summary
FPI(org.w3c.dom.ProcessingInstruction pi)
          Constructor for creating a processing instruction from a DOM node.
FPI(QNm n, byte[] v)
          Constructor for creating a processing instruction.
FPI(java.lang.String n, java.lang.String v)
          Constructor for creating a processing instruction.
 
Method Summary
 FNode copy()
          Creates a copy of this node.
 byte[] name()
          Returns the name of the node, composed of an optional prefix and the local name.
static byte[] parse(byte[] atom, InputInfo ii)
          Checks the specified token for validity.
 void plan(FElem plan)
          Creates an expression tree.
 QNm qname()
          Returns the QName of the node.
 java.lang.String toString()
           
 
Methods inherited from class org.basex.query.value.node.FNode
ancestor, ancestorOrSelf, attributes, children, deepCopy, descendant, descendantOrSelf, diff, following, followingSibling, hasChildren, is, parent, parent, parentIter, qname, string
 
Methods inherited from class org.basex.query.value.node.ANode
attribute, attribute, attribute, baseURI, bool, dbCopy, diff, diff, eq, finish, kind, kind, namespaces, nodeType, nsScope, optimize, preceding, precedingSibling, self, string, toJava, type, uri
 
Methods inherited from class org.basex.query.value.item.Item
castErr, comparable, dbl, dec, description, ebv, equiv, flt, hash, homogeneous, input, isItem, item, itemAt, iter, iterable, itr, materialize, score, score, size, test, type, typeId, writeTo, xdmInfo
 
Methods inherited from class org.basex.query.value.Value
accept, cache, checkUp, compile, copy, count, data, exprSize, has, inline, isValue, iter, iterator, removable, serialize, value
 
Methods inherited from class org.basex.query.expr.Expr
addText, compEbv, copy, hasFreeVars, indexAccessible, indexEquivalent, inlineAll, isEmpty, isFunction, isVacuous, markTailCalls, optimize, sameAs, uses, visitAll
 
Methods inherited from class org.basex.data.ExprInfo
addPlan, addPlan, info, planAttr, planElem
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

FPI

public FPI(java.lang.String n,
           java.lang.String v)
Constructor for creating a processing instruction.

Parameters:
n - name
v - value

FPI

public FPI(QNm n,
           byte[] v)
Constructor for creating a processing instruction.

Parameters:
n - name
v - value

FPI

public FPI(org.w3c.dom.ProcessingInstruction pi)
Constructor for creating a processing instruction from a DOM node. Originally provided by Erdal Karaca.

Parameters:
pi - DOM node
Method Detail

qname

public QNm qname()
Description copied from class: ANode
Returns the QName of the node. This function must only be called for elements, attributes and pi's.

Overrides:
qname in class ANode
Returns:
name

name

public byte[] name()
Description copied from class: ANode
Returns the name of the node, composed of an optional prefix and the local name. This function must only be called for element and attribute nodes. It is more efficient than calling ANode.qname(), as no QNm instance is created.

Overrides:
name in class ANode
Returns:
name

copy

public FNode copy()
Description copied from class: ANode
Creates a copy of this node.

Specified by:
copy in class ANode
Returns:
copy

plan

public void plan(FElem plan)
Description copied from class: ExprInfo
Creates an expression tree.

Overrides:
plan in class Item
Parameters:
plan - root element

toString

public java.lang.String toString()
Specified by:
toString in class ExprInfo

parse

public static byte[] parse(byte[] atom,
                           InputInfo ii)
                    throws QueryException
Checks the specified token for validity.

Parameters:
atom - token to be checked
ii - input info
Returns:
token
Throws:
QueryException - query exception