|
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.mde.MdeNode
public abstract class MdeNode
Base class for rendering the document structure ("nodes") in the Metadata Editor. Subclasses provide concrete render methods for two *modes*:
MdeNode instances provide access to the following classes:
Field Summary | |
---|---|
protected DocumentFactory |
df
NOT YET DOCUMENTED |
protected String |
formBeanName
NOT YET DOCUMENTED |
protected String |
inputHelperFile
|
protected String |
normalizedXPath
NOT YET DOCUMENTED |
protected Element |
parent
NOT YET DOCUMENTED |
RendererImpl |
renderer
NOT YET DOCUMENTED |
protected RendererHelper |
rhelper
NOT YET DOCUMENTED |
protected SchemaNode |
schemaNode
NOT YET DOCUMENTED |
protected SchemaHelper |
sh
NOT YET DOCUMENTED |
protected GlobalDef |
typeDef
NOT YET DOCUMENTED |
protected String |
xpath
NOT YET DOCUMENTED |
Constructor Summary | |
---|---|
MdeNode(RendererImpl renderer)
Constructor for the MdeNode object |
Method Summary | |
---|---|
protected void |
addHtmlComment(Element e,
String s)
Adds a feature to the HtmlComment attribute of the MdeNode object |
protected void |
attachElementDebugInfo(Element e,
String s)
Attach a debugging message to this element that can be viewed in the editing form. |
protected void |
attachElementDebugInfo(Element target,
String displayText,
String borderColor)
Attaches debugging info to a rendered element in the editor, optionally including a border to outline the element. |
protected void |
attachElementId(Element e)
Add an "id" attribute to the provided element, with a value derived from this node's "xpath". |
protected void |
attachLabelDebugInfo(Element e,
String s)
Description of the Method |
protected void |
attachLabelDebugInfo(Element e,
String s,
String borderSpec)
Description of the Method |
protected void |
attachLabelDebugInfo(Label labelObj,
String s)
attach debuging information to a label object that is displayed in the editor |
protected Element |
bestPracticesLink(String xpath)
Return a Best Practices link represented as an Element. |
protected void |
embedDebugInfo(Element e,
String s)
Embed a debugging string in the provided element that can be viewed in HTML source. |
protected Element |
getDiv()
Gets the div attribute of the MdeNode object |
protected Element |
getDiv(int level)
Gets the div attribute of the MdeNode object |
protected Element |
getInputElement()
Gets a rendered inputElement for this node from the Renderer instance. |
String |
getInputHelperFile()
|
protected Namespace |
getInstanceSchemaNamespace()
Gets the schema namespace (associated with "http://www.w3.org/2001/XMLSchema") for the root schema for the metadata framework for this Renderer. |
String |
getMode()
Gets the mode attribute of the MdeNode object - used for Debugging |
protected String |
getQualifiedAttributeName(String name,
Element element,
GlobalDef typeDef)
Gets the qualifiedAttributeName attribute of the Renderer object. |
protected String |
getQualifiedElementName(String name,
GlobalDef typeDef)
Gets the qualifiedName attribute of the Renderer object |
protected Element |
getRenderedField(Label label,
Element inputField)
Renders a Labelled input field (for a Simple or Built-in schema dataType. |
protected Element |
getRenderedNoInputField(Label label)
Displaying labels for elements that have no input field |
protected Element |
getRenderedNoInputField(Label label,
Element action)
|
protected Element |
getRenderedNoInputField(Label label,
Element action,
Element inputHelper)
Creates Element for displaying labels, action controllers and collapseWidgets for elements that have no input field. |
protected String |
getToolHelp(String s)
Attempts to return a metadata vocab field definition for the input string assuming it is an xpath. |
protected void |
insertDisplaySetup(Element baseDiv)
Creates element representing a mousable field label that will open or close its contents. |
protected void |
insertHtmlComment(Element e,
String s)
Insert an HTML comment into the html source. |
protected boolean |
isDisplayMode()
Gets the displayMode attribute of the MdeNode object (KEEP) |
protected boolean |
isEditMode()
Gets the editMode attribute of the MdeNode object |
Renderer |
newRenderer(String xpath,
Element parent)
Gets a new renderer for the specified xpath and parent element. |
Renderer |
newRenderer(String xpath,
Element parent,
GlobalDef typeDef)
Gets a new renderer for the specified xpath and parent element and typeDef. |
protected void |
prtln(String s)
Description of the Method |
abstract void |
render()
NOT YET DOCUMENTED |
static void |
setDebug(boolean bool)
Sets the debug attribute of the MdeNode class |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected SchemaHelper sh
protected String xpath
protected Element parent
protected SchemaNode schemaNode
protected GlobalDef typeDef
protected DocumentFactory df
protected RendererHelper rhelper
protected String formBeanName
protected String normalizedXPath
public RendererImpl renderer
protected String inputHelperFile
Constructor Detail |
---|
public MdeNode(RendererImpl renderer)
renderer
- NOT YET DOCUMENTEDMethod Detail |
---|
public abstract void render()
public Renderer newRenderer(String xpath, Element parent)
xpath
- xpath for new rendererparent
- parent element for new renderer
public Renderer newRenderer(String xpath, Element parent, GlobalDef typeDef)
xpath
- xpath for new rendererparent
- parent element for new renderertypeDef
- Explicitly specified typeDef for new renderer
public String getInputHelperFile()
protected boolean isEditMode()
protected boolean isDisplayMode()
public String getMode()
protected Element getInputElement()
protected Element bestPracticesLink(String xpath)
NOTE: apparently css class ("action-button") must be applyed to both the link and the text within to get consistent results in both IE and FireFox ...
xpath
- Description of the Parameter
protected Namespace getInstanceSchemaNamespace()
protected String getQualifiedElementName(String name, GlobalDef typeDef)
name
- NOT YET DOCUMENTEDtypeDef
- NOT YET DOCUMENTED
protected String getQualifiedAttributeName(String name, Element element, GlobalDef typeDef)
NOTE: i don't think this method is required at all. if the instance document is constructed correctly, the attributes are already qualified as needed and there is no need to mess with it any further ..
name
- NOT YET DOCUMENTEDtypeDef
- NOT YET DOCUMENTEDelement
- NOT YET DOCUMENTED
protected Element getRenderedField(Label label, Element inputField)
label
- Description of the ParameterinputField
- Description of the Parameter
protected Element getRenderedNoInputField(Label label)
label
- Description of the Parameter
protected Element getRenderedNoInputField(Label label, Element action)
protected Element getRenderedNoInputField(Label label, Element action, Element inputHelper)
label
- Description of the Parameteraction
- Description of the Parameter
protected Element getDiv()
protected Element getDiv(int level)
level
- Description of the Parameter
protected 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
protected void embedDebugInfo(Element e, String s)
e
- NOT YET DOCUMENTEDs
- NOT YET DOCUMENTEDprotected void attachElementDebugInfo(Element e, String s)
e
- NOT YET DOCUMENTEDs
- NOT YET DOCUMENTEDprotected void attachElementDebugInfo(Element target, String displayText, String borderColor)
target
- The Element to which the debugging element is attacheddisplayText
- The debugging messageborderColor
- NOT YET DOCUMENTEDprotected void attachLabelDebugInfo(Element e, String s, String borderSpec)
e
- Description of the Parameters
- Description of the ParameterborderSpec
- NOT YET DOCUMENTEDprotected void attachLabelDebugInfo(Element e, String s)
e
- Description of the Parameters
- Description of the Parameterprotected void insertHtmlComment(Element e, String s)
e
- NOT YET DOCUMENTEDs
- NOT YET DOCUMENTEDprotected void addHtmlComment(Element e, String s)
e
- The feature to be added to the HtmlComment attributes
- The feature to be added to the HtmlComment attributeprotected void attachLabelDebugInfo(Label labelObj, String s)
labelObj
- NOT YET DOCUMENTEDs
- NOT YET DOCUMENTEDprotected void attachElementId(Element e)
e
- NOT YET DOCUMENTEDprotected void insertDisplaySetup(Element baseDiv)
baseDiv
- Description of the Parameterprotected void prtln(String s)
s
- Description of the Parameterpublic 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 |