|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.xqdoc.conversion.XQDocXML
public class XQDocXML
This class has the responsibility for generating xqDoc XML. It contains member variables that hold the main sections of the xqDoc XML. Then, when the xqDoc XML is requested, it combines all of the sections into the final xqDoc XML output. Since a namespace can be specified when this object is created, it should be easy to support different versions of xqDoc XML without necessarily adjusting the xqDoc conversion programs.
Constructor Summary | |
---|---|
XQDocXML(java.lang.String xqDocNamespace)
Constructor. |
Method Summary | |
---|---|
static java.lang.String |
buildBeginTag(java.lang.String name)
Helper method to build a begin XML tag name for the specified name. |
static java.lang.String |
buildBeginTagWithNamespace(java.lang.String name,
java.lang.String namespace)
Helper method to build a begin XML tag name for the specified name and namespace. |
void |
buildControlSection(java.lang.String version)
Build the control section for xqDoc XML. |
static java.lang.String |
buildEndTag(java.lang.String name)
Helper method to build an end XML tag name for the specified name. |
void |
buildFunctionSection(java.lang.String functionName,
java.lang.String functionSignature,
XQDocComment comment,
java.lang.String functionBody,
java.util.HashSet invokedFunctions,
java.util.HashSet referencedVariables)
Construct the snippet of serialized xqDoc XML for the function. |
void |
buildImportSection(java.lang.String uri,
XQDocComment comment)
Append information to the import section of the returned xqDoc XML. |
void |
buildLibraryModuleSection(java.lang.String uri,
java.lang.String commonName,
XQDocComment comment,
java.lang.String moduleBody)
Build the library module section for the xqDoc XML (for library modules). |
void |
buildMainModuleSection(java.lang.String uri,
java.lang.String commonName,
XQDocComment comment,
java.lang.String moduleBody)
Build the main module section of the returned xqDoc XML (for main modules). |
void |
buildVariableSection(java.lang.String uri,
XQDocComment comment)
Append information to the variable section of the returned xqDoc XML. |
static java.lang.String |
encodeXML(java.lang.String input)
Encode the string. |
java.lang.String |
getXML()
Construct the xqDoc XML and return the XML as a serialized string. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public XQDocXML(java.lang.String xqDocNamespace)
xqDocNamespace
- Namespace of xqDoc XML to createMethod Detail |
---|
public void buildControlSection(java.lang.String version)
version
- The xqDoc conversion program versionpublic void buildLibraryModuleSection(java.lang.String uri, java.lang.String commonName, XQDocComment comment, java.lang.String moduleBody)
uri
- The library module uri.commonName
- The 'user-friendly' name for the library modulecomment
- The XQDocComment blockmoduleBody
- The source code for the library modulepublic void buildMainModuleSection(java.lang.String uri, java.lang.String commonName, XQDocComment comment, java.lang.String moduleBody)
uri
- The main module uri.commonName
- The 'user-friendly' name for the main modulecomment
- The XQDocComment blockmoduleBody
- The source code for the main modulepublic void buildImportSection(java.lang.String uri, XQDocComment comment)
uri
- The uri for the module imported.comment
- The XQDocComment blockpublic void buildVariableSection(java.lang.String uri, XQDocComment comment)
uri
- The uri for the global variable.comment
- The XQDocComment blockpublic void buildFunctionSection(java.lang.String functionName, java.lang.String functionSignature, XQDocComment comment, java.lang.String functionBody, java.util.HashSet invokedFunctions, java.util.HashSet referencedVariables)
functionName
- The local name for the current functionfunctionSignature
- The signature for the functioncomment
- The XQDocComment associated with the functionfunctionBody
- The source code for the functioninvokedFunctions
- The list of functions invoked by this functionreferencedVariables
- The list of global variables referenced by this functionpublic java.lang.String getXML()
public static java.lang.String buildBeginTagWithNamespace(java.lang.String name, java.lang.String namespace)
name
- XML Element namenamespace
- The namespace for this element and it's descendants
public static java.lang.String buildBeginTag(java.lang.String name)
name
- XML Element name
public static java.lang.String buildEndTag(java.lang.String name)
name
- XML Element name
public static java.lang.String encodeXML(java.lang.String input)
input
- The string to encode
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |