SageTV Platform
V9.0

sage.media.rss
Class RSSHandler

java.lang.Object
  extended by org.xml.sax.helpers.DefaultHandler
      extended by sage.media.rss.RSSHandler
All Implemented Interfaces:
org.xml.sax.ContentHandler, org.xml.sax.DTDHandler, org.xml.sax.EntityResolver, org.xml.sax.ErrorHandler

public class RSSHandler
extends org.xml.sax.helpers.DefaultHandler

Copyright 2015 The SageTV Authors. All Rights Reserved. Handler for SAX Parser.

This elements are not handled yet:

cloud
rating
skipHours
skipDays
category

This module, both source code and documentation, is in the Public Domain, and comes with NO WARRANTY.

Since:
RSSLIB4J 0.1

Field Summary
static java.lang.String AUTHOR_TAG
           
static java.lang.String CATEGORY_TAG
           
static java.lang.String CHANNEL_TAG
           
static java.lang.String CLOUD_TAG
           
static java.lang.String COMMENTS_TAG
           
static java.lang.String CONTENT_ENCODED_TAG
           
static java.lang.String COPY_TAG
           
static java.lang.String DC_CONTRIBUTOR_TAG
           
static java.lang.String DC_COVERAGE_TAG
           
static java.lang.String DC_CREATOR_TAG
           
static java.lang.String DC_DATE_TAG
           
static java.lang.String DC_DESCRIPTION_TAG
           
static java.lang.String DC_FORMAT_TAG
           
static java.lang.String DC_IDENTIFIER_TAG
           
static java.lang.String DC_LANGUAGE_TAG
           
static java.lang.String DC_PUBLISHER_TAG
           
static java.lang.String DC_RELATION_TAG
           
static java.lang.String DC_RIGHTS_TAG
           
static java.lang.String DC_SOURCE_TAG
           
static java.lang.String DC_SUBJECT_TAG
           
static java.lang.String DC_TITLE_TAG
           
static java.lang.String DC_TYPE_TAG
           
static java.lang.String DESCRIPTION_TAG
           
static java.lang.String DOCS_TAG
           
static java.lang.String ENCLOSURE_TAG
           
static java.lang.String GENERATOR_TAG
           
static java.lang.String IMAGE_H_TAG
           
static java.lang.String IMAGE_TAG
           
static java.lang.String IMAGE_W_TAG
           
static java.lang.String ITEM_TAG
           
static java.lang.String ITUNES_AUTHOR
           
static java.lang.String ITUNES_DURATION
           
static java.lang.String ITUNES_IMAGE
           
static java.lang.String ITUNES_KEYWORDS
           
static java.lang.String ITUNES_SUMMARY
           
static java.lang.String LANGUAGE_TAG
           
static java.lang.String LAST_B_DATE_TAG
           
static java.lang.String LINK_TAG
           
static java.lang.String MANAGING_TAG
           
static java.lang.String MEDIA_CONTENT_TAG
           
static java.lang.String MEDIA_DESCRIPTION_TAG
           
static java.lang.String MEDIA_GROUP_TAG
           
static java.lang.String MEDIA_PLAYER_TAG
           
static java.lang.String MEDIA_THUMBNAIL_TAG
           
static java.lang.String MEDIA_TITLE_TAG
           
static java.lang.String NAME_TAG
           
static java.lang.String PUB_DATE_TAG
           
static java.lang.String RATING_TAG
           
static java.lang.String SEQ_ELEMENT_TAG
           
static java.lang.String SEQ_TAG
           
static java.lang.String SKIPD_TAG
           
static java.lang.String SKIPH_TAG
           
static java.lang.String SY_BASE_TAG
           
static java.lang.String SY_FREQ_TAG
           
static java.lang.String SY_PERIOD_TAG
           
static java.lang.String TEXTINPUT_TAG
           
static java.lang.String TITLE_TAG
           
static java.lang.String TTL_TAG
           
static java.lang.String URL_TAG
           
static java.lang.String WMASTER_TAG
           
 
Constructor Summary
RSSHandler()
           
 
Method Summary
 void characters(char[] ch, int start, int length)
          Receive notification of character data inside an element
 void endElement(java.lang.String uri, java.lang.String localName, java.lang.String qName)
          Receive notification of the end of an element
 RSSChannel getRSSChannel()
          Get the RSSChannel Object back from the parser
 void startElement(java.lang.String uri, java.lang.String localName, java.lang.String qName, org.xml.sax.Attributes attributes)
          Receive notification of the start of an element.
protected static boolean tagIsEqual(java.lang.String a, java.lang.String b)
          Check against non-casesentive tag name
 
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

