|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.fcrepo.server.journal.xmlhelpers.AbstractXmlReader
public abstract class AbstractXmlReader
An abstract base class that provides some useful methods for the XML reader classes.
| Field Summary |
|---|
| Constructor Summary | |
|---|---|
AbstractXmlReader()
|
|
| Method Summary | |
|---|---|
protected void |
advancePastWhitespace(XMLEventReader reader)
Advance past any white space. |
protected JournalException |
getNotCharactersException(QName tagName,
XMLEvent event)
If we encounter an unexpected event when reading the journal file, create an exception with all of the pertinent information. |
protected JournalException |
getNotEndTagException(QName tagName,
XMLEvent event)
Complain when we were expecting a end tag, and didn't find it. |
protected JournalException |
getNotNextMemberOrEndOfGroupException(QName groupTagName,
QName memberTagName,
XMLEvent event)
While traversing a group of member tags, we expected either the start of another member tag, or the end of the group. |
protected JournalException |
getNotStartTagException(QName tagName,
XMLEvent event)
Complain when we were expecting a start tag, and didn't find it. |
protected String |
getOptionalAttributeValue(StartElement start,
QName attributeName)
Get the value of a given attribute from this start tag, or null if the attribute is not there. |
protected String |
getRequiredAttributeValue(StartElement start,
QName attributeName)
Get the value of a given attribute from this start tag, or complain if it's not there. |
protected boolean |
isEndTagEvent(XMLEvent event,
QName tagName)
Test an event to see whether it is an end tag with the expected name. |
protected boolean |
isStartTagEvent(XMLEvent event,
QName tagName)
Test an event to see whether it is an start tag with the expected name. |
protected String |
readCharactersUntilEndTag(XMLEventReader reader,
QName tagName)
Loop through a series of character events, accumulating the data into a String. |
protected XMLEvent |
readStartTag(XMLEventReader reader,
QName tagName)
Read the next event and complain if it is not the Start Tag that we expected. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public AbstractXmlReader()
| Method Detail |
|---|
protected void advancePastWhitespace(XMLEventReader reader)
throws XMLStreamException
XMLStreamException
protected XMLEvent readStartTag(XMLEventReader reader,
QName tagName)
throws XMLStreamException,
JournalException
XMLStreamException
JournalException
protected boolean isStartTagEvent(XMLEvent event,
QName tagName)
protected boolean isEndTagEvent(XMLEvent event,
QName tagName)
protected String getRequiredAttributeValue(StartElement start,
QName attributeName)
throws JournalException
JournalException
protected String getOptionalAttributeValue(StartElement start,
QName attributeName)
protected String readCharactersUntilEndTag(XMLEventReader reader,
QName tagName)
throws XMLStreamException,
JournalException
XMLStreamException
JournalException
protected JournalException getNotStartTagException(QName tagName,
XMLEvent event)
protected JournalException getNotEndTagException(QName tagName,
XMLEvent event)
protected JournalException getNotCharactersException(QName tagName,
XMLEvent event)
protected JournalException getNotNextMemberOrEndOfGroupException(QName groupTagName,
QName memberTagName,
XMLEvent event)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||