FileDocCategorySizeDatePackage
AbstractGOMElement.javaAPI DocApache Lucene 2.1.05605Wed Feb 14 10:45:58 GMT 2007org.apache.lucene.gdata.gom.core

AbstractGOMElement

public abstract class AbstractGOMElement extends Object implements org.apache.lucene.gdata.gom.GOMElement
author
Simon Willnauer

Fields Summary
protected String
xmlLang
atomCommonAttribute
attribute xml:lang { atomLanguageTag }?
protected String
xmlBase
atomCommonAttribute
attribute xml:base { atomUri }?
protected QName
qname
protected String
textValue
protected String
localName
protected String
nsUri
protected String
nsPrefix
protected List
extensionAttributes
atomCommonAttributes
undefinedAttribute*
Constructors Summary
Methods Summary
protected voidaddAttribute(org.apache.lucene.gdata.gom.GOMAttribute aAttribute)

		if (aAttribute != null)
			this.extensionAttributes.add(aAttribute);

	
public AtomParsergetChildParser(javax.xml.namespace.QName aName)
{@inheritDoc}

see
org.apache.lucene.gdata.gom.core.AtomParser#getChildParser(javax.xml.namespace.QName)

		throw new GDataParseException(String.format(UNEXPECTED_ELEMENT_CHILD,
				this.qname));
	
public java.lang.StringgetLocalName()
{@inheritDoc}

see
org.apache.lucene.gdata.gom.GOMXmlEntity#getLocalName()

		return this.localName;
	
public javax.xml.namespace.QNamegetQname()
{@inheritDoc}

see
org.apache.lucene.gdata.gom.GOMXmlEntity#getQname()


	    	 
	   
		return this.qname;
	
public java.lang.StringgetTextValue()
{@inheritDoc}

see
org.apache.lucene.gdata.gom.GOMXmlEntity#getTextValue()

		return this.textValue;
	
public java.lang.StringgetXmlBase()
{@inheritDoc}

see
org.apache.lucene.gdata.gom.GOMElement#getXmlBase()

		return this.xmlBase;
	
public java.lang.StringgetXmlLang()
{@inheritDoc}

see
org.apache.lucene.gdata.gom.GOMElement#getXmlLang()


		return this.xmlLang;
	
protected java.util.ListgetXmlNamespaceAttributes()

		List<GOMAttribute> retVal = new LinkedList<GOMAttribute>();
		if (this.xmlBase != null)
			retVal.add(new GOMAttributeImpl(GOMNamespace.XML_NS_URI,
					GOMNamespace.XML_NS_PREFIX, "base", this.xmlBase));
		if (this.xmlLang != null)
			retVal.add(new GOMAttributeImpl(GOMNamespace.XML_NS_URI,
					GOMNamespace.XML_NS_PREFIX, "lang", this.xmlLang));
		return retVal;

	
public voidprocessAttribute(javax.xml.namespace.QName aQName, java.lang.String aValue)
{@inheritDoc}

see
org.apache.lucene.gdata.gom.core.AtomParser#processAttribute(javax.xml.namespace.QName, java.lang.String)

		if (aQName == null)
			throw new GDataParseException("QName must not be null");
		if (aQName.getNamespaceURI().equals(GOMNamespace.XML_NS_URI)) {
			if (aQName.getLocalPart().equals(XML_BASE))
				this.xmlBase = aValue;
			else if (aQName.getLocalPart().equals(XML_LANG))
				this.xmlLang = aValue;

		} else {
			GOMAttributeImpl impl = new GOMAttributeImpl(aQName
					.getNamespaceURI(), aQName.getPrefix(), aQName
					.getLocalPart(), aValue);
			this.addAttribute(impl);
		}

	
public voidprocessElementValue(java.lang.String aValue)
{@inheritDoc}

see
org.apache.lucene.gdata.gom.core.AtomParser#processElementValue(java.lang.String)

		throw new GDataParseException(String.format(UNEXPECTED_ELEMENT_VALUE,
				this.qname));
	
public voidprocessEndElement()
{@inheritDoc}

see
org.apache.lucene.gdata.gom.core.AtomParser#processEndElement()

		// no post processing

	
public voidsetLocalName(java.lang.String aLocalName)
{@inheritDoc}

see
org.apache.lucene.gdata.gom.GOMXmlEntity#setLocalName(java.lang.String)

		// must override
	
public voidsetNamespacePrefix(java.lang.String aString)
{@inheritDoc}

see
org.apache.lucene.gdata.gom.GOMXmlEntity#setNamespacePrefix(java.lang.String)

		this.nsPrefix = aString;
	
public voidsetNamespaceUri(java.lang.String aString)
{@inheritDoc}

see
org.apache.lucene.gdata.gom.GOMXmlEntity#setNamespaceUri(java.lang.String)

		this.nsUri = aString;

	
public voidsetTextValue(java.lang.String aTextValue)
{@inheritDoc}

see
org.apache.lucene.gdata.gom.GOMXmlEntity#setTextValue(java.lang.String)

		this.textValue = aTextValue;

	
public voidwriteRssOutput(org.apache.lucene.gdata.gom.writer.GOMOutputWriter aStreamWriter, java.lang.String aRssName)
{@inheritDoc}

see
org.apache.lucene.gdata.gom.GOMElement#writeRssOutput(org.apache.lucene.gdata.gom.writer.GOMStaxWriter, java.lang.String)