|
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 org.dlese.dpc.schemedit.autoform.ViewerRenderer
public class ViewerRenderer
Renders JSP for viewing metadata records within the DCS (as opposed to within a metadata editor).
Shows only elements that are either required or that have values. Element labels have "editMe" links that open a metadata editor to the selected element for editing.
Field Summary |
---|
Fields inherited from class org.dlese.dpc.schemedit.autoform.RendererImpl |
---|
DISPLAY_MODE, 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 | |
---|---|
ViewerRenderer()
|
Method Summary | |
---|---|
ComplexTypeLabel |
getComplexTypeLabel(String xpath,
String siblingPath,
String indexId)
Gets the complexTypeLabel attribute of the ViewerRenderer object |
Element |
getDeleteController(String itemPath,
String elementName)
Gets the deleteController attribute of the ViewerRenderer object |
protected Element |
getEditMeTag(String xpath)
Gets the editMeTag attribute of the ViewerRenderer object |
protected Element |
getEditMeTag(String xpath,
String siblingPath,
String indexId)
creates a jsp tag (st:dcsViewEditMeLabel) that renders a label as a link that will open the metadata editor to this field. |
Element |
getInputElement(String xpath,
SchemaNode schemaNode,
GlobalDef typeDef)
Gets the inputElement attribute of the ViewerRenderer object |
Element |
getMultiSelectInput(String xpath)
Renders a multiSelect input (a set of of checkboxes) as an Element. |
Element |
getOptionalItemControl(String xpath)
View pages do not have conrols! |
Element |
getRenderedField_1(String xpath,
Label label,
Element inputField)
Formats the label and value for the current node. |
Element |
getRenderedField_2(String xpath,
Label label,
Element inputField)
Gets the labelledInputField_2 attribute of the ViewerRenderer object |
Element |
getRenderedField(String xpath,
Label label,
Element inputField)
Gets the labelledInputField attribute of the ViewerRenderer object |
SimpleTypeLabel |
getSimpleTypeLabel(String xpath,
String siblingPath,
String indexId)
Gets the simpleTypeLabel attribute of the ViewerRenderer object |
protected Element |
getStaticSimpleValue(String xpath)
Displays the value of the element at specified xpath |
Element |
hasValueTest(String xpath)
test for whether a node has a value |
Element |
missingValueTest(String xpath)
test for whether a node has a value |
void |
renderAttribute()
Render an attribute |
void |
renderChoice(Element choiceElement)
Render a choice Compositor |
void |
renderComplexTypeConcrete()
A complexType is displayed iff: it is required or it satisfies the viewNode predicate. |
void |
renderRepeatingElement()
Render a repeating element |
void |
renderSequence(Element sequence)
Render a Sequence Compositor |
void |
renderSimpleTypeConcrete()
Concrete render method for SimpleType elements |
void |
renderSubElements()
Render the subElements of the current typeDefinition |
void |
renderSubElements(List subElements)
Render the provided list of subelements |
static void |
setDebug(boolean verbose)
Sets the debug attribute of the ViewerRenderer class |
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 |
Constructor Detail |
---|
public ViewerRenderer()
Method Detail |
---|
public void renderAttribute()
renderAttribute
in class RendererImpl
public void renderSimpleTypeConcrete()
renderSimpleTypeConcrete
in class RendererImpl
public void renderChoice(Element choiceElement)
renderChoice
in class RendererImpl
choiceElement
- NOT YET DOCUMENTEDpublic void renderComplexTypeConcrete()
approach:
renderComplexTypeConcrete
in class RendererImpl
public void renderSequence(Element sequence)
renderSequence
in class RendererImpl
sequence
- The Sequence elementpublic void renderRepeatingElement()
renderRepeatingElement
in class RendererImpl
public void renderSubElements(List subElements)
renderSubElements
in class RendererImpl
subElements
- list of subElements to renderpublic void renderSubElements()
renderSubElements
in class RendererImpl
public Element getInputElement(String xpath, SchemaNode schemaNode, GlobalDef typeDef)
getInputElement
in class RendererImpl
xpath
- xpath of inputElementschemaNode
- schemaNode of elementtypeDef
- typeDef of element
protected Element getStaticSimpleValue(String xpath)
xpath
- xpath of element for which we render the value
public Element getMultiSelectInput(String xpath)
getMultiSelectInput
in class RendererImpl
xpath
- xpath of element for which we render an input
public Element getOptionalItemControl(String xpath)
getOptionalItemControl
in class RendererImpl
xpath
- NOT YET DOCUMENTED
public Element getDeleteController(String itemPath, String elementName)
getDeleteController
in class RendererImpl
itemPath
- NOT YET DOCUMENTEDelementName
- NOT YET DOCUMENTED
public SimpleTypeLabel getSimpleTypeLabel(String xpath, String siblingPath, String indexId)
getSimpleTypeLabel
in class RendererImpl
xpath
- NOT YET DOCUMENTEDsiblingPath
- NOT YET DOCUMENTEDindexId
- NOT YET DOCUMENTED
public ComplexTypeLabel getComplexTypeLabel(String xpath, String siblingPath, String indexId)
getComplexTypeLabel
in class RendererImpl
xpath
- normalized xpath to the field for this labelsiblingPath
- xpath to reach all siblingsindexId
- jsp variable used to generate indicies for repeating
fields
protected Element getEditMeTag(String xpath)
xpath
- NOT YET DOCUMENTED
protected Element getEditMeTag(String xpath, String siblingPath, String indexId)
If provided, siblingPath parameter includes indexing (e.g., /record/general_${index+1}_) to make the proper link to an indexed field.
xpath
- NOT YET DOCUMENTEDsiblingPath
- NOT YET DOCUMENTEDindexId
- NOT YET DOCUMENTED
public Element getRenderedField(String xpath, Label label, Element inputField)
getRenderedField
in class RendererImpl
xpath
- NOT YET DOCUMENTEDlabel
- NOT YET DOCUMENTEDinputField
- NOT YET DOCUMENTED
public Element getRenderedField_2(String xpath, Label label, Element inputField)
xpath
- NOT YET DOCUMENTEDlabel
- NOT YET DOCUMENTEDinputField
- NOT YET DOCUMENTED
public Element getRenderedField_1(String xpath, Label label, Element inputField)
NOTE: this probably shouldn't be here, since it is misnamed (it does not have anything to do with "input"). To fix this problem we have to change super classes to differentiate between renders that create edit inputs and those that simply display values.
xpath
- NOT YET DOCUMENTEDlabel
- NOT YET DOCUMENTEDinputField
- NOT YET DOCUMENTED
public Element missingValueTest(String xpath)
xpath
- NOT YET DOCUMENTED
public Element hasValueTest(String xpath)
xpath
- NOT YET DOCUMENTED
public static void setDebug(boolean verbose)
verbose
- 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 |