org.basex.query.value.item
Class StrStream

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.item.AStr
                      extended by org.basex.query.value.item.StrStream
All Implemented Interfaces:
java.lang.Iterable<Item>

public final class StrStream
extends AStr

Streamable string item (xs:string).

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.item.Item
score, UNDEF
 
Fields inherited from class org.basex.query.value.Value
type
 
Constructor Summary
StrStream(IO io, java.lang.String enc, Err err, QueryContext ctx)
          Constructor.
 
Method Summary
 TextInput input(InputInfo ii)
          Returns an input stream.
 Item materialize(InputInfo ii)
          Materializes streamable values, or returns a self reference.
 byte[] string(InputInfo ii)
          Returns a string representation of the value.
 java.lang.String toJava()
          Returns a Java representation of the value.
 java.lang.String toString()
           
 
Methods inherited from class org.basex.query.value.item.AStr
bool, diff, eq
 
Methods inherited from class org.basex.query.value.item.Item
castErr, comparable, dbl, dec, description, ebv, equiv, flt, hash, homogeneous, isItem, item, itemAt, iter, iterable, itr, plan, 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

StrStream

public StrStream(IO io,
                 java.lang.String enc,
                 Err err,
                 QueryContext ctx)
Constructor.

Parameters:
io - input
enc - encoding (may be null)
ctx - query context
err - error message to be thrown
Method Detail

string

public byte[] string(InputInfo ii)
              throws QueryException
Description copied from class: Item
Returns a string representation of the value.

Specified by:
string in class Item
Parameters:
ii - input info, use null if none is available
Returns:
string value
Throws:
QueryException - if the item can't be atomized

toJava

public java.lang.String toJava()
                        throws QueryException
Description copied from class: Value
Returns a Java representation of the value.

Specified by:
toJava in class Value
Returns:
Java object
Throws:
QueryException - query exception

input

public TextInput input(InputInfo ii)
                throws QueryException
Description copied from class: Item
Returns an input stream.

Overrides:
input in class Item
Parameters:
ii - input info
Returns:
input stream
Throws:
QueryException - query exception

materialize

public Item materialize(InputInfo ii)
                 throws QueryException
Description copied from class: Item
Materializes streamable values, or returns a self reference.

Overrides:
materialize in class Item
Parameters:
ii - input info
Returns:
materialized item
Throws:
QueryException - query exception

toString

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