UnmarshallingContext.java revision c1350cf5bc50458ba79cc93ff9e0e5fe3f1aeeb0
c1350cf5bc50458ba79cc93ff9e0e5fe3f1aeeb0jeff.schenk// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v1.0.6-b27-fcs
c1350cf5bc50458ba79cc93ff9e0e5fe3f1aeeb0jeff.schenk// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
c1350cf5bc50458ba79cc93ff9e0e5fe3f1aeeb0jeff.schenk// Any modifications to this file will be lost upon recompilation of the source schema.
c1350cf5bc50458ba79cc93ff9e0e5fe3f1aeeb0jeff.schenk// Generated on: 2012.06.11 at 10:34:16 AM PDT
c1350cf5bc50458ba79cc93ff9e0e5fe3f1aeeb0jeff.schenkpackage com.sun.identity.wsfederation.jaxb.entityconfig.impl.runtime;
c1350cf5bc50458ba79cc93ff9e0e5fe3f1aeeb0jeff.schenk * Methods exposed by the unmarshalling coordinator object
c1350cf5bc50458ba79cc93ff9e0e5fe3f1aeeb0jeff.schenk * to the generated code.
c1350cf5bc50458ba79cc93ff9e0e5fe3f1aeeb0jeff.schenk * This interface will be implemented by the coordinator, which
c1350cf5bc50458ba79cc93ff9e0e5fe3f1aeeb0jeff.schenk * converts whatever events (e.g., SAX) into unmarshalling events.
c1350cf5bc50458ba79cc93ff9e0e5fe3f1aeeb0jeff.schenk * Errors detected by the AbstractUnmarshallingEventHandlerImpl-derived classes should
c1350cf5bc50458ba79cc93ff9e0e5fe3f1aeeb0jeff.schenk * be either thrown as {@link UnrepotedException} or reported through
c1350cf5bc50458ba79cc93ff9e0e5fe3f1aeeb0jeff.schenk * the handleEvent method of this interface.
c1350cf5bc50458ba79cc93ff9e0e5fe3f1aeeb0jeff.schenk * <a href="mailto:kohsuke.kawaguchi@sun.com">Kohsuke KAWAGUCHI</a>
c1350cf5bc50458ba79cc93ff9e0e5fe3f1aeeb0jeff.schenkpublic interface UnmarshallingContext extends NamespaceContext
c1350cf5bc50458ba79cc93ff9e0e5fe3f1aeeb0jeff.schenk /** Obtains a reference to the current grammar info. */
c1350cf5bc50458ba79cc93ff9e0e5fe3f1aeeb0jeff.schenk * Pushes the current content handler into the stack
c1350cf5bc50458ba79cc93ff9e0e5fe3f1aeeb0jeff.schenk * and registers the newly specified content handler so
c1350cf5bc50458ba79cc93ff9e0e5fe3f1aeeb0jeff.schenk * that it can receive SAX events.
c1350cf5bc50458ba79cc93ff9e0e5fe3f1aeeb0jeff.schenk * @param memento
c1350cf5bc50458ba79cc93ff9e0e5fe3f1aeeb0jeff.schenk * When this newly specified handler will be removed from the stack,
c1350cf5bc50458ba79cc93ff9e0e5fe3f1aeeb0jeff.schenk * the leaveChild event will be fired to the parent handler
c1350cf5bc50458ba79cc93ff9e0e5fe3f1aeeb0jeff.schenk * with this memento.
c1350cf5bc50458ba79cc93ff9e0e5fe3f1aeeb0jeff.schenk void pushContentHandler( UnmarshallingEventHandler handler, int memento );
c1350cf5bc50458ba79cc93ff9e0e5fe3f1aeeb0jeff.schenk * Pops a content handler from the stack and registers
c1350cf5bc50458ba79cc93ff9e0e5fe3f1aeeb0jeff.schenk * it as the current content handler.
c1350cf5bc50458ba79cc93ff9e0e5fe3f1aeeb0jeff.schenk * This method will also fire the leaveChild event with the
c1350cf5bc50458ba79cc93ff9e0e5fe3f1aeeb0jeff.schenk * associated memento.
c1350cf5bc50458ba79cc93ff9e0e5fe3f1aeeb0jeff.schenk * Gets the current handler.
c1350cf5bc50458ba79cc93ff9e0e5fe3f1aeeb0jeff.schenk * Returns a list of prefixes newly declared on this element.
c1350cf5bc50458ba79cc93ff9e0e5fe3f1aeeb0jeff.schenk * This method has to be called after the {@link #pushAttributes}
c1350cf5bc50458ba79cc93ff9e0e5fe3f1aeeb0jeff.schenk * method is called.
c1350cf5bc50458ba79cc93ff9e0e5fe3f1aeeb0jeff.schenk * A possible zero-length array of prefixes. The default prefix
c1350cf5bc50458ba79cc93ff9e0e5fe3f1aeeb0jeff.schenk * is represented by the empty string.
c1350cf5bc50458ba79cc93ff9e0e5fe3f1aeeb0jeff.schenk * Returns a list of all in-scope prefixes.
c1350cf5bc50458ba79cc93ff9e0e5fe3f1aeeb0jeff.schenk * A possible zero-length array of prefixes. The default prefix
c1350cf5bc50458ba79cc93ff9e0e5fe3f1aeeb0jeff.schenk * is represented by the empty string.
c1350cf5bc50458ba79cc93ff9e0e5fe3f1aeeb0jeff.schenk * Stores a new attribute set.
c1350cf5bc50458ba79cc93ff9e0e5fe3f1aeeb0jeff.schenk * This method should be called by the generated code
c1350cf5bc50458ba79cc93ff9e0e5fe3f1aeeb0jeff.schenk * when it "eats" an enterElement event.
c1350cf5bc50458ba79cc93ff9e0e5fe3f1aeeb0jeff.schenk * @param collectText
c1350cf5bc50458ba79cc93ff9e0e5fe3f1aeeb0jeff.schenk * false if the context doesn't need to fire text events
c1350cf5bc50458ba79cc93ff9e0e5fe3f1aeeb0jeff.schenk * for texts inside this element. True otherwise.
c1350cf5bc50458ba79cc93ff9e0e5fe3f1aeeb0jeff.schenk void pushAttributes( Attributes atts, boolean collectText );
c1350cf5bc50458ba79cc93ff9e0e5fe3f1aeeb0jeff.schenk * Discards the previously stored attribute set.
c1350cf5bc50458ba79cc93ff9e0e5fe3f1aeeb0jeff.schenk * This method should be called by the generated code
c1350cf5bc50458ba79cc93ff9e0e5fe3f1aeeb0jeff.schenk * when it "eats" a leaveElement event.
c1350cf5bc50458ba79cc93ff9e0e5fe3f1aeeb0jeff.schenk * Gets the index of the attribute with the specified name.
c1350cf5bc50458ba79cc93ff9e0e5fe3f1aeeb0jeff.schenk * This is usually faster when you only need to test with
c1350cf5bc50458ba79cc93ff9e0e5fe3f1aeeb0jeff.schenk * a simple name.
c1350cf5bc50458ba79cc93ff9e0e5fe3f1aeeb0jeff.schenk * -1 if not found.
c1350cf5bc50458ba79cc93ff9e0e5fe3f1aeeb0jeff.schenk * Gets all the unconsumed attributes.
c1350cf5bc50458ba79cc93ff9e0e5fe3f1aeeb0jeff.schenk * If you need to find attributes based on more complex filter,
c1350cf5bc50458ba79cc93ff9e0e5fe3f1aeeb0jeff.schenk * you need to use this method.
c1350cf5bc50458ba79cc93ff9e0e5fe3f1aeeb0jeff.schenk * Fires an attribute event for the specified attribute,
c1350cf5bc50458ba79cc93ff9e0e5fe3f1aeeb0jeff.schenk * and marks the attribute as "used".
c1350cf5bc50458ba79cc93ff9e0e5fe3f1aeeb0jeff.schenk void consumeAttribute( int idx ) throws SAXException;
c1350cf5bc50458ba79cc93ff9e0e5fe3f1aeeb0jeff.schenk * Marks the attribute as "used" and return the value of the attribute.
c1350cf5bc50458ba79cc93ff9e0e5fe3f1aeeb0jeff.schenk String eatAttribute( int idx ) throws SAXException;
c1350cf5bc50458ba79cc93ff9e0e5fe3f1aeeb0jeff.schenk * Adds a job that will be executed at the last of the unmarshalling.
c1350cf5bc50458ba79cc93ff9e0e5fe3f1aeeb0jeff.schenk * This method is used to support ID/IDREF feature, but it can be used
c1350cf5bc50458ba79cc93ff9e0e5fe3f1aeeb0jeff.schenk * for other purposes as well.
c1350cf5bc50458ba79cc93ff9e0e5fe3f1aeeb0jeff.schenk * @param job
c1350cf5bc50458ba79cc93ff9e0e5fe3f1aeeb0jeff.schenk * The run method of this object is called.
c1350cf5bc50458ba79cc93ff9e0e5fe3f1aeeb0jeff.schenk // the patcher can throw JAXBException?
c1350cf5bc50458ba79cc93ff9e0e5fe3f1aeeb0jeff.schenk * Adds the object which is currently being unmarshalled
c1350cf5bc50458ba79cc93ff9e0e5fe3f1aeeb0jeff.schenk * to the ID table.
c1350cf5bc50458ba79cc93ff9e0e5fe3f1aeeb0jeff.schenk * Returns the value passed as the parameter.
c1350cf5bc50458ba79cc93ff9e0e5fe3f1aeeb0jeff.schenk * This is a hack, but this makes it easier for ID
c1350cf5bc50458ba79cc93ff9e0e5fe3f1aeeb0jeff.schenk * transducer to do its job.
c1350cf5bc50458ba79cc93ff9e0e5fe3f1aeeb0jeff.schenk // throwing an exception is one way. Overwriting the previous one
c1350cf5bc50458ba79cc93ff9e0e5fe3f1aeeb0jeff.schenk // is another way. The latter allows us to process invalid documents,
c1350cf5bc50458ba79cc93ff9e0e5fe3f1aeeb0jeff.schenk // while the former makes it impossible to handle them.
c1350cf5bc50458ba79cc93ff9e0e5fe3f1aeeb0jeff.schenk // I prefer to be flexible in terms of invalid document handling,
c1350cf5bc50458ba79cc93ff9e0e5fe3f1aeeb0jeff.schenk // so chose not to throw an exception.
c1350cf5bc50458ba79cc93ff9e0e5fe3f1aeeb0jeff.schenk // I believe this is an implementation choice, not the spec issue.
c1350cf5bc50458ba79cc93ff9e0e5fe3f1aeeb0jeff.schenk * Looks up the ID table and gets associated object.
c1350cf5bc50458ba79cc93ff9e0e5fe3f1aeeb0jeff.schenk * If there is no object associated with the given id,
c1350cf5bc50458ba79cc93ff9e0e5fe3f1aeeb0jeff.schenk * this method returns null.
c1350cf5bc50458ba79cc93ff9e0e5fe3f1aeeb0jeff.schenk // if we don't find ID.
c1350cf5bc50458ba79cc93ff9e0e5fe3f1aeeb0jeff.schenk * Gets the current source location information.
c1350cf5bc50458ba79cc93ff9e0e5fe3f1aeeb0jeff.schenk * Reports an error to the user, and asks if s/he wants
c1350cf5bc50458ba79cc93ff9e0e5fe3f1aeeb0jeff.schenk * to recover. If the canRecover flag is false, regardless
c1350cf5bc50458ba79cc93ff9e0e5fe3f1aeeb0jeff.schenk * of the client instruction, an exception will be thrown.
c1350cf5bc50458ba79cc93ff9e0e5fe3f1aeeb0jeff.schenk * Only if the flag is true and the user wants to recover from an error,
c1350cf5bc50458ba79cc93ff9e0e5fe3f1aeeb0jeff.schenk * the method returns normally.
c1350cf5bc50458ba79cc93ff9e0e5fe3f1aeeb0jeff.schenk * The thrown exception will be catched by the unmarshaller.
c1350cf5bc50458ba79cc93ff9e0e5fe3f1aeeb0jeff.schenk void handleEvent( ValidationEvent event, boolean canRecover ) throws SAXException;
c1350cf5bc50458ba79cc93ff9e0e5fe3f1aeeb0jeff.schenk// the copy of the org.relaxng.datatype.ValidationContext interface.
c1350cf5bc50458ba79cc93ff9e0e5fe3f1aeeb0jeff.schenk// this interface doesn't derive from that interface so that we don't have
c1350cf5bc50458ba79cc93ff9e0e5fe3f1aeeb0jeff.schenk// a direct dependency to it, but we provide the same functionality so that
c1350cf5bc50458ba79cc93ff9e0e5fe3f1aeeb0jeff.schenk// we can adopt this interface into the ValidationContext interface.
c1350cf5bc50458ba79cc93ff9e0e5fe3f1aeeb0jeff.schenk// see the ValidationContextAdaptor class.
c1350cf5bc50458ba79cc93ff9e0e5fe3f1aeeb0jeff.schenk * Gets a tracer object.
c1350cf5bc50458ba79cc93ff9e0e5fe3f1aeeb0jeff.schenk * Tracer can be used to trace the unmarshalling behavior.
c1350cf5bc50458ba79cc93ff9e0e5fe3f1aeeb0jeff.schenk * Note that to debug the unmarshalling process,
c1350cf5bc50458ba79cc93ff9e0e5fe3f1aeeb0jeff.schenk * you have to configure XJC so that it will emit trace codes
c1350cf5bc50458ba79cc93ff9e0e5fe3f1aeeb0jeff.schenk * in the unmarshaller.