CHANNEL_TAG

public static final java.lang.String CHANNEL_TAG
See Also:
Constant Field Values

TITLE_TAG

public static final java.lang.String TITLE_TAG
See Also:
Constant Field Values

LINK_TAG

public static final java.lang.String LINK_TAG
See Also:
Constant Field Values

DESCRIPTION_TAG

public static final java.lang.String DESCRIPTION_TAG
See Also:
Constant Field Values

ITEM_TAG

public static final java.lang.String ITEM_TAG
See Also:
Constant Field Values

IMAGE_TAG

public static final java.lang.String IMAGE_TAG
See Also:
Constant Field Values

IMAGE_W_TAG

public static final java.lang.String IMAGE_W_TAG
See Also:
Constant Field Values

IMAGE_H_TAG

public static final java.lang.String IMAGE_H_TAG
See Also:
Constant Field Values

URL_TAG

public static final java.lang.String URL_TAG
See Also:
Constant Field Values

SEQ_TAG

public static final java.lang.String SEQ_TAG
See Also:
Constant Field Values

SEQ_ELEMENT_TAG

public static final java.lang.String SEQ_ELEMENT_TAG
See Also:
Constant Field Values

TEXTINPUT_TAG

public static final java.lang.String TEXTINPUT_TAG
See Also:
Constant Field Values

NAME_TAG

public static final java.lang.String NAME_TAG
See Also:
Constant Field Values

LANGUAGE_TAG

public static final java.lang.String LANGUAGE_TAG
See Also:
Constant Field Values

MANAGING_TAG

public static final java.lang.String MANAGING_TAG
See Also:
Constant Field Values

WMASTER_TAG

public static final java.lang.String WMASTER_TAG
See Also:
Constant Field Values

COPY_TAG

public static final java.lang.String COPY_TAG
See Also:
Constant Field Values

PUB_DATE_TAG

public static final java.lang.String PUB_DATE_TAG
See Also:
Constant Field Values

LAST_B_DATE_TAG

public static final java.lang.String LAST_B_DATE_TAG
See Also:
Constant Field Values

GENERATOR_TAG

public static final java.lang.String GENERATOR_TAG
See Also:
Constant Field Values

DOCS_TAG

public static final java.lang.String DOCS_TAG
See Also:
Constant Field Values

TTL_TAG

public static final java.lang.String TTL_TAG
See Also:
Constant Field Values

AUTHOR_TAG

public static final java.lang.String AUTHOR_TAG
See Also:
Constant Field Values

COMMENTS_TAG

public static final java.lang.String COMMENTS_TAG
See Also:
Constant Field Values

CLOUD_TAG

public static final java.lang.String CLOUD_TAG
See Also:
Constant Field Values

RATING_TAG

public static final java.lang.String RATING_TAG
See Also:
Constant Field Values

SKIPH_TAG

public static final java.lang.String SKIPH_TAG
See Also:
Constant Field Values

SKIPD_TAG

public static final java.lang.String SKIPD_TAG
See Also:
Constant Field Values

CATEGORY_TAG

public static final java.lang.String CATEGORY_TAG
See Also:
Constant Field Values

ITUNES_AUTHOR

public static final java.lang.String ITUNES_AUTHOR
See Also:
Constant Field Values

ITUNES_SUMMARY

public static final java.lang.String ITUNES_SUMMARY
See Also:
Constant Field Values

ITUNES_DURATION

public static final java.lang.String ITUNES_DURATION
See Also:
Constant Field Values

ITUNES_KEYWORDS

public static final java.lang.String ITUNES_KEYWORDS
See Also:
Constant Field Values

ITUNES_IMAGE

public static final java.lang.String ITUNES_IMAGE
See Also:
Constant Field Values

DC_TITLE_TAG

public static final java.lang.String DC_TITLE_TAG
See Also:
Constant Field Values

DC_CREATOR_TAG

public static final java.lang.String DC_CREATOR_TAG
See Also:
Constant Field Values

DC_SUBJECT_TAG

public static final java.lang.String DC_SUBJECT_TAG
See Also:
Constant Field Values

DC_DESCRIPTION_TAG

public static final java.lang.String DC_DESCRIPTION_TAG
See Also:
Constant Field Values

DC_PUBLISHER_TAG

public static final java.lang.String DC_PUBLISHER_TAG
See Also:
Constant Field Values

DC_CONTRIBUTOR_TAG

public static final java.lang.String DC_CONTRIBUTOR_TAG
See Also:
Constant Field Values

DC_DATE_TAG

public static final java.lang.String DC_DATE_TAG
See Also:
Constant Field Values

DC_TYPE_TAG

