Methods Summary |
---|
public java.util.List | getAttributes()this method will never return null
return this.attributes;
|
public AtomParser | getChildParser(javax.xml.namespace.QName aName){@inheritDoc}
if (aName == null)
throw new GDataParseException("QName must not be null");
/*
* either a text value or a child
*/
if (this.textValue != null)
throw new GDataParseException(String.format(
AtomParser.UNEXPECTED_ELEMENT_CHILD, this.localName));
GOMElement element = new ArbitraryGOMXml(aName);
this.children.add(element);
return element;
|
public java.util.List | getChildren()this method will never return null
return this.children;
|
public void | processAttribute(javax.xml.namespace.QName aQName, java.lang.String aValue){@inheritDoc}
if (aQName == null)
throw new GDataParseException("QName must not be null");
GOMAttributeImpl impl = new GOMAttributeImpl(aQName.getNamespaceURI(),
aQName.getPrefix(), aQName.getLocalPart(), aValue);
this.attributes.add(impl);
|
public void | processElementValue(java.lang.String aValue){@inheritDoc}
if (aValue == null)
throw new GDataParseException("Element value must not be null");
/*
* either a text value or a child
*/
if (this.children.size() > 0)
throw new GDataParseException(String.format(
AtomParser.UNEXPECTED_ELEMENT_VALUE, this.localName));
if (this.textValue != null)
throw new GDataParseException(String.format(
AtomParser.UNEXPECTED_ELEMENT_VALUE, this.localName));
this.textValue = aValue;
|
public void | writeAtomOutput(org.apache.lucene.gdata.gom.writer.GOMOutputWriter aStreamWriter){@inheritDoc}
if (aStreamWriter == null)
throw new NullPointerException("StreamWriter is null");
aStreamWriter.writeStartElement(this.qname, this.attributes);
if (this.textValue == null) {
for (GOMElement element : this.children) {
element.writeAtomOutput(aStreamWriter);
}
} else {
aStreamWriter.writeContent(this.textValue);
}
aStreamWriter.writeEndElement();
|
public void | writeRssOutput(org.apache.lucene.gdata.gom.writer.GOMOutputWriter aStreamWriter){@inheritDoc}
// delegate it by default
this.writeAtomOutput(aStreamWriter);
|