org.jsxp.framework.dom
Class ViewParserDom

java.lang.Object
  extended by org.jsxp.framework.dom.XMLProcessing
      extended by org.jsxp.framework.dom.ViewParserDom
All Implemented Interfaces:
ViewParser

public class ViewParserDom
extends XMLProcessing
implements ViewParser

Default implementation of ViewParser. Used by the jsxp framework to parse a xml-based design view file and build a jsxp element representation (based on the ElementDom implementation).


Constructor Summary
ViewParserDom()
          Instantiates a new dom parser.
 
Method Summary
 java.lang.String getIdAttributeName()
          Gets the id attribute name.
 java.lang.String getIdNamespace()
          Gets the id namespace.
 InternalElement read(java.lang.String uri, ResourceResolver resolver, java.lang.Object contextObjectForResolver, java.lang.String idPrefix, java.util.Map<java.lang.String,InternalElement> idElements, InternalElement rootElement, ViewController sourceViewController)
          Parses the element.
 void setIdAttributeName(java.lang.String idAttributeName)
          Sets the id attribute name.
 void setIdNamespace(java.lang.String idNamespace)
          Sets the id namespace.
 void write(InternalElement elem, java.io.OutputStream os, java.lang.String contentType)
          Render the element hierarchy to the output stream
 
Methods inherited from class org.jsxp.framework.dom.XMLProcessing
getNode, getNodes, parseDocument, printFile, validate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ViewParserDom

public ViewParserDom()
Instantiates a new dom parser.

Method Detail

getIdAttributeName

public java.lang.String getIdAttributeName()
Description copied from interface: ViewParser
Gets the id attribute name.

Specified by:
getIdAttributeName in interface ViewParser
Returns:
the id attribute name

getIdNamespace

public java.lang.String getIdNamespace()
Description copied from interface: ViewParser
Gets the id namespace.

Specified by:
getIdNamespace in interface ViewParser
Returns:
the id namespace

read

public InternalElement read(java.lang.String uri,
                            ResourceResolver resolver,
                            java.lang.Object contextObjectForResolver,
                            java.lang.String idPrefix,
                            java.util.Map<java.lang.String,InternalElement> idElements,
                            InternalElement rootElement,
                            ViewController sourceViewController)
Description copied from interface: ViewParser
Parses the element.

Specified by:
read in interface ViewParser
Parameters:
uri - the uri
resolver - the resolver
contextObjectForResolver - the context object for resolver
idPrefix - the id prefix
idElements - the id elements
rootElement - the root element
sourceViewController - the source view controller
Returns:
the internal element

setIdAttributeName

public void setIdAttributeName(java.lang.String idAttributeName)
Description copied from interface: ViewParser
Sets the id attribute name.

Specified by:
setIdAttributeName in interface ViewParser
Parameters:
idAttributeName - the new id attribute name

setIdNamespace

public void setIdNamespace(java.lang.String idNamespace)
Description copied from interface: ViewParser
Sets the id namespace.

Specified by:
setIdNamespace in interface ViewParser
Parameters:
idNamespace - the new id namespace

write

public void write(InternalElement elem,
                  java.io.OutputStream os,
                  java.lang.String contentType)
Description copied from interface: ViewParser
Render the element hierarchy to the output stream

Specified by:
write in interface ViewParser
Parameters:
elem - the elem
os - the os
contentType - the content type


Copyright © 2012 Oliver Szymanski & David Tanzer