|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object | +--org.scopemvc.view.servlet.xml.ModelToXML
Converts a model into an XML document (as SAX events driving a
ContentHandler). Uses a PropertyIDGenerator to create "path"
attributes for all elements, and "id" attributes for model elements.
Handles circular references using the "ID" and "IDREF" pattern.
(data id='_root')
(name path='name')Steve(/name)
(pets path='pets')
(element index='0' path='pets.0')
(data id='pets.0')
(name path='pets.0.name')Trevor(/name)
(/data)
(/element)
(/pets)
(/data)
| Field Summary | |
protected static java.lang.String |
CDATA_TYPE
TODO: describe of the Field |
protected static java.lang.String |
COLLECTION_ELEMENT
Element to contain contents of a collection model. |
protected static java.lang.String |
COLLECTION_INDEX_ATTRIBUTE
Attribute to index the contents of a collection model. |
protected static org.xml.sax.Attributes |
EMPTY_ATTRIBUTES
TODO: describe of the Field |
protected static java.lang.String |
ID_ATTRIBUTE
TODO: describe of the Field |
protected org.xml.sax.helpers.AttributesImpl |
idAttributes
TODO: describe of the Field |
protected static java.lang.String |
IDREF_ATTRIBUTE
TODO: describe of the Field |
protected org.xml.sax.helpers.AttributesImpl |
idrefAttributes
TODO: describe of the Field |
protected org.xml.sax.helpers.AttributesImpl |
indexAttributes
TODO: describe of the Field |
protected static java.lang.String |
MODEL_ELEMENT
Element to contain a model object. |
protected static java.lang.String |
PATH_ATTRIBUTE
TODO: describe of the Field |
protected org.xml.sax.helpers.AttributesImpl |
pathAttributes
TODO: describe of the Field |
protected org.xml.sax.helpers.AttributesImpl |
pathIndexAttributes
TODO: describe of the Field |
| Constructor Summary | |
ModelToXML()
Constructor for the ModelToXML object |
|
| Method Summary | |
protected void |
init()
Initialise the Attributes that are reused during SAX generation. |
void |
modelToXML(java.lang.Object inModel,
org.xml.sax.ContentHandler inContentHandler,
PropertyIDGenerator inIDGenerator)
|
protected void |
propertiesToXML(java.lang.Object inModel,
org.xml.sax.ContentHandler inContentHandler,
PropertyIDGenerator inIDGenerator,
org.scopemvc.view.servlet.xml.IdRefMap inIdRefMap)
TODO: document the method |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected static final java.lang.String ID_ATTRIBUTE
protected static final java.lang.String IDREF_ATTRIBUTE
protected static final java.lang.String CDATA_TYPE
protected static final java.lang.String PATH_ATTRIBUTE
protected static final org.xml.sax.Attributes EMPTY_ATTRIBUTES
protected static java.lang.String COLLECTION_ELEMENT
protected static java.lang.String COLLECTION_INDEX_ATTRIBUTE
protected static java.lang.String MODEL_ELEMENT
protected org.xml.sax.helpers.AttributesImpl idAttributes
protected org.xml.sax.helpers.AttributesImpl idrefAttributes
protected org.xml.sax.helpers.AttributesImpl pathIndexAttributes
protected org.xml.sax.helpers.AttributesImpl indexAttributes
protected org.xml.sax.helpers.AttributesImpl pathAttributes
| Constructor Detail |
public ModelToXML()
| Method Detail |
public void modelToXML(java.lang.Object inModel,
org.xml.sax.ContentHandler inContentHandler,
PropertyIDGenerator inIDGenerator)
throws java.lang.Exception
inContentHandler - Drive this ContentHandler with the Model's SAX
events.inModel - Model object to write. null generates no SAX.inIDGenerator - TODO: Describe the Parameter
java.lang.Exception - TODO: Describe the Exceptionprotected void init()
protected void propertiesToXML(java.lang.Object inModel,
org.xml.sax.ContentHandler inContentHandler,
PropertyIDGenerator inIDGenerator,
org.scopemvc.view.servlet.xml.IdRefMap inIdRefMap)
throws java.lang.Exception
inModel - TODO: Describe the ParameterinContentHandler - TODO: Describe the ParameterinIDGenerator - TODO: Describe the ParameterinIdRefMap - TODO: Describe the Parameter
java.lang.Exception - TODO: Describe the Exception
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||