public class AutoForm
extends java.lang.Object
DleseEditorRenderer
) for editing and viewing of schemedit-based xml
documents.
Called from command line for debugging as well as from MetaDataFramework
at start-up time and after run-time reconfiguration.
Modifier and Type | Field and Description |
---|---|
protected org.dom4j.DocumentFactory |
df
NOT YET DOCUMENTED
|
protected java.lang.String |
formBeanName
NOT YET DOCUMENTED
|
protected MetaDataFramework |
framework
NOT YET DOCUMENTED
|
protected org.dom4j.Document |
instanceDocument
NOT YET DOCUMENTED
|
protected java.io.File |
schemaFile
NOT YET DOCUMENTED
|
protected SchemaHelper |
sh
NOT YET DOCUMENTED
|
protected org.dom4j.io.XMLWriter |
writer
NOT YET DOCUMENTED
|
Constructor and Description |
---|
AutoForm(MetaDataFramework framework)
Constructor for the AutoForm object
|
AutoForm(java.lang.String xmlFormat)
Constructor for the Stand-along AutoForm object, meaning it is created from command line rather than via
schemedit.
|
Modifier and Type | Method and Description |
---|---|
void |
batchRenderAndWrite()
Create a jsp file for each top-level element of the schema
|
static java.lang.String |
elementToJsp(org.dom4j.Element e)
Perform any modifications to the XML to create legal JSP.
|
protected java.io.File |
getBatchJspDest(java.lang.String pageName)
Path for writing component jsp pages.
|
protected java.lang.String |
getComponentJspHeader()
JSP code to insert at the top of component jsp files.
|
protected java.io.File |
getJspDest(java.lang.String pageName)
Path for writing master jsp files.
|
protected java.lang.String |
getMasterJspHeader()
JSP code to insert at the top of master jsp files.
|
protected java.lang.String |
getRendererClassName()
Gets the rendererClassName attribute of the AutoForm object
|
static void |
main(java.lang.String[] args)
The main program for the AutoForm class.
|
protected static void |
prtlnErr(java.lang.String s)
NOT YET DOCUMENTED
|
org.dom4j.Element |
render()
NOT YET DOCUMENTED
|
org.dom4j.Element |
render(java.lang.String xpath)
Produce a
Element representing an editor for the node at xpath. |
void |
renderAndWrite(java.lang.String xpath)
Description of the Method
|
void |
renderAndWrite(java.lang.String xpath,
java.io.File dest)
NOT YET DOCUMENTED
|
static void |
setLogging(boolean verbose)
Sets the logging attribute of the AutoForm class
|
static void |
setVerbose(boolean verbosity) |
protected boolean |
writeJsp(org.dom4j.Element element,
java.io.File dest,
java.lang.String jspHeader)
Writes Element to disk as JSP page to be included in a master page at run time.
|
protected org.dom4j.Document instanceDocument
protected org.dom4j.io.XMLWriter writer
protected org.dom4j.DocumentFactory df
protected SchemaHelper sh
protected java.io.File schemaFile
protected MetaDataFramework framework
protected java.lang.String formBeanName
public AutoForm(MetaDataFramework framework)
framework
- Description of the Parameterpublic AutoForm(java.lang.String xmlFormat) throws java.lang.Exception, SchemaHelperException
xmlFormat
- Description of the ParameterSchemaHelperException
- Description of the Exceptionjava.lang.Exception
- NOT YET DOCUMENTEDpublic static void main(java.lang.String[] args) throws java.lang.Exception
args
- The command line argumentsjava.lang.Exception
- NOT YET DOCUMENTEDpublic void renderAndWrite(java.lang.String xpath) throws java.lang.Exception
xpath
- Description of the Parameterjava.lang.Exception
- NOT YET DOCUMENTEDpublic void renderAndWrite(java.lang.String xpath, java.io.File dest) throws java.lang.Exception
xpath
- NOT YET DOCUMENTEDdest
- NOT YET DOCUMENTEDjava.lang.Exception
- NOT YET DOCUMENTEDpublic void batchRenderAndWrite() throws java.lang.Exception
java.lang.Exception
- NOT YET DOCUMENTEDprotected java.lang.String getRendererClassName()
public org.dom4j.Element render()
public org.dom4j.Element render(java.lang.String xpath)
Element
representing an editor for the node at xpath. The Element returned by
render is eventually converted to JSP.xpath
- XPath to a Node in the Schemapublic static java.lang.String elementToJsp(org.dom4j.Element e)
e
- Element produced by rendererprotected java.io.File getBatchJspDest(java.lang.String pageName) throws java.lang.Exception
pageName
- NOT YET DOCUMENTEDjava.lang.Exception
- NOT YET DOCUMENTEDprotected java.io.File getJspDest(java.lang.String pageName) throws java.lang.Exception
pageName
- NOT YET DOCUMENTEDjava.lang.Exception
- NOT YET DOCUMENTEDprotected java.lang.String getMasterJspHeader()
protected java.lang.String getComponentJspHeader()
protected boolean writeJsp(org.dom4j.Element element, java.io.File dest, java.lang.String jspHeader)
element
- Element representing editor pagedest
- NOT YET DOCUMENTEDjspHeader
- NOT YET DOCUMENTEDpublic static void setLogging(boolean verbose)
verbose
- The new logging valueprotected static void prtlnErr(java.lang.String s)
s
- NOT YET DOCUMENTEDpublic static void setVerbose(boolean verbosity)