public static final java.lang.String DC_TYPE_TAG
See Also:
Constant Field Values

DC_FORMAT_TAG

public static final java.lang.String DC_FORMAT_TAG
See Also:
Constant Field Values

DC_IDENTIFIER_TAG

public static final java.lang.String DC_IDENTIFIER_TAG
See Also:
Constant Field Values

DC_SOURCE_TAG

public static final java.lang.String DC_SOURCE_TAG
See Also:
Constant Field Values

DC_LANGUAGE_TAG

public static final java.lang.String DC_LANGUAGE_TAG
See Also:
Constant Field Values

DC_RELATION_TAG

public static final java.lang.String DC_RELATION_TAG
See Also:
Constant Field Values

DC_COVERAGE_TAG

public static final java.lang.String DC_COVERAGE_TAG
See Also:
Constant Field Values

DC_RIGHTS_TAG

public static final java.lang.String DC_RIGHTS_TAG
See Also:
Constant Field Values

SY_PERIOD_TAG

public static final java.lang.String SY_PERIOD_TAG
See Also:
Constant Field Values

SY_FREQ_TAG

public static final java.lang.String SY_FREQ_TAG
See Also:
Constant Field Values

SY_BASE_TAG

public static final java.lang.String SY_BASE_TAG
See Also:
Constant Field Values

CONTENT_ENCODED_TAG

public static final java.lang.String CONTENT_ENCODED_TAG
See Also:
Constant Field Values

MEDIA_GROUP_TAG

public static final java.lang.String MEDIA_GROUP_TAG
See Also:
Constant Field Values

MEDIA_CONTENT_TAG

public static final java.lang.String MEDIA_CONTENT_TAG
See Also:
Constant Field Values

MEDIA_TITLE_TAG

public static final java.lang.String MEDIA_TITLE_TAG
See Also:
Constant Field Values

MEDIA_DESCRIPTION_TAG

public static final java.lang.String MEDIA_DESCRIPTION_TAG
See Also:
Constant Field Values

MEDIA_THUMBNAIL_TAG

public static final java.lang.String MEDIA_THUMBNAIL_TAG
See Also:
Constant Field Values

MEDIA_PLAYER_TAG

public static final java.lang.String MEDIA_PLAYER_TAG
See Also:
Constant Field Values

ENCLOSURE_TAG

public static final java.lang.String ENCLOSURE_TAG
See Also:
Constant Field Values
Constructor Detail

RSSHandler

public RSSHandler()
Method Detail

startElement

public void startElement(java.lang.String uri,
                         java.lang.String localName,
                         java.lang.String qName,
                         org.xml.sax.Attributes attributes)
Receive notification of the start of an element.

Specified by:
startElement in interface org.xml.sax.ContentHandler
Overrides:
startElement in class org.xml.sax.helpers.DefaultHandler
Parameters:
uri - The Namespace URI, or the empty string if the element has no Namespace URI or if Namespace processing is not being performed.
localName - The local name (without prefix), or the empty string if Namespace processing is not being performed
qName - The qualified name (with prefix), or the empty string if qualified names are not available
attributes - The attributes attached to the element. If there are no attributes, it shall be an empty Attributes object

endElement

public void endElement(java.lang.String uri,
                       java.lang.String localName,
                       java.lang.String qName)
Receive notification of the end of an element

Specified by:
endElement in interface org.xml.sax.ContentHandler
Overrides:
endElement in class org.xml.sax.helpers.DefaultHandler
Parameters:
uri - The Namespace URI, or the empty string if the element has no Namespace URI or if Namespace processing is not being performed.
localName - The local name (without prefix), or the empty string if Namespace processing is not being performed
qName - The qualified name (with prefix), or the empty string if qualified names are not available

characters

public void characters(char[] ch,
                       int start,
                       int length)
Receive notification of character data inside an element

Specified by:
characters in interface org.xml.sax.ContentHandler
Overrides:
characters in class org.xml.sax.helpers.DefaultHandler
Parameters:
ch - The characters.
start - The start position in the character array.
length - The number of characters to use from the character array.

tagIsEqual

protected static boolean tagIsEqual(java.lang.String a,
                                    java.lang.String b)
Check against non-casesentive tag name

Parameters:
a - The first tag
b - The tag to check
Returns:
True if the tags are the same

getRSSChannel

public RSSChannel getRSSChannel()
Get the RSSChannel Object back from the parser

Returns:
The RSSChannell Object

SageTV Platform
V9.0

SageTV is a trademark or registered trademark of Google, Inc. in the US and other countries.
Copyright 2000-2015 The SageTV Authors. All Rights Reserved.