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

GOMPersonImpl

public class GOMPersonImpl extends AbstractGOMElement implements org.apache.lucene.gdata.gom.GOMPerson
author
Simon Willnauer

Fields Summary
private static final String
NAME_LOCAL_NAME
private static final String
EMAIL_LOCAL_NAME
private static final String
URI_LOCAL_NAME
protected String
uri
protected String
email
protected String
name
Constructors Summary
public GOMPersonImpl()


	 	 
	  
		super();
		this.localName = LOCALNAME;
		this.qname = new QName(GOMNamespace.ATOM_NS_URI, this.localName);

	
Methods Summary
public AtomParsergetChildParser(javax.xml.namespace.QName aName)

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

		if (aName == null)
			throw new GDataParseException("QName must not be null");
		if (aName.getNamespaceURI().equals(GOMNamespace.ATOM_NS_URI)) {
			if (aName.getLocalPart().equals(NAME_LOCAL_NAME))
				return this.new NameParser();
			if (aName.getLocalPart().equals(URI_LOCAL_NAME))
				return this.new UriParser();
			if (aName.getLocalPart().equals(EMAIL_LOCAL_NAME))
				return this.new EmailParser();
		}
		return super.getChildParser(aName);
	
public java.lang.StringgetEmail()

see
org.apache.lucene.gdata.gom.GOMPerson#getEmail()

		return this.email;
	
public java.lang.StringgetName()

see
org.apache.lucene.gdata.gom.GOMPerson#getName()


		return this.name;
	
public java.lang.StringgetUri()

see
org.apache.lucene.gdata.gom.GOMPerson#getUri()


		return this.uri;
	
public voidprocessEndElement()

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

		if (this.name == null)
			throw new GDataParseException(String.format(
					AtomParser.MISSING_ELEMENT_CHILD, this.localName,
					NAME_LOCAL_NAME));
	
public voidsetEmail(java.lang.String aEmail)

see
org.apache.lucene.gdata.gom.GOMPerson#setEmail(java.lang.String)

		this.email = aEmail;
	
public voidsetName(java.lang.String aName)

see
org.apache.lucene.gdata.gom.GOMPerson#setName(java.lang.String)

		this.name = aName;

	
public voidsetUri(java.lang.String aUri)

see
org.apache.lucene.gdata.gom.GOMPerson#setUri(java.lang.String)

		this.uri = aUri;
	
public voidwriteAtomOutput(org.apache.lucene.gdata.gom.writer.GOMOutputWriter aStreamWriter)

see
org.apache.lucene.gdata.gom.GOMElement#writeAtomOutput(org.apache.lucene.gdata.gom.writer.GOMStaxWriter)

		if (aStreamWriter == null)
			throw new GDataParseException("GOMWriter must not be null");
		List<GOMAttribute> list = getXmlNamespaceAttributes();
		if (this.xmlLang != null) {
			list = new ArrayList<GOMAttribute>(1);
			list.add(GOMUtils
					.buildXMLNamespaceAttribute(this.xmlLang, XML_LANG));
		}
		aStreamWriter.writeStartElement(this.qname, list);
		aStreamWriter.writeSimpleXMLElement(NAME_LOCAL_NAME, this.name, null);
		if (this.email != null)
			aStreamWriter.writeSimpleXMLElement(EMAIL_LOCAL_NAME, this.email,
					null);
		if (this.uri != null)
			aStreamWriter.writeSimpleXMLElement(URI_LOCAL_NAME, this.uri, null);

		aStreamWriter.writeEndElement();

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

see
org.apache.lucene.gdata.gom.core.AbstractGOMElement#writeRssOutput(org.apache.lucene.gdata.gom.writer.GOMOutputWriter, java.lang.String)

		if (aStreamWriter == null)
			throw new GDataParseException("GOMWriter must not be null");
		StringBuilder builder = new StringBuilder("");
		if (this.email != null)
			builder.append(this.email);
		if (this.name != null)
			builder.append("(").append(this.name).append(")");
		aStreamWriter.writeSimpleXMLElement(aRssName,
				getXmlNamespaceAttributes(), builder.toString());

	
public voidwriteRssOutput(org.apache.lucene.gdata.gom.writer.GOMOutputWriter aStreamWriter)

see
org.apache.lucene.gdata.gom.GOMElement#writeRssOutput(org.apache.lucene.gdata.gom.writer.GOMStaxWriter)

		//