T
- The type of the parsed entities.public class FeedContentHandler<T> extends FeedReader
Constructor and Description |
---|
FeedContentHandler(Class<?> entityClass,
EntityType entityType,
Metadata metadata,
Logger logger)
Constructor.
|
FeedContentHandler(Class<?> entityClass,
Metadata metadata,
Logger logger)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
characters(char[] ch,
int start,
int length) |
boolean |
closeLink()
Handle the end of a "link" element.
|
void |
endContent(Content content)
Called at the end of the XML block that defines the given content
element.
|
void |
endElement(String uri,
String localName,
String qName) |
void |
endEntry(Entry entry)
Called at the end of the XML block that defines the given entry.
|
void |
endLink(Link link)
Called at the end of the XML block that defines the given link.
|
void |
endPrefixMapping(String prefix) |
int |
getCount()
Returns the value of the "count" tag, that is to say the size of the
current entity set.
|
List<T> |
getEntities()
Returns the list of discovered entities.
|
void |
startContent(Content content)
Called when a new content element has been detected in the Atom document.
|
void |
startElement(String uri,
String localName,
String qName,
Attributes attrs) |
void |
startEntry(Entry entry)
Called when a new entry has been detected in the Atom document.
|
void |
startFeed(Feed feed)
Called when a new feed has been detected in the Atom document.
|
void |
startLink(Link link)
Called when a new link has been detected in the Atom document.
|
void |
startPrefixMapping(String prefix,
String uri) |
endDocument, endFeed, error, fatalError, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, setDocumentLocator, skippedEntity, startDocument, unparsedEntityDecl, warning
public FeedContentHandler(Class<?> entityClass, EntityType entityType, Metadata metadata, Logger logger)
entityClass
- The class of the parsed entities.entityType
- The entity type of the parsed entities.metadata
- The metadata of the remote OData service.logger
- The logger.public void characters(char[] ch, int start, int length) throws SAXException
characters
in interface ContentHandler
characters
in class FeedReader
SAXException
public boolean closeLink()
public void endContent(Content content)
FeedReader
endContent
in class FeedReader
content
- The current content element.public void endElement(String uri, String localName, String qName) throws SAXException
endElement
in interface ContentHandler
endElement
in class FeedReader
SAXException
public void endEntry(Entry entry)
FeedReader
endEntry
in class FeedReader
entry
- The current entry.public void endLink(Link link)
FeedReader
endLink
in class FeedReader
link
- The current link.public void endPrefixMapping(String prefix) throws SAXException
endPrefixMapping
in interface ContentHandler
endPrefixMapping
in class FeedReader
SAXException
public int getCount()
public List<T> getEntities()
public void startContent(Content content)
FeedReader
startContent
in class FeedReader
content
- The current content element.public void startElement(String uri, String localName, String qName, Attributes attrs) throws SAXException
startElement
in interface ContentHandler
startElement
in class FeedReader
SAXException
public void startEntry(Entry entry)
FeedReader
startEntry
in class FeedReader
entry
- The current entry.public void startFeed(Feed feed)
FeedReader
startFeed
in class FeedReader
feed
- The current feed.public void startLink(Link link)
FeedReader
startLink
in class FeedReader
link
- The current link.public void startPrefixMapping(String prefix, String uri) throws SAXException
startPrefixMapping
in interface ContentHandler
startPrefixMapping
in class FeedReader
SAXException
Copyright © 2005–2015. All rights reserved.