org.apache.ws.jaxme.pm.ino

Class InoResponseHandler

public class InoResponseHandler extends Object implements ContentHandler

This is a SAX content handler for an ino:response document.

Author: Jochen Wiedmann

Field Summary
static StringINO_RESPONSE2_URI

The namespace of an INO response document: http://namespaces.softwareag.com/tamino/response2.

static StringXQL_URI

The namespace of the XQL section in an INO response document: http://metalab.unc.edu/xql/.

Constructor Summary
InoResponseHandler()
Creates a new InoResponseHandler
Method Summary
voidcharacters(char[] ch, int start, int len)
voidendDocument()
voidendElement(String namespaceUri, String localName, String qName)
voidendPrefixMapping(String prefix)
LocatorgetDocumentLocator()
Returns the document Locator, that was previously set by the XML parser.
ListgetInoObjectIdList()

Returns the current list for collection of generated ino:id's.

ContentHandlergetResultHandler()

Returns a result handler, that was previously set with setResultHandler, or null.

The result handler is another SAX ContentHandler.

voidignorableWhitespace(char[] ch, int start, int len)
voidprocessingInstruction(String target, String data)
voidsetDocumentLocator(Locator l)
voidsetInoObjectIdList(List pList)

The Tamino response document contains object ID's of inserted or updated objects.

voidsetResultHandler(ContentHandler handler)

Sets the result handler.

voidskippedEntity(String entity)
voidstartDocument()
voidstartElement(String namespaceUri, String localName, String qName, Attributes attr)
voidstartPrefixMapping(String namespaceUri, String prefix)

Field Detail

INO_RESPONSE2_URI

public static final String INO_RESPONSE2_URI

The namespace of an INO response document: http://namespaces.softwareag.com/tamino/response2.

XQL_URI

public static final String XQL_URI

The namespace of the XQL section in an INO response document: http://metalab.unc.edu/xql/.

Constructor Detail

InoResponseHandler

public InoResponseHandler()
Creates a new InoResponseHandler

Method Detail

characters

public void characters(char[] ch, int start, int len)

endDocument

public void endDocument()

endElement

public void endElement(String namespaceUri, String localName, String qName)

endPrefixMapping

public void endPrefixMapping(String prefix)

getDocumentLocator

public Locator getDocumentLocator()
Returns the document Locator, that was previously set by the XML parser. May be null, if the parser didn't supply one.

getInoObjectIdList

public List getInoObjectIdList()

Returns the current list for collection of generated ino:id's.

See Also: InoResponseHandler

getResultHandler

public ContentHandler getResultHandler()

Returns a result handler, that was previously set with setResultHandler, or null.

The result handler is another SAX ContentHandler. For any result document the InoResponseHandler finds, that is, for any subelement of xql:result, a stream of SAX events is generated for the result handler.

If the response document contains more than one result object, then the result handler must be "restartable". In other words, it must be able to process multiple startDocument ... endDocument startDocument ... endDocument sequences.

Returns: The result handler or null, if generating SAX events is disabled.

ignorableWhitespace

public void ignorableWhitespace(char[] ch, int start, int len)

processingInstruction

public void processingInstruction(String target, String data)

setDocumentLocator

public void setDocumentLocator(Locator l)

setInoObjectIdList

public void setInoObjectIdList(List pList)

The Tamino response document contains object ID's of inserted or updated objects. If you use this method, then the ID's are collected in the given List. A null value disables ID collection. The list will be cleared within startDocument, so it's safe to reuse the list over multiple uses of the handler.

More precise, the list will contain all occurences of ino:response/ino:object/@ino:id.

Parameters: pList A list where ID's are being collected or null to disable ID collection.

See Also: InoResponseHandler

setResultHandler

public void setResultHandler(ContentHandler handler)

Sets the result handler. The result handler is another SAX ContentHandler. For any result document the InoResponseHandler finds, that is, for any subelement of xql:result, a stream of SAX events is generated for the result handler.

If the response document contains more than one result object, then the result handler must be "restartable". In other words, it must be able to process multiple startDocument ... endDocument startDocument ... endDocument sequences.

Parameters: handler The result handler to use or null to disable SAX events

See Also: InoResponseHandler

skippedEntity

public void skippedEntity(String entity)

startDocument

public void startDocument()

startElement

public void startElement(String namespaceUri, String localName, String qName, Attributes attr)

startPrefixMapping

public void startPrefixMapping(String namespaceUri, String prefix)