Copyright (c) 2000-2002 ChurchillObjects.com

churchillobjects.rss4j.parser
Class RssParserImpl091

java.lang.Object
  |
  +--org.xml.sax.helpers.DefaultHandler
        |
        +--churchillobjects.rss4j.parser.RssParser
              |
              +--churchillobjects.rss4j.parser.RssParserImpl090
                    |
                    +--churchillobjects.rss4j.parser.RssParserImpl091
All Implemented Interfaces:
org.xml.sax.ContentHandler, org.xml.sax.DTDHandler, org.xml.sax.EntityResolver, org.xml.sax.ErrorHandler, RssVersion

class RssParserImpl091
extends RssParserImpl090

Class to parse an RSS document according to the specifications of the RSS .91 standard. This object is created when the base parser already started parsing the document (and knows what the version number is), so it is given the document object and the known namespaces up to that point.


Field Summary
protected  boolean inChannel
          Indicates that the SAX handling process is currently in a channel.
protected  boolean inImage
          Indicates that the SAX handling process is currently in an image.
protected  boolean inItem
          Indicates that the SAX handling process is currently in an item.
protected  boolean inSkipDays
          Indicates that the parser is inside the skipDays element, so it should look for days values to follow.
protected  boolean inSkipHours
          Indicates that the parser is inside the skipHours element, so it should look for hours values to follow.
protected  boolean inTextInput
          Indicates that the SAX handling process is currently in a text input.
private static java.lang.String VERSION
          Static version number string for this implementation.
 
Fields inherited from class churchillobjects.rss4j.parser.RssParser
currentChannel, currentImage, currentItem, currentTextInput, document, namespaces
 
Fields inherited from interface churchillobjects.rss4j.model.RssVersion
VERSION_10, VERSION_90, VERSION_91
 
Constructor Summary
(package private) RssParserImpl091(churchillobjects.rss4j.RssDocument document, java.util.Vector namespaces)
          Constructor for this RSS verion's parser.
 
Method Summary
 void endElement(java.lang.String uri, java.lang.String name, java.lang.String qName)
          SAX interface method, indicates that an element has completed.
private  void handleChannelAttributes(java.lang.String name)
          Handles channel attributes that may exist for RSS 0.91 channels.
private  void handleHour()
          Handles parsing the hour value for channels.
private  void handleImageAttributes(java.lang.String name)
          handles image attributes that may exist for RSS 0.91 images.
 void startElement(java.lang.String uri, java.lang.String name, java.lang.String qName, org.xml.sax.Attributes attrs)
          SAX interface method, begins a new element.
 
Methods inherited from class churchillobjects.rss4j.parser.RssParser
characters, cleanUp, getAttribute, getChars, hasChars, parseRss, parseRss, parseRss, parseRss, parseRss, resetChars, startPrefixMapping
 
Methods inherited from class org.xml.sax.helpers.DefaultHandler
endDocument, endPrefixMapping, error, fatalError, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, setDocumentLocator, skippedEntity, startDocument, unparsedEntityDecl, warning
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

inSkipDays

protected boolean inSkipDays
Indicates that the parser is inside the skipDays element, so it should look for days values to follow.


inSkipHours

protected boolean inSkipHours
Indicates that the parser is inside the skipHours element, so it should look for hours values to follow.


VERSION

private static final java.lang.String VERSION
Static version number string for this implementation.

See Also:
Constant Field Values

inChannel

protected boolean inChannel
Indicates that the SAX handling process is currently in a channel.


inItem

protected boolean inItem
Indicates that the SAX handling process is currently in an item.


inTextInput

protected boolean inTextInput
Indicates that the SAX handling process is currently in a text input.


inImage

protected boolean inImage
Indicates that the SAX handling process is currently in an image.

Constructor Detail

RssParserImpl091

RssParserImpl091(churchillobjects.rss4j.RssDocument document,
                 java.util.Vector namespaces)
Constructor for this RSS verion's parser. Provided with an already set-up document and namespace.

Parameters:
document -
namespaces -
Method Detail

startElement

public void startElement(java.lang.String uri,
                         java.lang.String name,
                         java.lang.String qName,
                         org.xml.sax.Attributes attrs)
                  throws org.xml.sax.SAXException
SAX interface method, begins a new element. For RSS 0.91, all elements except for skipDays and skipHours are handled in the superclass, 0.90.

Specified by:
startElement in interface org.xml.sax.ContentHandler
Overrides:
startElement in class RssParserImpl090
Parameters:
uri -
name -
qName -
attrs -
Throws:
org.xml.sax.SAXException

endElement

public void endElement(java.lang.String uri,
                       java.lang.String name,
                       java.lang.String qName)
                throws org.xml.sax.SAXException
SAX interface method, indicates that an element has completed. Set flags to indicate being outside an element, or obtain the characters of the element and add them to the document.

Specified by:
endElement in interface org.xml.sax.ContentHandler
Overrides:
endElement in class RssParserImpl090
Parameters:
uri -
name -
qName -
Throws:
org.xml.sax.SAXException

handleHour

private void handleHour()
                 throws RssParseException
Handles parsing the hour value for channels.

Throws:
RssParseException

handleChannelAttributes

private void handleChannelAttributes(java.lang.String name)
Handles channel attributes that may exist for RSS 0.91 channels.

Parameters:
name -

handleImageAttributes

private void handleImageAttributes(java.lang.String name)
                            throws RssParseException
handles image attributes that may exist for RSS 0.91 images.

Parameters:
name -
Throws:
RssParseException

Copyright (c) 2000-2002 ChurchillObjects.com