|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.xml.sax.helpers.DefaultHandler
fr.paris.lutece.plugins.googleapi.service.FeedHandler
public class FeedHandler
Simple SAX event handler, which prints out the titles of all entries in the Atom response feed.
Field Summary | |
---|---|
protected boolean |
_bInsideEntryContent
|
protected boolean |
_bInsideEntryTitle
True if we are inside of a data entry's title, false otherwise. |
protected Item |
_item
|
protected java.util.List<Item> |
_listItems
|
protected java.util.Stack<java.lang.String> |
xmlTags
Stack containing the opening XML tags of the response. |
Constructor Summary | |
---|---|
FeedHandler()
|
Method Summary | |
---|---|
void |
characters(char[] ch,
int start,
int length)
Callback method for receiving notification of character data inside an XML element. |
void |
endElement(java.lang.String uri,
java.lang.String localName,
java.lang.String qName)
Receive notification of a closing XML tag: remove the tag from teh stack. |
void |
setItemList(java.util.List<Item> listItems)
Receive notification of an opening XML tag: push the tag to xmlTags . |
void |
startElement(java.lang.String uri,
java.lang.String localName,
java.lang.String qName,
org.xml.sax.Attributes attributes)
|
Methods inherited from class org.xml.sax.helpers.DefaultHandler |
---|
endDocument, endPrefixMapping, error, fatalError, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, setDocumentLocator, skippedEntity, startDocument, startPrefixMapping, unparsedEntityDecl, warning |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected java.util.List<Item> _listItems
protected java.util.Stack<java.lang.String> xmlTags
protected boolean _bInsideEntryTitle
protected boolean _bInsideEntryContent
protected Item _item
Constructor Detail |
---|
public FeedHandler()
Method Detail |
---|
public void setItemList(java.util.List<Item> listItems)
xmlTags
. If the tag is a title tag inside an entry tag,
turn insideEntryTitle
to true
.
listItems
- public void startElement(java.lang.String uri, java.lang.String localName, java.lang.String qName, org.xml.sax.Attributes attributes) throws org.xml.sax.SAXException
startElement
in interface org.xml.sax.ContentHandler
startElement
in class org.xml.sax.helpers.DefaultHandler
uri
- localName
- qName
- attributes
-
org.xml.sax.SAXException
public void endElement(java.lang.String uri, java.lang.String localName, java.lang.String qName) throws org.xml.sax.SAXException
insideEntryTitle
to false
.
endElement
in interface org.xml.sax.ContentHandler
endElement
in class org.xml.sax.helpers.DefaultHandler
uri
- localName
- qName
-
org.xml.sax.SAXException
public void characters(char[] ch, int start, int length) throws org.xml.sax.SAXException
characters
in interface org.xml.sax.ContentHandler
characters
in class org.xml.sax.helpers.DefaultHandler
ch
- start
- length
-
org.xml.sax.SAXException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |