|
DLESE Tools v1.6.0 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.dlese.dpc.schemedit.autoform.Renderer org.dlese.dpc.schemedit.autoform.RendererImpl
public class RendererImpl
Concrete class for rendering a JSP-based representation of a SchemaNode (an Element or Attribute defined in an XML Schema). Editor pages are Rendered via recursive instantiations of Renderers starting with the base element for that page.
The Renderer is initialized with information from the schema definition for the particular schemaNode (attribute or element) to be rendered, along with access to a RenderHelper, which provides utility functions. Rendered nodes are attached to the parent element (and thus to the Render-tree).
Field Summary | |
---|---|
static String |
DISPLAY_MODE
NOT YET DOCUMENTED |
static String |
EDIT_MODE
|
Fields inherited from class org.dlese.dpc.schemedit.autoform.Renderer |
---|
df, formBeanName, normalizedXPath, parent, repeatingComplexSingletonChildPath, rhelper, root, schemaNode, sh, typeDef, typeName, xpath |
Constructor Summary | |
---|---|
RendererImpl()
Constructor for the Renderer object |
Method Summary | |
---|---|
Element |
bestPracticesLink(String xpath)
Render a Best Practices link for the specified xpath |
protected void |
doInit(String xpath,
Element parent,
GlobalDef typeDef,
RendererHelper rhelper)
NOT YET DOCUMENTED |
protected Element |
getBooleanInput(String xpath)
Boolean input elements are rendered with a tag that implements an select input with options for true and false. |
protected Element |
getComboUnionInput(String xpath)
comboUnionInput allows user to select from enumerated list (supplied by schema) or enter in an arbitray value if desired. |
ComplexTypeLabel |
getComplexTypeLabel(String xpath)
Gets the complexTypeLabel attribute of the RendererImpl object |
ComplexTypeLabel |
getComplexTypeLabel(String xpath,
String siblingPath,
String indexId)
Gets the complexTypeLabel attribute of the RendererImpl object |
Element |
getDeleteController(String itemPath,
String elementName)
Gets the deleteController attribute of the RendererImpl object |
Element |
getInputElement(String xpath,
SchemaNode schemaNode,
GlobalDef typeDef)
Gets the inputElement attribute of the RendererImpl object |
Element |
getInputHelperElement(String xpath)
Creates the JSP element to render an input helper for the specified path |
String |
getLabelText(String xpath,
String siblingPath,
String indexId)
Label text is indexed if siblingPath and indexId provided, otherwise based on xpath |
Element |
getLanguageInput(String xpath)
Gets the languageSelectInput attribute of the RendererImpl object |
protected Element |
getMultiBoxInput(String xpath)
Renders a MultiBoxInput (a set of checkboxes) for the current element. |
Label |
getMultiBoxLabel(String xpath)
Gets the multiBoxLabel attribute of the RendererImpl object |
Element |
getMultiSelectInput(String xpath)
Renders a multiSelect input (a set of of checkboxes) as an Element. |
Element |
getOptionalItemControl(String xpath)
Creates an optionalItemControl Element that allows user to add or delete an optional Element to/from the instance document |
protected Element |
getReadOnlyElement(String xpath)
Gets the readOnlyElement attribute of the RendererImpl object |
Element |
getRenderedField(String xpath,
Element label,
Element input)
Renders a Labelled input field (for a Simple or Built-in schema dataType. |
Element |
getRenderedField(String xpath,
Label label,
Element input)
Gets the renderedField attribute of the RendererImpl object |
String |
getRenderMode()
|
Element |
getSelectInput(String xpath)
Gets the selectInput attribute of the RendererImpl object |
static boolean |
getShowNSPrefixInLabels()
Gets the showNSPrefixInLabels attribute of the RendererImpl class |
SimpleTypeLabel |
getSimpleTypeLabel(String xpath)
Gets the simpleTypeLabel attribute of the RendererImpl object |
SimpleTypeLabel |
getSimpleTypeLabel(String xpath,
String siblingPath,
String indexId)
Gets the simpleTypeLabel attribute of the RendererImpl object |
Element |
getTextAreaInput(String xpath)
Gets the textAreaInput attribute of the RendererImpl object |
Element |
getTextAreaInput(String xpath,
int rows)
Gets the textAreaInput attribute of the RendererImpl object |
protected Element |
getTextInput(String xpath,
SchemaNode schemaNode,
GlobalDef typeDef)
Gets the textInput attribute of the RendererImpl object |
String |
getToolHelp(String s)
Attempts to return a metadata vocab field definition for the input string assuming it is an xpath. |
String |
getXpath()
Gets the xpath of the Node to be rendered. |
boolean |
isDisplayMode()
Returns true if we are in display mode (not editing) |
boolean |
isEditMode()
Returns true if we are editing field contents (as opposed to simply viewing them). |
void |
renderAttribute()
Render an Attribute schemaNode |
void |
renderChoice(Element choiceElement)
Render a choice compository via either MdeChoice, for simple choices, or MdeMultiChoice for choice compositors that have more than one occurance |
void |
renderComplexTypeConcrete()
Renders a complexType element by creating an containerBox and then populating it with a formattedLabel and the complexType element contents (via renderSubElements). |
void |
renderDerivedContentModel()
Render a derived content model (complexType). |
void |
renderDerivedTextOnlyModel()
Render a Text-only content model, which is a complexType that uses a simpleContent element. |
protected Element |
renderInputElement(String xpath,
SchemaNode schemaNode,
GlobalDef typeDef)
Gets the inputElement attribute of the EditorRenderer object |
void |
renderModelGroup(Element group)
called with group element, e.g., <xs:group ref="nameGroup"/> |
void |
renderRepeatingElement()
NOT YET DOCUMENTED |
void |
renderRepeatingSubstitutionGroup()
NOT YET DOCUMENTED |
void |
renderSequence(Element sequence)
NOT YET DOCUMENTED |
void |
renderSimpleTypeConcrete()
NOT YET DOCUMENTED |
void |
renderSubElements()
NOT YET DOCUMENTED |
void |
renderSubElements(GlobalDef proxyTypeDef)
NOT YET DOCUMENTED |
void |
renderSubElements(List subElements)
Render the given subElements (or those of the current ComplexType if no subElements are provided). |
String |
report()
Description of the Method |
static void |
setDebug(boolean bool)
Sets the debug attribute of the RendererImpl class |
void |
setRenderMode(String mode)
RenderMode determines whether we are editing a record, or simply viewing its contents. |
static void |
setShowNSPrefixInLabels(boolean b)
Sets the showNSPrefixInLabels attribute of the RendererImpl class |
boolean |
showXsdStringElement(String xpath)
Hook to allow specialized renderers (in particular DleseEditorRenderer) to suppress display of xsd:string elements in certain circumstances by overriding this method. |
Methods inherited from class org.dlese.dpc.schemedit.autoform.Renderer |
---|
doInit, getDiv, getDiv, getLevel, getSchemaNamespace, getSchemaNSPrefix, getXmlFormat, init, jspQuotedString, renderComplexType, renderNode, renderSimpleType |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String EDIT_MODE
public static final String DISPLAY_MODE
Constructor Detail |
---|
public RendererImpl()
Method Detail |
---|
public void setRenderMode(String mode)
setRenderMode
in class Renderer
public String getRenderMode()
getRenderMode
in class Renderer
public boolean isDisplayMode()
isDisplayMode
in class Renderer
public boolean isEditMode()
isEditMode
in class Renderer
public static void setShowNSPrefixInLabels(boolean b)
b
- The new showNSPrefixInLabels valuepublic static boolean getShowNSPrefixInLabels()
protected void doInit(String xpath, Element parent, GlobalDef typeDef, RendererHelper rhelper) throws Exception
doInit
in class Renderer
xpath
- path to the node to be renderedparent
- element to which the rendered node will be attachedtypeDef
- schema-defined type definition for the node to be
renderedrhelper
- Helper class provided utility functions to aid
rendering
Exception
- NOT YET DOCUMENTEDpublic String getXpath()
public void renderSimpleTypeConcrete()
renderSimpleTypeConcrete
in class Renderer
public void renderComplexTypeConcrete()
renderComplexTypeConcrete
in class Renderer
public void renderDerivedTextOnlyModel()
renderDerivedTextOnlyModel
in class Renderer
public void renderDerivedContentModel()
renderDerivedContentModel
in class Renderer
public void renderModelGroup(Element group)
renderModelGroup
in class Renderer
group
- NOT YET DOCUMENTEDpublic void renderAttribute()
renderAttribute
in class Renderer
public void renderChoice(Element choiceElement)
renderChoice
in class Renderer
choiceElement
- choice compositor element from the parent node's
typeDefinition.public void renderSequence(Element sequence)
renderSequence
in class Renderer
sequence
- NOT YET DOCUMENTEDpublic void renderRepeatingSubstitutionGroup()
renderRepeatingSubstitutionGroup
in class Renderer
public void renderRepeatingElement()
renderRepeatingElement
in class Renderer
public void renderSubElements(GlobalDef proxyTypeDef)
renderSubElements
in class Renderer
proxyTypeDef
- NOT YET DOCUMENTEDpublic void renderSubElements(List subElements)
renderSubElements
in class Renderer
subElements
- A list of elements to be rendered.public void renderSubElements()
renderSubElements
in class Renderer
public Element bestPracticesLink(String xpath)
bestPracticesLink
in class Renderer
xpath
- NOT YET DOCUMENTED
public String getToolHelp(String s)
FieldInfoReader
for the xpath. If a FieldInfoReader cannot be found,
return the input string (encoded so whether an xpath or a regular string,
there won't be a javascript error)..
s
- A string that may or may not corrrespond to a field that has
metadata-vocab definition information
public Element getInputHelperElement(String xpath)
xpath
- NOT YET DOCUMENTED
protected Element renderInputElement(String xpath, SchemaNode schemaNode, GlobalDef typeDef)
xpath
- NOT YET DOCUMENTEDschemaNode
- NOT YET DOCUMENTEDtypeDef
- NOT YET DOCUMENTED
public Element getInputElement(String xpath, SchemaNode schemaNode, GlobalDef typeDef)
getInputElement
in class Renderer
xpath
- NOT YET DOCUMENTEDschemaNode
- NOT YET DOCUMENTEDtypeDef
- NOT YET DOCUMENTED
protected Element getReadOnlyElement(String xpath)
xpath
- NOT YET DOCUMENTED
protected Element getTextInput(String xpath, SchemaNode schemaNode, GlobalDef typeDef)
xpath
- NOT YET DOCUMENTEDschemaNode
- NOT YET DOCUMENTEDtypeDef
- NOT YET DOCUMENTED
protected Element getBooleanInput(String xpath)
xpath
- NOT YET DOCUMENTED
public Element getTextAreaInput(String xpath)
xpath
- NOT YET DOCUMENTED
public Element getTextAreaInput(String xpath, int rows)
xpath
- NOT YET DOCUMENTEDrows
- NOT YET DOCUMENTED
public Element getSelectInput(String xpath)
xpath
- NOT YET DOCUMENTED
public Element getLanguageInput(String xpath)
xpath
- NOT YET DOCUMENTED
public Element getMultiSelectInput(String xpath)
xpath
- NOT YET DOCUMENTED
protected Element getMultiBoxInput(String xpath)
getMultiBoxInput
in class Renderer
xpath
- NOT YET DOCUMENTED
protected Element getComboUnionInput(String xpath)
xpath
- NOT YET DOCUMENTED
public SimpleTypeLabel getSimpleTypeLabel(String xpath)
getSimpleTypeLabel
in class Renderer
xpath
- NOT YET DOCUMENTED
public SimpleTypeLabel getSimpleTypeLabel(String xpath, String siblingPath, String indexId)
getSimpleTypeLabel
in class Renderer
xpath
- NOT YET DOCUMENTEDsiblingPath
- NOT YET DOCUMENTEDindexId
- NOT YET DOCUMENTED
public String getLabelText(String xpath, String siblingPath, String indexId)
xpath
- NOT YET DOCUMENTEDsiblingPath
- NOT YET DOCUMENTEDindexId
- NOT YET DOCUMENTED
public Label getMultiBoxLabel(String xpath)
xpath
- NOT YET DOCUMENTED
public Element getDeleteController(String itemPath, String elementName)
getDeleteController
in class Renderer
itemPath
- NOT YET DOCUMENTEDelementName
- NOT YET DOCUMENTED
public Element getOptionalItemControl(String xpath)
getOptionalItemControl
in class Renderer
xpath
- NOT YET DOCUMENTED
public ComplexTypeLabel getComplexTypeLabel(String xpath)
getComplexTypeLabel
in class Renderer
xpath
- NOT YET DOCUMENTED
public ComplexTypeLabel getComplexTypeLabel(String xpath, String siblingPath, String indexId)
getComplexTypeLabel
in class Renderer
xpath
- NOT YET DOCUMENTEDsiblingPath
- NOT YET DOCUMENTEDindexId
- NOT YET DOCUMENTED
public boolean showXsdStringElement(String xpath)
showXsdStringElement
in class Renderer
xpath
- The xpath to show
public Element getRenderedField(String xpath, Label label, Element input)
xpath
- NOT YET DOCUMENTEDlabel
- NOT YET DOCUMENTEDinput
- NOT YET DOCUMENTED
public Element getRenderedField(String xpath, Element label, Element input)
getRenderedField
in class Renderer
label
- Description of the Parameterinput
- Description of the Parameterxpath
- NOT YET DOCUMENTED
public String report()
report
in class Renderer
public static void setDebug(boolean bool)
bool
- The new debug value
|
DLESE Tools v1.6.0 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |