com.splunk
Class AtomObject

java.lang.Object
  extended by com.splunk.AtomObject
Direct Known Subclasses:
AtomEntry, AtomFeed

public class AtomObject
extends java.lang.Object

The AtomObject class represents a generic Atom object. This class is a common base class shared by AtomFeed and AtomEntry.


Field Summary
 java.lang.String id
          The value of the Atom <id> element.
 java.util.Map<java.lang.String,java.lang.String> links
          The value of the <link> elements in this AtomObject.
 java.lang.String title
          The value of the Atom <title> element.
 java.lang.String updated
          The value of the Atom <updated> element.
 
Constructor Summary
AtomObject()
           
 
Method Summary
protected static javax.xml.stream.XMLStreamReader createReader(java.io.InputStream input)
          Instantiates the XMLStreamReader, advances to the root element and validates the root document structure.
protected static java.lang.String getElementText(javax.xml.stream.XMLStreamReader reader)
           
protected static boolean isEndElement(javax.xml.stream.XMLStreamReader reader, java.lang.String localName)
           
protected static boolean isStartElement(javax.xml.stream.XMLStreamReader reader, java.lang.String localName)
           
protected  void parseEnd(javax.xml.stream.XMLStreamReader reader)
          Parses the element at the current cursor position and reads the corresponding end element.
protected  java.lang.String parseText(javax.xml.stream.XMLStreamReader reader)
          Parses and returns the text value of the element at the current cursor position and reads the corresponding end element.
protected static void scan(javax.xml.stream.XMLStreamReader reader)
           
protected static void scanEnd(javax.xml.stream.XMLStreamReader reader)
           
protected static void scanTag(javax.xml.stream.XMLStreamReader reader)
           
protected static void syntaxError(javax.xml.stream.XMLStreamReader reader)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

id

public java.lang.String id
The value of the Atom <id> element.


links

public java.util.Map<java.lang.String,java.lang.String> links
The value of the <link> elements in this AtomObject.


title

public java.lang.String title
The value of the Atom <title> element.


updated

public java.lang.String updated
The value of the Atom <updated> element.

Constructor Detail

AtomObject

public AtomObject()
Method Detail

createReader

protected static javax.xml.stream.XMLStreamReader createReader(java.io.InputStream input)
Instantiates the XMLStreamReader, advances to the root element and validates the root document structure. This initialization code is shared by the AtomFeed and AtomEntry parsers.

Parameters:
input - The input stream.
Returns:
An XMLStreamReader initialized reader, advanced to the first element of the document.

parseEnd

protected void parseEnd(javax.xml.stream.XMLStreamReader reader)
Parses the element at the current cursor position and reads the corresponding end element.

Parameters:
reader - The XML reader.

parseText

protected java.lang.String parseText(javax.xml.stream.XMLStreamReader reader)
Parses and returns the text value of the element at the current cursor position and reads the corresponding end element.

Parameters:
reader - The XML reader.
Returns:
The element's text value.

getElementText

protected static java.lang.String getElementText(javax.xml.stream.XMLStreamReader reader)

isEndElement

protected static boolean isEndElement(javax.xml.stream.XMLStreamReader reader,
                                      java.lang.String localName)

isStartElement

protected static boolean isStartElement(javax.xml.stream.XMLStreamReader reader,
                                        java.lang.String localName)

scan

protected static void scan(javax.xml.stream.XMLStreamReader reader)

scanEnd

protected static void scanEnd(javax.xml.stream.XMLStreamReader reader)

scanTag

protected static void scanTag(javax.xml.stream.XMLStreamReader reader)

syntaxError

protected static void syntaxError(javax.xml.stream.XMLStreamReader reader)