ContentHandlerAdaptor.java revision 4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenk// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v1.0.6-b27-fcs
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenk// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenk// Any modifications to this file will be lost upon recompilation of the source schema.
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenk// Generated on: 2012.06.11 at 10:33:54 AM PDT
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenkpackage com.sun.identity.federation.jaxb.entityconfig.impl.runtime;
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenk * Receives SAX2 events and send the equivalent events to
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenk * {@link com.sun.xml.bind.serializer.XMLSerializer}
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenk * Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenkpublic class ContentHandlerAdaptor implements ContentHandler {
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenk /** Stores newly declared prefix-URI mapping. */
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenk private final ArrayList prefixMap = new ArrayList();
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenk /** Events will be sent to this object. */
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenk private final StringBuffer text = new StringBuffer();
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenk public ContentHandlerAdaptor( XMLSerializer _serializer ) {
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenk public void startDocument() throws SAXException {
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenk public void startPrefixMapping(String prefix, String uri) throws SAXException {
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenk public void endPrefixMapping(String prefix) throws SAXException {
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenk public void startElement(String namespaceURI, String localName, String qName, Attributes atts)
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenk serializer.startElement(namespaceURI,localName);
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenk // declare namespace events
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenk String prefix = (idx==-1)?qname:qname.substring(0,idx);
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenk serializer.getNamespaceContext().declareNamespace(
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenk serializer.getNamespaceContext().declareNamespace(
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenk // fire attribute events
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenk serializer.startAttribute( atts.getURI(i), atts.getLocalName(i) );
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenk public void endElement(String namespaceURI, String localName, String qName) throws SAXException {
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenk public void characters(char[] ch, int start, int length) throws SAXException {
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenk public void ignorableWhitespace(char[] ch, int start, int length) throws SAXException {
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenk public void setDocumentLocator(Locator locator) {
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenk public void processingInstruction(String target, String data) throws SAXException {
4b8d88eb610aa1e0bb6ec632f792744b3d6b5f22jeff.schenk public void skippedEntity(String name) throws SAXException {