public interface UnmarshallingContext extends NamespaceContext
Errors detected by the AbstractUnmarshallingEventHandlerImpl-derived classes should
be either thrown as UnrepotedException
or reported through
the handleEvent method of this interface.
Modifier and Type | Method and Description |
---|---|
void |
addPatcher(Runnable job)
Adds a job that will be executed at the last of the unmarshalling.
|
String |
addToIdTable(String id)
Adds the object which is currently being unmarshalled
to the ID table.
|
void |
consumeAttribute(int idx)
Fires an attribute event for the specified attribute,
and marks the attribute as "used".
|
String |
eatAttribute(int idx)
Marks the attribute as "used" and return the value of the attribute.
|
String[] |
getAllDeclaredPrefixes()
Returns a list of all in-scope prefixes.
|
int |
getAttribute(String uri,
String name)
Gets the index of the attribute with the specified name.
|
String |
getBaseUri() |
UnmarshallingEventHandler |
getCurrentHandler()
Gets the current handler.
|
GrammarInfo |
getGrammarInfo()
Obtains a reference to the current grammar info.
|
Locator |
getLocator()
Gets the current source location information.
|
String[] |
getNewlyDeclaredPrefixes()
Returns a list of prefixes newly declared on this element.
|
Object |
getObjectFromId(String id)
Looks up the ID table and gets associated object.
|
com.sun.xml.bind.unmarshaller.Tracer |
getTracer()
Gets a tracer object.
|
Attributes |
getUnconsumedAttributes()
Gets all the unconsumed attributes.
|
void |
handleEvent(ValidationEvent event,
boolean canRecover)
Reports an error to the user, and asks if s/he wants
to recover.
|
boolean |
isNotation(String notationName) |
boolean |
isUnparsedEntity(String entityName) |
void |
popAttributes()
Discards the previously stored attribute set.
|
void |
popContentHandler()
Pops a content handler from the stack and registers
it as the current content handler.
|
void |
pushAttributes(Attributes atts,
boolean collectText)
Stores a new attribute set.
|
void |
pushContentHandler(UnmarshallingEventHandler handler,
int memento)
Pushes the current content handler into the stack
and registers the newly specified content handler so
that it can receive SAX events.
|
String |
resolveNamespacePrefix(String prefix) |
getNamespaceURI, getPrefix, getPrefixes
GrammarInfo getGrammarInfo()
void pushContentHandler(UnmarshallingEventHandler handler, int memento)
memento
- When this newly specified handler will be removed from the stack,
the leaveChild event will be fired to the parent handler
with this memento.void popContentHandler() throws SAXException
This method will also fire the leaveChild event with the associated memento.
SAXException
UnmarshallingEventHandler getCurrentHandler()
String[] getNewlyDeclaredPrefixes()
pushAttributes(org.xml.sax.Attributes, boolean)
method is called.String[] getAllDeclaredPrefixes()
void pushAttributes(Attributes atts, boolean collectText)
collectText
- false if the context doesn't need to fire text events
for texts inside this element. True otherwise.void popAttributes()
int getAttribute(String uri, String name)
Attributes getUnconsumedAttributes()
void consumeAttribute(int idx) throws SAXException
SAXException
String eatAttribute(int idx) throws SAXException
SAXException
void addPatcher(Runnable job)
job
- The run method of this object is called.String addToIdTable(String id)
Object getObjectFromId(String id)
Locator getLocator()
void handleEvent(ValidationEvent event, boolean canRecover) throws SAXException
SAXException
String getBaseUri()
boolean isUnparsedEntity(String entityName)
boolean isNotation(String notationName)
com.sun.xml.bind.unmarshaller.Tracer getTracer()
Copyright © 2010–2025 Open Identity Platform Community. All rights reserved.