|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public static interface XMLDocWriterParser.TestOutput
This interface is called at various points when the framework is writing out the xml document. It can be used to both prevent certain portions of the XML tree from appearing according to user defined criteria (e.g. whether a certain object meets certain criteria). It can also be used to insert user defined pieces of XML within an XML document that is being written, for example to append an additional attribute to an existing object, override 'afterAttributes' and make the necessary SAX calls on the handler to write the desired XML fragment.
Method Summary | |
---|---|
void |
afterAttributes(org.xml.sax.ContentHandler hnd,
java.lang.Object o,
java.lang.String xPath)
This method is called after the attributes of an object have been written but before the object element is closed. |
void |
afterObject(org.xml.sax.ContentHandler hnd,
java.lang.Object o,
java.lang.String xPath)
This method is called after an object has been written. |
java.lang.String[] |
beforeAttributes(org.xml.sax.ContentHandler hnd,
java.lang.Object o,
java.lang.String xPath,
java.lang.String[] exclude)
This method is called after the object element has been written, but before any of its attributes or sub-objects have been written. |
org.xml.sax.Attributes |
beforeObject(org.xml.sax.ContentHandler hnd,
java.lang.Object o,
java.lang.String xPath,
org.xml.sax.Attributes attrs)
This method is called just before an object is to be written to the SAX stream. |
java.util.Comparator |
getComparator(java.lang.String xPath)
This method is called before writing out a collection of objects to determine the order they should be written in. |
Method Detail |
---|
java.util.Comparator getComparator(java.lang.String xPath)
xPath
- the X-Path (see http://www.w3.org/TR/xpath) that indicates
where we are in the object hierarchy. The final element of this path
is the name of the object instance that is to be sorted.
org.xml.sax.Attributes beforeObject(org.xml.sax.ContentHandler hnd, java.lang.Object o, java.lang.String xPath, org.xml.sax.Attributes attrs)
hnd
- the content handler that is being used to write out the SAX stream.
Use this if you want to write anything out before the object is written.o
- the hydrate object that is about to be written.xPath
- the X-Path (see http://www.w3.org/TR/xpath) that represents
the location of the object in the XML tree.attrs
- the attributes that are about to be written as part of the
object element.
java.lang.String[] beforeAttributes(org.xml.sax.ContentHandler hnd, java.lang.Object o, java.lang.String xPath, java.lang.String[] exclude)
hnd
- the content handler that is being used to write out the SAX stream.
Use this if you want to write anything out before the object is written.o
- the hydrate object whose attributes are about to be written.xPath
- the X-Path (see http://www.w3.org/TR/xpath) that represents
the location of the object in the XML tree.exclude
- the list of attribute names that will be excluded from
the output. By default, this includes those attributes that form part
of the key, but this list can be modified by implementations of this
interface.
void afterAttributes(org.xml.sax.ContentHandler hnd, java.lang.Object o, java.lang.String xPath)
hnd
- the content handler that is being used to write out the SAX stream.
Use this if you want to write anything out before the object is written.o
- the hydrate object whose attributes are about to be written.xPath
- the X-Path (see http://www.w3.org/TR/xpath) that represents
the location of the object in the XML tree.void afterObject(org.xml.sax.ContentHandler hnd, java.lang.Object o, java.lang.String xPath)
hnd
- the content handler that is being used to write out the SAX stream.
Use this if you want to write anything out before the object is written.o
- the hydrate object whose attributes are about to be written.xPath
- the X-Path (see http://www.w3.org/TR/xpath) that represents
the location of the object in the XML tree.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |