Package org.dlese.dpc.schemedit.autoform
Class AutoForm
java.lang.Object
org.dlese.dpc.schemedit.autoform.AutoForm
- Direct Known Subclasses:
DcsViewRecord
Class to automatically generate jsp pages (using a Renderer class such as
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.
- Author:
- ostwald
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected org.dom4j.DocumentFactoryNOT YET DOCUMENTEDprotected StringNOT YET DOCUMENTEDprotected MetaDataFrameworkNOT YET DOCUMENTEDprotected org.dom4j.DocumentNOT YET DOCUMENTEDprotected FileNOT YET DOCUMENTEDprotected SchemaHelperNOT YET DOCUMENTEDprotected org.dom4j.io.XMLWriterNOT YET DOCUMENTED -
Constructor Summary
ConstructorsConstructorDescriptionConstructor for the Stand-along AutoForm object, meaning it is created from command line rather than via schemedit.AutoForm(MetaDataFramework framework) Constructor for the AutoForm object -
Method Summary
Modifier and TypeMethodDescriptionvoidCreate a jsp file for each top-level element of the schemastatic StringelementToJsp(org.dom4j.Element e) Perform any modifications to the XML to create legal JSP.protected FilegetBatchJspDest(String pageName) Path for writing component jsp pages.protected StringJSP code to insert at the top of component jsp files.protected FilegetJspDest(String pageName) Path for writing master jsp files.protected StringJSP code to insert at the top of master jsp files.protected StringGets the rendererClassName attribute of the AutoForm objectstatic voidThe main program for the AutoForm class.protected static voidNOT YET DOCUMENTEDorg.dom4j.Elementrender()NOT YET DOCUMENTEDorg.dom4j.ElementProduce aElementrepresenting an editor for the node at xpath.voidrenderAndWrite(String xpath) Description of the MethodvoidrenderAndWrite(String xpath, File dest) NOT YET DOCUMENTEDstatic voidsetLogging(boolean verbose) Sets the logging attribute of the AutoForm classstatic voidsetVerbose(boolean verbosity) protected booleanWrites Element to disk as JSP page to be included in a master page at run time.
-
Field Details
-
instanceDocument
protected org.dom4j.Document instanceDocumentNOT YET DOCUMENTED -
writer
protected org.dom4j.io.XMLWriter writerNOT YET DOCUMENTED -
df
protected org.dom4j.DocumentFactory dfNOT YET DOCUMENTED -
sh
NOT YET DOCUMENTED -
schemaFile
NOT YET DOCUMENTED -
framework
NOT YET DOCUMENTED -
formBeanName
NOT YET DOCUMENTED
-
-
Constructor Details
-
AutoForm
Constructor for the AutoForm object- Parameters:
framework- Description of the Parameter
-
AutoForm
Constructor for the Stand-along AutoForm object, meaning it is created from command line rather than via schemedit.- Parameters:
xmlFormat- Description of the Parameter- Throws:
SchemaHelperException- Description of the ExceptionException- NOT YET DOCUMENTED
-
-
Method Details
-
main
The main program for the AutoForm class. The first argument is command, the second is arg (if nec);- Parameters:
args- The command line arguments- Throws:
Exception- NOT YET DOCUMENTED
-
renderAndWrite
Description of the Method- Parameters:
xpath- Description of the Parameter- Throws:
Exception- NOT YET DOCUMENTED
-
renderAndWrite
NOT YET DOCUMENTED- Parameters:
xpath- NOT YET DOCUMENTEDdest- NOT YET DOCUMENTED- Throws:
Exception- NOT YET DOCUMENTED
-
batchRenderAndWrite
Create a jsp file for each top-level element of the schema- Throws:
Exception- NOT YET DOCUMENTED
-
getRendererClassName
Gets the rendererClassName attribute of the AutoForm object- Returns:
- The rendererClassName value
-
render
public org.dom4j.Element render()NOT YET DOCUMENTED- Returns:
- NOT YET DOCUMENTED
-
render
Produce aElementrepresenting an editor for the node at xpath. The Element returned by render is eventually converted to JSP.- Parameters:
xpath- XPath to a Node in the Schema- Returns:
- An Element representing an editor for the given schema node
-
elementToJsp
Perform any modifications to the XML to create legal JSP. Some strings, such as tag-like notation (e.g., "c:set") are not convenient in XML processing, since they are interpreted as namespaces, so they are encoded by the renderer using a convention (e.g., "c__set") and then decoded here to convert to JSP- Parameters:
e- Element produced by renderer- Returns:
- JSP representation of Element
-
getBatchJspDest
Path for writing component jsp pages.- Parameters:
pageName- NOT YET DOCUMENTED- Returns:
- The batchJspDest value
- Throws:
Exception- NOT YET DOCUMENTED
-
getJspDest
Path for writing master jsp files.- Parameters:
pageName- NOT YET DOCUMENTED- Returns:
- The jspDest value
- Throws:
Exception- NOT YET DOCUMENTED
-
getMasterJspHeader
JSP code to insert at the top of master jsp files.- Returns:
- The masterJspHeader value
-
getComponentJspHeader
JSP code to insert at the top of component jsp files. In the case of AutoForm, where the components are on separate JSP pages, the component and master headers are the same. In subclasses, the component JSP pages maybe included (via jsp:include) in the master, and therefore they may require a different header.- Returns:
- The componentJspHeader value
-
writeJsp
Writes Element to disk as JSP page to be included in a master page at run time.- Parameters:
element- Element representing editor pagedest- NOT YET DOCUMENTEDjspHeader- NOT YET DOCUMENTED- Returns:
- true if JSP was successfully written
-
setLogging
public static void setLogging(boolean verbose) Sets the logging attribute of the AutoForm class- Parameters:
verbose- The new logging value
-
prtlnErr
NOT YET DOCUMENTED- Parameters:
s- NOT YET DOCUMENTED
-
setVerbose
public static void setVerbose(boolean verbosity)
-