org.globus.ogsa.utils
Class SAX2EventFilter
java.lang.Object
org.globus.ogsa.utils.SAX2EventFilter
- All Implemented Interfaces:
- org.xml.sax.ContentHandler, org.apache.axis.encoding.DeserializationContext, javax.xml.rpc.encoding.DeserializationContext
- public class SAX2EventFilter
- extends java.lang.Object
- implements org.xml.sax.ContentHandler, org.apache.axis.encoding.DeserializationContext
An anoyingly big but very simple class that filters sax events.
You subclass this, and override a method to change some events.
Field Summary |
protected org.apache.axis.message.SAX2EventRecorder |
sink
|
Method Summary |
void |
addObjectById(java.lang.String _id,
java.lang.Object obj)
|
void |
characters(char[] ch,
int start,
int length)
|
void |
endDocument()
|
void |
endElement(java.lang.String namespaceURI,
java.lang.String localName,
java.lang.String qName)
|
void |
endPrefixMapping(java.lang.String prefix)
|
org.apache.axis.message.SAX2EventRecorder |
filter(org.apache.axis.message.SAX2EventRecorder source)
Replays all of the events from the source into a new SAX2EventRecorder and returns it. |
org.apache.axis.message.MessageElement |
getCurElement()
|
java.util.ArrayList |
getCurrentNSMappings()
|
int |
getCurrentRecordPos()
|
org.apache.axis.encoding.Deserializer |
getDeserializer(java.lang.Class c,
javax.xml.namespace.QName xmlType)
|
org.apache.axis.encoding.Deserializer |
getDeserializerForClass(java.lang.Class cls)
|
org.apache.axis.encoding.Deserializer |
getDeserializerForType(javax.xml.namespace.QName xmlType)
|
java.lang.Class |
getDestinationClass()
|
org.apache.axis.message.MessageElement |
getElementByID(java.lang.String id)
|
org.apache.axis.message.SOAPEnvelope |
getEnvelope()
|
org.apache.axis.MessageContext |
getMessageContext()
|
java.lang.String |
getNamespaceURI(java.lang.String prefix)
|
java.lang.Object |
getObjectByRef(java.lang.String href)
|
javax.xml.namespace.QName |
getQNameFromString(java.lang.String qNameStr)
|
org.apache.axis.message.SAX2EventRecorder |
getRecorder()
|
int |
getStartOfMappingsPos()
|
org.apache.axis.message.SOAPHandler |
getTopHandler()
|
javax.xml.namespace.QName |
getTypeFromAttributes(java.lang.String namespace,
java.lang.String localName,
org.xml.sax.Attributes attrs)
|
javax.xml.namespace.QName |
getTypeFromXSITypeAttr(java.lang.String s1,
java.lang.String s2,
org.xml.sax.Attributes atts)
|
org.apache.axis.encoding.TypeMapping |
getTypeMapping()
|
org.apache.axis.encoding.TypeMappingRegistry |
getTypeMappingRegistry()
|
void |
ignorableWhitespace(char[] ch,
int start,
int length)
|
boolean |
isDoneParsing()
|
boolean |
isNil(org.xml.sax.Attributes attrs)
|
boolean |
isProcessingRef()
|
void |
parse()
|
org.apache.axis.message.SOAPHandler |
popElementHandler()
|
void |
processingInstruction(java.lang.String target,
java.lang.String data)
|
void |
pushElementHandler(org.apache.axis.message.SOAPHandler handler)
|
void |
pushNewElement(org.apache.axis.message.MessageElement elem)
|
void |
registerElementByID(java.lang.String id,
org.apache.axis.message.MessageElement elem)
|
void |
registerFixup(java.lang.String href,
org.apache.axis.encoding.Deserializer dser)
|
void |
registerResolverForID(java.lang.String id,
org.apache.axis.message.IDResolver resolver)
|
void |
replaceElementHandler(org.apache.axis.message.SOAPHandler handler)
|
void |
setCurElement(org.apache.axis.message.MessageElement el)
|
void |
setDestinationClass(java.lang.Class cls)
|
void |
setDocumentLocator(org.xml.sax.Locator locator)
|
void |
setProcessingRef(boolean b)
|
void |
setRecorder(org.apache.axis.message.SAX2EventRecorder recorder)
|
void |
skippedEntity(java.lang.String name)
|
void |
startDocument()
|
void |
startElement(java.lang.String namespaceURI,
java.lang.String localName,
java.lang.String qName,
org.xml.sax.Attributes atts)
|
void |
startPrefixMapping(java.lang.String prefix,
java.lang.String uri)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
sink
protected org.apache.axis.message.SAX2EventRecorder sink
SAX2EventFilter
public SAX2EventFilter()
filter
public org.apache.axis.message.SAX2EventRecorder filter(org.apache.axis.message.SAX2EventRecorder source)
throws org.xml.sax.SAXException
- Replays all of the events from the source into a new SAX2EventRecorder and returns it.
Your subclass can change the events as they pass though.
- Throws:
org.xml.sax.SAXException
setDocumentLocator
public void setDocumentLocator(org.xml.sax.Locator locator)
- Specified by:
setDocumentLocator
in interface org.xml.sax.ContentHandler
startDocument
public void startDocument()
throws org.xml.sax.SAXException
- Specified by:
startDocument
in interface org.xml.sax.ContentHandler
- Throws:
org.xml.sax.SAXException
endDocument
public void endDocument()
throws org.xml.sax.SAXException
- Specified by:
endDocument
in interface org.xml.sax.ContentHandler
- Throws:
org.xml.sax.SAXException
startPrefixMapping
public void startPrefixMapping(java.lang.String prefix,
java.lang.String uri)
throws org.xml.sax.SAXException
- Specified by:
startPrefixMapping
in interface org.xml.sax.ContentHandler
- Throws:
org.xml.sax.SAXException
endPrefixMapping
public void endPrefixMapping(java.lang.String prefix)
throws org.xml.sax.SAXException
- Specified by:
endPrefixMapping
in interface org.xml.sax.ContentHandler
- Throws:
org.xml.sax.SAXException
startElement
public void startElement(java.lang.String namespaceURI,
java.lang.String localName,
java.lang.String qName,
org.xml.sax.Attributes atts)
- Specified by:
startElement
in interface org.xml.sax.ContentHandler
endElement
public void endElement(java.lang.String namespaceURI,
java.lang.String localName,
java.lang.String qName)
throws org.xml.sax.SAXException
- Specified by:
endElement
in interface org.xml.sax.ContentHandler
- Throws:
org.xml.sax.SAXException
characters
public void characters(char[] ch,
int start,
int length)
throws org.xml.sax.SAXException
- Specified by:
characters
in interface org.xml.sax.ContentHandler
- Throws:
org.xml.sax.SAXException
ignorableWhitespace
public void ignorableWhitespace(char[] ch,
int start,
int length)
throws org.xml.sax.SAXException
- Specified by:
ignorableWhitespace
in interface org.xml.sax.ContentHandler
- Throws:
org.xml.sax.SAXException
processingInstruction
public void processingInstruction(java.lang.String target,
java.lang.String data)
throws org.xml.sax.SAXException
- Specified by:
processingInstruction
in interface org.xml.sax.ContentHandler
- Throws:
org.xml.sax.SAXException
skippedEntity
public void skippedEntity(java.lang.String name)
throws org.xml.sax.SAXException
- Specified by:
skippedEntity
in interface org.xml.sax.ContentHandler
- Throws:
org.xml.sax.SAXException
setCurElement
public void setCurElement(org.apache.axis.message.MessageElement el)
- Specified by:
setCurElement
in interface org.apache.axis.encoding.DeserializationContext
parse
public void parse()
throws org.xml.sax.SAXException
- Specified by:
parse
in interface org.apache.axis.encoding.DeserializationContext
- Throws:
org.xml.sax.SAXException
getCurElement
public org.apache.axis.message.MessageElement getCurElement()
- Specified by:
getCurElement
in interface org.apache.axis.encoding.DeserializationContext
getMessageContext
public org.apache.axis.MessageContext getMessageContext()
- Specified by:
getMessageContext
in interface org.apache.axis.encoding.DeserializationContext
getEnvelope
public org.apache.axis.message.SOAPEnvelope getEnvelope()
- Specified by:
getEnvelope
in interface org.apache.axis.encoding.DeserializationContext
getRecorder
public org.apache.axis.message.SAX2EventRecorder getRecorder()
- Specified by:
getRecorder
in interface org.apache.axis.encoding.DeserializationContext
setRecorder
public void setRecorder(org.apache.axis.message.SAX2EventRecorder recorder)
- Specified by:
setRecorder
in interface org.apache.axis.encoding.DeserializationContext
getCurrentNSMappings
public java.util.ArrayList getCurrentNSMappings()
- Specified by:
getCurrentNSMappings
in interface org.apache.axis.encoding.DeserializationContext
getNamespaceURI
public java.lang.String getNamespaceURI(java.lang.String prefix)
- Specified by:
getNamespaceURI
in interface org.apache.axis.encoding.DeserializationContext
getQNameFromString
public javax.xml.namespace.QName getQNameFromString(java.lang.String qNameStr)
- Specified by:
getQNameFromString
in interface org.apache.axis.encoding.DeserializationContext
getTypeFromAttributes
public javax.xml.namespace.QName getTypeFromAttributes(java.lang.String namespace,
java.lang.String localName,
org.xml.sax.Attributes attrs)
- Specified by:
getTypeFromAttributes
in interface org.apache.axis.encoding.DeserializationContext
isNil
public boolean isNil(org.xml.sax.Attributes attrs)
- Specified by:
isNil
in interface org.apache.axis.encoding.DeserializationContext
getDeserializerForType
public org.apache.axis.encoding.Deserializer getDeserializerForType(javax.xml.namespace.QName xmlType)
- Specified by:
getDeserializerForType
in interface org.apache.axis.encoding.DeserializationContext
getDeserializerForClass
public org.apache.axis.encoding.Deserializer getDeserializerForClass(java.lang.Class cls)
- Specified by:
getDeserializerForClass
in interface org.apache.axis.encoding.DeserializationContext
getDestinationClass
public java.lang.Class getDestinationClass()
- Specified by:
getDestinationClass
in interface org.apache.axis.encoding.DeserializationContext
setDestinationClass
public void setDestinationClass(java.lang.Class cls)
- Specified by:
setDestinationClass
in interface org.apache.axis.encoding.DeserializationContext
getTypeMapping
public org.apache.axis.encoding.TypeMapping getTypeMapping()
- Specified by:
getTypeMapping
in interface org.apache.axis.encoding.DeserializationContext
getTypeMappingRegistry
public org.apache.axis.encoding.TypeMappingRegistry getTypeMappingRegistry()
- Specified by:
getTypeMappingRegistry
in interface org.apache.axis.encoding.DeserializationContext
getElementByID
public org.apache.axis.message.MessageElement getElementByID(java.lang.String id)
- Specified by:
getElementByID
in interface org.apache.axis.encoding.DeserializationContext
getObjectByRef
public java.lang.Object getObjectByRef(java.lang.String href)
- Specified by:
getObjectByRef
in interface org.apache.axis.encoding.DeserializationContext
addObjectById
public void addObjectById(java.lang.String _id,
java.lang.Object obj)
- Specified by:
addObjectById
in interface org.apache.axis.encoding.DeserializationContext
registerFixup
public void registerFixup(java.lang.String href,
org.apache.axis.encoding.Deserializer dser)
- Specified by:
registerFixup
in interface org.apache.axis.encoding.DeserializationContext
registerElementByID
public void registerElementByID(java.lang.String id,
org.apache.axis.message.MessageElement elem)
- Specified by:
registerElementByID
in interface org.apache.axis.encoding.DeserializationContext
registerResolverForID
public void registerResolverForID(java.lang.String id,
org.apache.axis.message.IDResolver resolver)
- Specified by:
registerResolverForID
in interface org.apache.axis.encoding.DeserializationContext
getCurrentRecordPos
public int getCurrentRecordPos()
- Specified by:
getCurrentRecordPos
in interface org.apache.axis.encoding.DeserializationContext
getStartOfMappingsPos
public int getStartOfMappingsPos()
- Specified by:
getStartOfMappingsPos
in interface org.apache.axis.encoding.DeserializationContext
pushNewElement
public void pushNewElement(org.apache.axis.message.MessageElement elem)
- Specified by:
pushNewElement
in interface org.apache.axis.encoding.DeserializationContext
getTopHandler
public org.apache.axis.message.SOAPHandler getTopHandler()
pushElementHandler
public void pushElementHandler(org.apache.axis.message.SOAPHandler handler)
- Specified by:
pushElementHandler
in interface org.apache.axis.encoding.DeserializationContext
replaceElementHandler
public void replaceElementHandler(org.apache.axis.message.SOAPHandler handler)
- Specified by:
replaceElementHandler
in interface org.apache.axis.encoding.DeserializationContext
popElementHandler
public org.apache.axis.message.SOAPHandler popElementHandler()
- Specified by:
popElementHandler
in interface org.apache.axis.encoding.DeserializationContext
isDoneParsing
public boolean isDoneParsing()
- Specified by:
isDoneParsing
in interface org.apache.axis.encoding.DeserializationContext
getTypeFromXSITypeAttr
public javax.xml.namespace.QName getTypeFromXSITypeAttr(java.lang.String s1,
java.lang.String s2,
org.xml.sax.Attributes atts)
- Specified by:
getTypeFromXSITypeAttr
in interface org.apache.axis.encoding.DeserializationContext
getDeserializer
public org.apache.axis.encoding.Deserializer getDeserializer(java.lang.Class c,
javax.xml.namespace.QName xmlType)
- Specified by:
getDeserializer
in interface org.apache.axis.encoding.DeserializationContext
setProcessingRef
public void setProcessingRef(boolean b)
- Specified by:
setProcessingRef
in interface org.apache.axis.encoding.DeserializationContext
isProcessingRef
public boolean isProcessingRef()
- Specified by:
isProcessingRef
in interface org.apache.axis.encoding.DeserializationContext
Copyright ? 1999 University of Chicago and The University of Southern California. All Rights Reserved.