// // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v1.0.6-b27-fcs // See http://java.sun.com/xml/jaxb // Any modifications to this file will be lost upon recompilation of the source schema. // Generated on: 2012.06.11 at 10:33:54 AM PDT // package com.sun.identity.federation.jaxb.entityconfig.impl.runtime; import javax.xml.bind.ValidationEvent; import org.xml.sax.SAXException; import com.sun.xml.bind.JAXBObject; import com.sun.xml.bind.marshaller.IdentifiableObject; import com.sun.xml.bind.serializer.AbortSerializationException; /** * Receives XML serialization event * *
* This object coordinates the overall marshalling efforts across different * content-tree objects and different target formats. * *
* The following CFG gives the proper sequence of method invocation. * *
* MARSHALLING := ELEMENT * ELEMENT := "startElement" NSDECL* "endNamespaceDecls" * ATTRIBUTE* "endAttributes" BODY "endElement" * * NSDECL := "declareNamespace" * * ATTRIBUTE := "startAttribute" ATTVALUES "endAttribute" * ATTVALUES := "text"* * * * BODY := ( "text" | ELEMENT )* ** *
* A marshalling of one element consists of two stages. The first stage is * for marshalling attributes and collecting namespace declarations. * The second stage is for marshalling characters/child elements of that element. * *
* Observe that multiple invocation of "text" is allowed. * *
* Also observe that the namespace declarations are allowed only between * "startElement" and "endAttributes". * * * @author Kohsuke Kawaguchi */ public interface XMLSerializer { /** * Errors detected by the XMLSerializable should be either thrown * as {@link SAXException} or reported through this method. * * The callee should report an error to the client application * and */ void reportError( ValidationEvent e ) throws AbortSerializationException; /** * Starts marshalling of an element. * Calling this method will push the internal state into the * internal stack. */ void startElement( String uri, String local ) throws SAXException; /** * Switches to the mode to marshal attribute values. * This method has to be called after the 1st pass is completed. */ void endNamespaceDecls() throws SAXException; /** * Switches to the mode to marshal child texts/elements. * This method has to be called after the 2nd pass is completed. */ void endAttributes() throws SAXException; /** * Ends marshalling of an element. * Pops the internal stack. */ void endElement() throws SAXException; /** * Marshalls text. * *
* This method can be called (i) after the startAttribute method * and (ii) before the endAttribute method, to marshal attribute values. * If the method is called more than once, those texts are considered * as separated by whitespaces. For example, * *
* c.startAttribute(); * c.text("abc"); * c.text("def"); * c.endAttribute("","foo"); ** * will generate foo="abc def". * *
* Similarly, this method can be called after the endAttributes * method to marshal texts inside elements. The same rule about * multiple invokations apply to this case, too. For example, * *
* c.startElement("","foo"); * c.endNamespaceDecls(); * c.endAttributes(); * c.text("abc"); * c.text("def"); * c.startElement("","bar"); * c.endAttributes(); * c.endElement(); * c.text("ghi"); * c.endElement(); ** * will generate
<foo>abc def<bar/>ghi</foo>
.
*/
void text( String text, String fieldName ) throws SAXException;
/**
* Starts marshalling of an attribute.
*
* The marshalling of an attribute will be done by
*