|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.xqdoc.conversion.XQDocContext
public class XQDocContext
This class serves as the 'go between' for XQDocController and the parser. The XQDocController creates (and initializes) the XQDocContext and the parser sets numerous member variables via callbacks. The XQDocContext also has the responsibility for creating the correct XQDocXML and XQDocComment object(s) which eventually constructs the resultant xqDoc XML. Finally, XQDocContext creates the XQDocPaylaod (and sets the member variables) that is returned to XQDocController.
Field Summary | |
---|---|
static java.lang.String |
XQDOC_NAMESPACE
|
Constructor Summary | |
---|---|
XQDocContext(java.lang.String namespace)
Constructor. |
Method Summary | |
---|---|
void |
addPrefixAndURI(java.lang.String prefix,
java.lang.String uri)
Add the namespace prefix and uri to a HashMap. |
void |
buildFunctionSection()
Append information to the function section for the returned xqDoc XML. |
void |
buildImportSection(java.lang.String uri)
Append information to the import section for the returned xqDoc XML. |
void |
buildLibraryModuleSection(java.lang.String uri)
Build the library module section for the returned xqDoc XML (for library modules). |
void |
buildMainModuleSection()
Build the main module section for the returned xqDoc XML (for main modules). |
XQDocPayload |
buildResponse()
Construct the response payload consisting of serialized xqDoc XML and the module URI. |
void |
buildVariableSection(java.lang.String uri)
Append information to the global variable section for the returned xqDoc XML. |
void |
init(java.lang.String base,
java.lang.String name,
java.lang.String source,
java.util.HashMap map,
java.lang.String uri,
boolean encode)
The initialize method for XQDocContext. |
void |
setDefaultModuleFunctionNamespace(java.lang.String uri)
Set the default function namespace as specified in the module. |
void |
setFunctionBody(java.lang.String body)
Set the source code for the function body so that it can be included when generating the xqDoc XML. |
void |
setFunctionName(java.lang.String prefix,
java.lang.String name)
Set the function name for the function declaration so that it can be included when generating the xqDoc XML. |
void |
setFunctionSignature(java.lang.String signature)
Set the function signature for the function delcaration so that it can be included when generating the xqDoc XML. |
void |
setInvokedFunction(java.lang.String fName)
Check if the invoked function (from the current function) has already been identified. |
void |
setReferencedVariable(java.lang.String vName)
Check if the referenced global variable (from the current function) has already been identified. |
void |
setXQDocBuffer(java.lang.String text)
Set the xqDoc comment block. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String XQDOC_NAMESPACE
Constructor Detail |
---|
public XQDocContext(java.lang.String namespace)
namespace
- The namespace to use for the generated XQDoc XML.Method Detail |
---|
public void init(java.lang.String base, java.lang.String name, java.lang.String source, java.util.HashMap map, java.lang.String uri, boolean encode)
base
- The module base (mostly used for main modules)name
- The common name associated with the modulesource
- The source code for the modulemap
- The map of predefined function namespaces (URIs) to prefixesuri
- The default function namespace URIencode
- The document URI encode flagpublic void buildLibraryModuleSection(java.lang.String uri)
uri
- The library module uri.public void buildMainModuleSection()
public void buildImportSection(java.lang.String uri)
uri
- The uri for the module imported.public void buildVariableSection(java.lang.String uri)
uri
- The uri for the global variable.public void buildFunctionSection()
public XQDocPayload buildResponse()
public void addPrefixAndURI(java.lang.String prefix, java.lang.String uri)
prefix
- The namespace prefixuri
- The namespace uripublic void setDefaultModuleFunctionNamespace(java.lang.String uri)
uri
- The uri for the default function namespacepublic void setFunctionName(java.lang.String prefix, java.lang.String name)
name
- The function name (without the uri prefix)public void setFunctionSignature(java.lang.String signature)
signature
- The function signaturepublic void setFunctionBody(java.lang.String body)
body
- The source code for a function bodypublic void setXQDocBuffer(java.lang.String text)
text
- The xqDoc comment blockpublic void setInvokedFunction(java.lang.String fName)
fName
- The function invoked from within the current functionpublic void setReferencedVariable(java.lang.String vName)
vName
- The variable referenced from within the current function
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |