org.basex.query.util.inspect
Class PlainDoc

java.lang.Object
  extended by org.basex.query.util.inspect.Inspect
      extended by org.basex.query.util.inspect.PlainDoc

public final class PlainDoc
extends Inspect

This class contains functions for generating a plain XQuery documentation.

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

Field Summary
 
Fields inherited from class org.basex.query.util.inspect.Inspect
ctx, info, module
 
Constructor Summary
PlainDoc(QueryContext qc, InputInfo ii)
          Constructor.
 
Method Summary
 FElem context()
          Parses a module and returns an inspection element.
protected  FElem elem(java.lang.String name, FElem parent)
          Creates an element.
 FElem function(QNm fname, StaticFunc sf, FuncType ftype, FElem parent)
          Creates a description for the specified function.
 FElem parse(IO io)
          Parses a module and returns an inspection element.
protected  FElem tag(byte[] tag, FElem parent)
          Creates a new element for the specified tag.
 
Methods inherited from class org.basex.query.util.inspect.Inspect
add, annotation, comment, doc, parseQuery
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PlainDoc

public PlainDoc(QueryContext qc,
                InputInfo ii)
Constructor.

Parameters:
qc - query context
ii - input info
Method Detail

context

public FElem context()
              throws QueryException
Parses a module and returns an inspection element.

Returns:
inspection element
Throws:
QueryException - query exception

parse

public FElem parse(IO io)
            throws QueryException
Description copied from class: Inspect
Parses a module and returns an inspection element.

Specified by:
parse in class Inspect
Parameters:
io - input reference
Returns:
inspection element
Throws:
QueryException - query exception

function

public FElem function(QNm fname,
                      StaticFunc sf,
                      FuncType ftype,
                      FElem parent)
               throws QueryException
Creates a description for the specified function.

Parameters:
fname - name of function
sf - function reference
ftype - function type
parent - node
Returns:
resulting value
Throws:
QueryException - query exception

elem

protected FElem elem(java.lang.String name,
                     FElem parent)
Creates an element.

Specified by:
elem in class Inspect
Parameters:
name - name of element
parent - parent node
Returns:
element node

tag

protected FElem tag(byte[] tag,
                    FElem parent)
Description copied from class: Inspect
Creates a new element for the specified tag.

Specified by:
tag in class Inspect
Parameters:
tag - tag
parent - parent element
Returns:
element