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