|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.hydrateframework.XMLDocWriterParser.TestOutputHandler
public static class XMLDocWriterParser.TestOutputHandler
This implementation of the TestOutput
interface provides a default
implementation for each of its methods. The default implementation in effect
does nothing and passing an instance of this class as the TestOutput
is the equivalent of passing in null, however by deriving from this class instead
of implementing the base interface, you will only have to override the one
or two methods you need to have your desired effect.
Constructor Summary | |
---|---|
XMLDocWriterParser.TestOutputHandler()
|
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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public XMLDocWriterParser.TestOutputHandler()
Method Detail |
---|
public java.util.Comparator getComparator(java.lang.String xPath)
XMLDocWriterParser.TestOutput
getComparator
in interface XMLDocWriterParser.TestOutput
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.
public org.xml.sax.Attributes beforeObject(org.xml.sax.ContentHandler hnd, java.lang.Object o, java.lang.String xPath, org.xml.sax.Attributes attrs)
XMLDocWriterParser.TestOutput
beforeObject
in interface XMLDocWriterParser.TestOutput
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.
public java.lang.String[] beforeAttributes(org.xml.sax.ContentHandler hnd, java.lang.Object o, java.lang.String xPath, java.lang.String[] exclude)
XMLDocWriterParser.TestOutput
beforeAttributes
in interface XMLDocWriterParser.TestOutput
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.
public void afterAttributes(org.xml.sax.ContentHandler hnd, java.lang.Object o, java.lang.String xPath)
XMLDocWriterParser.TestOutput
afterAttributes
in interface XMLDocWriterParser.TestOutput
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.public void afterObject(org.xml.sax.ContentHandler hnd, java.lang.Object o, java.lang.String xPath)
XMLDocWriterParser.TestOutput
afterObject
in interface XMLDocWriterParser.TestOutput
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 |