org.apache.lucene.gdata.gom.core
Class AbstractGOMElement

java.lang.Object
  extended by org.apache.lucene.gdata.gom.core.AbstractGOMElement
All Implemented Interfaces:
AtomParser, GOMElement, GOMXmlEntity
Direct Known Subclasses:
ArbitraryGOMXml, GOMCategoryImpl, GOMDateConstructImpl, GOMEntryImpl, GOMGeneratorImpl, GOMLinkImpl, GOMPersonImpl, GOMSourceImpl, GOMTextContructImpl, SimpleGOMElementImpl

public abstract class AbstractGOMElement
extends Object
implements GOMElement

Author:
Simon Willnauer

Field Summary
protected  List<GOMAttribute> extensionAttributes
          atomCommonAttributes
undefinedAttribute*
protected  String localName
           
protected  String nsPrefix
           
protected  String nsUri
           
protected  javax.xml.namespace.QName qname
           
protected  String textValue
           
protected  String xmlBase
          atomCommonAttribute
attribute xml:base { atomUri }?
protected  String xmlLang
          atomCommonAttribute
attribute xml:lang { atomLanguageTag }?
 
Fields inherited from interface org.apache.lucene.gdata.gom.GOMElement
XML_BASE, XML_LANG
 
Fields inherited from interface org.apache.lucene.gdata.gom.core.AtomParser
DUPLICATE_ATTRIBUTE, DUPLICATE_ELEMENT, DUPLICATE_ELEMENT_VALUE, INVALID_ATTRIBUTE, INVALID_ELEMENT_VALUE, MISSING_ELEMENT_ATTRIBUTE, MISSING_ELEMENT_CHILD, MISSING_ELEMENT_VALUE, MISSING_ELEMENT_VALUE_PLAIN, UNEXPECTED_ATTRIBUTE, UNEXPECTED_ELEMENT, UNEXPECTED_ELEMENT_CHILD, UNEXPECTED_ELEMENT_VALUE, URECOGNIZED_ELEMENT_CHILD
 
Constructor Summary
AbstractGOMElement()
           
 
Method Summary
protected  void addAttribute(GOMAttribute aAttribute)
           
 AtomParser getChildParser(javax.xml.namespace.QName aName)
          
 String getLocalName()
          
 javax.xml.namespace.QName getQname()
          
 String getTextValue()
          
 String getXmlBase()
          
 String getXmlLang()
          
protected  List<GOMAttribute> getXmlNamespaceAttributes()
           
 void processAttribute(javax.xml.namespace.QName aQName, String aValue)
          
 void processElementValue(String aValue)
          
 void processEndElement()
          
 void setLocalName(String aLocalName)
          
 void setNamespacePrefix(String aString)
          
 void setNamespaceUri(String aString)
          
 void setTextValue(String aTextValue)
          
 void writeRssOutput(GOMOutputWriter aStreamWriter, String aRssName)
          Generates the xml element represented by this class in the RSS 2.0 formate using the parameter rssName as the element local name
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.lucene.gdata.gom.GOMElement
writeAtomOutput, writeRssOutput
 

Field Detail

xmlLang

protected String xmlLang
atomCommonAttribute
attribute xml:lang { atomLanguageTag }?


xmlBase

protected String xmlBase
atomCommonAttribute
attribute xml:base { atomUri }?


qname

protected javax.xml.namespace.QName qname

textValue

protected String textValue

localName

protected String localName

nsUri

protected String nsUri

nsPrefix

protected String nsPrefix

extensionAttributes

protected List<GOMAttribute> extensionAttributes
atomCommonAttributes
undefinedAttribute*

Constructor Detail

AbstractGOMElement

public AbstractGOMElement()
Method Detail

getQname

public javax.xml.namespace.QName getQname()

Specified by:
getQname in interface GOMXmlEntity
Returns:
- the entities QName
See Also:
GOMXmlEntity.getQname()

getTextValue

public String getTextValue()

Specified by:
getTextValue in interface GOMXmlEntity
Returns:
- the text value of the entity
See Also:
GOMXmlEntity.getTextValue()

setTextValue

public void setTextValue(String aTextValue)

Specified by:
setTextValue in interface GOMXmlEntity
Parameters:
aTextValue - - the text value of the entity
See Also:
GOMXmlEntity.setTextValue(java.lang.String)

getLocalName

public String getLocalName()

Specified by:
getLocalName in interface GOMXmlEntity
Returns:
- the local name of the entitiy
See Also:
GOMXmlEntity.getLocalName()

setLocalName

public void setLocalName(String aLocalName)

Specified by:
setLocalName in interface GOMXmlEntity
Parameters:
aLocalName - - the localname of the entitiy
See Also:
GOMXmlEntity.setLocalName(java.lang.String)

addAttribute

protected void addAttribute(GOMAttribute aAttribute)

getChildParser

public AtomParser getChildParser(javax.xml.namespace.QName aName)

Specified by:
getChildParser in interface AtomParser
Returns:
See Also:
AtomParser.getChildParser(javax.xml.namespace.QName)

processAttribute

public void processAttribute(javax.xml.namespace.QName aQName,
                             String aValue)

Specified by:
processAttribute in interface AtomParser
See Also:
AtomParser.processAttribute(javax.xml.namespace.QName, java.lang.String)

processElementValue

public void processElementValue(String aValue)

Specified by:
processElementValue in interface AtomParser
See Also:
AtomParser.processElementValue(java.lang.String)

processEndElement

public void processEndElement()

Specified by:
processEndElement in interface AtomParser
See Also:
AtomParser.processEndElement()

setNamespaceUri

public void setNamespaceUri(String aString)

Specified by:
setNamespaceUri in interface GOMXmlEntity
Parameters:
aString - - the namespace uri to set
See Also:
GOMXmlEntity.setNamespaceUri(java.lang.String)

setNamespacePrefix

public void setNamespacePrefix(String aString)

Specified by:
setNamespacePrefix in interface GOMXmlEntity
Parameters:
aString - - the namespace prefix to set
See Also:
GOMXmlEntity.setNamespacePrefix(java.lang.String)

getXmlNamespaceAttributes

protected List<GOMAttribute> getXmlNamespaceAttributes()

writeRssOutput

public void writeRssOutput(GOMOutputWriter aStreamWriter,
                           String aRssName)
                    throws javax.xml.stream.XMLStreamException
Generates the xml element represented by this class in the RSS 2.0 formate using the parameter rssName as the element local name

Specified by:
writeRssOutput in interface GOMElement
Parameters:
aStreamWriter - - the GOMOutputWriter implementation to write the output
aRssName - - the local name to render the element
Throws:
javax.xml.stream.XMLStreamException - - if the GOMOutputWriter throws an exception
See Also:
org.apache.lucene.gdata.gom.GOMElement#writeRssOutput(org.apache.lucene.gdata.gom.writer.GOMStaxWriter, java.lang.String)

getXmlBase

public String getXmlBase()

Specified by:
getXmlBase in interface GOMElement
Returns:
the xml:base attribute value
See Also:
GOMElement.getXmlBase()

getXmlLang

public String getXmlLang()

Specified by:
getXmlLang in interface GOMElement
Returns:
the xml:lang attribute value
See Also:
GOMElement.getXmlLang()


Copyright © 2000-2008 Apache Software Foundation. All Rights Reserved.