Skip to content

armgit / solr

Public Imported from GitHub
0

Apache Solr open-source search software

Initial Revision GData Object Model GOM is a GData object representation for render, parse and manipulate GData Feeds (RSS/ATOM)

Simon Willnauer3bd4a1671166
diff --git a/contrib/gdata-server/src/gom/java/org/apache/lucene/gdata/gom/AtomMediaType.java b/contrib/gdata-server/src/gom/java/org/apache/lucene/gdata/gom/AtomMediaType.java
new file mode 100644
index 00000000000..a030cfde9ee
--- /dev/null
+++ b/contrib/gdata-server/src/gom/java/org/apache/lucene/gdata/gom/AtomMediaType.java
@@ -0,0 +1,40 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.lucene.gdata.gom;
+
+/**
+ * Describes an abstraction of a mime-type used to define the content of a
+ * atom:content element. This could be every possible mimetype but has to match
+ * this ".+/.+" Pattern.
+ *
+ * @author Simon Willnauer
+ *
+ */
+public enum AtomMediaType {
+ /**
+ * A xml media type (mime-type)
+ */
+ XML,
+ /**
+ *A text but no xml media type (mime-type)
+ */
+ TEXT,
+ /**
+ * A binary media type (mime-type)
+ */
+ BINARY
+}
diff --git a/contrib/gdata-server/src/gom/java/org/apache/lucene/gdata/gom/ContentType.java b/contrib/gdata-server/src/gom/java/org/apache/lucene/gdata/gom/ContentType.java
new file mode 100644
index 00000000000..38101a92692
--- /dev/null
+++ b/contrib/gdata-server/src/gom/java/org/apache/lucene/gdata/gom/ContentType.java
@@ -0,0 +1,45 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.lucene.gdata.gom;
+
+/**
+ * Atom e.g. feed element can contain text, html and xhtml content as character
+ * values
+ *
+ * @author Simon Willnauer
+ *
+ */
+public enum ContentType {
+ /**
+ * GOM content type text
+ */
+ TEXT,
+ /**
+ * GOM content type XHTML
+ */
+ XHTML,
+ /**
+ * GOM content type HTML
+ */
+ HTML,
+
+ /**
+ * GOM atom media type
+ * @see AtomMediaType
+ */
+ ATOM_MEDIA_TYPE
+}
diff --git a/contrib/gdata-server/src/gom/java/org/apache/lucene/gdata/gom/GOMAttribute.java b/contrib/gdata-server/src/gom/java/org/apache/lucene/gdata/gom/GOMAttribute.java
new file mode 100644
index 00000000000..1a0ed0aef4e
--- /dev/null
+++ b/contrib/gdata-server/src/gom/java/org/apache/lucene/gdata/gom/GOMAttribute.java
@@ -0,0 +1,35 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.lucene.gdata.gom;
+
+/**
+ * This class is a object representation of a XML Attribute used in the
+ * GO-Model.
+ *
+ * @author Simon Willnauer
+ *
+ */
+public interface GOMAttribute extends GOMXmlEntity {
+
+ /**
+ *
+ * @return <code>true</code> if and only if this attribute has the default
+ * namespace, otherwise <code>false</code>
+ */
+ public abstract boolean hasDefaultNamespace();
+
+}
diff --git a/contrib/gdata-server/src/gom/java/org/apache/lucene/gdata/gom/GOMAuthor.java b/contrib/gdata-server/src/gom/java/org/apache/lucene/gdata/gom/GOMAuthor.java
new file mode 100644
index 00000000000..4473a09bb49
--- /dev/null
+++ b/contrib/gdata-server/src/gom/java/org/apache/lucene/gdata/gom/GOMAuthor.java
@@ -0,0 +1,36 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.lucene.gdata.gom;
+
+/**
+ * GOMAuthor elmement used in feed and entries as a representation of a atom:author element.
+ * The "atom:author" element is a Person construct that indicates the author of the entry or feed.
+ * <pre>
+ * atomAuthor =
+ * element atom:author { atomPersonConstruct }
+ * </pre>
+ * @see org.apache.lucene.gdata.gom.GOMPerson
+ * @author Simon Willnauer
+ *
+ */
+public interface GOMAuthor extends GOMPerson {
+ /**
+ * Atom 1.0 local name for the xml element
+ */
+ public static final String LOCALNAME = "author";
+
+}
diff --git a/contrib/gdata-server/src/gom/java/org/apache/lucene/gdata/gom/GOMCategory.java b/contrib/gdata-server/src/gom/java/org/apache/lucene/gdata/gom/GOMCategory.java
new file mode 100644
index 00000000000..8057555bb9e
--- /dev/null
+++ b/contrib/gdata-server/src/gom/java/org/apache/lucene/gdata/gom/GOMCategory.java
@@ -0,0 +1,100 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.lucene.gdata.gom;
+
+/**
+ *
+ * GOMCategory type<br>
+ * <p>
+ * The <b>"category"</b> element conveys information about a category
+ * associated with an entry or feed. This specification assigns no meaning to
+ * the content (if any) of this element.
+ * </p>
+ * <p>
+ * RelaxNG Schema:
+ * </p>
+ *
+ * <pre>
+ * atomCategory =
+ * element atom:category {
+ * atomCommonAttributes,
+ * attribute term { text },
+ * attribute scheme { atomUri }?,
+ * attribute label { text }?,
+ * undefinedContent
+ * }
+ * </pre>
+ *
+ *
+ * @author Simon Willnauer
+ *
+ */
+public interface GOMCategory extends GOMElement {
+ /**
+ * Atom local name for the xml element
+ */
+ public static final String LOCALNAME = "category";
+
+ /**
+ * Attribute name (attribute term { text })
+ */
+ public static final String TERM_ATTRIBUTE = "term";
+
+ /**
+ * Attribute name (attribute label { text })
+ */
+ public static final String LABLE_ATTRIBUTE = "label";
+
+ /**
+ * Attribute name (attribute scheme { atomUri })
+ */
+ public static final String SCHEME_ATTRIBUTE = "scheme";
+
+ /**
+ * @param aTerm -
+ * the attribute term { text }
+ */
+ public abstract void setTerm(String aTerm);
+
+ /**
+ * @param aLabel -
+ * the attribute lable { text }
+ */
+ public abstract void setLabel(String aLabel);
+
+ /**
+ * @param aScheme -
+ * the attribute scheme { atomUri }
+ */
+ public abstract void setScheme(String aScheme);
+
+ /**
+ * @return the attribute term { text }
+ */
+ public abstract String getTerm();
+
+ /**
+ * @return the attribute scheme { atomUri }
+ */
+ public abstract String getScheme();
+
+ /**
+ * @return the attribute lable { text }
+ */
+ public abstract String getLabel();
+
+}
diff --git a/contrib/gdata-server/src/gom/java/org/apache/lucene/gdata/gom/GOMContent.java b/contrib/gdata-server/src/gom/java/org/apache/lucene/gdata/gom/GOMContent.java
new file mode 100644
index 00000000000..8cbbc8ff901
--- /dev/null
+++ b/contrib/gdata-server/src/gom/java/org/apache/lucene/gdata/gom/GOMContent.java
@@ -0,0 +1,99 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.lucene.gdata.gom;
+
+/**
+ * <p>
+ * GOMContent represents the atom:content element.
+ * </p>
+ * The "atom:content" element either contains or links to the content of the
+ * entry. The content of atom:content is Language-Sensitive.
+ *
+ * <pre>
+ * atomInlineTextContent =
+ * element atom:content {
+ * atomCommonAttributes,
+ * attribute type { &quot;text&quot; | &quot;html&quot; }?,
+ * (text)*
+ * }
+ *
+ * atomInlineXHTMLContent =
+ * element atom:content {
+ * atomCommonAttributes,
+ * attribute type { &quot;xhtml&quot; },
+ * xhtmlDiv
+ * }
+ *
+ * atomInlineOtherContent =
+ * element atom:content {
+ * atomCommonAttributes,
+ * attribute type { atomMediaType }?,
+ * (text|anyElement)*
+ * }
+ *
+ *
+ * atomOutOfLineContent =
+ * element atom:content {
+ * atomCommonAttributes,
+ * attribute type { atomMediaType }?,
+ * attribute src { atomUri },
+ * empty
+ * }
+ *
+ * atomContent = atomInlineTextContent
+ * | atomInlineXHTMLContent
+ *
+ * | atomInlineOtherContent
+ * | atomOutOfLineContent
+ * </pre>
+ *
+ * @author Simon Willnauer
+ * @see org.apache.lucene.gdata.gom.GOMTextConstruct
+ *
+ *
+ */
+public interface GOMContent extends GOMTextConstruct {
+ /**
+ * Atom local name for the xml element
+ */
+ public static final String LOCALNAME = "content";
+ /**
+ * RSS local name for the xml element
+ */
+ public static final String LOCAL_NAME_RSS = "description";
+ /**
+ * The src attribute value
+ * @return - the value of the src attribute
+ */
+ public abstract String getSrc();
+ /**
+ * The src attribute value
+ * @param aSrc - the src attribute value to set
+ */
+ public abstract void setSrc(String aSrc);
+ /**
+ * The contents abstract media type
+ * @param aMediaType -
+ */
+ public abstract void setAtomMediaType(AtomMediaType aMediaType);
+
+ /**
+ * @return - the atom media type of the content element
+ * @see AtomMediaType
+ */
+ public abstract AtomMediaType getAtomMediaType();
+}
diff --git a/contrib/gdata-server/src/gom/java/org/apache/lucene/gdata/gom/GOMContributor.java b/contrib/gdata-server/src/gom/java/org/apache/lucene/gdata/gom/GOMContributor.java
new file mode 100644
index 00000000000..9eac1605e6d
--- /dev/null
+++ b/contrib/gdata-server/src/gom/java/org/apache/lucene/gdata/gom/GOMContributor.java
@@ -0,0 +1,35 @@
+/**
+ * contributor license agreements. See the NOTICE file distributed with
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.lucene.gdata.gom;
+
+/**
+ * The "atom:contributor" element is a Person construct that indicates a person
+ * or other entity who contributed to the entry or feed.
+ *
+ * <pre>
+ * atomContributor = element atom:contributor { atomPersonConstruct }
+ * </pre>
+ *
+ * @author Simon Willnauer
+ *
+ */
+public interface GOMContributor extends GOMPerson {
+ /**
+ * Atom 1.0 local name for the xml element
+ */
+ public static final String LOCALNAME = "contributor";
+}
diff --git a/contrib/gdata-server/src/gom/java/org/apache/lucene/gdata/gom/GOMDateConstruct.java b/contrib/gdata-server/src/gom/java/org/apache/lucene/gdata/gom/GOMDateConstruct.java
new file mode 100644
index 00000000000..79875bd4e32
--- /dev/null
+++ b/contrib/gdata-server/src/gom/java/org/apache/lucene/gdata/gom/GOMDateConstruct.java
@@ -0,0 +1,77 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.lucene.gdata.gom;
+
+import java.util.Date;
+
+/**
+ *
+ * <P>
+ * GOMDateConstruct is a base interface for several concrete DateConstruct
+ * implementations like {@link org.apache.lucene.gdata.gom.GOMUpdated} or
+ * {@link org.apache.lucene.gdata.gom.GOMPublished}
+ * </p>
+ * <p>
+ * A Date construct is an element whose content MUST conform to the "date-time"
+ * production in [RFC3339]. In addition, an uppercase "T" character MUST be used
+ * to separate date and time, and an uppercase "Z" character MUST be present in
+ * the absence of a numeric time zone offset.
+ *
+ * <pre>
+ * atomDateConstruct = atomCommonAttributes, xsd:dateTime
+ * </pre>
+ *
+ * Such date values happen to be compatible with the following specifications:
+ * [ISO.8601.1988], [W3C.NOTE-datetime-19980827], and
+ * [W3C.REC-xmlschema-2-20041028].
+ * </p>
+ * <p>
+ * Example Date constructs:
+ *
+ * <pre>
+ * &lt;updated&gt;2003-12-13T18:30:02Z&lt;/updated&gt;
+ *
+ * &lt;updated&gt;2003-12-13T18:30:02.25Z&lt;/updated&gt;
+ * &lt;updated&gt;2003-12-13T18:30:02+01:00&lt;/updated&gt;
+ * &lt;updated&gt;2003-12-13T18:30:02.25+01:00&lt;/updated&gt;
+ * </pre>
+ *
+ * Date values SHOULD be as accurate as possible. For example, it would be
+ * generally inappropriate for a publishing system to apply the same timestamp
+ * to several entries that were published during the course of a single day.
+ * </p>
+ *
+ * @author Simon Willnauer
+ *
+ * @see org.apache.lucene.gdata.gom.GOMUpdated
+ * @see org.apache.lucene.gdata.gom.GOMPublished
+ */
+public abstract interface GOMDateConstruct extends GOMElement {
+ /**
+ *
+ * @param date -
+ * the date to set
+ */
+ public abstract void setDate(Date date);
+
+ /**
+ *
+ * @return - the date object, if no date has been set this method will
+ * return a <code>new Date(0)</code> date object
+ */
+ public abstract Date getDate();
+}
diff --git a/contrib/gdata-server/src/gom/java/org/apache/lucene/gdata/gom/GOMDocument.java b/contrib/gdata-server/src/gom/java/org/apache/lucene/gdata/gom/GOMDocument.java
new file mode 100644
index 00000000000..e895dc878cb
--- /dev/null
+++ b/contrib/gdata-server/src/gom/java/org/apache/lucene/gdata/gom/GOMDocument.java
@@ -0,0 +1,110 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.lucene.gdata.gom;
+
+import javax.xml.stream.XMLStreamException;
+
+import org.apache.lucene.gdata.gom.writer.GOMOutputWriter;
+
+/**
+ * <p>
+ * GOMDocument acts as a container for GOMElements to render the containing
+ * GOMElement as a valid xml document. This class renderes the
+ *
+ * <pre>
+ * &lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
+ * </pre>
+ *
+ * header to the outputstream before the containing element will be rendered.
+ * </p>
+ *
+ * @author Simon Willnauer
+ *
+ * @param <T>
+ */
+public interface GOMDocument<T extends GOMElement> {
+ /**
+ * setter for the root element of the xml e.g GOMDocument
+ *
+ * @param aRootElement -
+ * the root element to set
+ */
+ public abstract void setRootElement(T aRootElement);
+
+ /**
+ * Getter for the root element of the xml e.g GOMDocument
+ *
+ * @return - the root elmenent
+ */
+ public abstract T getRootElement();
+
+ /**
+ * Sets the xml version
+ *
+ * @param aVersion -
+ * the version string
+ */
+ public abstract void setVersion(String aVersion);
+
+ /**
+ * Gets the xml version
+ *
+ * @return - the xml version string
+ */
+ public abstract String getVersion();
+
+ /**
+ * Gets the xml charset encoding
+ *
+ * @return - the specified char encoding
+ */
+ public abstract String getCharacterEncoding();
+
+ /**
+ * Sets the xml charset encoding
+ *
+ * @param aEncoding -
+ * the charset encoding to set
+ */
+ public abstract void setCharacterEncoding(String aEncoding);
+
+ /**
+ * Generates a complete xml document starting with the header followed by
+ * the output of the specified root element in the ATOM 1.0 formate.
+ *
+ * @param aStreamWriter -
+ * the {@link GOMOutputWriter} implementation to write the output
+ * @throws XMLStreamException -
+ * if the {@link GOMOutputWriter} throws an exception
+ */
+ public abstract void writeAtomOutput(final GOMOutputWriter aStreamWriter)
+ throws XMLStreamException;
+
+ /**
+ *
+ * Generates a complete xml document starting with the header followed by
+ * the output of the specified root element in the RSS 2.0 formate.
+ *
+ * @param aStreamWriter -
+ * the {@link GOMOutputWriter} implementation to write the output
+ * @throws XMLStreamException -
+ * if the {@link GOMOutputWriter} throws an exception
+ */
+ public abstract void writeRssOutput(final GOMOutputWriter aStreamWriter)
+ throws XMLStreamException;
+
+}
diff --git a/contrib/gdata-server/src/gom/java/org/apache/lucene/gdata/gom/GOMElement.java b/contrib/gdata-server/src/gom/java/org/apache/lucene/gdata/gom/GOMElement.java
new file mode 100644
index 00000000000..83495abcf21
--- /dev/null
+++ b/contrib/gdata-server/src/gom/java/org/apache/lucene/gdata/gom/GOMElement.java
@@ -0,0 +1,92 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.lucene.gdata.gom;
+
+import javax.xml.stream.XMLStreamException;
+
+import org.apache.lucene.gdata.gom.core.AtomParser;
+import org.apache.lucene.gdata.gom.writer.GOMOutputWriter;
+
+/**
+ * Abstract interface which should be assignable from all classes representing
+ * xml elements within the GData Object Model.
+ *
+ * @author Simon Willnauer
+ *
+ */
+public abstract interface GOMElement extends GOMXmlEntity, AtomParser {
+ /**
+ * <code>xml:lang</code> attribute localpart
+ */
+ public static final String XML_LANG = "lang";
+
+ /**
+ * <code>xml:base</code> attribute localpart
+ */
+ public static final String XML_BASE = "base";
+
+ /**
+ *
+ * @return the xml:base attribute value
+ */
+ public abstract String getXmlBase();
+
+ /**
+ *
+ * @return the xml:lang attribute value
+ */
+ public abstract String getXmlLang();
+
+ /**
+ * Generates the xml element represented by this class in the ATOM 1.0
+ * formate.
+ *
+ * @param aStreamWriter -
+ * the {@link GOMOutputWriter} implementation to write the output
+ * @throws XMLStreamException -
+ * if the {@link GOMOutputWriter} throws an exception
+ */
+ public abstract void writeAtomOutput(final GOMOutputWriter aStreamWriter)
+ throws XMLStreamException;
+
+ /**
+ * Generates the xml element represented by this class in the RSS 2.0
+ * formate.
+ *
+ * @param aStreamWriter -
+ * the {@link GOMOutputWriter} implementation to write the output
+ * @throws XMLStreamException -
+ * if the {@link GOMOutputWriter} throws an exception
+ */
+ public abstract void writeRssOutput(final GOMOutputWriter aStreamWriter)
+ throws XMLStreamException;
+
+ /**
+ * Generates the xml element represented by this class in the RSS 2.0
+ * formate using the parameter rssName as the element local name
+ *
+ * @param rssName -
+ * the local name to render the element
+ * @param aStreamWriter -
+ * the {@link GOMOutputWriter} implementation to write the output
+ * @throws XMLStreamException -
+ * if the {@link GOMOutputWriter} throws an exception
+ */
+ public abstract void writeRssOutput(final GOMOutputWriter aStreamWriter,
+ String rssName) throws XMLStreamException;
+
+}
diff --git a/contrib/gdata-server/src/gom/java/org/apache/lucene/gdata/gom/GOMEntry.java b/contrib/gdata-server/src/gom/java/org/apache/lucene/gdata/gom/GOMEntry.java
new file mode 100644
index 00000000000..56903cb6a8b
--- /dev/null
+++ b/contrib/gdata-server/src/gom/java/org/apache/lucene/gdata/gom/GOMEntry.java
@@ -0,0 +1,255 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.lucene.gdata.gom;
+
+import java.util.List;
+
+/**
+ *
+ * <p>
+ * The GOMEntry class represents a "atom:entry" element in the GData Object
+ * Model.
+ * </p>
+ * <p>
+ * The "atom:entry" element represents an individual entry, acting as a
+ * container for metadata and data associated with the entry. This element can
+ * appear as a child of the atom:feed element, or it can appear as the document
+ * (i.e., top-level) element of a stand-alone Atom Entry Document.
+ * </p>
+ * <p>
+ * RelaxNG Schema:
+ * </p>
+ *
+ * <pre>
+ * atomEntry =
+ * element atom:entry {
+ * atomCommonAttributes,
+ * ( atomAuthor*
+ * &amp; atomCategory*
+ * &amp; atomContent?
+ * &amp; atomContributor*
+ * &amp; atomId
+ * &amp; atomLink*
+ * &amp; atomPublished?
+ * &amp; atomRights?
+ * &amp; atomSource?
+ * &amp; atomSummary?
+ * &amp; atomTitle
+ * &amp; atomUpdated
+ * &amp; extensionElement*)
+ * }
+ * </pre>
+ *
+ * @author Simon Willnauer
+ *
+ */
+public interface GOMEntry extends GOMXmlEntity, GOMElement, GOMExtensible {
+ /**
+ * Atom 1.0 local name for the xml element
+ */
+ public static final String LOCALNAME = "entry";
+
+ /**
+ * RSS 2.0 local name for the xml element
+ */
+ public static final String LOCALNAME_RSS = "item";
+
+ /**
+ * @param aAuthor -
+ * a author to add
+ * @see GOMAuthor
+ */
+ public abstract void addAuthor(GOMAuthor aAuthor);
+
+ /**
+ * @param aCategory -
+ * a category to add
+ * @see GOMCategory
+ */
+ public abstract void addCategory(GOMCategory aCategory);
+
+ /**
+ * @param aContributor -
+ * a contributor to add
+ * @see GOMContributor
+ */
+ public abstract void addContributor(GOMContributor aContributor);
+
+ /**
+ * @param aLink -
+ * a link to add
+ * @see GOMLink
+ */
+ public abstract void addLink(GOMLink aLink);
+
+ /**
+ * @return - the entry author
+ * @see GOMAuthor
+ */
+ public abstract List<GOMAuthor> getAuthors();
+
+ /**
+ *
+ * This method returns all categories and will never return<code>null</code>
+ *
+ * @return - a list of categories
+ * @see GOMCategory
+ */
+ public abstract List<GOMCategory> getCategories();
+
+ /**
+ *
+ * This method returns all contributors and will never return<code>null</code>
+ *
+ * @return - a list of contributors
+ * @see GOMContributor
+ */
+ public abstract List<GOMContributor> getContributor();
+
+ /**
+ * @return - the feed id
+ * @see GOMId
+ */
+ public abstract GOMId getId();
+
+ /**
+ * @param aId -
+ * the entry id
+ * @see GOMId
+ */
+ public abstract void setId(GOMId aId);
+
+ /**
+ * @return - the entry rights
+ * @see GOMRights
+ */
+ public abstract GOMRights getRights();
+
+ /**
+ * @param aRights -
+ * the GOMRights to set
+ * @see GOMRights
+ */
+ public abstract void setRights(GOMRights aRights);
+
+ /**
+ * @return - the entries title
+ * @see GOMTitle
+ */
+ public abstract GOMTitle getTitle();
+
+ /**
+ * @param aTitle -
+ * the title to set
+ * @see GOMTitle
+ */
+ public abstract void setTitle(GOMTitle aTitle);
+
+ /**
+ * @return - the last updated element
+ * @see GOMUpdated
+ */
+ public abstract GOMUpdated getUpdated();
+
+ /**
+ * @param aUpdated -
+ * the updated element to set
+ * @see GOMUpdated
+ */
+ public abstract void setUpdated(GOMUpdated aUpdated);
+
+ /**
+ *
+ * This method returns all links and will never return<code>null</code>
+ *
+ * @return - a list of links
+ * @see GOMLink
+ */
+ public abstract List<GOMLink> getLinks();
+
+ /**
+ * @param aSummary -
+ * a summary to set
+ * @see GOMSummary
+ */
+ public abstract void setSummary(GOMSummary aSummary);
+
+ /**
+ * @return - the summary
+ * @see GOMSummary
+ */
+ public abstract GOMSummary getSummary();
+
+ /**
+ * @param aSource -
+ * the source to set
+ * @see GOMSource
+ */
+ public abstract void setSource(GOMSource aSource);
+
+ /**
+ * @return - the entry source
+ * @see GOMSource
+ */
+ public abstract GOMSource getSource();
+
+ /**
+ * @param aPublished -
+ * the published element to set
+ * @see GOMPublished
+ */
+ public abstract void setPublished(GOMPublished aPublished);
+
+ /**
+ * @return - the published element
+ * @see GOMPublished
+ */
+ public abstract GOMPublished getPublished();
+
+ /**
+ * @return - the content element
+ * @see GOMContent
+ */
+ public abstract GOMContent getContent();
+
+ /**
+ * @param content -
+ * the content to set
+ * @see GOMContent
+ */
+ public abstract void setContent(GOMContent content);
+
+ /**
+ * @param aNamespace -
+ * a Namespace to add
+ * @see GOMNamespace
+ */
+ public abstract void addNamespace(GOMNamespace aNamespace);
+
+ /**
+ * @return - list of all namespaces - will never be null
+ * @see GOMNamespace
+ */
+ public abstract List<GOMNamespace> getNamespaces();
+
+ /**
+ * @return - the default namespace
+ * @see GOMNamespace
+ */
+ public abstract GOMNamespace getDefaultNamespace();
+
+}
diff --git a/contrib/gdata-server/src/gom/java/org/apache/lucene/gdata/gom/GOMExtensible.java b/contrib/gdata-server/src/gom/java/org/apache/lucene/gdata/gom/GOMExtensible.java
new file mode 100644
index 00000000000..1bd4c38011f
--- /dev/null
+++ b/contrib/gdata-server/src/gom/java/org/apache/lucene/gdata/gom/GOMExtensible.java
@@ -0,0 +1,55 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.lucene.gdata.gom;
+
+import java.util.List;
+
+import org.apache.lucene.gdata.gom.core.extension.GOMExtensionFactory;
+
+/**
+ * <p>
+ * The Gdata Object Model describes an abstract object model for the gdata
+ * protocol. GData is supposed to be very flexible and extensible. Users should
+ * be able to extend {@link org.apache.lucene.gdata.gom.GOMFeed} and
+ * {@link org.apache.lucene.gdata.gom.GOMEntry} elements to create extensions
+ * and custom classes for their own model.
+ * </p>
+ *
+ * <p>
+ * This interface describes the extensible GOM entities.
+ * </p>
+ *
+ * @author Simon Willnauer
+ * @see org.apache.lucene.gdata.gom.GOMFeed
+ * @see org.apache.lucene.gdata.gom.GOMEntry
+ *
+ */
+public interface GOMExtensible {
+ //TODO add setter!
+ //TODO add how to
+ /**
+ * @return - a list of all extensions specified to the extended element
+ */
+ public List<GOMExtension> getExtensions();
+
+ /**
+ *
+ * @param factory - the extension factory to set
+ */
+ public void setExtensionFactory(GOMExtensionFactory factory);
+
+}
diff --git a/contrib/gdata-server/src/gom/java/org/apache/lucene/gdata/gom/GOMExtension.java b/contrib/gdata-server/src/gom/java/org/apache/lucene/gdata/gom/GOMExtension.java
new file mode 100644
index 00000000000..dbfc50a0c42
--- /dev/null
+++ b/contrib/gdata-server/src/gom/java/org/apache/lucene/gdata/gom/GOMExtension.java
@@ -0,0 +1,36 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.lucene.gdata.gom;
+
+/**
+ * The GData Object Model is like the Google Data Api highly extensible and
+ * offers a lot of base classes to extend as a {@link GOMExtension}. All
+ * extensions returned by
+ * {@link org.apache.lucene.gdata.gom.core.extension.GOMExtensionFactory#canHandleExtensionElement(QName)}
+ * must implement this interface. <br>
+ * GOM extensions can either be created via the
+ * {@link org.apache.lucene.gdata.gom.core.extension.GOMExtensionFactory} or by
+ * subclassing either {@link org.apache.lucene.gdata.gom.GOMFeed} or
+ * {@link org.apache.lucene.gdata.gom.GOMEntry}.
+ *
+ * @author Simon Willnauer
+ * @see org.apache.lucene.gdata.gom.GOMExtensible
+ * @see org.apache.lucene.gdata.gom.core.extension.GOMExtensionFactory
+ */
+public interface GOMExtension extends GOMXmlEntity, GOMElement {
+
+}
diff --git a/contrib/gdata-server/src/gom/java/org/apache/lucene/gdata/gom/GOMFeed.java b/contrib/gdata-server/src/gom/java/org/apache/lucene/gdata/gom/GOMFeed.java
new file mode 100644
index 00000000000..20733c83d9e
--- /dev/null
+++ b/contrib/gdata-server/src/gom/java/org/apache/lucene/gdata/gom/GOMFeed.java
@@ -0,0 +1,130 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.lucene.gdata.gom;
+
+import java.util.List;
+
+/**
+ * Class representing the "atom:feed" element. The "atom:feed" element is the
+ * document (i.e., top-level) element of an Atom Feed Document, acting as a
+ * container for metadata and data associated with the feed. Its element
+ * children consist of metadata elements followed by zero or more atom:entry
+ * child elements.
+ *
+ * <pre>
+ * atom:feed {
+ * atomCommonAttributes,
+ * (atomAuthor* &amp; atomCategory* &amp;
+ * atomContributor* &amp;
+ * atomGenerator? &amp; atomIcon? &amp;
+ * atomId &amp;
+ * atomLink* &amp;
+ * atomLogo? &amp;
+ * atomRights? &amp;
+ * atomSubtitle? &amp;
+ * atomTitle &amp;
+ * atomUpdated &amp;
+ * extensionElement*),
+ * atomEntry* }
+ * </pre>
+ *
+ *
+ * @author Simon Willnauer
+ * @see org.apache.lucene.gdata.gom.GOMExtensible
+ * @see org.apache.lucene.gdata.gom.GOMExtension
+ * @see org.apache.lucene.gdata.gom.GOMDocument
+ */
+public interface GOMFeed extends GOMSource, GOMExtensible {
+ /**
+ * Atom local name for the xml element
+ */
+ public static final String LOCALNAME = "feed";
+
+ /**
+ * RSS local name for the xml element
+ */
+ public static final String LOCALNAME_RSS = "rss";
+
+ /**
+ * RSS channel localname as Rss starts with
+ *
+ * <pre>
+ * &lt;rss&gt;&lt;channel&gt;
+ * </pre>
+ */
+ public static final String RSS_CHANNEL_ELEMENT_NAME = "channel";
+
+ /**
+ * this class can contain namespaces which will be rendered into the start
+ * element.
+ *
+ * <pre>
+ * &lt;feed xmlns:myNs=&quot;someNamespace&quot;&gt;&lt;/feed&gt;
+ * </pre>
+ *
+ * @param aNamespace -
+ * a namespace to add
+ */
+ public void addNamespace(GOMNamespace aNamespace);
+
+ /**
+ * @return - all declared namespaces, excluding the default namespace, this
+ * method will never return <code>null</code>.
+ * @see GOMFeed#getDefaultNamespace()
+ */
+ public List<GOMNamespace> getNamespaces();
+
+ /**
+ *
+ * @return - a list of added entries, this method will never return
+ * <code>null</code>.
+ */
+ public List<GOMEntry> getEntries();
+
+ /**
+ * @return - the OpenSearch namespace element <i>itemsPerPage</i> text
+ * value.
+ */
+ public int getItemsPerPage();
+
+ /**
+ * @return - the OpenSearch namespace element <i>startIndex</i> text value.
+ */
+ public int getStartIndex();
+
+ /**
+ * @param aIndex -
+ * the OpenSearch namespace element <i>startIndex</i> text value
+ * as an integer.
+ */
+ public void setStartIndex(int aIndex);
+
+ /**
+ * @param aInt -
+ * the OpenSearch namespace element <i>itemsPerPage</i> text
+ * value as an integer.
+ */
+ public void setItemsPerPage(int aInt);
+
+ /**
+ *
+ * @return the default namespace - this will always be
+ * {@link GOMNamespace#ATOM_NAMESPACE}
+ */
+ public GOMNamespace getDefaultNamespace();
+
+}
diff --git a/contrib/gdata-server/src/gom/java/org/apache/lucene/gdata/gom/GOMGenerator.java b/contrib/gdata-server/src/gom/java/org/apache/lucene/gdata/gom/GOMGenerator.java
new file mode 100644
index 00000000000..a8ee0c09a4c
--- /dev/null
+++ b/contrib/gdata-server/src/gom/java/org/apache/lucene/gdata/gom/GOMGenerator.java
@@ -0,0 +1,70 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.lucene.gdata.gom;
+
+/**
+ * Class representing the "atom:generator" element. The "atom:generator"
+ * element's content identifies the agent used to generate a feed, for debugging
+ * and other purposes.
+ *
+ * <pre>
+ * atomGenerator = element atom:generator {
+ * atomCommonAttributes,
+ * attribute uri { atomUri }?,
+ * attribute version { text }?,
+ * text
+ * }
+ * </pre>
+ *
+ *
+ * @author Simon Willnauer
+ *
+ */
+public interface GOMGenerator extends GOMElement {
+ /**
+ * Atom local name for the xml element
+ */
+ public static final String LOCALNAME = "generator";
+
+ /**
+ * Sets the the atom:generator <i>uri</i> attribute value
+ *
+ * @param uri -
+ * the generator <i>uri</i> attribute value to set
+ */
+ public void setUri(String uri);
+
+ /**
+ * Sets the the atom:generator <i>version</i> attribute value
+ *
+ * @param version -
+ * the version value to set
+ */
+ public void setGeneratorVersion(String version);
+
+ /**
+ *
+ * @return - the atom:generator <i>version</i> attribute value
+ */
+ public String getGeneratorVersion();
+
+ /**
+ *
+ * @return - the atom:generator <i>uri</i> attribute value
+ */
+ public String getUri();
+}
diff --git a/contrib/gdata-server/src/gom/java/org/apache/lucene/gdata/gom/GOMIcon.java b/contrib/gdata-server/src/gom/java/org/apache/lucene/gdata/gom/GOMIcon.java
new file mode 100644
index 00000000000..35c58b4d57d
--- /dev/null
+++ b/contrib/gdata-server/src/gom/java/org/apache/lucene/gdata/gom/GOMIcon.java
@@ -0,0 +1,41 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.lucene.gdata.gom;
+
+/**
+ *
+ * Simple atom:icon element class. The "atom:icon" element's content is an IRI
+ * reference [RFC3987] that identifies an image that provides iconic visual
+ * identification for a feed.
+ *
+ * <pre>
+ * atomIcon = element atom:icon {
+ * atomCommonAttributes,
+ * (atomUri)
+ * }
+ * </pre>
+ *
+ * @author Simon Willnauer
+ *
+ */
+public interface GOMIcon extends GOMElement {
+ /**
+ * Atom local name for the xml element
+ */
+ String LOCALNAME = "icon";
+
+}
diff --git a/contrib/gdata-server/src/gom/java/org/apache/lucene/gdata/gom/GOMId.java b/contrib/gdata-server/src/gom/java/org/apache/lucene/gdata/gom/GOMId.java
new file mode 100644
index 00000000000..840613f5f49
--- /dev/null
+++ b/contrib/gdata-server/src/gom/java/org/apache/lucene/gdata/gom/GOMId.java
@@ -0,0 +1,45 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.lucene.gdata.gom;
+
+/**
+ *
+ * The "atom:id" element conveys a permanent, universally unique identifier for
+ * an entry or feed.
+ *
+ * <pre>
+ * atomId = element atom:id {
+ * atomCommonAttributes,
+ * (atomUri)
+ * }
+ * </pre>
+ *
+ * @author Simon Willnauer
+ *
+ */
+public interface GOMId extends GOMElement {
+ /**
+ * Atom local name for the xml element
+ */
+ public static final String LOCALNAME = "id";
+
+ /**
+ * RSS local name for the xml element
+ */
+ public static final String LOCALNAME_RSS = "uid";
+
+}
diff --git a/contrib/gdata-server/src/gom/java/org/apache/lucene/gdata/gom/GOMLink.java b/contrib/gdata-server/src/gom/java/org/apache/lucene/gdata/gom/GOMLink.java
new file mode 100644
index 00000000000..5c590054609
--- /dev/null
+++ b/contrib/gdata-server/src/gom/java/org/apache/lucene/gdata/gom/GOMLink.java
@@ -0,0 +1,113 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.lucene.gdata.gom;
+
+/**
+ * The "atom:link" element defines a reference from an entry or feed to a Web
+ * resource. This specification assigns no meaning to the content (if any) of
+ * this element.
+ *
+ * <pre>
+ * atomLink =
+ * element atom:link {
+ * atomCommonAttributes,
+ * attribute href { atomUri },
+ * attribute rel { atomNCName | atomUri }?,
+ * attribute type { atomMediaType }?,
+ * attribute hreflang { atomLanguageTag }?,
+ * attribute title { text }?,
+ * attribute length { text }?,
+ * undefinedContent
+ * }
+ * </pre>
+ *
+ * @author Simon Willnauer
+ *
+ */
+public interface GOMLink extends GOMElement {
+ /**
+ * Atom local name for the xml element
+ */
+ public static final String LOCALNAME = "link";
+
+ /**
+ * @return - the href attribute value of the element link
+ */
+ public String getHref();
+
+ /**
+ * @param aHref -
+ * the href attribute value of the element link to set.
+ */
+ public void setHref(String aHref);
+
+ /**
+ * @return the hreflang attribute value of the element link
+ */
+ public String getHrefLang();
+
+ /**
+ * @param aHrefLang -
+ * the hreflang attribute value of the element link to set.
+ */
+ public void setHrefLang(String aHrefLang);
+
+ /**
+ * @return - the length attribute value of the element link.
+ */
+ public Integer getLength();
+
+ /**
+ * @param aLength -
+ * the length attribute value of the element link to set.
+ */
+ public void setLength(Integer aLength);
+
+ /**
+ * @return - the rel attribute value of the element link.
+ */
+ public String getRel();
+
+ /**
+ * @param aRel -
+ * the rel attribute value of the element link to set
+ */
+ public void setRel(String aRel);
+
+ /**
+ * @return - the title attribute value of the element link.
+ */
+ public String getTitle();
+
+ /**
+ * @param aTitle -
+ * the title attribute value of the element link to set
+ */
+ public void setTitle(String aTitle);
+
+ /**
+ * @return - the type attribute value of the element link.
+ */
+ public String getType();
+
+ /**
+ * @param aType -
+ * the type attribute value of the element link.
+ */
+ public void setType(String aType);
+
+}
diff --git a/contrib/gdata-server/src/gom/java/org/apache/lucene/gdata/gom/GOMLogo.java b/contrib/gdata-server/src/gom/java/org/apache/lucene/gdata/gom/GOMLogo.java
new file mode 100644
index 00000000000..440b9afcc6c
--- /dev/null
+++ b/contrib/gdata-server/src/gom/java/org/apache/lucene/gdata/gom/GOMLogo.java
@@ -0,0 +1,42 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.lucene.gdata.gom;
+
+import org.apache.lucene.gdata.gom.GOMElement;
+
+// TODO add descrition
+/**
+ * Simple atom:logo element. The "atom:logo" element's content is an IRI
+ * reference [RFC3987] that identifies an image that provides visual
+ * identification for a feed.
+ *
+ * <pre>
+ * atomLogo = element atom:logo {
+ * atomCommonAttributes,
+ * (atomUri)
+ * </pre>
+ *
+ * @author Simon Willnauer
+ *
+ */
+public interface GOMLogo extends GOMElement {
+ /**
+ * Atom local name for the xml element
+ */
+ public static final String LOCALNAME = "logo";
+
+}
diff --git a/contrib/gdata-server/src/gom/java/org/apache/lucene/gdata/gom/GOMNamespace.java b/contrib/gdata-server/src/gom/java/org/apache/lucene/gdata/gom/GOMNamespace.java
new file mode 100644
index 00000000000..6cfa41d5a6b
--- /dev/null
+++ b/contrib/gdata-server/src/gom/java/org/apache/lucene/gdata/gom/GOMNamespace.java
@@ -0,0 +1,151 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.lucene.gdata.gom;
+
+/**
+ * A simple domain object to represent a xml namespace.
+ *
+ * @author Simon Willnauer
+ *
+ */
+public final class GOMNamespace {
+
+ /**
+ * XML namespace uri
+ */
+ public static final String XML_NS_URI = "http://www.w3.org/XML/1998/namespace";
+
+ /**
+ * XML namespace prefix
+ */
+ public static final String XML_NS_PREFIX = "xml";
+
+ /**
+ * Amazon "opensearch" namespace prefix
+ */
+ public static final String OPENSEARCH_NS_PREFIX = "openSearch";
+
+ /**
+ * Amazon "opensearch" namespace uri
+ */
+ public static final String OPENSEARCH_NS_URI = "http://a9.com/-/spec/opensearchrss/1.0/";
+
+ /**
+ * ATOM namespace uri
+ */
+ public static final String ATOM_NS_URI = "http://www.w3.org/2005/Atom";
+
+ /**
+ * ATOM namespace prefix
+ */
+ public static final String ATOM_NS_PREFIX = "atom";
+
+ /**
+ * ATOM namespace
+ */
+ public static final GOMNamespace ATOM_NAMESPACE = new GOMNamespace(
+ ATOM_NS_URI, ATOM_NS_PREFIX);
+
+ /**
+ * Amazon "opensearch" namespace
+ */
+ public static final GOMNamespace OPENSEARCH_NAMESPACE = new GOMNamespace(
+ OPENSEARCH_NS_URI, OPENSEARCH_NS_PREFIX);
+
+ private final String namespaceUri;
+
+ private final String namespacePrefix;
+
+ /**
+ * Class constructor for GOMNamespace
+ *
+ * @param aNamespaceUri -
+ * the namespace uri (must not be null)
+ * @param aNamespacePrefix -
+ * the namespace prefix (if null an empty string will be
+ * assigned)
+ *
+ */
+ public GOMNamespace(final String aNamespaceUri,
+ final String aNamespacePrefix) {
+ if (aNamespaceUri == null)
+ throw new IllegalArgumentException("uri must not be null");
+ this.namespacePrefix = aNamespacePrefix == null ? "" : aNamespacePrefix;
+ this.namespaceUri = aNamespaceUri;
+ }
+
+ /**
+ * @return Returns the namespacePrefix.
+ */
+ public String getNamespacePrefix() {
+ return this.namespacePrefix;
+ }
+
+ /**
+ * @return Returns the namespaceUri.
+ */
+ public String getNamespaceUri() {
+ return this.namespaceUri;
+ }
+
+ /**
+ * @see java.lang.Object#equals(java.lang.Object)
+ */
+ @Override
+ public boolean equals(Object arg0) {
+ if (arg0 == null)
+ return false;
+ if (arg0 == this)
+ return true;
+ if (arg0 instanceof GOMNamespace) {
+ GOMNamespace other = (GOMNamespace) arg0;
+ return this.namespacePrefix.equals(other.getNamespacePrefix())
+ && this.namespaceUri.equals(other.getNamespaceUri());
+ }
+ return false;
+ }
+
+ /**
+ * @see java.lang.Object#hashCode()
+ */
+ @Override
+ public int hashCode() {
+ /*
+ * The multiplier 37 was chosen because it is an odd prime. If it was
+ * even and the multiplication overflowed, information would be lost
+ * because multiplication by two is equivalent to shifting The value 17
+ * is arbitrary. see
+ * http://java.sun.com/developer/Books/effectivejava/Chapter3.pdf
+ */
+ int hash = 17;
+ hash = 37 * hash + this.namespacePrefix.hashCode();
+ hash = 37 * hash + this.namespaceUri.hashCode();
+ return hash;
+ }
+
+ /**
+ * @see java.lang.Object#toString()
+ */
+ @Override
+ public String toString() {
+ StringBuilder builder = new StringBuilder(this.getClass().getName());
+ builder.append(" uri: ").append(this.namespaceUri);
+ builder.append(" prefix: ").append(this.namespacePrefix);
+ return builder.toString();
+ }
+
+}
diff --git a/contrib/gdata-server/src/gom/java/org/apache/lucene/gdata/gom/GOMPerson.java b/contrib/gdata-server/src/gom/java/org/apache/lucene/gdata/gom/GOMPerson.java
new file mode 100644
index 00000000000..6fedc07f072
--- /dev/null
+++ b/contrib/gdata-server/src/gom/java/org/apache/lucene/gdata/gom/GOMPerson.java
@@ -0,0 +1,75 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.lucene.gdata.gom;
+
+
+/**
+ *
+ * GOMPerson type used for feed and entry authors and contributors. It may also
+ * be used by custom elements.
+ *
+ * <pre>
+ *
+ * atomPersonConstruct =
+ * atomCommonAttributes,
+ * (element atom:name { text }
+ * &amp; element atom:uri { atomUri }?
+ * &amp; element atom:email { atomEmailAddress }?
+ * &amp; extensionElement*)
+ * }
+ * </pre>
+ *
+ * @author Simon Willnauer
+ * @see org.apache.lucene.gdata.gom.GOMAuthor
+ */
+public interface GOMPerson extends GOMElement {
+ /**
+ * Atom local name for the xml element
+ */
+ public static final String LOCALNAME = "person";
+
+ /**
+ * @param aName - the person name value
+ */
+ public abstract void setName(String aName);
+
+ /**
+ * @param aEmail - the person email value
+ */
+ public abstract void setEmail(String aEmail);
+
+ /**
+ * @param uri - the person uri value
+ */
+ public abstract void setUri(String uri);
+
+ /**
+ * @return - the person name value
+ */
+ public abstract String getName();
+
+ /**
+ * @return - the person email value
+ */
+ public abstract String getEmail();
+
+ /**
+ * @return - the person uri value
+ */
+ public abstract String getUri();
+ // TODO needs extension possibility
+}
diff --git a/contrib/gdata-server/src/gom/java/org/apache/lucene/gdata/gom/GOMPublished.java b/contrib/gdata-server/src/gom/java/org/apache/lucene/gdata/gom/GOMPublished.java
new file mode 100644
index 00000000000..55036a84e62
--- /dev/null
+++ b/contrib/gdata-server/src/gom/java/org/apache/lucene/gdata/gom/GOMPublished.java
@@ -0,0 +1,38 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.lucene.gdata.gom;
+
+/**
+ *
+ * The "atom:published" element is a Date construct indicating an instant in
+ * time associated with an event early in the life cycle of the entry.
+ * Typically, atom:published will be associated with the initial creation or
+ * first availability of the resource.
+ *
+ * <pre>
+ * atomPublished = element atom:published { atomDateConstruct}
+ * </pre>
+ *
+ * @author Simon Willnauer
+ * @see org.apache.lucene.gdata.gom.GOMDateConstruct
+ */
+public interface GOMPublished extends GOMDateConstruct {
+ /**
+ * Atom local name for the xml element
+ */
+ public static final String LOCALNAME = "published";
+}
diff --git a/contrib/gdata-server/src/gom/java/org/apache/lucene/gdata/gom/GOMRights.java b/contrib/gdata-server/src/gom/java/org/apache/lucene/gdata/gom/GOMRights.java
new file mode 100644
index 00000000000..ff794c64957
--- /dev/null
+++ b/contrib/gdata-server/src/gom/java/org/apache/lucene/gdata/gom/GOMRights.java
@@ -0,0 +1,39 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.lucene.gdata.gom;
+
+import org.apache.lucene.gdata.gom.GOMElement;
+
+/**
+ *
+ * The "atom:rights" element is a Text construct that conveys information about
+ * rights held in and over an entry or feed. The atom:rights element SHOULD NOT
+ * be used to convey machine-readable licensing information.
+ *
+ * <pre>
+ * atomRights = element atom:rights { atomTextConstruct }
+ * </pre>
+ *
+ * @author Simon Willnauer
+ *
+ */
+public interface GOMRights extends GOMElement {
+ /**
+ * Atom local name for the xml element
+ */
+ public static final String LOCALNAME = "rights";
+}
diff --git a/contrib/gdata-server/src/gom/java/org/apache/lucene/gdata/gom/GOMSource.java b/contrib/gdata-server/src/gom/java/org/apache/lucene/gdata/gom/GOMSource.java
new file mode 100644
index 00000000000..2e1771176da
--- /dev/null
+++ b/contrib/gdata-server/src/gom/java/org/apache/lucene/gdata/gom/GOMSource.java
@@ -0,0 +1,120 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.lucene.gdata.gom;
+
+import java.util.List;
+
+/**
+ * If an atom:entry is copied from one feed into another feed, then the source
+ * atom:feed's metadata (all child elements of atom:feed other than the
+ * atom:entry elements) MAY be preserved within the copied entry by adding an
+ * atom:source child element, if it is not already present in the entry, and
+ * including some or all of the source feed's Metadata elements as the
+ * atom:source element's children. Such metadata SHOULD be preserved if the
+ * source atom:feed contains any of the child elements atom:author,
+ * atom:contributor, atom:rights, or atom:category and those child elements are
+ * not present in the source atom:entry.
+ *
+ * <pre>
+ * atomSource =
+ * element atom:source {
+ * atomCommonAttributes,
+ * (atomAuthor*
+ * &amp; atomCategory*
+ * &amp; atomContributor*
+ * &amp; atomGenerator?
+ * &amp; atomIcon?
+ * &amp; atomId?
+ * &amp; atomLink*
+ * &amp; atomLogo?
+ * &amp; atomRights?
+ * &amp; atomSubtitle?
+ * &amp; atomTitle?
+ * &amp; atomUpdated?
+ * &amp; extensionElement*)
+ * }
+ * </pre>
+ *
+ * @author Simon Willnauer
+ *
+ */
+public interface GOMSource extends GOMXmlEntity, GOMElement {
+ public static final String LOCALNAME = "source";
+
+ /**
+ * @param aAuthor
+ */
+ public void addAuthor(GOMAuthor aAuthor);
+
+ /**
+ * @param aCategory
+ */
+ public void addCategory(GOMCategory aCategory);
+
+ /**
+ * @param aContributor
+ */
+ public void addContributor(GOMContributor aContributor);
+
+ /**
+ * @param aLink
+ */
+ public void addLink(GOMLink aLink);
+
+ public List<GOMAuthor> getAuthors();
+
+ public List<GOMCategory> getCategories();
+
+ public List<GOMContributor> getContributor();
+
+ public GOMGenerator getGenerator();
+
+ public GOMId getId();
+
+ public void setGenerator(GOMGenerator aGenerator);
+
+ public void setIcon(GOMIcon aIcon);
+
+ public void setId(GOMId aId);
+
+ public GOMLogo getLogo();
+
+ public void setLogo(GOMLogo aLogo);
+
+ public GOMRights getRights();
+
+ public void setRights(GOMRights aRights);
+
+ public GOMSubtitle getSubtitle();
+
+ public void setSubtitle(GOMSubtitle aSubtitle);
+
+ public GOMTitle getTitle();
+
+ public void setTitle(GOMTitle aTitle);
+
+ public GOMUpdated getUpdated();
+
+ public void setUpdated(GOMUpdated aUpdated);
+
+ public GOMIcon getIcon();
+
+ public List<GOMLink> getLinks();
+
+ //TODO needs extension elements
+
+}
diff --git a/contrib/gdata-server/src/gom/java/org/apache/lucene/gdata/gom/GOMSubtitle.java b/contrib/gdata-server/src/gom/java/org/apache/lucene/gdata/gom/GOMSubtitle.java
new file mode 100644
index 00000000000..c5116c5e3ed
--- /dev/null
+++ b/contrib/gdata-server/src/gom/java/org/apache/lucene/gdata/gom/GOMSubtitle.java
@@ -0,0 +1,41 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.lucene.gdata.gom;
+
+/**
+ *
+ * The "atom:subtitle" element is a Text construct that conveys a human-readable
+ * description or subtitle for a feed.
+ *
+ * <pre>
+ * atomSubtitle = element atom:subtitle { atomTextConstruct }
+ * </pre>
+ *
+ * @author Simon Willnauer
+ * @see org.apache.lucene.gdata.gom.GOMTextConstruct
+ */
+public interface GOMSubtitle extends GOMTextConstruct {
+ /**
+ * Atom local name for the xml element
+ */
+ public static final String LOCALNAME = "subtitle";
+
+ /**
+ * RSS local name for the xml element
+ */
+ public static final String RSS_LOCALNAME = "description";
+}
diff --git a/contrib/gdata-server/src/gom/java/org/apache/lucene/gdata/gom/GOMSummary.java b/contrib/gdata-server/src/gom/java/org/apache/lucene/gdata/gom/GOMSummary.java
new file mode 100644
index 00000000000..def976573af
--- /dev/null
+++ b/contrib/gdata-server/src/gom/java/org/apache/lucene/gdata/gom/GOMSummary.java
@@ -0,0 +1,29 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.lucene.gdata.gom;
+
+/**
+ * @author Simon Willnauer
+ *
+ */
+public interface GOMSummary extends GOMTextConstruct {
+
+ /**
+ * Atom local name for the xml element
+ */
+ public static final String LOCALNAME = "summary";
+}
diff --git a/contrib/gdata-server/src/gom/java/org/apache/lucene/gdata/gom/GOMTextConstruct.java b/contrib/gdata-server/src/gom/java/org/apache/lucene/gdata/gom/GOMTextConstruct.java
new file mode 100644
index 00000000000..be72991a447
--- /dev/null
+++ b/contrib/gdata-server/src/gom/java/org/apache/lucene/gdata/gom/GOMTextConstruct.java
@@ -0,0 +1,25 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.lucene.gdata.gom;
+
+/**
+ * @author Simon Willnauer
+ *
+ */
+public interface GOMTextConstruct extends GOMElement {
+
+}
diff --git a/contrib/gdata-server/src/gom/java/org/apache/lucene/gdata/gom/GOMTime.java b/contrib/gdata-server/src/gom/java/org/apache/lucene/gdata/gom/GOMTime.java
new file mode 100644
index 00000000000..e2653beee56
--- /dev/null
+++ b/contrib/gdata-server/src/gom/java/org/apache/lucene/gdata/gom/GOMTime.java
@@ -0,0 +1,27 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.lucene.gdata.gom;
+
+import org.apache.lucene.gdata.gom.GOMElement;
+
+/**
+ * @author Simon Willnauer
+ *
+ */
+public interface GOMTime extends GOMElement {
+
+}
diff --git a/contrib/gdata-server/src/gom/java/org/apache/lucene/gdata/gom/GOMTitle.java b/contrib/gdata-server/src/gom/java/org/apache/lucene/gdata/gom/GOMTitle.java
new file mode 100644
index 00000000000..75f8e14700d
--- /dev/null
+++ b/contrib/gdata-server/src/gom/java/org/apache/lucene/gdata/gom/GOMTitle.java
@@ -0,0 +1,43 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.lucene.gdata.gom;
+
+/**
+ *
+ * The "atom:title" element is a Text construct that conveys a human-readable
+ * title for an entry or feed.
+ *
+ * <pre>
+ * atomTitle = element atom:title { atomTextConstruct }
+ * </pre>
+ *
+ * @author Simon Willnauer
+ *
+ */
+public interface GOMTitle extends GOMElement {
+
+ /**
+ * Atom local name for the xml element
+ */
+ public static final String LOCALNAME = "title";
+
+ /**
+ * @return - the content type attribute value as a {@link ContentType}
+ * @see ContentType
+ */
+ public abstract ContentType getContentType();
+}
diff --git a/contrib/gdata-server/src/gom/java/org/apache/lucene/gdata/gom/GOMUpdated.java b/contrib/gdata-server/src/gom/java/org/apache/lucene/gdata/gom/GOMUpdated.java
new file mode 100644
index 00000000000..e0bd13a5cd1
--- /dev/null
+++ b/contrib/gdata-server/src/gom/java/org/apache/lucene/gdata/gom/GOMUpdated.java
@@ -0,0 +1,38 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.lucene.gdata.gom;
+
+/**
+ *
+ * The "atom:updated" element is a Date construct indicating the most recent
+ * instant in time when an entry or feed was modified in a way the publisher
+ * considers significant. Therefore, not all modifications necessarily result in
+ * a changed atom:updated value.
+ *
+ * <pre>
+ * atomUpdated = element atom:updated { atomDateConstruct}
+ * </pre>
+ *
+ * @author Simon Willnauer
+ * @see org.apache.lucene.gdata.gom.GOMDateConstruct
+ */
+public interface GOMUpdated extends GOMDateConstruct {
+ /**
+ * Atom local name for the xml element
+ */
+ public static final String LOCALNAME = "updated";
+}
diff --git a/contrib/gdata-server/src/gom/java/org/apache/lucene/gdata/gom/GOMXmlEntity.java b/contrib/gdata-server/src/gom/java/org/apache/lucene/gdata/gom/GOMXmlEntity.java
new file mode 100644
index 00000000000..b73ed26c498
--- /dev/null
+++ b/contrib/gdata-server/src/gom/java/org/apache/lucene/gdata/gom/GOMXmlEntity.java
@@ -0,0 +1,69 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.lucene.gdata.gom;
+
+import javax.xml.namespace.QName;
+
+/**
+ * GOMXmlEntity is a abstract base interface for all Gdata Object Model
+ * Interfaces to be implemented by any class which is a part of the GOM. This
+ * interface defines a basic interface for xml attributes and elements
+ *
+ * @author Simon Willnauer
+ *
+ */
+public abstract interface GOMXmlEntity {
+
+ /**
+ * @return - the entities QName
+ * @see QName
+ *
+ */
+ public abstract QName getQname();
+
+ /**
+ * @param aString - the namespace uri to set
+ */
+ public abstract void setNamespaceUri(String aString);
+
+ /**
+ * @param aString - the namespace prefix to set
+ */
+ public abstract void setNamespacePrefix(String aString);
+
+ /**
+ * @param aLocalName - the localname of the entitiy
+ */
+ public abstract void setLocalName(String aLocalName);
+
+ /**
+ * @return - the local name of the entitiy
+ */
+ public abstract String getLocalName();
+
+ /**
+ * @return - the text value of the entity
+ */
+ public abstract String getTextValue();
+
+ /**
+ * @param aTextValue - the text value of the entity
+ */
+ public abstract void setTextValue(String aTextValue);
+
+}
diff --git a/contrib/gdata-server/src/gom/java/org/apache/lucene/gdata/gom/core/AbstractGOMElement.java b/contrib/gdata-server/src/gom/java/org/apache/lucene/gdata/gom/core/AbstractGOMElement.java
new file mode 100644
index 00000000000..ab2c694c3e7
--- /dev/null
+++ b/contrib/gdata-server/src/gom/java/org/apache/lucene/gdata/gom/core/AbstractGOMElement.java
@@ -0,0 +1,232 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.lucene.gdata.gom.core;
+
+import java.util.LinkedList;
+import java.util.List;
+
+import javax.xml.namespace.QName;
+import javax.xml.stream.XMLStreamException;
+
+import org.apache.lucene.gdata.gom.GOMAttribute;
+import org.apache.lucene.gdata.gom.GOMElement;
+import org.apache.lucene.gdata.gom.GOMNamespace;
+import org.apache.lucene.gdata.gom.writer.GOMOutputWriter;
+
+/**
+ * @author Simon Willnauer
+ */
+public abstract class AbstractGOMElement implements GOMElement {
+ /**
+ * atomCommonAttribute <br/> attribute xml:lang { atomLanguageTag }?
+ */
+ protected String xmlLang;
+
+ /**
+ * atomCommonAttribute <br/> attribute xml:base { atomUri }?
+ */
+ protected String xmlBase;
+
+ protected QName qname;
+
+ protected String textValue;
+
+ protected String localName;
+
+ protected String nsUri;
+
+ protected String nsPrefix;
+
+ /**
+ * atomCommonAttributes <br/> undefinedAttribute*
+ */
+ protected List<GOMAttribute> extensionAttributes = new LinkedList<GOMAttribute>();
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.apache.lucene.gdata.gom.GOMXmlEntity#getQname()
+ */
+ public QName getQname() {
+ return this.qname;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.apache.lucene.gdata.gom.GOMXmlEntity#getTextValue()
+ */
+ public String getTextValue() {
+ return this.textValue;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.apache.lucene.gdata.gom.GOMXmlEntity#setTextValue(java.lang.String)
+ */
+ public void setTextValue(String aTextValue) {
+ this.textValue = aTextValue;
+
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.apache.lucene.gdata.gom.GOMXmlEntity#getLocalName()
+ */
+ public String getLocalName() {
+ return this.localName;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.apache.lucene.gdata.gom.GOMXmlEntity#setLocalName(java.lang.String)
+ */
+ public void setLocalName(String aLocalName) {
+ // must override
+ }
+
+ protected void addAttribute(GOMAttribute aAttribute) {
+ if (aAttribute != null)
+ this.extensionAttributes.add(aAttribute);
+
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.apache.lucene.gdata.gom.core.AtomParser#getChildParser(javax.xml.namespace.QName)
+ */
+ public AtomParser getChildParser(QName aName) {
+ throw new GDataParseException(String.format(UNEXPECTED_ELEMENT_CHILD,
+ this.qname));
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.apache.lucene.gdata.gom.core.AtomParser#processAttribute(javax.xml.namespace.QName,
+ * java.lang.String)
+ */
+ public void processAttribute(QName aQName, String aValue) {
+ 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);
+ }
+
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.apache.lucene.gdata.gom.core.AtomParser#processElementValue(java.lang.String)
+ */
+ public void processElementValue(String aValue) {
+ throw new GDataParseException(String.format(UNEXPECTED_ELEMENT_VALUE,
+ this.qname));
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.apache.lucene.gdata.gom.core.AtomParser#processEndElement()
+ */
+ public void processEndElement() {
+ // no post processing
+
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.apache.lucene.gdata.gom.GOMXmlEntity#setNamespaceUri(java.lang.String)
+ */
+ public void setNamespaceUri(String aString) {
+ this.nsUri = aString;
+
+ }
+
+ /**
+ *
+ * {@inheritDoc}
+ *
+ * @see org.apache.lucene.gdata.gom.GOMXmlEntity#setNamespacePrefix(java.lang.String)
+ */
+ public void setNamespacePrefix(String aString) {
+ this.nsPrefix = aString;
+ }
+
+ protected List<GOMAttribute> getXmlNamespaceAttributes() {
+ 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;
+
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.apache.lucene.gdata.gom.GOMElement#writeRssOutput(org.apache.lucene.gdata.gom.writer.GOMStaxWriter,
+ * java.lang.String)
+ */
+ public void writeRssOutput(GOMOutputWriter aStreamWriter, String aRssName)
+ throws XMLStreamException {
+
+ }
+
+
+
+
+ /**
+ *
+ * {@inheritDoc}
+ *
+ * @see org.apache.lucene.gdata.gom.GOMElement#getXmlBase()
+ */
+ public String getXmlBase() {
+ return this.xmlBase;
+ }
+
+ /**
+ *
+ * {@inheritDoc}
+ *
+ * @see org.apache.lucene.gdata.gom.GOMElement#getXmlLang()
+ */
+ public String getXmlLang() {
+
+ return this.xmlLang;
+ }
+
+}
diff --git a/contrib/gdata-server/src/gom/java/org/apache/lucene/gdata/gom/core/ArbitraryGOMXml.java b/contrib/gdata-server/src/gom/java/org/apache/lucene/gdata/gom/core/ArbitraryGOMXml.java
new file mode 100644
index 00000000000..37e2de6ad7d
--- /dev/null
+++ b/contrib/gdata-server/src/gom/java/org/apache/lucene/gdata/gom/core/ArbitraryGOMXml.java
@@ -0,0 +1,162 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.lucene.gdata.gom.core;
+
+import java.util.LinkedList;
+import java.util.List;
+
+import javax.xml.namespace.QName;
+import javax.xml.stream.XMLStreamException;
+
+import org.apache.lucene.gdata.gom.GOMAttribute;
+import org.apache.lucene.gdata.gom.GOMElement;
+import org.apache.lucene.gdata.gom.writer.GOMOutputWriter;
+//TODO add java doc
+/**
+ *
+ * @author Simon Willnauer
+ *
+ */
+public class ArbitraryGOMXml extends AbstractGOMElement {
+ private List<GOMElement> children = new LinkedList<GOMElement>();
+
+ private List<GOMAttribute> attributes = new LinkedList<GOMAttribute>();
+
+ /**
+ * this method will never return <code>null</code>
+ *
+ * @return Returns the attributes of this xml element.
+ */
+ public List<GOMAttribute> getAttributes() {
+ return this.attributes;
+ }
+
+ /**
+ * this method will never return <code>null</code>
+ *
+ * @return - the child elements of this xml element
+ */
+ public List<GOMElement> getChildren() {
+ return this.children;
+ }
+
+ /**
+ * Class constructor
+ *
+ * @param qname -
+ * the elements qname
+ */
+ public ArbitraryGOMXml(QName qname) {
+ if (qname == null)
+ throw new IllegalArgumentException("QName must not be null");
+
+ this.qname = qname;
+ this.localName = qname.getLocalPart();
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.apache.lucene.gdata.gom.core.AbstractGOMElement#getChildParser(javax.xml.namespace.QName)
+ */
+ @Override
+ public AtomParser getChildParser(QName aName) {
+ 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;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.apache.lucene.gdata.gom.core.AbstractGOMElement#processAttribute(javax.xml.namespace.QName,
+ * java.lang.String)
+ */
+ @Override
+ public void processAttribute(QName aQName, String aValue) {
+ 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);
+
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.apache.lucene.gdata.gom.core.AbstractGOMElement#processElementValue(java.lang.String)
+ */
+ @Override
+ public void processElementValue(String aValue) {
+ 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;
+
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.apache.lucene.gdata.gom.GOMElement#writeAtomOutput(org.apache.lucene.gdata.gom.writer.GOMStaxWriter)
+ */
+ public void writeAtomOutput(GOMOutputWriter aStreamWriter)
+ throws XMLStreamException {
+ 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();
+
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.apache.lucene.gdata.gom.GOMElement#writeRssOutput(org.apache.lucene.gdata.gom.writer.GOMStaxWriter)
+ */
+ public void writeRssOutput(GOMOutputWriter aStreamWriter)
+ throws XMLStreamException {
+ // delegate it by default
+ this.writeAtomOutput(aStreamWriter);
+
+ }
+
+}
diff --git a/contrib/gdata-server/src/gom/java/org/apache/lucene/gdata/gom/core/AtomParser.java b/contrib/gdata-server/src/gom/java/org/apache/lucene/gdata/gom/core/AtomParser.java
new file mode 100644
index 00000000000..a0178c9d795
--- /dev/null
+++ b/contrib/gdata-server/src/gom/java/org/apache/lucene/gdata/gom/core/AtomParser.java
@@ -0,0 +1,134 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.lucene.gdata.gom.core;
+
+import javax.xml.namespace.QName;
+
+/**
+ * @author Simon Willnauer
+ *
+ */
+public interface AtomParser {
+
+ /**
+ * Error message for an unexpected element
+ * @see String#format(java.lang.String, java.lang.Object[])
+ */
+ public static final String UNEXPECTED_ELEMENT = "Expected Element '%s' but was '%s' ";
+
+
+ /**
+ * Error message for an unexpected element child
+ * @see String#format(java.lang.String, java.lang.Object[])
+ */
+ public static final String UNEXPECTED_ELEMENT_CHILD = "Element '%s' can not contain child elements ";
+
+ /**
+ * Error message for an urecognized element child
+ * @see String#format(java.lang.String, java.lang.Object[])
+ */
+ public static final String URECOGNIZED_ELEMENT_CHILD = "Element '%s' can not contain child elements of the type %s";
+
+ /**
+ * Error message for an unexpected attribute
+ * @see String#format(java.lang.String, java.lang.Object[])
+ */
+ public static final String UNEXPECTED_ATTRIBUTE = "Element '%s' can not contain attributes ";
+
+ /**
+ * Error message for an unexpected element value
+ * @see String#format(java.lang.String, java.lang.Object[])
+ */
+ public static final String UNEXPECTED_ELEMENT_VALUE = "Element '%s' can not contain any element value";
+
+ /**
+ * Error message for a missing element attribute
+ * @see String#format(java.lang.String, java.lang.Object[])
+ */
+ public static final String MISSING_ELEMENT_ATTRIBUTE = "Element '%s' requires an '%s' attribute";
+
+ /**
+ * Error message for a missing element child
+ * @see String#format(java.lang.String, java.lang.Object[])
+ */
+ public static final String MISSING_ELEMENT_CHILD = "Element '%s' requires a child of the type '%s'";
+
+ /**
+ * Error message for a missing element value
+ * @see String#format(java.lang.String, java.lang.Object[])
+ */
+ public static final String MISSING_ELEMENT_VALUE = "Element '%s' requires a element value of the type '%s'";
+
+ /**
+ * Error message for a missing element value
+ * @see String#format(java.lang.String, java.lang.Object[])
+ */
+ public static final String MISSING_ELEMENT_VALUE_PLAIN = "Element '%s' requires a element value'";
+
+ /**
+ * Error message for a duplicated element
+ * @see String#format(java.lang.String, java.lang.Object[])
+ */
+ public static final String DUPLICATE_ELEMENT = "Duplicated Element '%s'";
+
+ /**
+ * Error message for a duplicated element value
+ * @see String#format(java.lang.String, java.lang.Object[])
+ */
+ public static final String DUPLICATE_ELEMENT_VALUE = "Duplicated Element value for element '%s'";
+
+ /**
+ * Error message for a duplicated attribute
+ * @see String#format(java.lang.String, java.lang.Object[])
+ */
+ public static final String DUPLICATE_ATTRIBUTE = "Duplicated Attribute '%s'";
+
+ /**
+ * Error message for an invalid attribute
+ * @see String#format(java.lang.String, java.lang.Object[])
+ */
+ public static final String INVALID_ATTRIBUTE = "The attribute '%s' must be an %s";
+
+ /**
+ * Error message for an invalid element value
+ * @see String#format(java.lang.String, java.lang.Object[])
+ */
+ public static final String INVALID_ELEMENT_VALUE = "The element value '%s' must be an %s";
+
+ /**
+ * @param aValue
+ */
+ public abstract void processElementValue(String aValue);
+
+ /**
+ * @param aQName
+ * @param aValue
+ */
+ public abstract void processAttribute(QName aQName, String aValue);
+
+ /**
+ *
+ */
+ public abstract void processEndElement();
+
+ /**
+ * @param name
+ * @return
+ */
+ public abstract AtomParser getChildParser(QName name);
+
+}
diff --git a/contrib/gdata-server/src/gom/java/org/apache/lucene/gdata/gom/core/AtomUriElement.java b/contrib/gdata-server/src/gom/java/org/apache/lucene/gdata/gom/core/AtomUriElement.java
new file mode 100644
index 00000000000..8bade2e668a
--- /dev/null
+++ b/contrib/gdata-server/src/gom/java/org/apache/lucene/gdata/gom/core/AtomUriElement.java
@@ -0,0 +1,45 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.lucene.gdata.gom.core;
+
+import java.net.URISyntaxException;
+
+import org.apache.lucene.gdata.gom.core.utils.AtomParserUtils;
+
+/**
+ * @author Simon Willnauer
+ *
+ */
+abstract class AtomUriElement extends SimpleGOMElementImpl {
+
+ /**
+ * @see org.apache.lucene.gdata.gom.core.SimpleGOMElementImpl#processEndElement()
+ */
+ @Override
+ public void processEndElement() {
+ if (this.textValue == null)
+ throw new GDataParseException(String.format(
+ MISSING_ELEMENT_VALUE, this.localName, "atomUri"));
+ try {
+ AtomParserUtils.getAbsolutAtomURI(this.xmlBase, this.textValue);
+ } catch (URISyntaxException e) {
+ throw new GDataParseException(String.format(INVALID_ELEMENT_VALUE,
+ this.localName, "absolute uri"), e);
+ }
+ }
+
+}
diff --git a/contrib/gdata-server/src/gom/java/org/apache/lucene/gdata/gom/core/GDataParseException.java b/contrib/gdata-server/src/gom/java/org/apache/lucene/gdata/gom/core/GDataParseException.java
new file mode 100644
index 00000000000..3978198ed9f
--- /dev/null
+++ b/contrib/gdata-server/src/gom/java/org/apache/lucene/gdata/gom/core/GDataParseException.java
@@ -0,0 +1,58 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.lucene.gdata.gom.core;
+
+/**
+ * @author Simon Willnauer
+ *
+ */
+public class GDataParseException extends RuntimeException {
+
+ /**
+ * Serial Version ID -- implements {@link java.io.Serializable}
+ */
+ private static final long serialVersionUID = -3633604155009277238L;
+
+ /**
+ *
+ */
+ public GDataParseException() {
+ }
+
+ /**
+ * @param arg0
+ */
+ public GDataParseException(String arg0) {
+ super(arg0);
+ }
+
+ /**
+ * @param arg0
+ */
+ public GDataParseException(Throwable arg0) {
+ super(arg0);
+ }
+
+ /**
+ * @param arg0
+ * @param arg1
+ */
+ public GDataParseException(String arg0, Throwable arg1) {
+ super(arg0, arg1);
+ }
+
+}
diff --git a/contrib/gdata-server/src/gom/java/org/apache/lucene/gdata/gom/core/GOMAttributeImpl.java b/contrib/gdata-server/src/gom/java/org/apache/lucene/gdata/gom/core/GOMAttributeImpl.java
new file mode 100644
index 00000000000..8e6baab0953
--- /dev/null
+++ b/contrib/gdata-server/src/gom/java/org/apache/lucene/gdata/gom/core/GOMAttributeImpl.java
@@ -0,0 +1,151 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.lucene.gdata.gom.core;
+
+import javax.xml.namespace.QName;
+
+import org.apache.lucene.gdata.gom.GOMAttribute;
+
+/**
+ * @author Simon Willnauer
+ *
+ */
+public class GOMAttributeImpl implements GOMAttribute {
+ private boolean hasDefaultNamespace;
+
+ private QName qName;
+
+ private String localName;
+
+ private String uri;
+
+ private String prefix;
+
+ private String value;
+
+ /**
+ *
+ */
+ public GOMAttributeImpl() {
+ super();
+ }
+
+ /**
+ * @param localName
+ * @param value
+ */
+ public GOMAttributeImpl(String localName, String value) {
+ this.hasDefaultNamespace = true;
+ this.value = value;
+ this.localName = localName;
+ }
+
+ /**
+ * @param namespaceUri
+ * @param namespacePrefix
+ * @param localName
+ * @param value
+ */
+ public GOMAttributeImpl(String namespaceUri, String namespacePrefix,
+ String localName, String value) {
+ this.localName = localName;
+ this.uri = namespaceUri;
+ this.prefix = namespacePrefix;
+ this.value = value;
+ }
+
+ /**
+ * @see org.apache.lucene.gdata.gom.GOMXmlEntity#getQname()
+ */
+ public QName getQname() {
+ if (this.qName == null)
+ this.qName = new QName(this.uri, (this.localName == null ? ""
+ : this.localName), (this.prefix == null ? "" : this.prefix));
+ return this.qName;
+
+ }
+
+ /**
+ * @see org.apache.lucene.gdata.gom.GOMXmlEntity#setLocalName(java.lang.String)
+ */
+ public void setLocalName(String aLocalName) {
+ if (aLocalName == null)
+ return;
+ this.qName = null;
+ this.localName = aLocalName;
+
+ }
+
+ /**
+ * @see org.apache.lucene.gdata.gom.GOMXmlEntity#getLocalName()
+ */
+ public String getLocalName() {
+ return this.localName;
+ }
+
+ /**
+ * @see org.apache.lucene.gdata.gom.GOMXmlEntity#getTextValue()
+ */
+ public String getTextValue() {
+ return this.value == null ? "" : this.value;
+ }
+
+ /**
+ * @see org.apache.lucene.gdata.gom.GOMXmlEntity#setTextValue(java.lang.String)
+ */
+ public void setTextValue(String aTextValue) {
+ this.value = aTextValue;
+
+ }
+
+ /**
+ * @see org.apache.lucene.gdata.gom.GOMAttribute#hasDefaultNamespace()
+ */
+ public boolean hasDefaultNamespace() {
+
+ return this.hasDefaultNamespace;
+ }
+
+ void setHasDefaultNamespace(boolean aBoolean) {
+ this.hasDefaultNamespace = aBoolean;
+ }
+
+ /**
+ * @see org.apache.lucene.gdata.gom.GOMXmlEntity#setNamespaceUri(java.lang.String)
+ */
+ public void setNamespaceUri(String aString) {
+ if (aString == null)
+ return;
+ this.qName = null;
+ this.hasDefaultNamespace = false;
+ this.uri = aString;
+
+ }
+
+ /**
+ * @see org.apache.lucene.gdata.gom.GOMXmlEntity#setNamespacePrefix(java.lang.String)
+ */
+ public void setNamespacePrefix(String aString) {
+ if (aString == null)
+ return;
+ this.qName = null;
+ this.hasDefaultNamespace = false;
+ this.prefix = aString;
+
+ }
+
+}
diff --git a/contrib/gdata-server/src/gom/java/org/apache/lucene/gdata/gom/core/GOMAuthorImpl.java b/contrib/gdata-server/src/gom/java/org/apache/lucene/gdata/gom/core/GOMAuthorImpl.java
new file mode 100644
index 00000000000..4045c1c7209
--- /dev/null
+++ b/contrib/gdata-server/src/gom/java/org/apache/lucene/gdata/gom/core/GOMAuthorImpl.java
@@ -0,0 +1,49 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.lucene.gdata.gom.core;
+
+import javax.xml.namespace.QName;
+import javax.xml.stream.XMLStreamException;
+
+import org.apache.lucene.gdata.gom.GOMAuthor;
+import org.apache.lucene.gdata.gom.GOMNamespace;
+import org.apache.lucene.gdata.gom.writer.GOMOutputWriter;
+
+/**
+ * @author Simon Willnauer
+ *
+ */
+public class GOMAuthorImpl extends GOMPersonImpl implements GOMAuthor {
+ /**
+ *
+ */
+ public GOMAuthorImpl() {
+ this.localName = GOMAuthor.LOCALNAME;
+ this.qname = new QName(GOMNamespace.ATOM_NS_URI, this.localName);
+ }
+
+ /**
+ * @see org.apache.lucene.gdata.gom.core.GOMPersonImpl#writeRssOutput(org.apache.lucene.gdata.gom.writer.GOMStaxWriter)
+ */
+ @Override
+ public void writeRssOutput(GOMOutputWriter aStreamWriter)
+ throws XMLStreamException {
+ writeRssOutput(aStreamWriter, this.localName);
+
+ }
+
+}
diff --git a/contrib/gdata-server/src/gom/java/org/apache/lucene/gdata/gom/core/GOMBuilder.java b/contrib/gdata-server/src/gom/java/org/apache/lucene/gdata/gom/core/GOMBuilder.java
new file mode 100644
index 00000000000..e92cfb547e8
--- /dev/null
+++ b/contrib/gdata-server/src/gom/java/org/apache/lucene/gdata/gom/core/GOMBuilder.java
@@ -0,0 +1,154 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.lucene.gdata.gom.core;
+
+import java.util.Stack;
+
+import javax.xml.stream.XMLStreamConstants;
+import javax.xml.stream.XMLStreamException;
+import javax.xml.stream.XMLStreamReader;
+
+import org.apache.lucene.gdata.gom.GOMDocument;
+import org.apache.lucene.gdata.gom.GOMEntry;
+import org.apache.lucene.gdata.gom.GOMFeed;
+import org.apache.lucene.gdata.gom.GOMNamespace;
+
+/**
+ * @author Simon Willnauer
+ */
+public class GOMBuilder {
+
+ private final XMLStreamReader streamReader;
+
+ private final GOMFactory factory;
+
+ private final Stack<AtomParser> parserStack;
+
+ /**
+ * @param arg0
+ */
+ public GOMBuilder(XMLStreamReader arg0) {
+ if (arg0 == null)
+ throw new IllegalArgumentException(
+ "XMLStreamReader instance must not be null");
+ this.streamReader = arg0;
+ this.factory = GOMFactory.createInstance();
+ this.parserStack = new Stack<AtomParser>();
+ }
+
+ public GOMDocument<GOMFeed> buildGOMFeed() throws XMLStreamException {
+ GOMDocument<GOMFeed> document = new GOMDocumentImpl<GOMFeed>();
+ GOMFeed element = startFeedDocument(document);
+ document.setRootElement(element);
+ parse(this.streamReader);
+
+ return document;
+ }
+
+ private void parse(XMLStreamReader aReader) throws XMLStreamException {
+
+ int next = 0;
+
+ while ((next = next()) != XMLStreamConstants.END_DOCUMENT) {
+
+ if (next == XMLStreamConstants.START_ELEMENT) {
+ AtomParser childParser = this.parserStack.peek()
+ .getChildParser(this.streamReader.getName());
+ processAttributes(childParser);
+ this.parserStack.push(childParser);
+ } else if (next == XMLStreamConstants.END_ELEMENT) {
+ this.parserStack.pop().processEndElement();
+ } else if (next == XMLStreamConstants.CHARACTERS) {
+ this.parserStack.peek().processElementValue(
+ this.streamReader.getText());
+ } else if (next == XMLStreamConstants.CDATA) {
+ System.out.println("CDdata");
+ }
+ // System.out.println(next);
+ }
+
+ }
+
+ /**
+ * @param childParser
+ */
+ private void processAttributes(AtomParser childParser) {
+ int attributeCount = this.streamReader.getAttributeCount();
+ for (int i = 0; i < attributeCount; i++) {
+ childParser.processAttribute(this.streamReader.getAttributeName(i),
+ this.streamReader.getAttributeValue(i));
+ }
+ }
+
+ public GOMDocument<GOMEntry> buildGOMEntry() throws XMLStreamException {
+ GOMDocument<GOMEntry> document = new GOMDocumentImpl<GOMEntry>();
+ GOMEntry element = startEntryDocument(document);
+ document.setRootElement(element);
+ parse(this.streamReader);
+
+ return document;
+
+ }
+
+ private GOMEntry startEntryDocument(GOMDocument aDocument)
+ throws XMLStreamException {
+ aDocument.setVersion(this.streamReader.getVersion());
+ aDocument.setCharacterEncoding(this.streamReader
+ .getCharacterEncodingScheme());
+ GOMEntry entry = this.factory.createEntry();
+ if (next() != XMLStreamConstants.START_ELEMENT)
+ throw new GDataParseException("Expected start of feed element");
+ processAttributes(entry);
+ this.parserStack.push(entry);
+ int count = this.streamReader.getNamespaceCount();
+ for (int i = 0; i < count; i++) {
+ GOMNamespace namespace = new GOMNamespace(this.streamReader
+ .getNamespaceURI(i), this.streamReader
+ .getNamespacePrefix(i));
+ entry.addNamespace(namespace);
+ }
+ return entry;
+ }
+
+ private GOMFeed startFeedDocument(GOMDocument aDocument)
+ throws XMLStreamException {
+ aDocument.setVersion(this.streamReader.getVersion());
+ aDocument.setCharacterEncoding(this.streamReader
+ .getCharacterEncodingScheme());
+ GOMFeed feed = this.factory.createFeed();
+ if (next() != XMLStreamConstants.START_ELEMENT)
+ throw new GDataParseException("Expected start of feed element");
+ processAttributes(feed);
+ this.parserStack.push(feed);
+ int count = this.streamReader.getNamespaceCount();
+ for (int i = 0; i < count; i++) {
+
+ GOMNamespace namespace = new GOMNamespace(this.streamReader
+ .getNamespaceURI(i), this.streamReader
+ .getNamespacePrefix(i));
+ System.out.println(namespace);
+ feed.addNamespace(namespace);
+ }
+ return feed;
+ }
+
+ private int next() throws XMLStreamException {
+ return this.streamReader.next();
+
+ }
+
+}
diff --git a/contrib/gdata-server/src/gom/java/org/apache/lucene/gdata/gom/core/GOMCategoryImpl.java b/contrib/gdata-server/src/gom/java/org/apache/lucene/gdata/gom/core/GOMCategoryImpl.java
new file mode 100644
index 00000000000..91b69b69b5d
--- /dev/null
+++ b/contrib/gdata-server/src/gom/java/org/apache/lucene/gdata/gom/core/GOMCategoryImpl.java
@@ -0,0 +1,206 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.lucene.gdata.gom.core;
+
+import java.net.URISyntaxException;
+import java.util.LinkedList;
+import java.util.List;
+
+import javax.xml.namespace.QName;
+import javax.xml.stream.XMLStreamException;
+
+import org.apache.lucene.gdata.gom.GOMAttribute;
+import org.apache.lucene.gdata.gom.GOMCategory;
+import org.apache.lucene.gdata.gom.GOMNamespace;
+import org.apache.lucene.gdata.gom.core.utils.AtomParserUtils;
+import org.apache.lucene.gdata.gom.core.utils.GOMUtils;
+import org.apache.lucene.gdata.gom.writer.GOMOutputWriter;
+
+/**
+ * @author Simon Willnauer
+ *
+ */
+public class GOMCategoryImpl extends AbstractGOMElement implements GOMCategory {
+
+ private static final String DOMAIN = "domain";
+
+ protected String term;
+
+ protected String label;
+
+ protected String scheme;
+
+ /**
+ *
+ */
+ public GOMCategoryImpl() {
+ super();
+ this.localName = LOCALNAME;
+ this.qname = new QName(GOMNamespace.ATOM_NS_URI, this.localName);
+ }
+
+ /**
+ * @see org.apache.lucene.gdata.gom.GOMCategory#setTerm(java.lang.String)
+ */
+ public void setTerm(String aTerm) {
+
+ this.term = aTerm;
+
+ }
+
+ /**
+ * @see org.apache.lucene.gdata.gom.GOMCategory#setLabel(java.lang.String)
+ */
+ public void setLabel(String aLabel) {
+ this.label = aLabel;
+
+ }
+
+ /**
+ * @see org.apache.lucene.gdata.gom.GOMCategory#setScheme(java.lang.String)
+ */
+ public void setScheme(String aScheme) {
+ this.scheme = aScheme;
+ }
+
+ /**
+ * @see org.apache.lucene.gdata.gom.GOMCategory#getTerm()
+ */
+ public String getTerm() {
+ return this.term;
+ }
+
+ /**
+ * @see org.apache.lucene.gdata.gom.GOMCategory#getScheme()
+ */
+ public String getScheme() {
+ return this.scheme;
+ }
+
+ /**
+ * @see org.apache.lucene.gdata.gom.GOMCategory#getLabel()
+ */
+ public String getLabel() {
+ return this.label;
+ }
+
+ /**
+ * @see org.apache.lucene.gdata.gom.core.AbstractGOMElement#processAttribute(javax.xml.namespace.QName,
+ * java.lang.String)
+ */
+ @Override
+ public void processAttribute(QName aQName, String aValue) {
+ if (aQName == null)
+ throw new GDataParseException("QName must not be null");
+ if (aQName.getNamespaceURI().equals(GOMNamespace.ATOM_NS_URI)
+ || aQName.getNamespaceURI().equals("")) {
+ String localPart = aQName.getLocalPart();
+ if (localPart.equals(TERM_ATTRIBUTE)) {
+ if (this.term != null)
+ throw new GDataParseException(String.format(
+ AtomParser.DUPLICATE_ATTRIBUTE, TERM_ATTRIBUTE));
+ this.term = aValue;
+ } else if (localPart.equals(LABLE_ATTRIBUTE)) {
+ if (this.label != null)
+ throw new GDataParseException(String.format(
+ AtomParser.DUPLICATE_ATTRIBUTE, LABLE_ATTRIBUTE));
+ this.label = aValue;
+ } else if (localPart.equals(SCHEME_ATTRIBUTE)) {
+ if (this.scheme != null)
+ throw new GDataParseException(String.format(
+ AtomParser.DUPLICATE_ATTRIBUTE, SCHEME_ATTRIBUTE));
+ this.scheme = aValue;
+ } else {
+ super.processAttribute(aQName, aValue);
+ }
+
+ } else {
+ super.processAttribute(aQName, aValue);
+ }
+
+ }
+
+ /**
+ * @see org.apache.lucene.gdata.gom.core.AbstractGOMElement#processEndElement()
+ */
+ @Override
+ public void processEndElement() {
+ /*
+ * ATOM defines "undefinedContent" for this. GData defines this as no
+ * content containing element
+ */
+ if (this.term == null)
+ throw new GDataParseException(String.format(
+ AtomParser.MISSING_ELEMENT_ATTRIBUTE, this.localName,
+ TERM_ATTRIBUTE));
+ if (this.scheme != null) {
+ try {
+ AtomParserUtils.getAbsolutAtomURI(this.xmlBase, this.scheme);
+ } catch (URISyntaxException e) {
+ throw new GDataParseException(String.format(
+ AtomParser.INVALID_ATTRIBUTE, this.localName
+ + " attribute " + GOMCategory.SCHEME_ATTRIBUTE,
+ "absolute uri"), e);
+ }
+ }
+ }
+
+ /**
+ * @see org.apache.lucene.gdata.gom.GOMElement#writeAtomOutput(org.apache.lucene.gdata.gom.writer.GOMStaxWriter)
+ */
+ public void writeAtomOutput(GOMOutputWriter aStreamWriter)
+ throws XMLStreamException {
+ if (aStreamWriter == null)
+ throw new NullPointerException("StreamWriter is null");
+ List<GOMAttribute> list = new LinkedList<GOMAttribute>();
+ /*
+ * term attribute is requiered for a category. attribute term { text },
+ */
+ list.add(GOMUtils.buildDefaultNamespaceAttribute(this.term,
+ TERM_ATTRIBUTE));
+ if (this.scheme != null)
+ list.add(GOMUtils.buildDefaultNamespaceAttribute(this.scheme,
+ SCHEME_ATTRIBUTE));
+ if (this.label != null)
+ list.add(GOMUtils.buildDefaultNamespaceAttribute(this.label,
+ LABLE_ATTRIBUTE));
+
+ if (this.xmlLang != null)
+ list.add(GOMUtils
+ .buildXMLNamespaceAttribute(this.xmlLang, XML_LANG));
+ aStreamWriter.writeSimpleXMLElement(this.localName, list, null);
+
+ }
+
+ /**
+ * @see org.apache.lucene.gdata.gom.GOMElement#writeRssOutput(org.apache.lucene.gdata.gom.writer.GOMStaxWriter)
+ */
+ public void writeRssOutput(GOMOutputWriter aStreamWriter)
+ throws XMLStreamException {
+ if (aStreamWriter == null)
+ throw new NullPointerException("StreamWriter is null");
+ List<GOMAttribute> list = getXmlNamespaceAttributes();
+ /*
+ * build this domain attr. even if scheme is null or empty
+ */
+ list.add(GOMUtils.buildDefaultNamespaceAttribute(this.scheme, DOMAIN));
+
+ aStreamWriter.writeSimpleXMLElement(this.localName, list, this.term);
+
+ }
+
+}
diff --git a/contrib/gdata-server/src/gom/java/org/apache/lucene/gdata/gom/core/GOMContentImpl.java b/contrib/gdata-server/src/gom/java/org/apache/lucene/gdata/gom/core/GOMContentImpl.java
new file mode 100644
index 00000000000..4263045c816
--- /dev/null
+++ b/contrib/gdata-server/src/gom/java/org/apache/lucene/gdata/gom/core/GOMContentImpl.java
@@ -0,0 +1,216 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.lucene.gdata.gom.core;
+
+import java.net.URISyntaxException;
+import java.util.List;
+
+import javax.xml.namespace.QName;
+import javax.xml.stream.XMLStreamException;
+
+import org.apache.lucene.gdata.gom.AtomMediaType;
+import org.apache.lucene.gdata.gom.GOMAttribute;
+import org.apache.lucene.gdata.gom.GOMContent;
+import org.apache.lucene.gdata.gom.GOMNamespace;
+import org.apache.lucene.gdata.gom.core.utils.AtomParserUtils;
+import org.apache.lucene.gdata.gom.core.utils.GOMUtils;
+import org.apache.lucene.gdata.gom.writer.GOMOutputWriter;
+
+/**
+ * @author Simon Willnauer
+ *
+ */
+public class GOMContentImpl extends GOMTextContructImpl implements GOMContent {
+ private String src;
+
+ private String type;
+
+ private AtomMediaType mediaType;
+
+ /**
+ *
+ */
+ public GOMContentImpl() {
+ this.localName = GOMContent.LOCALNAME;
+ this.qname = new QName(GOMNamespace.ATOM_NS_URI, this.localName);
+ this.rssLocalName = GOMContent.LOCAL_NAME_RSS;
+ }
+
+ /**
+ * @see org.apache.lucene.gdata.gom.GOMContent#getSrc()
+ */
+ public String getSrc() {
+ return this.src;
+ }
+
+ /**
+ * @see org.apache.lucene.gdata.gom.GOMContent#setSrc(java.lang.String)
+ */
+ public void setSrc(String aSrc) {
+ this.src = aSrc;
+
+ }
+
+ /**
+ * @see org.apache.lucene.gdata.gom.core.GOMTextContructImpl#processAttribute(javax.xml.namespace.QName,
+ * java.lang.String)
+ */
+ @Override
+ public void processAttribute(QName aQName, String aValue) {
+ if (aQName == null)
+ throw new GDataParseException("QName must not be null");
+ if (aValue == null)
+ throw new GDataParseException("Value must not be null");
+ if ("src".equals(aQName.getLocalPart())) {
+ if (this.src != null)
+ throw new GDataParseException(String.format(
+ DUPLICATE_ATTRIBUTE, "src"));
+ this.src = aValue;
+ return;
+ }
+ if ("type".equals(aQName.getLocalPart())) {
+ if (this.contentType != null || this.mediaType != null)
+ throw new GDataParseException(String.format(
+ DUPLICATE_ATTRIBUTE, "type"));
+ if (AtomParserUtils.isAtomMediaType(aValue)) {
+ this.type = aValue;
+ this.mediaType = AtomParserUtils.getAtomMediaType(aValue);
+ return;
+ }
+
+ }
+ super.processAttribute(aQName, aValue);
+
+ }
+
+ /**
+ * @see org.apache.lucene.gdata.gom.core.GOMTextContructImpl#processElementValue(java.lang.String)
+ */
+ @Override
+ public void processElementValue(String aValue) {
+ if (this.src != null)
+ throw new GDataParseException(String.format(
+ AtomParser.UNEXPECTED_ELEMENT_VALUE, this.localName
+ + " with attribute src set "));
+ super.processElementValue(aValue);
+ }
+
+ /**
+ * @see org.apache.lucene.gdata.gom.core.GOMTextContructImpl#processEndElement()
+ */
+ @Override
+ public void processEndElement() {
+ if (this.src != null)
+ try {
+ AtomParserUtils.getAbsolutAtomURI(this.xmlBase, this.src);
+ } catch (URISyntaxException e) {
+ throw new GDataParseException(String.format(INVALID_ATTRIBUTE,
+ "src", "absolute uri"), e);
+ }
+
+ if (this.mediaType == null)
+ super.processEndElement();
+ else if (this.blobParser != null) {
+ this.textValue = this.blobParser.toString();
+ this.blobParser.close();
+ this.blobParser = null;
+ }
+
+ }
+
+ /**
+ * @see org.apache.lucene.gdata.gom.core.GOMTextContructImpl#getChildParser(javax.xml.namespace.QName)
+ */
+ @Override
+ public AtomParser getChildParser(QName aName) {
+ if (aName == null)
+ throw new GDataParseException("QName must not be null");
+ if (this.mediaType == AtomMediaType.XML) {
+ if (this.blobParser != null)
+ throw new GDataParseException(String.format(
+ DUPLICATE_ELEMENT, aName.getLocalPart()));
+ this.blobParser = new XMLBlobContentParser();
+ return this.blobParser.getChildParser(aName);
+ }
+ return super.getChildParser(aName);
+ }
+
+ /**
+ * @see org.apache.lucene.gdata.gom.GOMElement#writeAtomOutput(org.apache.lucene.gdata.gom.writer.GOMStaxWriter)
+ */
+ public void writeAtomOutput(GOMOutputWriter aStreamWriter)
+ throws XMLStreamException {
+
+ if (this.mediaType != null) {
+ List<GOMAttribute> xmlNamespaceAttributes = getXmlNamespaceAttributes();
+ xmlNamespaceAttributes.add(GOMUtils.buildDefaultNamespaceAttribute(
+ this.type, "type"));
+ aStreamWriter.writeStartElement(this.localName,
+ xmlNamespaceAttributes);
+ if (this.src == null)
+ aStreamWriter.writeContentUnescaped(this.textValue);
+ else
+ aStreamWriter.writeAttribute(GOMUtils
+ .buildDefaultNamespaceAttribute(this.src, "src"));
+ aStreamWriter.writeEndElement();
+
+ } else {
+ super.writeAtomOutput(aStreamWriter);
+ }
+
+ }
+
+ /**
+ * @see org.apache.lucene.gdata.gom.core.GOMTextContructImpl#writeRssOutput(org.apache.lucene.gdata.gom.writer.GOMStaxWriter)
+ */
+ @Override
+ public void writeRssOutput(GOMOutputWriter aStreamWriter)
+ throws XMLStreamException {
+ if (this.mediaType != null) {
+ // if content is atomOutOfLineContent (has not textValue) ->
+ // generate a <link> element.
+ if (src != null) {
+ aStreamWriter.writeSimpleXMLElement("link", null, this.src);
+ } else if (this.mediaType == AtomMediaType.TEXT) {
+ aStreamWriter.writeSimpleXMLElement("description", null,
+ this.textValue);
+ } else {
+ // RSS doesn't support non-text content --> write atom type
+ this.writeAtomOutput(aStreamWriter);
+ }
+ } else {
+ super.writeRssOutput(aStreamWriter);
+ }
+ }
+
+ /**
+ * @see org.apache.lucene.gdata.gom.GOMContent#setAtomMediaType(org.apache.lucene.gdata.gom.AtomMediaType)
+ */
+ public void setAtomMediaType(AtomMediaType aMediaType) {
+
+ this.mediaType = aMediaType;
+
+ }
+
+ /**
+ * @see org.apache.lucene.gdata.gom.GOMContent#getAtomMediaType()
+ */
+ public AtomMediaType getAtomMediaType() {
+ return this.mediaType;
+ }
+
+}
diff --git a/contrib/gdata-server/src/gom/java/org/apache/lucene/gdata/gom/core/GOMContributorImpl.java b/contrib/gdata-server/src/gom/java/org/apache/lucene/gdata/gom/core/GOMContributorImpl.java
new file mode 100644
index 00000000000..26c2d32fa89
--- /dev/null
+++ b/contrib/gdata-server/src/gom/java/org/apache/lucene/gdata/gom/core/GOMContributorImpl.java
@@ -0,0 +1,50 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.lucene.gdata.gom.core;
+
+import javax.xml.namespace.QName;
+import javax.xml.stream.XMLStreamException;
+
+import org.apache.lucene.gdata.gom.GOMAuthor;
+import org.apache.lucene.gdata.gom.GOMContributor;
+import org.apache.lucene.gdata.gom.GOMNamespace;
+import org.apache.lucene.gdata.gom.writer.GOMOutputWriter;
+
+/**
+ * @author Simon Willnauer
+ *
+ */
+public class GOMContributorImpl extends GOMPersonImpl implements GOMContributor {
+
+ /**
+ * @see org.apache.lucene.gdata.gom.core.GOMPersonImpl#writeRssOutput(org.apache.lucene.gdata.gom.writer.GOMOutputWriter)
+ */
+ @Override
+ public void writeRssOutput(GOMOutputWriter aStreamWriter)
+ throws XMLStreamException {
+ writeRssOutput(aStreamWriter, GOMAuthor.LOCALNAME);
+ }
+
+ /**
+ *
+ */
+ public GOMContributorImpl() {
+ this.localName = GOMContributor.LOCALNAME;
+ this.qname = new QName(GOMNamespace.ATOM_NS_URI, this.localName);
+ }
+
+}
diff --git a/contrib/gdata-server/src/gom/java/org/apache/lucene/gdata/gom/core/GOMDateConstructImpl.java b/contrib/gdata-server/src/gom/java/org/apache/lucene/gdata/gom/core/GOMDateConstructImpl.java
new file mode 100644
index 00000000000..0a124eac3c0
--- /dev/null
+++ b/contrib/gdata-server/src/gom/java/org/apache/lucene/gdata/gom/core/GOMDateConstructImpl.java
@@ -0,0 +1,100 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.lucene.gdata.gom.core;
+
+import java.util.Date;
+
+import javax.xml.stream.XMLStreamException;
+
+import org.apache.lucene.gdata.gom.GOMDateConstruct;
+import org.apache.lucene.gdata.gom.core.utils.GOMUtils;
+import org.apache.lucene.gdata.gom.writer.GOMOutputWriter;
+
+/**
+ * A Date construct is an element whose content MUST conform to the "date-time"
+ * production in [RFC3339]. In addition, an uppercase "T" character MUST be used
+ * to separate date and time, and an uppercase "Z" character MUST be present in
+ * the absence of a numeric time zone offset.
+ *
+ * @author Simon Willnauer
+ */
+public abstract class GOMDateConstructImpl extends AbstractGOMElement implements
+ GOMDateConstruct {
+ protected long date;
+
+ /*
+ * save the rfcString to skip the building while rendering the element
+ */
+ protected String rfc3339String;
+
+ /**
+ * @see org.apache.lucene.gdata.gom.GOMDateConstruct#setDate(java.util.Date)
+ */
+ public void setDate(Date aDate) {
+ if (aDate == null)
+ return;
+ this.date = aDate.getTime();
+ this.rfc3339String = GOMUtils.buildRfc3339DateFormat(this.date);
+ }
+
+ /**
+ * @see org.apache.lucene.gdata.gom.GOMDateConstruct#getDate()
+ */
+ public Date getDate() {
+ return new Date(this.date);
+
+ }
+
+ /**
+ * @see org.apache.lucene.gdata.gom.core.AbstractGOMElement#processElementValue(java.lang.String)
+ */
+ @Override
+ public void processElementValue(String aValue) {
+ if (aValue == null)
+ throw new IllegalArgumentException("element value must not be null");
+ this.date = GOMUtils.parseRfc3339DateFormat(aValue);
+ this.rfc3339String = aValue;
+
+ }
+
+ /**
+ * @see org.apache.lucene.gdata.gom.core.AbstractGOMElement#processEndElement()
+ */
+ @Override
+ public void processEndElement() {
+ if (this.rfc3339String == null)
+ throw new GDataParseException(String.format(
+ MISSING_ELEMENT_VALUE, this.localName,
+ "RFC3339 Date Time"));
+
+ }
+
+ /**
+ * @see org.apache.lucene.gdata.gom.GOMElement#writeAtomOutput(org.apache.lucene.gdata.gom.writer.GOMStaxWriter)
+ */
+ public void writeAtomOutput(GOMOutputWriter aStreamWriter)
+ throws XMLStreamException {
+ if (this.rfc3339String == null)
+ this.rfc3339String = GOMUtils
+ .buildRfc3339DateFormat(this.date == 0 ? System
+ .currentTimeMillis() : this.date);
+ aStreamWriter.writeSimpleXMLElement(this.qname,
+ getXmlNamespaceAttributes(), this.rfc3339String);
+
+ }
+
+}
diff --git a/contrib/gdata-server/src/gom/java/org/apache/lucene/gdata/gom/core/GOMDocumentImpl.java b/contrib/gdata-server/src/gom/java/org/apache/lucene/gdata/gom/core/GOMDocumentImpl.java
new file mode 100644
index 00000000000..ba0b8bd2964
--- /dev/null
+++ b/contrib/gdata-server/src/gom/java/org/apache/lucene/gdata/gom/core/GOMDocumentImpl.java
@@ -0,0 +1,135 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.lucene.gdata.gom.core;
+
+import javax.xml.stream.XMLStreamException;
+
+import org.apache.lucene.gdata.gom.GOMDocument;
+import org.apache.lucene.gdata.gom.GOMElement;
+import org.apache.lucene.gdata.gom.writer.GOMOutputWriter;
+
+/**
+ * @author Simon Willnauer
+ * @param <T>
+ */
+public class GOMDocumentImpl<T extends GOMElement> implements GOMDocument<T> {
+
+ private static final String DEFAULT_ENCODING = "UTF-8";
+
+ private static final String DEFAULT_VERSION = "1.0";
+
+ private T root;
+
+ private String version;
+
+ private String charEncoding;
+
+ /**
+ *
+ */
+ public GOMDocumentImpl() {
+ super();
+ }
+
+ /**
+ * @see org.apache.lucene.gdata.gom.GOMDocument#setRootElement(org.apache.lucene.gdata.gom.GOMElement)
+ */
+ public void setRootElement(T aRootElement) {
+ this.root = aRootElement;
+
+ }
+
+ /**
+ * @see org.apache.lucene.gdata.gom.GOMDocument#getRootElement()
+ */
+ public T getRootElement() {
+ return this.root;
+ }
+
+ /**
+ * @see org.apache.lucene.gdata.gom.GOMDocument#setVersion(java.lang.String)
+ */
+ public void setVersion(String aVersion) {
+ this.version = aVersion;
+
+ }
+
+ /**
+ * @return the version
+ * @uml.property name="version"
+ */
+ public String getVersion() {
+ return this.version;
+ }
+
+ /**
+ * @see org.apache.lucene.gdata.gom.GOMDocument#getCharacterEncoding()
+ */
+ public String getCharacterEncoding() {
+ return this.charEncoding;
+ }
+
+ /**
+ * @see org.apache.lucene.gdata.gom.GOMDocument#setCharacterEncoding(java.lang.String)
+ */
+ public void setCharacterEncoding(String aEncoding) {
+ this.charEncoding = aEncoding;
+
+ }
+
+ /**
+ * @see org.apache.lucene.gdata.gom.GOMDocument#writeAtomOutput(org.apache.lucene.gdata.gom.writer.GOMStaxWriter)
+ */
+ public void writeAtomOutput(GOMOutputWriter aStreamWriter)
+ throws XMLStreamException {
+ try {
+ aStreamWriter.writeStartDocument(
+ this.charEncoding == null ? DEFAULT_ENCODING
+ : this.charEncoding,
+ this.version == null ? DEFAULT_VERSION : this.version);
+ if (this.root != null)
+ this.root.writeAtomOutput(aStreamWriter);
+ aStreamWriter.writeEndDocument();
+ aStreamWriter.flush();
+ } finally {
+ aStreamWriter.close();
+ }
+
+ }
+
+ /**
+ * @see org.apache.lucene.gdata.gom.GOMDocument#writeRssOutput(org.apache.lucene.gdata.gom.writer.GOMStaxWriter)
+ */
+ public void writeRssOutput(GOMOutputWriter aStreamWriter)
+ throws XMLStreamException {
+ try {
+ aStreamWriter.writeStartDocument(
+ this.charEncoding == null ? DEFAULT_ENCODING
+ : this.charEncoding,
+ this.version == null ? DEFAULT_VERSION : this.version);
+ if (this.root != null) {
+ this.root.writeRssOutput(aStreamWriter);
+ }
+ aStreamWriter.writeEndDocument();
+ aStreamWriter.flush();
+ } finally {
+ aStreamWriter.close();
+ }
+
+ }
+
+}
diff --git a/contrib/gdata-server/src/gom/java/org/apache/lucene/gdata/gom/core/GOMEntryImpl.java b/contrib/gdata-server/src/gom/java/org/apache/lucene/gdata/gom/core/GOMEntryImpl.java
new file mode 100644
index 00000000000..3c3e00263df
--- /dev/null
+++ b/contrib/gdata-server/src/gom/java/org/apache/lucene/gdata/gom/core/GOMEntryImpl.java
@@ -0,0 +1,668 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.lucene.gdata.gom.core;
+
+import java.util.LinkedList;
+import java.util.List;
+
+import javax.xml.namespace.QName;
+import javax.xml.stream.XMLStreamException;
+
+import org.apache.lucene.gdata.gom.AtomMediaType;
+import org.apache.lucene.gdata.gom.GOMAuthor;
+import org.apache.lucene.gdata.gom.GOMCategory;
+import org.apache.lucene.gdata.gom.GOMContent;
+import org.apache.lucene.gdata.gom.GOMContributor;
+import org.apache.lucene.gdata.gom.GOMEntry;
+import org.apache.lucene.gdata.gom.GOMExtension;
+import org.apache.lucene.gdata.gom.GOMId;
+import org.apache.lucene.gdata.gom.GOMLink;
+import org.apache.lucene.gdata.gom.GOMNamespace;
+import org.apache.lucene.gdata.gom.GOMPublished;
+import org.apache.lucene.gdata.gom.GOMRights;
+import org.apache.lucene.gdata.gom.GOMSource;
+import org.apache.lucene.gdata.gom.GOMSummary;
+import org.apache.lucene.gdata.gom.GOMTitle;
+import org.apache.lucene.gdata.gom.GOMUpdated;
+import org.apache.lucene.gdata.gom.core.extension.GOMExtensionFactory;
+import org.apache.lucene.gdata.gom.core.utils.AtomParserUtils;
+import org.apache.lucene.gdata.gom.writer.GOMOutputWriter;
+
+/**
+ *
+ * The default implementation of {@link org.apache.lucene.gdata.gom.GOMEntry}
+ *
+ * <pre>
+ * atomEntry =
+ * element atom:entry {
+ * atomCommonAttributes,
+ * ( atomAuthor*
+ * &amp; atomCategory*
+ * &amp; atomContent?
+ * &amp; atomContributor*
+ * &amp; atomId
+ * &amp; atomLink*
+ * &amp; atomPublished?
+ * &amp; atomRights?
+ * &amp; atomSource?
+ * &amp; atomSummary?
+ * &amp; atomTitle
+ * &amp; atomUpdated
+ * &amp; extensionElement*)
+ * }
+ * </pre>
+ *
+ * @author Simon Willnauer
+ *
+ */
+public class GOMEntryImpl extends AbstractGOMElement implements GOMEntry {
+
+ protected List<GOMNamespace> namespaces = new LinkedList<GOMNamespace>();
+
+ protected List<GOMExtension> extensions = new LinkedList<GOMExtension>();
+
+ private List<GOMAuthor> authors = new LinkedList<GOMAuthor>();
+
+ private List<GOMCategory> categories = new LinkedList<GOMCategory>();
+
+ private List<GOMContributor> contributors = new LinkedList<GOMContributor>();
+
+ private GOMId id;
+
+ private List<GOMLink> links = new LinkedList<GOMLink>();
+
+ private GOMPublished published;
+
+ private GOMRights rights;
+
+ private GOMSource source;
+
+ private GOMSummary summary;
+
+ private GOMTitle title;
+
+ private GOMUpdated updated;
+
+ private GOMExtensionFactory extensionFactory;
+
+ private GOMContent content;
+
+ private final GOMNamespace defaultNamespace = GOMNamespace.ATOM_NAMESPACE;
+
+ /**
+ *
+ */
+ public GOMEntryImpl() {
+ super();
+ this.localName = GOMEntry.LOCALNAME;
+ this.qname = new QName(GOMNamespace.ATOM_NS_URI, this.localName);
+
+ }
+
+ /**
+ * @see org.apache.lucene.gdata.gom.GOMEntry#addAuthor(org.apache.lucene.gdata.gom.GOMAuthor)
+ */
+ public void addAuthor(GOMAuthor aAuthor) {
+ if (aAuthor != null)
+ this.authors.add(aAuthor);
+
+ }
+
+ /**
+ * @see org.apache.lucene.gdata.gom.GOMEntry#addCategory(org.apache.lucene.gdata.gom.GOMCategory)
+ */
+ public void addCategory(GOMCategory aCategory) {
+ if (aCategory != null)
+ this.categories.add(aCategory);
+
+ }
+
+ /**
+ * @see org.apache.lucene.gdata.gom.GOMEntry#addContributor(org.apache.lucene.gdata.gom.GOMContributor)
+ */
+ public void addContributor(GOMContributor aContributor) {
+ if (aContributor != null)
+ this.contributors.add(aContributor);
+
+ }
+
+ /**
+ * @see org.apache.lucene.gdata.gom.GOMEntry#addLink(org.apache.lucene.gdata.gom.GOMLink)
+ */
+ public void addLink(GOMLink aLink) {
+ if (aLink != null)
+ this.links.add(aLink);
+
+ }
+
+ /**
+ * @see org.apache.lucene.gdata.gom.GOMEntry#getAuthors()
+ */
+ public List<GOMAuthor> getAuthors() {
+ return this.authors;
+ }
+
+ /**
+ * @see org.apache.lucene.gdata.gom.GOMEntry#getCategories()
+ */
+ public List<GOMCategory> getCategories() {
+ return this.categories;
+
+ }
+
+ /**
+ * @see org.apache.lucene.gdata.gom.GOMEntry#getContributor()
+ */
+ public List<GOMContributor> getContributor() {
+ return this.contributors;
+ }
+
+ /**
+ * @see org.apache.lucene.gdata.gom.GOMEntry#getId()
+ */
+ public GOMId getId() {
+ return this.id;
+ }
+
+ /**
+ * @see org.apache.lucene.gdata.gom.GOMEntry#getLinks()
+ */
+ public List<GOMLink> getLinks() {
+ return this.links;
+ }
+
+ /**
+ * @see org.apache.lucene.gdata.gom.GOMEntry#getPublished()
+ */
+ public GOMPublished getPublished() {
+ return this.published;
+ }
+
+ /**
+ * @see org.apache.lucene.gdata.gom.GOMEntry#getRights()
+ */
+ public GOMRights getRights() {
+ return this.rights;
+ }
+
+ /**
+ * @see org.apache.lucene.gdata.gom.GOMEntry#getSource()
+ */
+ public GOMSource getSource() {
+ return this.source;
+ }
+
+ /**
+ * @see org.apache.lucene.gdata.gom.GOMEntry#getSummary()
+ */
+ /**
+ * @see org.apache.lucene.gdata.gom.GOMEntry#getSummary()
+ */
+ public GOMSummary getSummary() {
+ return this.summary;
+ }
+
+ /**
+ * @see org.apache.lucene.gdata.gom.GOMEntry#getTitle()
+ */
+ public GOMTitle getTitle() {
+ return this.title;
+ }
+
+ /**
+ * @see org.apache.lucene.gdata.gom.GOMEntry#getUpdated()
+ */
+ public GOMUpdated getUpdated() {
+ return this.updated;
+ }
+
+ /**
+ * @see org.apache.lucene.gdata.gom.GOMEntry#setId(org.apache.lucene.gdata.gom.GOMId)
+ */
+ public void setId(GOMId aId) {
+ this.id = aId;
+ }
+
+ /**
+ * @see org.apache.lucene.gdata.gom.GOMEntry#setPublished(org.apache.lucene.gdata.gom.GOMPublished)
+ */
+ public void setPublished(GOMPublished aPublished) {
+ this.published = aPublished;
+ }
+
+ /**
+ * @see org.apache.lucene.gdata.gom.GOMEntry#setRights(org.apache.lucene.gdata.gom.GOMRights)
+ */
+ public void setRights(GOMRights aRights) {
+ this.rights = aRights;
+ }
+
+ /**
+ * @see org.apache.lucene.gdata.gom.GOMEntry#setSource(org.apache.lucene.gdata.gom.GOMSource)
+ */
+ public void setSource(GOMSource aSource) {
+ this.source = aSource;
+ }
+
+ /**
+ * @see org.apache.lucene.gdata.gom.GOMEntry#setSummary(org.apache.lucene.gdata.gom.GOMSummary)
+ */
+ public void setSummary(GOMSummary aSummary) {
+ this.summary = aSummary;
+ }
+
+ /**
+ * @see org.apache.lucene.gdata.gom.GOMEntry#setTitle(org.apache.lucene.gdata.gom.GOMTitle)
+ */
+ public void setTitle(GOMTitle aTitle) {
+ this.title = aTitle;
+
+ }
+
+ /**
+ * @see org.apache.lucene.gdata.gom.GOMEntry#setUpdated(org.apache.lucene.gdata.gom.GOMUpdated)
+ */
+ public void setUpdated(GOMUpdated aUpdated) {
+ this.updated = aUpdated;
+ }
+
+ /**
+ * @see org.apache.lucene.gdata.gom.GOMEntry#addNamespace(org.apache.lucene.gdata.gom.GOMNamespace)
+ */
+ public void addNamespace(GOMNamespace aNamespace) {
+ if (aNamespace == null)
+ return;
+ // namespace overrides hash / equals
+ if (this.namespaces.contains(aNamespace))
+ return;
+ if ("".equals(aNamespace.getNamespacePrefix())
+ || aNamespace.getNamespaceUri()
+ .equals(GOMNamespace.ATOM_NS_URI))
+ return;
+ else
+ this.namespaces.add(aNamespace);
+ }
+
+ /**
+ * @see org.apache.lucene.gdata.gom.GOMEntry#getNamespaces()
+ */
+ public List<GOMNamespace> getNamespaces() {
+ return this.namespaces;
+ }
+
+ /**
+ * @see org.apache.lucene.gdata.gom.GOMEntry#getDefaultNamespace()
+ */
+ public GOMNamespace getDefaultNamespace() {
+
+ return this.defaultNamespace;
+ }
+
+ /**
+ * @see org.apache.lucene.gdata.gom.GOMElement#writeAtomOutput(org.apache.lucene.gdata.gom.writer.GOMStaxWriter)
+ */
+ public void writeAtomOutput(GOMOutputWriter aStreamWriter)
+ throws XMLStreamException {
+ aStreamWriter
+ .writeStartElement(this.qname, getXmlNamespaceAttributes());
+ if (this.defaultNamespace != null)
+ aStreamWriter.writeDefaultNamespace(this.defaultNamespace);
+ for (GOMNamespace namespace : this.namespaces) {
+ aStreamWriter.writeNamespace(namespace);
+ }
+ if (this.id != null)
+ this.id.writeAtomOutput(aStreamWriter);
+ if (this.published != null)
+ this.published.writeAtomOutput(aStreamWriter);
+ if (this.updated != null)
+ this.updated.writeAtomOutput(aStreamWriter);
+ for (GOMCategory category : this.categories) {
+ category.writeAtomOutput(aStreamWriter);
+ }
+ if (this.title != null)
+ this.title.writeAtomOutput(aStreamWriter);
+ if (this.summary != null)
+ this.summary.writeAtomOutput(aStreamWriter);
+ if (this.content != null)
+ this.content.writeAtomOutput(aStreamWriter);
+ for (GOMLink link : this.links) {
+ link.writeAtomOutput(aStreamWriter);
+ }
+ for (GOMAuthor autor : this.authors) {
+ autor.writeAtomOutput(aStreamWriter);
+ }
+ for (GOMContributor contributor : this.contributors) {
+ contributor.writeAtomOutput(aStreamWriter);
+ }
+ if (this.rights != null) {
+ this.rights.writeAtomOutput(aStreamWriter);
+ }
+ if (this.source != null) {
+ this.source.writeAtomOutput(aStreamWriter);
+ }
+
+ for (GOMExtension extension : this.extensions) {
+ extension.writeAtomOutput(aStreamWriter);
+ }
+ aStreamWriter.writeEndElement();
+
+ }
+
+ /**
+ * @see org.apache.lucene.gdata.gom.GOMElement#writeRssOutput(org.apache.lucene.gdata.gom.writer.GOMStaxWriter)
+ */
+ public void writeRssOutput(GOMOutputWriter aStreamWriter)
+ throws XMLStreamException {
+ aStreamWriter.writeStartElement(GOMEntry.LOCALNAME_RSS,
+ getXmlNamespaceAttributes());
+ if (this.defaultNamespace != null)
+ aStreamWriter.writeNamespace(this.defaultNamespace);
+ for (GOMNamespace namespace : this.namespaces) {
+ aStreamWriter.writeNamespace(namespace);
+ }
+ if (this.id != null)
+ this.id.writeRssOutput(aStreamWriter, GOMId.LOCALNAME_RSS);
+ String xmlLang = null;
+
+ if (this.content != null) {
+ xmlLang = this.content.getXmlLang();
+ }
+ if (xmlLang == null && this.summary != null) {
+ xmlLang = this.summary.getXmlLang();
+ }
+
+ if (xmlLang == null && this.title != null) {
+ xmlLang = this.title.getXmlLang();
+ }
+
+ if (xmlLang != null) {
+ aStreamWriter.writeSimpleXMLElement("language", xmlLang, null);
+ }
+ if (this.published != null) {
+ this.published.writeRssOutput(aStreamWriter);
+ }
+ if (this.updated != null)
+ this.updated.writeRssOutput(aStreamWriter);
+ for (GOMCategory category : this.categories) {
+ category.writeRssOutput(aStreamWriter);
+ }
+ if (this.title != null)
+ this.title.writeRssOutput(aStreamWriter);
+ if (this.summary != null)
+ this.summary.writeRssOutput(aStreamWriter);
+ if (this.content != null)
+ this.content.writeRssOutput(aStreamWriter);
+ for (GOMLink link : this.links) {
+ link.writeRssOutput(aStreamWriter);
+ }
+ for (GOMAuthor author : this.authors) {
+ author.writeRssOutput(aStreamWriter);
+ }
+
+ for (GOMContributor contributors : this.contributors) {
+ contributors.writeRssOutput(aStreamWriter);
+ }
+
+ for (GOMExtension extension : this.extensions) {
+ extension.writeRssOutput(aStreamWriter);
+ }
+ aStreamWriter.writeEndElement();
+ }
+
+ /**
+ * @see org.apache.lucene.gdata.gom.core.AbstractGOMElement#getChildParser(javax.xml.namespace.QName)
+ */
+ @Override
+ public AtomParser getChildParser(QName aName) {
+ if (aName.getNamespaceURI().equals(GOMNamespace.ATOM_NS_URI)) {
+ if (aName.getLocalPart().equals(GOMId.LOCALNAME)) {
+ // atom:feed elements MUST contain exactly one atom:id element.
+ if (this.id != null)
+ throw new GDataParseException(String.format(
+ AtomParser.DUPLICATE_ELEMENT, GOMId.LOCALNAME));
+ this.id = new GOMIdImpl();
+ return this.id;
+ }
+ if (aName.getLocalPart().equals(GOMTitle.LOCALNAME)) {
+ // atom:entry elements MUST contain exactly one atom:title
+ // element.
+ if (this.title != null)
+ throw new GDataParseException(String.format(
+ AtomParser.DUPLICATE_ELEMENT, GOMTitle.LOCALNAME));
+ this.title = new GOMTitleImpl();
+ return this.title;
+ }
+ if (aName.getLocalPart().equals(GOMAuthor.LOCALNAME)) {
+ GOMAuthor author = new GOMAuthorImpl();
+ this.authors.add(author);
+ return author;
+ }
+ if (aName.getLocalPart().equals(GOMCategory.LOCALNAME)) {
+ GOMCategory category = new GOMCategoryImpl();
+ this.categories.add(category);
+ return category;
+ }
+ if (aName.getLocalPart().equals(GOMContributor.LOCALNAME)) {
+ GOMContributorImpl impl = new GOMContributorImpl();
+ this.contributors.add(impl);
+ return impl;
+ }
+ if (aName.getLocalPart().equals(GOMLink.LOCALNAME)) {
+ GOMLinkImpl impl = new GOMLinkImpl();
+ this.links.add(impl);
+ return impl;
+ }
+
+ if (aName.getLocalPart().equals(GOMUpdated.LOCALNAME)) {
+ if (this.updated != null)
+ throw new GDataParseException(String.format(
+ AtomParser.DUPLICATE_ELEMENT,
+ GOMUpdated.LOCALNAME));
+ GOMUpdated updatedImpl = new GOMUpdatedImpl();
+ this.updated = updatedImpl;
+ return this.updated;
+
+ }
+ if (aName.getLocalPart().equals(GOMRights.LOCALNAME)) {
+ if (this.rights != null)
+ throw new GDataParseException(String
+ .format(AtomParser.DUPLICATE_ELEMENT,
+ GOMRights.LOCALNAME));
+
+ this.rights = new GOMRightsImpl();
+ return this.rights;
+
+ }
+ if (aName.getLocalPart().equals(GOMSource.LOCALNAME)) {
+ if (this.source != null)
+ throw new GDataParseException(String
+ .format(AtomParser.DUPLICATE_ELEMENT,
+ GOMSource.LOCALNAME));
+ this.source = new GOMSourceImpl();
+
+ return this.source;
+
+ }
+ if (aName.getLocalPart().equals(GOMSummary.LOCALNAME)) {
+ if (this.summary != null)
+ throw new GDataParseException(String.format(
+ AtomParser.DUPLICATE_ELEMENT,
+ GOMSummary.LOCALNAME));
+
+ this.summary = new GOMSummaryImpl();
+ return this.summary;
+
+ }
+ if (aName.getLocalPart().equals(GOMPublished.LOCALNAME)) {
+ if (this.published != null)
+ throw new GDataParseException(String.format(
+ AtomParser.DUPLICATE_ELEMENT,
+ GOMPublished.LOCALNAME));
+
+ this.published = new GOMPublishedImpl();
+ return this.published;
+
+ }
+ if (aName.getLocalPart().endsWith(GOMContent.LOCALNAME)) {
+ if (this.content != null)
+ throw new GDataParseException(String.format(
+ AtomParser.DUPLICATE_ELEMENT,
+ GOMContent.LOCALNAME));
+ this.content = new GOMContentImpl();
+ return this.content;
+
+ }
+
+ }
+ if (this.extensionFactory != null) {
+ GOMExtension extension = this.extensionFactory
+ .canHandleExtensionElement(aName);
+ if (extension != null) {
+ this.extensions.add(extension);
+ return extension;
+ }
+ }
+ return super.getChildParser(aName);
+ }
+
+ /**
+ * @see org.apache.lucene.gdata.gom.core.AbstractGOMElement#processEndElement()
+ */
+ @Override
+ public void processEndElement() {
+
+ /*
+ * atom:entry elements MUST contain an atom:summary element in either of
+ * the following cases:
+ *
+ * the atom:entry contains an atom:content that has a "src" attribute
+ * (and is thus empty). the atom:entry contains content that is encoded
+ * in Base64; i.e., the "type" attribute of atom:content is a MIME media
+ * type [MIMEREG], but is not an XML media type [RFC3023], does not
+ * begin with "text/", and does not end with "/xml" or "+xml".
+ *
+ *
+ */
+ if (this.summary == null && this.content != null) {
+
+ if (this.content.getAtomMediaType() == AtomMediaType.BINARY
+ || "".equals(this.content.getSrc())) {
+ throw new GDataParseException(String.format(
+ MISSING_ELEMENT_CHILD, this.localName,
+ GOMSummary.LOCALNAME));
+ }
+ }
+
+ /*
+ * atom:entry elements MUST contain exactly one atom:id element.
+ */
+ if (this.id == null)
+ throw new GDataParseException(String.format(
+ MISSING_ELEMENT_CHILD, this.localName, GOMId.LOCALNAME));
+ /*
+ * atom:entry elements MUST contain exactly one atom:title element.
+ */
+ if (this.title == null)
+ throw new GDataParseException(String
+ .format(MISSING_ELEMENT_CHILD, this.localName,
+ GOMTitle.LOCALNAME));
+ /*
+ * atom:entry elements MUST contain exactly one atom:updated element.
+ */
+ if (this.updated == null)
+ throw new GDataParseException(String.format(
+ MISSING_ELEMENT_CHILD, this.localName,
+ GOMUpdated.LOCALNAME));
+
+ /*
+ * atom:entry elements MUST NOT contain more than one atom:link element
+ * with a rel attribute value of "alternate" that has the same
+ * combination of type and hreflang attribute values.
+ */
+ List<GOMLink> alternateLinks = new LinkedList<GOMLink>();
+ for (GOMLink link : this.links) {
+ /*
+ * atom:link elements MAY have a "rel" attribute that indicates the
+ * link relation type. If the "rel" attribute is not present, the
+ * link element MUST be interpreted as if the link relation type is
+ * "alternate".
+ */
+ if (link.getRel() == null
+ || link.getRel().equalsIgnoreCase("alternate"))
+ alternateLinks.add(link);
+ }
+
+ /*
+ * atom:entry elements MUST NOT contain more than one atom:link element
+ * with a rel attribute value of "alternate" that has the same
+ * combination of type and hreflang attribute values.
+ */
+ if (alternateLinks.size() > 1) {
+ for (GOMLink link : alternateLinks) {
+ for (GOMLink link2 : alternateLinks) {
+ if (AtomParserUtils.compareAlternateLinks(link, link2))
+ throw new GDataParseException(
+ String
+ .format(DUPLICATE_ELEMENT,
+ "link with rel=\"alternate\" and same href and type attributes"));
+
+ }
+ }
+ } else if (this.content == null && alternateLinks.size() == 0) {
+ throw new GDataParseException(
+ "Element Entry must contain a element link with attribute alternate if no content element is set");
+ }
+ }
+
+ /**
+ * @see org.apache.lucene.gdata.gom.GOMExtensible#getExtensions()
+ */
+ public List<GOMExtension> getExtensions() {
+ return this.extensions;
+ }
+
+ /**
+ * @see org.apache.lucene.gdata.gom.GOMExtensible#setExtensionFactory(org.apache.lucene.gdata.gom.core.extension.GOMExtensionFactory)
+ */
+ public void setExtensionFactory(GOMExtensionFactory aFactory) {
+ if (extensionFactory != null) {
+ List<GOMNamespace> namespaces2 = extensionFactory.getNamespaces();
+ if (namespaces2 != null)
+ for (GOMNamespace namespace : namespaces2) {
+ this.addNamespace(namespace);
+ }
+
+ }
+ this.extensionFactory = aFactory;
+ }
+
+ /**
+ * @see org.apache.lucene.gdata.gom.GOMEntry#getContent()
+ */
+ public GOMContent getContent() {
+ return this.content;
+ }
+
+ /**
+ * @see org.apache.lucene.gdata.gom.GOMEntry#setContent(org.apache.lucene.gdata.gom.GOMContent)
+ */
+ public void setContent(GOMContent aContent) {
+ this.content = aContent;
+
+ }
+
+}
diff --git a/contrib/gdata-server/src/gom/java/org/apache/lucene/gdata/gom/core/GOMFactory.java b/contrib/gdata-server/src/gom/java/org/apache/lucene/gdata/gom/core/GOMFactory.java
new file mode 100644
index 00000000000..c58999b1fbf
--- /dev/null
+++ b/contrib/gdata-server/src/gom/java/org/apache/lucene/gdata/gom/core/GOMFactory.java
@@ -0,0 +1,47 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.lucene.gdata.gom.core;
+
+import org.apache.lucene.gdata.gom.GOMEntry;
+import org.apache.lucene.gdata.gom.GOMFeed;
+
+/**
+ * @author Simon Willnauer
+ *
+ */
+public class GOMFactory {
+ /**
+ *
+ */
+ private GOMFactory() {
+ super();
+ }
+
+ public static GOMFactory createInstance() {
+ return new GOMFactory();
+ }
+
+ public GOMFeed createFeed() {
+ return new GOMFeedImpl();
+ }
+
+ public GOMEntry createEntry() {
+ return new GOMEntryImpl();
+
+ }
+
+}
diff --git a/contrib/gdata-server/src/gom/java/org/apache/lucene/gdata/gom/core/GOMFeedImpl.java b/contrib/gdata-server/src/gom/java/org/apache/lucene/gdata/gom/core/GOMFeedImpl.java
new file mode 100644
index 00000000000..ed3c673b409
--- /dev/null
+++ b/contrib/gdata-server/src/gom/java/org/apache/lucene/gdata/gom/core/GOMFeedImpl.java
@@ -0,0 +1,381 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.lucene.gdata.gom.core;
+
+import java.util.LinkedList;
+import java.util.List;
+
+import javax.xml.namespace.QName;
+import javax.xml.stream.XMLStreamException;
+
+import org.apache.lucene.gdata.gom.GOMAttribute;
+import org.apache.lucene.gdata.gom.GOMAuthor;
+import org.apache.lucene.gdata.gom.GOMCategory;
+import org.apache.lucene.gdata.gom.GOMEntry;
+import org.apache.lucene.gdata.gom.GOMExtension;
+import org.apache.lucene.gdata.gom.GOMFeed;
+import org.apache.lucene.gdata.gom.GOMLink;
+import org.apache.lucene.gdata.gom.GOMNamespace;
+import org.apache.lucene.gdata.gom.core.extension.GOMExtensionFactory;
+import org.apache.lucene.gdata.gom.core.utils.GOMUtils;
+import org.apache.lucene.gdata.gom.writer.GOMOutputWriter;
+
+/**
+ * atom:feed { atomCommonAttributes, (atomAuthor* & atomCategory* &
+ * atomContributor* & atomGenerator? & atomIcon? & atomId & atomLink* &
+ * atomLogo? & atomRights? & atomSubtitle? & atomTitle & atomUpdated &
+ * extensionElement*), atomEntry* }
+ *
+ * @author Simon Willnauer
+ */
+class GOMFeedImpl extends GOMSourceImpl implements GOMFeed {
+ // TODO add totalResults OS namespace
+
+ static final int DEFAULT_START_INDEX = 1;
+
+ static final int DEFAULT_ITEMS_PER_PAGE = 25;
+
+ private static final GOMAttribute RSS_VERSION_ATTRIBUTE = new GOMAttributeImpl(
+ "version", "2.0");
+
+ protected List<GOMEntry> entries = new LinkedList<GOMEntry>();
+
+ protected List<GOMExtension> extensions = new LinkedList<GOMExtension>();
+
+ protected List<GOMNamespace> namespaces = new LinkedList<GOMNamespace>();
+
+ private SimpleGOMElementImpl startIndexElement;
+
+ private SimpleGOMElementImpl itemsPerPageElement;
+
+ private GOMExtensionFactory extensionFactory;
+
+ private GOMNamespace defaultNamespace = GOMNamespace.ATOM_NAMESPACE;
+
+ GOMFeedImpl() {
+ this.localName = GOMFeed.LOCALNAME;
+ this.qname = new QName(GOMNamespace.ATOM_NS_URI, this.localName);
+ startIndexElement = new SimpleGOMElementImpl(
+ SimpleGOMElementImpl.ELEMENT_OS_START_INDEX,
+ GOMNamespace.OPENSEARCH_NAMESPACE);
+ itemsPerPageElement = new SimpleGOMElementImpl(
+ SimpleGOMElementImpl.ELEMENT_OS_ITEMS_PER_PAGE,
+ GOMNamespace.OPENSEARCH_NAMESPACE);
+ itemsPerPageElement.setTextValue(Integer
+ .toString(DEFAULT_ITEMS_PER_PAGE));
+ startIndexElement.setTextValue(Integer.toString(DEFAULT_START_INDEX));
+ }
+
+ /**
+ * @see org.apache.lucene.gdata.gom.GOMSource#addEntry(org.apache.lucene.gdata.gom.GOMEntry)
+ */
+ public void addEntry(GOMEntry aEntry) {
+ if (aEntry != null)
+ this.entries.add(aEntry);
+
+ }
+
+ /**
+ * @see org.apache.lucene.gdata.gom.GOMFeed#getEntries()
+ */
+ public List<GOMEntry> getEntries() {
+ return this.entries;
+ }
+
+ /**
+ * @see org.apache.lucene.gdata.gom.GOMFeed#getItemsPerPage()
+ */
+ public int getItemsPerPage() {
+ return Integer.parseInt(this.itemsPerPageElement.getTextValue());
+ }
+
+ /**
+ * @see org.apache.lucene.gdata.gom.GOMFeed#getStartIndex()
+ */
+ public int getStartIndex() {
+ return Integer.parseInt(this.startIndexElement.getTextValue());
+ }
+
+ /**
+ * @see org.apache.lucene.gdata.gom.GOMFeed#setStartIndex(int)
+ */
+ public void setStartIndex(int aIndex) {
+ if (aIndex < 1)
+ return;
+ this.startIndexElement.textValue = Integer.toString(aIndex);
+ }
+
+ /**
+ * @see org.apache.lucene.gdata.gom.GOMFeed#setItemsPerPage(int)
+ */
+ public void setItemsPerPage(int aInt) {
+ if (aInt < 0)
+ return;
+ this.itemsPerPageElement.textValue = Integer.toString(aInt);
+ }
+
+ /**
+ * @see org.apache.lucene.gdata.gom.GOMFeed#addNamespace(org.apache.lucene.gdata.gom.GOMNamespace)
+ */
+ public void addNamespace(GOMNamespace aNamespace) {
+ if (aNamespace == null)
+ return;
+ // namespace overrides hash / equals
+ if (this.namespaces.contains(aNamespace))
+ return;
+ if ("".equals(aNamespace.getNamespacePrefix())
+ || aNamespace.getNamespaceUri()
+ .equals(GOMNamespace.ATOM_NS_URI))
+ return;
+ else
+ this.namespaces.add(aNamespace);
+ }
+
+ /**
+ * @see org.apache.lucene.gdata.gom.GOMFeed#getDefaultNamespace()
+ */
+ public GOMNamespace getDefaultNamespace() {
+ return this.defaultNamespace;
+ }
+
+ /**
+ * @see org.apache.lucene.gdata.gom.GOMFeed#getNamespaces()
+ *
+ */
+ public List<GOMNamespace> getNamespaces() {
+ return this.namespaces;
+ }
+
+ /**
+ * @see org.apache.lucene.gdata.gom.core.AtomParser#getChildParser(javax.xml.namespace.QName)
+ */
+ public AtomParser getChildParser(QName aName) {
+ if (aName.getNamespaceURI().equals(GOMNamespace.OPENSEARCH_NS_URI)) {
+ if (aName.getLocalPart().equals(
+ SimpleGOMElementImpl.ELEMENT_OS_ITEMS_PER_PAGE)) {
+
+ this.itemsPerPageElement = new SimpleGOMElementImpl(
+ SimpleGOMElementImpl.ELEMENT_OS_ITEMS_PER_PAGE,
+ GOMNamespace.OPENSEARCH_NAMESPACE);
+ this.itemsPerPageElement
+ .setValidator(new PositiveIntegerValidator(
+ SimpleGOMElementImpl.ELEMENT_OS_ITEMS_PER_PAGE));
+ return this.itemsPerPageElement;
+ }
+ if (aName.getLocalPart().equals(
+ SimpleGOMElementImpl.ELEMENT_OS_START_INDEX)) {
+ this.startIndexElement = new SimpleGOMElementImpl(
+ SimpleGOMElementImpl.ELEMENT_OS_START_INDEX,
+ GOMNamespace.OPENSEARCH_NAMESPACE);
+ this.startIndexElement
+ .setValidator(new PositiveIntegerValidator(
+ SimpleGOMElementImpl.ELEMENT_OS_START_INDEX));
+ return this.startIndexElement;
+ }
+
+ }
+ if (aName.getNamespaceURI().equals(GOMNamespace.ATOM_NS_URI)
+ && aName.getLocalPart().equals(GOMEntry.LOCALNAME)) {
+ GOMEntry entry = new GOMEntryImpl();
+ this.entries.add(entry);
+ return entry;
+
+ }
+ if (this.extensionFactory != null) {
+ GOMExtension extension = this.extensionFactory
+ .canHandleExtensionElement(aName);
+ if (extension != null) {
+ this.extensions.add(extension);
+ return extension;
+ }
+ }
+ return super.getChildParser(aName);
+
+ }
+
+ /**
+ * @see org.apache.lucene.gdata.gom.GOMElement#writeAtomOutput(org.apache.lucene.gdata.gom.writer.GOMStaxWriter)
+ */
+ public void writeAtomOutput(GOMOutputWriter aStreamWriter)
+ throws XMLStreamException {
+ aStreamWriter.writeStartElement(this.localName,
+ this.extensionAttributes);
+ if (this.defaultNamespace != null)
+ aStreamWriter.writeDefaultNamespace(this.defaultNamespace);
+ for (GOMNamespace namespace : this.namespaces) {
+ aStreamWriter.writeNamespace(namespace);
+ }
+ List<GOMAttribute> xmlNamespaceAttributes = getXmlNamespaceAttributes();
+ for (GOMAttribute attribute : xmlNamespaceAttributes) {
+ aStreamWriter.writeAttribute(attribute);
+ }
+ writeInnerAtomOutput(aStreamWriter);
+ if (this.itemsPerPageElement != null)
+ this.itemsPerPageElement.writeAtomOutput(aStreamWriter);
+ if (this.startIndexElement != null)
+ this.startIndexElement.writeAtomOutput(aStreamWriter);
+ for (GOMExtension extension : this.extensions) {
+ extension.writeAtomOutput(aStreamWriter);
+ }
+ for (GOMEntry entry : this.entries) {
+ entry.writeAtomOutput(aStreamWriter);
+ }
+
+ aStreamWriter.writeEndElement();
+
+ }
+
+ /**
+ * @see org.apache.lucene.gdata.gom.GOMElement#writeRssOutput(org.apache.lucene.gdata.gom.writer.GOMStaxWriter)
+ */
+ public void writeRssOutput(GOMOutputWriter aStreamWriter)
+ throws XMLStreamException {
+ aStreamWriter
+ .writeStartElement(LOCALNAME_RSS, this.extensionAttributes);
+ List<GOMAttribute> xmlNamespaceAttributes = getXmlNamespaceAttributes();
+ for (GOMAttribute attribute : xmlNamespaceAttributes) {
+ aStreamWriter.writeAttribute(attribute);
+ }
+ if (this.defaultNamespace != null)
+ aStreamWriter.writeNamespace(this.defaultNamespace);
+ for (GOMNamespace namespace : this.namespaces) {
+ aStreamWriter.writeNamespace(namespace);
+ }
+ aStreamWriter.writeAttribute(RSS_VERSION_ATTRIBUTE);
+
+ aStreamWriter.writeStartElement(RSS_CHANNEL_ELEMENT_NAME);
+
+ if (this.id != null)
+ this.id.writeRssOutput(aStreamWriter);
+ if (this.title != null)
+ this.title.writeRssOutput(aStreamWriter);
+ if (this.subtitle != null)
+ this.subtitle.writeRssOutput(aStreamWriter);
+ if (this.rights != null)
+ this.rights.writeRssOutput(aStreamWriter);
+ for (GOMAuthor authors : this.authors) {
+ authors.writeRssOutput(aStreamWriter, "managingEditor");
+ }
+ for (GOMCategory category : this.categories) {
+ category.writeRssOutput(aStreamWriter);
+ }
+ for (GOMLink link : this.links) {
+ link.writeRssOutput(aStreamWriter);
+ }
+ if (this.updated != null) {
+ // udated.getDate can not be null
+ aStreamWriter.writeSimpleXMLElement("lastBuildDate", GOMUtils
+ .buildRfc822Date(this.updated.getDate().getTime()), null);
+ }
+
+ if (this.logo != null || this.icon != null) {
+ aStreamWriter.writeStartElement("image");
+ if (this.logo != null)
+ this.logo.writeRssOutput(aStreamWriter);
+ else
+ this.icon.writeRssOutput(aStreamWriter);
+ aStreamWriter.writeEndElement();
+
+ }
+
+ if (this.generator != null)
+ this.generator.writeRssOutput(aStreamWriter);
+ if (this.itemsPerPageElement != null)
+ this.itemsPerPageElement.writeRssOutput(aStreamWriter);
+ if (this.startIndexElement != null)
+ this.startIndexElement.writeRssOutput(aStreamWriter);
+ for (GOMExtension extension : this.extensions) {
+ extension.writeRssOutput(aStreamWriter);
+ }
+ for (GOMExtension extension : this.extensions) {
+ extension.writeRssOutput(aStreamWriter);
+ }
+ for (GOMEntry entry : this.entries) {
+ entry.writeRssOutput(aStreamWriter);
+ }
+ // channel
+ aStreamWriter.writeEndElement();
+ // rss
+ aStreamWriter.writeEndElement();
+
+ }
+
+ static class PositiveIntegerValidator extends
+ SimpleGOMElementImpl.SimpleValidator {
+
+ protected PositiveIntegerValidator(String aLocalName) {
+ super(aLocalName);
+
+ }
+
+ /**
+ * @see org.apache.lucene.gdata.gom.core.SimpleGOMElementImpl.SimpleValidator#validate(java.lang.String)
+ */
+ @Override
+ protected void validate(String aTextValue) {
+ super.validate(aTextValue);
+ try {
+ int i = Integer.parseInt(aTextValue);
+ if (i < 0)
+ throw new GDataParseException(String.format(
+ AtomParser.INVALID_ELEMENT_VALUE, this.localName,
+ "positive integer value"));
+ } catch (NumberFormatException e) {
+ throw new GDataParseException(String.format(
+ AtomParser.INVALID_ELEMENT_VALUE, this.localName,
+ "positive integer value"));
+ }
+
+ }
+
+ }
+
+ /**
+ * @see org.apache.lucene.gdata.gom.GOMFeed#getExtensions()
+ */
+ public List<GOMExtension> getExtensions() {
+ return this.extensions;
+ }
+
+ /**
+ * @see org.apache.lucene.gdata.gom.GOMFeed#setExtensionFactory(org.apache.lucene.gdata.gom.core.extension.GOMExtensionFactory)
+ */
+ public void setExtensionFactory(GOMExtensionFactory aFactory) {
+ if (extensionFactory != null) {
+ List<GOMNamespace> namespaces2 = extensionFactory.getNamespaces();
+ if (namespaces2 != null)
+ for (GOMNamespace namespace : namespaces2) {
+ this.addNamespace(namespace);
+ }
+
+ }
+
+ this.extensionFactory = aFactory;
+
+ }
+
+ /**
+ * @see org.apache.lucene.gdata.gom.GOMFeed#addLink(org.apache.lucene.gdata.gom.GOMLink)
+ */
+ public void addLink(GOMLink aLink) {
+ if (aLink == null)
+ return;
+ this.links.add(aLink);
+
+ }
+
+}
diff --git a/contrib/gdata-server/src/gom/java/org/apache/lucene/gdata/gom/core/GOMGeneratorImpl.java b/contrib/gdata-server/src/gom/java/org/apache/lucene/gdata/gom/core/GOMGeneratorImpl.java
new file mode 100644
index 00000000000..690fb955ce7
--- /dev/null
+++ b/contrib/gdata-server/src/gom/java/org/apache/lucene/gdata/gom/core/GOMGeneratorImpl.java
@@ -0,0 +1,158 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.lucene.gdata.gom.core;
+
+import java.net.URISyntaxException;
+import java.util.List;
+
+import javax.xml.namespace.QName;
+import javax.xml.stream.XMLStreamException;
+
+import org.apache.lucene.gdata.gom.GOMAttribute;
+import org.apache.lucene.gdata.gom.GOMGenerator;
+import org.apache.lucene.gdata.gom.GOMNamespace;
+import org.apache.lucene.gdata.gom.core.utils.AtomParserUtils;
+import org.apache.lucene.gdata.gom.writer.GOMOutputWriter;
+
+/**
+ * @author Simon Willnauer
+ *
+ */
+public class GOMGeneratorImpl extends AbstractGOMElement implements
+ GOMGenerator {
+
+ private String generatorVersion;
+
+ private String uri;
+
+ /**
+ *
+ */
+ public GOMGeneratorImpl() {
+ super();
+ this.localName = GOMGenerator.LOCALNAME;
+ this.qname = new QName(GOMNamespace.ATOM_NS_URI, this.localName);
+ }
+
+ /**
+ * @see org.apache.lucene.gdata.gom.GOMGenerator#setUri(java.lang.String)
+ */
+ public void setUri(String aUri) {
+ this.uri = aUri;
+
+ }
+
+ /**
+ * @see org.apache.lucene.gdata.gom.GOMGenerator#setGeneratorVersion(java.lang.String)
+ */
+ public void setGeneratorVersion(String aVersion) {
+ this.generatorVersion = aVersion;
+
+ }
+
+ /**
+ * @see org.apache.lucene.gdata.gom.GOMGenerator#getGeneratorVersion()
+ */
+ public String getGeneratorVersion() {
+ return this.generatorVersion;
+ }
+
+ /**
+ * @see org.apache.lucene.gdata.gom.GOMGenerator#getUri()
+ */
+ public String getUri() {
+ return this.uri;
+ }
+
+ /**
+ * @see org.apache.lucene.gdata.gom.core.AbstractGOMElement#processAttribute(javax.xml.namespace.QName,
+ * java.lang.String)
+ */
+ @Override
+ public void processAttribute(QName aQName, String aValue) {
+ if (aQName == null)
+ throw new IllegalArgumentException("Qname must not be null");
+ if (aValue == null)
+ throw new IllegalArgumentException("Value must not be null");
+ if (aQName.getNamespaceURI().equals(GOMNamespace.ATOM_NS_URI)) {
+ if (aQName.getLocalPart().equals("uri")) {
+ if (this.uri != null)
+ throw new GDataParseException(String.format(
+ AtomParser.DUPLICATE_ATTRIBUTE, "uri"));
+ this.uri = aValue;
+ } else if (aQName.getLocalPart().equals("version")) {
+ if (this.generatorVersion != null)
+ throw new GDataParseException(String.format(
+ AtomParser.DUPLICATE_ATTRIBUTE, "version"));
+ this.generatorVersion = aValue;
+ }
+ }
+ super.processAttribute(aQName, aValue);
+ }
+
+ /**
+ * @see org.apache.lucene.gdata.gom.core.AbstractGOMElement#processElementValue(java.lang.String)
+ */
+ @Override
+ public void processElementValue(String aValue) {
+ if (this.textValue != null)
+ throw new GDataParseException(String.format(
+ AtomParser.DUPLICATE_ELEMENT_VALUE, this.localName));
+ this.textValue = aValue;
+
+ }
+
+ /**
+ * @see org.apache.lucene.gdata.gom.core.AbstractGOMElement#processEndElement()
+ */
+ @Override
+ public void processEndElement() {
+ if (this.uri != null)
+ try {
+ AtomParserUtils.getAbsolutAtomURI(this.xmlBase, this.uri);
+ } catch (URISyntaxException e) {
+ throw new GDataParseException(String.format(
+ AtomParser.INVALID_ELEMENT_VALUE, this.localName,
+ "absolute uri"));
+ }
+
+ }
+
+ /**
+ * @see org.apache.lucene.gdata.gom.GOMElement#writeAtomOutput(org.apache.lucene.gdata.gom.writer.GOMStaxWriter)
+ */
+ public void writeAtomOutput(GOMOutputWriter aStreamWriter)
+ throws XMLStreamException {
+ List<GOMAttribute> list = getXmlNamespaceAttributes();
+ if (this.uri != null)
+ list.add(new GOMAttributeImpl("uri", this.uri));
+ if (this.generatorVersion != null)
+ list.add(new GOMAttributeImpl("version", this.generatorVersion));
+
+ aStreamWriter.writeSimpleXMLElement(this.qname, list, this.textValue);
+ }
+
+ /**
+ * @see org.apache.lucene.gdata.gom.GOMElement#writeRssOutput(org.apache.lucene.gdata.gom.writer.GOMStaxWriter)
+ */
+ public void writeRssOutput(GOMOutputWriter aStreamWriter)
+ throws XMLStreamException {
+ aStreamWriter.writeSimpleXMLElement(this.localName,
+ getXmlNamespaceAttributes(), this.textValue);
+ }
+
+}
diff --git a/contrib/gdata-server/src/gom/java/org/apache/lucene/gdata/gom/core/GOMIconImpl.java b/contrib/gdata-server/src/gom/java/org/apache/lucene/gdata/gom/core/GOMIconImpl.java
new file mode 100644
index 00000000000..c84c7386623
--- /dev/null
+++ b/contrib/gdata-server/src/gom/java/org/apache/lucene/gdata/gom/core/GOMIconImpl.java
@@ -0,0 +1,51 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.lucene.gdata.gom.core;
+
+import javax.xml.namespace.QName;
+import javax.xml.stream.XMLStreamException;
+
+import org.apache.lucene.gdata.gom.GOMIcon;
+import org.apache.lucene.gdata.gom.GOMNamespace;
+import org.apache.lucene.gdata.gom.writer.GOMOutputWriter;
+
+/**
+ * @author Simon Willnauer
+ *
+ */
+public class GOMIconImpl extends AtomUriElement implements GOMIcon {
+
+ /**
+ *
+ */
+ public GOMIconImpl() {
+ this.localName = GOMIcon.LOCALNAME;
+ this.qname = new QName(GOMNamespace.ATOM_NS_URI, this.localName);
+
+ }
+
+ /**
+ * @see org.apache.lucene.gdata.gom.core.SimpleGOMElementImpl#writeRssOutput(org.apache.lucene.gdata.gom.writer.GOMStaxWriter)
+ */
+ @Override
+ public void writeRssOutput(GOMOutputWriter aStreamWriter)
+ throws XMLStreamException {
+ aStreamWriter.writeSimpleXMLElement("url", getXmlNamespaceAttributes(),
+ this.textValue);
+ }
+
+}
diff --git a/contrib/gdata-server/src/gom/java/org/apache/lucene/gdata/gom/core/GOMIdImpl.java b/contrib/gdata-server/src/gom/java/org/apache/lucene/gdata/gom/core/GOMIdImpl.java
new file mode 100644
index 00000000000..b8a582a73c7
--- /dev/null
+++ b/contrib/gdata-server/src/gom/java/org/apache/lucene/gdata/gom/core/GOMIdImpl.java
@@ -0,0 +1,103 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.lucene.gdata.gom.core;
+
+import javax.xml.namespace.QName;
+import javax.xml.stream.XMLStreamException;
+
+import org.apache.lucene.gdata.gom.GOMId;
+import org.apache.lucene.gdata.gom.GOMNamespace;
+import org.apache.lucene.gdata.gom.writer.GOMOutputWriter;
+
+/**
+ * @author Simon Willnauer
+ *
+ */
+class GOMIdImpl extends AbstractGOMElement implements GOMId {
+
+ protected static final QName ATOM_QNAME = new QName(
+ GOMNamespace.ATOM_NS_URI, LOCALNAME, GOMNamespace.ATOM_NS_PREFIX);
+
+ GOMIdImpl() {
+ this.localName = LOCALNAME;
+ this.qname = new QName(GOMNamespace.ATOM_NS_URI, this.localName);
+ }
+
+ /**
+ * @see org.apache.lucene.gdata.gom.core.AbstractGOMElement#getLocalName()
+ */
+ @Override
+ public String getLocalName() {
+ return this.localName;
+ }
+
+ /**
+ * @see org.apache.lucene.gdata.gom.core.AtomParser#processElementValue(java.lang.String)
+ */
+ public void processElementValue(String aValue) {
+ this.textValue = aValue;
+
+ }
+
+ /**
+ * @see org.apache.lucene.gdata.gom.core.AtomParser#processEndElement()
+ */
+ public void processEndElement() {
+ if (this.textValue == null)
+ throw new GDataParseException(
+ "Element id must have a unique id value -- is null");
+
+ }
+
+ /**
+ * @see org.apache.lucene.gdata.gom.GOMElement#writeAtomOutput(org.apache.lucene.gdata.gom.writer.GOMStaxWriter)
+ */
+ public void writeAtomOutput(GOMOutputWriter aStreamWriter)
+ throws XMLStreamException {
+ if (aStreamWriter == null)
+ throw new GDataParseException("GOMWriter must not be null");
+ aStreamWriter.writeSimpleXMLElement(LOCALNAME,
+ getXmlNamespaceAttributes(), this.textValue);
+
+ }
+
+ /**
+ * @see org.apache.lucene.gdata.gom.GOMElement#writeRssOutput(org.apache.lucene.gdata.gom.writer.GOMStaxWriter)
+ */
+ public void writeRssOutput(GOMOutputWriter aStreamWriter)
+ throws XMLStreamException {
+ if (aStreamWriter == null)
+ throw new GDataParseException("GOMWriter must not be null");
+ aStreamWriter.writeSimpleXMLElement(ATOM_QNAME,
+ getXmlNamespaceAttributes(), this.textValue);
+
+ }
+
+ /**
+ * @see org.apache.lucene.gdata.gom.core.AbstractGOMElement#writeRssOutput(org.apache.lucene.gdata.gom.writer.GOMOutputWriter,
+ * java.lang.String)
+ */
+ @Override
+ public void writeRssOutput(GOMOutputWriter aStreamWriter, String aRssName)
+ throws XMLStreamException {
+ if (aStreamWriter == null)
+ throw new GDataParseException("GOMWriter must not be null");
+ aStreamWriter.writeSimpleXMLElement(aRssName,
+ getXmlNamespaceAttributes(), this.textValue);
+ }
+
+}
diff --git a/contrib/gdata-server/src/gom/java/org/apache/lucene/gdata/gom/core/GOMLinkImpl.java b/contrib/gdata-server/src/gom/java/org/apache/lucene/gdata/gom/core/GOMLinkImpl.java
new file mode 100644
index 00000000000..3ed47b38d2c
--- /dev/null
+++ b/contrib/gdata-server/src/gom/java/org/apache/lucene/gdata/gom/core/GOMLinkImpl.java
@@ -0,0 +1,270 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.lucene.gdata.gom.core;
+
+import java.net.URISyntaxException;
+import java.util.List;
+
+import javax.xml.namespace.QName;
+import javax.xml.stream.XMLStreamException;
+
+import org.apache.lucene.gdata.gom.GOMAttribute;
+import org.apache.lucene.gdata.gom.GOMLink;
+import org.apache.lucene.gdata.gom.GOMNamespace;
+import org.apache.lucene.gdata.gom.core.utils.AtomParserUtils;
+import org.apache.lucene.gdata.gom.core.utils.GOMUtils;
+import org.apache.lucene.gdata.gom.writer.GOMOutputWriter;
+
+/**
+ * element atom:link { atomCommonAttributes, attribute href { atomUri },
+ * attribute rel { atomNCName | atomUri }?, attribute type { atomMediaType }?,
+ * attribute hreflang { atomLanguageTag }?, attribute title { text }?, attribute
+ * length { text }?, undefinedContent }
+ *
+ * @author Simon Willnauer
+ *
+ */
+public class GOMLinkImpl extends AbstractGOMElement implements GOMLink {
+ private String href;
+
+ private String rel;
+
+ private String type;
+
+ private String hrefLang;
+
+ private String title;
+
+ private Integer length;
+
+ /**
+ *
+ */
+ public GOMLinkImpl() {
+ super();
+ this.localName = LOCALNAME;
+ this.qname = new QName(this.localName);
+ }
+
+ /**
+ * @see org.apache.lucene.gdata.gom.GOMLink#getHref()
+ */
+ public String getHref() {
+ return this.href;
+ }
+
+ /**
+ * @see org.apache.lucene.gdata.gom.GOMLink#setHref(java.lang.String)
+ */
+ public void setHref(String aHref) {
+ href = aHref;
+ }
+
+ /**
+ * @see org.apache.lucene.gdata.gom.GOMLink#getHrefLang()
+ */
+ public String getHrefLang() {
+ return this.hrefLang;
+ }
+
+ /**
+ * @see org.apache.lucene.gdata.gom.GOMLink#setHrefLang(java.lang.String)
+ */
+ public void setHrefLang(String aHrefLang) {
+ hrefLang = aHrefLang;
+ }
+
+ /**
+ * @see org.apache.lucene.gdata.gom.GOMLink#getLength()
+ */
+ public Integer getLength() {
+ return this.length;
+ }
+
+ /**
+ * @see org.apache.lucene.gdata.gom.GOMLink#setLength(java.lang.String)
+ */
+ public void setLength(Integer aLength) {
+ length = aLength;
+ }
+
+ /**
+ * @see org.apache.lucene.gdata.gom.GOMLink#getRel()
+ */
+ public String getRel() {
+ return this.rel;
+ }
+
+ /**
+ * @see org.apache.lucene.gdata.gom.GOMLink#setRel(java.lang.String)
+ */
+ public void setRel(String aRel) {
+ rel = aRel;
+ }
+
+ /**
+ * @see org.apache.lucene.gdata.gom.GOMLink#getTitle()
+ */
+ public String getTitle() {
+ return this.title;
+ }
+
+ /**
+ * @see org.apache.lucene.gdata.gom.GOMLink#setTitle(java.lang.String)
+ */
+ public void setTitle(String aTitle) {
+ title = aTitle;
+ }
+
+ /**
+ * @see org.apache.lucene.gdata.gom.GOMLink#getType()
+ */
+ public String getType() {
+ return this.type;
+ }
+
+ /**
+ * @see org.apache.lucene.gdata.gom.GOMLink#setType(java.lang.String)
+ */
+ public void setType(String aType) {
+ type = aType;
+ }
+
+ /**
+ * @see org.apache.lucene.gdata.gom.core.AbstractGOMElement#processAttribute(javax.xml.namespace.QName,
+ * java.lang.String)
+ */
+ @Override
+ public void processAttribute(QName aQName, String aValue) {
+ if (aQName == null)
+ throw new IllegalArgumentException("QName must not be null");
+
+ if (aQName.getNamespaceURI().equals(GOMNamespace.ATOM_NS_URI)
+ || aQName.getNamespaceURI().equals("")) {
+ String localName = aQName.getLocalPart();
+
+ if (localName.equals("href")) {
+ if (this.href != null)
+ throw new GDataParseException(String.format(
+ DUPLICATE_ATTRIBUTE, "href"));
+ this.href = aValue;
+ } else if (localName.equals("type")) {
+ if (this.type != null)
+ throw new GDataParseException(String.format(
+ DUPLICATE_ATTRIBUTE, "type"));
+ this.type = aValue;
+ } else if (localName.equals("rel")) {
+ if (this.rel != null)
+ throw new GDataParseException(String.format(
+ DUPLICATE_ATTRIBUTE, "rel"));
+ this.rel = aValue;
+ } else if (localName.equals("title")) {
+ if (this.title != null)
+ throw new GDataParseException(String.format(
+ DUPLICATE_ATTRIBUTE, "title"));
+ this.title = aValue;
+
+ } else if (localName.equals("hreflang")) {
+ if (this.hrefLang != null)
+ throw new GDataParseException(String.format(
+ DUPLICATE_ATTRIBUTE, "hreflang"));
+ this.hrefLang = aValue;
+ } else if (localName.equals("length")) {
+ if (this.length != null)
+ throw new GDataParseException(String.format(
+ DUPLICATE_ATTRIBUTE, "length"));
+ try {
+ this.length = new Integer(Integer.parseInt(aValue));
+ } catch (NumberFormatException e) {
+ throw new GDataParseException(
+ "attribute lenght must be an integer");
+ }
+ }
+
+ }
+ super.processAttribute(aQName, aValue);
+ }
+
+ /**
+ * @see org.apache.lucene.gdata.gom.core.AbstractGOMElement#processEndElement()
+ */
+ @Override
+ public void processEndElement() {
+ if (this.href == null)
+ throw new GDataParseException(String.format(
+ MISSING_ELEMENT_ATTRIBUTE, this.localName, "href"));
+ try {
+ AtomParserUtils.getAbsolutAtomURI(this.xmlBase, this.href);
+ } catch (URISyntaxException e) {
+ throw new GDataParseException(String.format(INVALID_ATTRIBUTE,
+ "href", "absolute uri"), e);
+ }
+
+ }
+
+ /**
+ * @see org.apache.lucene.gdata.gom.GOMElement#writeAtomOutput(org.apache.lucene.gdata.gom.writer.GOMStaxWriter)
+ */
+ public void writeAtomOutput(GOMOutputWriter aStreamWriter)
+ throws XMLStreamException {
+ List<GOMAttribute> attList = getXmlNamespaceAttributes();
+ attList.add(GOMUtils.buildDefaultNamespaceAttribute(
+ this.href == null ? "" : this.href, "href"));
+ if (this.rel != null)
+ attList.add(GOMUtils
+ .buildDefaultNamespaceAttribute(this.rel, "rel"));
+ if (this.title != null)
+ attList.add(GOMUtils.buildDefaultNamespaceAttribute(this.title,
+ "title"));
+ if (this.type != null)
+ attList.add(GOMUtils.buildDefaultNamespaceAttribute(this.type,
+ "type"));
+ if (this.hrefLang != null)
+ attList.add(GOMUtils.buildDefaultNamespaceAttribute(this.hrefLang,
+ "hreflang"));
+ if (this.length != null)
+ attList.add(GOMUtils.buildDefaultNamespaceAttribute(this.length
+ .toString(), "length"));
+
+ aStreamWriter.writeSimpleXMLElement(this.qname, attList, null);
+
+ }
+
+ /**
+ * @see org.apache.lucene.gdata.gom.GOMElement#writeRssOutput(org.apache.lucene.gdata.gom.writer.GOMStaxWriter)
+ */
+ public void writeRssOutput(GOMOutputWriter aStreamWriter)
+ throws XMLStreamException {
+ List<GOMAttribute> xmlNamespaceAttributes = getXmlNamespaceAttributes();
+ if (this.rel != null && rel.equalsIgnoreCase("enclosure")) {
+ if (type != null)
+ xmlNamespaceAttributes.add(GOMUtils
+ .buildDefaultNamespaceAttribute(type, "type"));
+ if (href != null)
+ xmlNamespaceAttributes.add(GOMUtils
+ .buildDefaultNamespaceAttribute(href, "href"));
+
+ aStreamWriter.writeSimpleXMLElement("enclosure",
+ xmlNamespaceAttributes, null);
+ } else if ("comments".equalsIgnoreCase(this.rel))
+ aStreamWriter.writeSimpleXMLElement("comments", null, this.href);
+
+ else if ("alternate".equalsIgnoreCase(this.rel))
+ aStreamWriter.writeSimpleXMLElement("link", null, this.href);
+ }
+
+}
diff --git a/contrib/gdata-server/src/gom/java/org/apache/lucene/gdata/gom/core/GOMLogoImpl.java b/contrib/gdata-server/src/gom/java/org/apache/lucene/gdata/gom/core/GOMLogoImpl.java
new file mode 100644
index 00000000000..93f9ab6b208
--- /dev/null
+++ b/contrib/gdata-server/src/gom/java/org/apache/lucene/gdata/gom/core/GOMLogoImpl.java
@@ -0,0 +1,51 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.lucene.gdata.gom.core;
+
+import javax.xml.namespace.QName;
+import javax.xml.stream.XMLStreamException;
+
+import org.apache.lucene.gdata.gom.GOMLogo;
+import org.apache.lucene.gdata.gom.GOMNamespace;
+import org.apache.lucene.gdata.gom.writer.GOMOutputWriter;
+
+/**
+ * @author Simon Willnauer
+ *
+ */
+public class GOMLogoImpl extends AtomUriElement implements GOMLogo {
+
+ /**
+ * default class constructor
+ */
+ public GOMLogoImpl() {
+ this.localName = GOMLogo.LOCALNAME;
+ this.qname = new QName(GOMNamespace.ATOM_NS_URI, this.localName);
+
+ }
+
+ /**
+ * @see org.apache.lucene.gdata.gom.core.SimpleGOMElementImpl#writeRssOutput(org.apache.lucene.gdata.gom.writer.GOMStaxWriter)
+ */
+ @Override
+ public void writeRssOutput(GOMOutputWriter aStreamWriter)
+ throws XMLStreamException {
+ aStreamWriter.writeSimpleXMLElement("url", getXmlNamespaceAttributes(),
+ this.textValue);
+ }
+
+}
diff --git a/contrib/gdata-server/src/gom/java/org/apache/lucene/gdata/gom/core/GOMPersonImpl.java b/contrib/gdata-server/src/gom/java/org/apache/lucene/gdata/gom/core/GOMPersonImpl.java
new file mode 100644
index 00000000000..69385415606
--- /dev/null
+++ b/contrib/gdata-server/src/gom/java/org/apache/lucene/gdata/gom/core/GOMPersonImpl.java
@@ -0,0 +1,245 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.lucene.gdata.gom.core;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.xml.namespace.QName;
+import javax.xml.stream.XMLStreamException;
+
+import org.apache.lucene.gdata.gom.GOMAttribute;
+import org.apache.lucene.gdata.gom.GOMNamespace;
+import org.apache.lucene.gdata.gom.core.utils.GOMUtils;
+import org.apache.lucene.gdata.gom.writer.GOMOutputWriter;
+
+/**
+ * @author Simon Willnauer
+ *
+ */
+public class GOMPersonImpl extends AbstractGOMElement implements
+ org.apache.lucene.gdata.gom.GOMPerson {
+
+ private final static String NAME_LOCAL_NAME = "name";
+
+ private final static String EMAIL_LOCAL_NAME = "email";
+
+ private final static String URI_LOCAL_NAME = "uri";
+
+ protected String uri;
+
+ protected String email;
+
+ protected String name;
+
+ /**
+ *
+ */
+ public GOMPersonImpl() {
+ super();
+ this.localName = LOCALNAME;
+ this.qname = new QName(GOMNamespace.ATOM_NS_URI, this.localName);
+
+ }
+
+ /**
+ * @see org.apache.lucene.gdata.gom.GOMPerson#setName(java.lang.String)
+ */
+ public void setName(String aName) {
+ this.name = aName;
+
+ }
+
+ /**
+ * @see org.apache.lucene.gdata.gom.GOMPerson#setEmail(java.lang.String)
+ */
+ public void setEmail(String aEmail) {
+ this.email = aEmail;
+ }
+
+ /**
+ * @see org.apache.lucene.gdata.gom.GOMPerson#setUri(java.lang.String)
+ */
+ public void setUri(String aUri) {
+ this.uri = aUri;
+ }
+
+ /**
+ * @see org.apache.lucene.gdata.gom.GOMPerson#getName()
+ */
+ public String getName() {
+
+ return this.name;
+ }
+
+ /**
+ * @see org.apache.lucene.gdata.gom.GOMPerson#getEmail()
+ */
+ public String getEmail() {
+ return this.email;
+ }
+
+ /**
+ * @see org.apache.lucene.gdata.gom.GOMPerson#getUri()
+ */
+ public String getUri() {
+
+ return this.uri;
+ }
+
+ /**
+ * @see org.apache.lucene.gdata.gom.GOMElement#writeAtomOutput(org.apache.lucene.gdata.gom.writer.GOMStaxWriter)
+ */
+ public void writeAtomOutput(GOMOutputWriter aStreamWriter)
+ throws XMLStreamException {
+ 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();
+
+ }
+
+ /**
+ * @see org.apache.lucene.gdata.gom.GOMElement#writeRssOutput(org.apache.lucene.gdata.gom.writer.GOMStaxWriter)
+ */
+ public void writeRssOutput(GOMOutputWriter aStreamWriter)
+ throws XMLStreamException {
+ //
+ }
+
+ /**
+ * @see org.apache.lucene.gdata.gom.core.AbstractGOMElement#getChildParser(javax.xml.namespace.QName)
+ */
+ @Override
+ public AtomParser getChildParser(QName aName) {
+ 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);
+ }
+
+ /**
+ * @see org.apache.lucene.gdata.gom.core.AbstractGOMElement#processEndElement()
+ */
+ @Override
+ public void processEndElement() {
+ if (this.name == null)
+ throw new GDataParseException(String.format(
+ AtomParser.MISSING_ELEMENT_CHILD, this.localName,
+ NAME_LOCAL_NAME));
+ }
+
+ class NameParser extends SimpleElementParser {
+
+ NameParser() {
+ this.localname = NAME_LOCAL_NAME;
+ }
+
+ /**
+ * @see org.apache.lucene.gdata.gom.core.AtomParser#processEndElement()
+ */
+ public void processEndElement() {
+ if (name != null)
+ throw new GDataParseException(String.format(
+ AtomParser.DUPLICATE_ELEMENT, this.localname));
+ if (this.aString != null)
+ name = this.aString;
+
+ }
+
+ }
+
+ class UriParser extends SimpleElementParser {
+
+ UriParser() {
+ this.localname = URI_LOCAL_NAME;
+ }
+
+ /**
+ * @see org.apache.lucene.gdata.gom.core.AtomParser#processEndElement()
+ */
+ public void processEndElement() {
+ if (uri != null)
+ throw new GDataParseException(String.format(
+ AtomParser.DUPLICATE_ELEMENT, this.localname));
+ if (this.aString != null)
+ uri = this.aString;
+
+ }
+
+ }
+
+ class EmailParser extends SimpleElementParser {
+
+ EmailParser() {
+ this.localname = EMAIL_LOCAL_NAME;
+ }
+
+ /**
+ * @see org.apache.lucene.gdata.gom.core.AtomParser#processEndElement()
+ */
+ public void processEndElement() {
+ if (email != null)
+ throw new GDataParseException(String.format(
+ AtomParser.DUPLICATE_ELEMENT, this.localname));
+ if (this.aString != null)
+ email = this.aString;
+
+ }
+
+ }
+
+ /**
+ * @see org.apache.lucene.gdata.gom.core.AbstractGOMElement#writeRssOutput(org.apache.lucene.gdata.gom.writer.GOMOutputWriter,
+ * java.lang.String)
+ */
+ @Override
+ public void writeRssOutput(GOMOutputWriter aStreamWriter, String aRssName)
+ throws XMLStreamException {
+ 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());
+
+ }
+
+}
diff --git a/contrib/gdata-server/src/gom/java/org/apache/lucene/gdata/gom/core/GOMPublishedImpl.java b/contrib/gdata-server/src/gom/java/org/apache/lucene/gdata/gom/core/GOMPublishedImpl.java
new file mode 100644
index 00000000000..274ac900fc6
--- /dev/null
+++ b/contrib/gdata-server/src/gom/java/org/apache/lucene/gdata/gom/core/GOMPublishedImpl.java
@@ -0,0 +1,55 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.lucene.gdata.gom.core;
+
+import javax.xml.namespace.QName;
+import javax.xml.stream.XMLStreamException;
+
+import org.apache.lucene.gdata.gom.GOMPublished;
+import org.apache.lucene.gdata.gom.core.utils.GOMUtils;
+import org.apache.lucene.gdata.gom.writer.GOMOutputWriter;
+
+/**
+ * @author Simon Willnauer
+ *
+ */
+public class GOMPublishedImpl extends GOMDateConstructImpl implements
+ GOMPublished {
+ protected static final QName RSS_QNAME = new QName("pubDate");
+
+ /**
+ *
+ */
+ public GOMPublishedImpl() {
+ this.localName = GOMPublished.LOCALNAME;
+ this.qname = new QName(this.localName);
+ }
+
+ /**
+ * @see org.apache.lucene.gdata.gom.GOMElement#writeRssOutput(org.apache.lucene.gdata.gom.writer.GOMStaxWriter)
+ */
+ public void writeRssOutput(GOMOutputWriter aStreamWriter)
+ throws XMLStreamException {
+ String rssRFC3339Date = GOMUtils
+ .buildRfc822Date(this.date == 0 ? System.currentTimeMillis()
+ : this.date);
+ aStreamWriter.writeSimpleXMLElement(RSS_QNAME,
+ getXmlNamespaceAttributes(), rssRFC3339Date);
+
+ }
+
+}
diff --git a/contrib/gdata-server/src/gom/java/org/apache/lucene/gdata/gom/core/GOMRightsImpl.java b/contrib/gdata-server/src/gom/java/org/apache/lucene/gdata/gom/core/GOMRightsImpl.java
new file mode 100644
index 00000000000..94b9a155ac8
--- /dev/null
+++ b/contrib/gdata-server/src/gom/java/org/apache/lucene/gdata/gom/core/GOMRightsImpl.java
@@ -0,0 +1,49 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.lucene.gdata.gom.core;
+
+import javax.xml.namespace.QName;
+import javax.xml.stream.XMLStreamException;
+
+import org.apache.lucene.gdata.gom.GOMNamespace;
+import org.apache.lucene.gdata.gom.GOMRights;
+import org.apache.lucene.gdata.gom.writer.GOMOutputWriter;
+
+/**
+ * @author Simon Willnauer
+ *
+ */
+public class GOMRightsImpl extends GOMTextContructImpl implements GOMRights {
+
+ /**
+ *
+ */
+ public GOMRightsImpl() {
+ this.localName = GOMRights.LOCALNAME;
+ this.rssLocalName = GOMRights.LOCALNAME;
+ this.qname = new QName(GOMNamespace.ATOM_NS_URI, this.localName);
+ }
+
+ /**
+ * @see org.apache.lucene.gdata.gom.core.GOMTextContructImpl#writeRssOutput(org.apache.lucene.gdata.gom.writer.GOMStaxWriter)
+ */
+ @Override
+ public void writeRssOutput(GOMOutputWriter aStreamWriter)
+ throws XMLStreamException {
+ aStreamWriter.writeSimpleXMLElement("copyright", null, this.textValue);
+ }
+}
diff --git a/contrib/gdata-server/src/gom/java/org/apache/lucene/gdata/gom/core/GOMSourceImpl.java b/contrib/gdata-server/src/gom/java/org/apache/lucene/gdata/gom/core/GOMSourceImpl.java
new file mode 100644
index 00000000000..6e0ad96d3d6
--- /dev/null
+++ b/contrib/gdata-server/src/gom/java/org/apache/lucene/gdata/gom/core/GOMSourceImpl.java
@@ -0,0 +1,544 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.lucene.gdata.gom.core;
+
+import java.util.LinkedList;
+import java.util.List;
+
+import javax.xml.namespace.QName;
+import javax.xml.stream.XMLStreamException;
+
+import org.apache.lucene.gdata.gom.GOMAttribute;
+import org.apache.lucene.gdata.gom.GOMAuthor;
+import org.apache.lucene.gdata.gom.GOMCategory;
+import org.apache.lucene.gdata.gom.GOMContributor;
+import org.apache.lucene.gdata.gom.GOMGenerator;
+import org.apache.lucene.gdata.gom.GOMIcon;
+import org.apache.lucene.gdata.gom.GOMId;
+import org.apache.lucene.gdata.gom.GOMLink;
+import org.apache.lucene.gdata.gom.GOMLogo;
+import org.apache.lucene.gdata.gom.GOMNamespace;
+import org.apache.lucene.gdata.gom.GOMRights;
+import org.apache.lucene.gdata.gom.GOMSource;
+import org.apache.lucene.gdata.gom.GOMSubtitle;
+import org.apache.lucene.gdata.gom.GOMTitle;
+import org.apache.lucene.gdata.gom.GOMUpdated;
+import org.apache.lucene.gdata.gom.core.utils.AtomParserUtils;
+import org.apache.lucene.gdata.gom.writer.GOMOutputWriter;
+
+/**
+ * @author Simon Willnauer
+ *
+ */
+public class GOMSourceImpl extends AbstractGOMElement implements GOMSource {
+
+ protected List<GOMAuthor> authors = new LinkedList<GOMAuthor>();
+
+ protected List<GOMCategory> categories = new LinkedList<GOMCategory>();
+
+ protected List<GOMLink> links = new LinkedList<GOMLink>();
+
+ protected List<GOMContributor> contributors = new LinkedList<GOMContributor>();
+
+ protected GOMGenerator generator;
+
+ protected GOMId id;
+
+ protected GOMLogo logo;
+
+ protected GOMRights rights;
+
+ protected GOMSubtitle subtitle;
+
+ protected GOMTitle title;
+
+ protected GOMUpdated updated;
+
+ protected GOMIcon icon;
+
+ GOMSourceImpl() {
+ this.localName = LOCALNAME;
+ this.qname = new QName(GOMNamespace.ATOM_NS_URI, this.localName);
+ }
+
+ /**
+ * @see org.apache.lucene.gdata.gom.core.AbstractGOMElement#getLocalName()
+ */
+ @Override
+ public String getLocalName() {
+ return this.localName;
+ }
+
+ /**
+ * @see org.apache.lucene.gdata.gom.GOMSource#addAuthor(org.apache.lucene.gdata.gom.GOMAuthor)
+ */
+ public void addAuthor(GOMAuthor aAuthor) {
+ if (aAuthor != null)
+ this.authors.add(aAuthor);
+
+ }
+
+ /**
+ * @see org.apache.lucene.gdata.gom.GOMSource#addCategory(org.apache.lucene.gdata.gom.GOMCategory)
+ */
+ public void addCategory(GOMCategory aCategory) {
+ if (aCategory != null)
+ this.categories.add(aCategory);
+
+ }
+
+ /**
+ * @see org.apache.lucene.gdata.gom.GOMSource#addContributor(org.apache.lucene.gdata.gom.GOMContributor)
+ */
+ public void addContributor(GOMContributor aContributor) {
+ if (aContributor != null)
+ this.contributors.add(aContributor);
+
+ }
+
+ /**
+ * @see org.apache.lucene.gdata.gom.GOMSource#getAuthors()
+ *
+ */
+ public List<GOMAuthor> getAuthors() {
+ return this.authors;
+ }
+
+ /**
+ * @see org.apache.lucene.gdata.gom.GOMSource#getCategories()
+ *
+ */
+ public List<GOMCategory> getCategories() {
+ return this.categories;
+ }
+
+ /**
+ * @see org.apache.lucene.gdata.gom.GOMSource#getContributor()
+ */
+ public List<GOMContributor> getContributor() {
+ return this.contributors;
+ }
+
+ /**
+ * @see org.apache.lucene.gdata.gom.GOMSource#getGenerator()
+ *
+ */
+ public GOMGenerator getGenerator() {
+ return this.generator;
+ }
+
+ /**
+ * @see org.apache.lucene.gdata.gom.GOMSource#getId()
+ *
+ */
+ public GOMId getId() {
+ return this.id;
+ }
+
+ /**
+ * @see org.apache.lucene.gdata.gom.GOMSource#setGenerator(org.apache.lucene.gdata.gom.GOMGenerator)
+ *
+ */
+ public void setGenerator(GOMGenerator aGenerator) {
+ this.generator = aGenerator;
+
+ }
+
+ /**
+ * @see org.apache.lucene.gdata.gom.GOMSource#setIcon(org.apache.lucene.gdata.gom.GOMIcon)
+ *
+ */
+ public void setIcon(GOMIcon aIcon) {
+ this.icon = aIcon;
+
+ }
+
+ /**
+ * @see org.apache.lucene.gdata.gom.GOMSource#setId(org.apache.lucene.gdata.gom.GOMId)
+ *
+ */
+ public void setId(GOMId aId) {
+ this.id = aId;
+
+ }
+
+ /**
+ * @return the logo
+ *
+ */
+ public GOMLogo getLogo() {
+ return this.logo;
+ }
+
+ /**
+ * @param aLogo
+ * the logo to set
+ *
+ */
+ public void setLogo(GOMLogo aLogo) {
+ this.logo = aLogo;
+ }
+
+ /**
+ * @return the rights
+ *
+ */
+ public GOMRights getRights() {
+ return this.rights;
+ }
+
+ /**
+ * @param aRights
+ * the rights to set
+ *
+ */
+ public void setRights(GOMRights aRights) {
+ rights = aRights;
+ }
+
+ /**
+ * @return the subtitle
+ *
+ */
+ public GOMSubtitle getSubtitle() {
+ return this.subtitle;
+ }
+
+ /**
+ * @param aSubtitle
+ * the subtitle to set
+ *
+ */
+ public void setSubtitle(GOMSubtitle aSubtitle) {
+ this.subtitle = aSubtitle;
+ }
+
+ /**
+ * @return the title
+ *
+ */
+ public GOMTitle getTitle() {
+ return this.title;
+ }
+
+ /**
+ * @param aTitle
+ * the title to set
+ *
+ */
+ public void setTitle(GOMTitle aTitle) {
+ this.title = aTitle;
+ }
+
+ /**
+ * @return the updated
+ *
+ */
+ public GOMUpdated getUpdated() {
+ return this.updated;
+ }
+
+ /**
+ * @param aUpdated
+ * the updated to set
+ *
+ */
+ public void setUpdated(GOMUpdated aUpdated) {
+ this.updated = aUpdated;
+ }
+
+ /**
+ * @return the icon
+ *
+ */
+ public GOMIcon getIcon() {
+ return this.icon;
+ }
+
+ /**
+ * @return the links
+ *
+ */
+ public List<GOMLink> getLinks() {
+ return this.links;
+ }
+
+ /**
+ * @see org.apache.lucene.gdata.gom.GOMSource#addLink(org.apache.lucene.gdata.gom.GOMLink)
+ */
+ public void addLink(GOMLink aLink) {
+ if (aLink == null)
+ return;
+ this.links.add(aLink);
+
+ }
+
+ /**
+ * @see org.apache.lucene.gdata.gom.core.AtomParser#processElementValue(java.lang.String)
+ */
+ public void processElementValue(String aValue) {
+ throw new GDataParseException(String.format(
+ AtomParser.UNEXPECTED_ELEMENT_VALUE, this.localName));
+ }
+
+ /**
+ * @see org.apache.lucene.gdata.gom.core.AtomParser#processEndElement()
+ */
+ public void processEndElement() {
+ /*
+ * atom:feed elements MUST contain exactly one atom:id element.
+ */
+ if (this.id == null)
+ throw new GDataParseException(String.format(
+ MISSING_ELEMENT_CHILD, this.localName, GOMId.LOCALNAME));
+ /*
+ * atom:feed elements MUST contain exactly one atom:title element.
+ */
+ if (this.title == null)
+ throw new GDataParseException(String
+ .format(MISSING_ELEMENT_CHILD, this.localName,
+ GOMTitle.LOCALNAME));
+ /*
+ * atom:feed elements MUST contain exactly one atom:updated element.
+ */
+ if (this.updated == null)
+ throw new GDataParseException(String.format(
+ MISSING_ELEMENT_CHILD, this.localName,
+ GOMUpdated.LOCALNAME));
+ /*
+ * atom:feed elements MUST contain one or more atom:author elements,
+ * unless all of the
+ */
+ if (this.authors.size() < 1)
+ throw new GDataParseException(String.format(
+ MISSING_ELEMENT_CHILD, this.localName,
+ GOMAuthor.LOCALNAME));
+
+ /*
+ * atom:feed elements MUST NOT contain more than one atom:link element
+ * with a rel attribute value of "alternate" that has the same
+ * combination of type and hreflang attribute values.
+ */
+ List<GOMLink> alternateLinks = new LinkedList<GOMLink>();
+ for (GOMLink link : this.links) {
+ /*
+ * atom:link elements MAY have a "rel" attribute that indicates the
+ * link relation type. If the "rel" attribute is not present, the
+ * link element MUST be interpreted as if the link relation type is
+ * "alternate".
+ */
+ if (link.getRel() == null
+ || link.getRel().equalsIgnoreCase("alternate"))
+ alternateLinks.add(link);
+ }
+
+ /*
+ * atom:feed elements MUST NOT contain more than one atom:link element
+ * with a rel attribute value of "alternate" that has the same
+ * combination of type and hreflang attribute values.
+ */
+ if (alternateLinks.size() > 1) {
+ for (GOMLink link : alternateLinks) {
+ for (GOMLink link2 : alternateLinks) {
+ if (link != link2)
+ if (AtomParserUtils.compareAlternateLinks(link, link2))
+ throw new GDataParseException(
+ String
+ .format(DUPLICATE_ELEMENT,
+ "link with rel=\"alternate\" and same href and type attributes"));
+
+ }
+ }
+ }
+
+ }
+
+ /**
+ * @see org.apache.lucene.gdata.gom.core.AtomParser#getChildParser(javax.xml.namespace.QName)
+ */
+ public AtomParser getChildParser(QName aName) {
+ if (aName.getNamespaceURI().equals(GOMNamespace.ATOM_NS_URI)) {
+ if (aName.getLocalPart().equals(GOMId.LOCALNAME)) {
+ // atom:feed / atom:source elements MUST contain exactly one
+ // atom:id element.
+ if (this.id != null)
+ throw new GDataParseException(String.format(
+ AtomParser.DUPLICATE_ELEMENT, GOMId.LOCALNAME));
+ this.id = new GOMIdImpl();
+ return this.id;
+ }
+ if (aName.getLocalPart().equals(GOMTitle.LOCALNAME)) {
+ // atom:feed / atom:source elements MUST contain exactly one
+ // atom:title
+ // element.
+ if (this.title != null)
+ throw new GDataParseException(String.format(
+ AtomParser.DUPLICATE_ELEMENT, GOMTitle.LOCALNAME));
+ this.title = new GOMTitleImpl();
+ return this.title;
+ }
+ if (aName.getLocalPart().equals(GOMAuthor.LOCALNAME)) {
+ GOMAuthor author = new GOMAuthorImpl();
+ this.authors.add(author);
+ return author;
+ }
+ if (aName.getLocalPart().equals(GOMCategory.LOCALNAME)) {
+ GOMCategory category = new GOMCategoryImpl();
+ this.categories.add(category);
+ return category;
+ }
+ if (aName.getLocalPart().equals(GOMContributor.LOCALNAME)) {
+ GOMContributorImpl impl = new GOMContributorImpl();
+ this.contributors.add(impl);
+ return impl;
+ }
+ if (aName.getLocalPart().equals(GOMLink.LOCALNAME)) {
+ GOMLinkImpl impl = new GOMLinkImpl();
+ this.links.add(impl);
+ return impl;
+ }
+ if (aName.getLocalPart().equals(GOMSubtitle.LOCALNAME)) {
+ GOMSubtitleImpl impl = new GOMSubtitleImpl();
+ /*
+ * atom:feed elements MUST NOT contain more than one
+ * atom:subtitle element.
+ */
+ if (this.subtitle != null)
+ throw new GDataParseException(String.format(
+ AtomParser.DUPLICATE_ELEMENT,
+ GOMSubtitle.LOCALNAME));
+ this.subtitle = impl;
+ return this.subtitle;
+ }
+ if (aName.getLocalPart().equals(GOMUpdated.LOCALNAME)) {
+ if (this.updated != null)
+ throw new GDataParseException(String.format(
+ AtomParser.DUPLICATE_ELEMENT,
+ GOMUpdated.LOCALNAME));
+ GOMUpdated updatedImpl = new GOMUpdatedImpl();
+ this.updated = updatedImpl;
+ return this.updated;
+
+ }
+ if (aName.getLocalPart().equals(GOMLogo.LOCALNAME)) {
+ if (this.logo != null)
+ throw new GDataParseException(String.format(
+ AtomParser.DUPLICATE_ELEMENT, GOMLogo.LOCALNAME));
+
+ this.logo = new GOMLogoImpl();
+ return this.logo;
+
+ }
+ if (aName.getLocalPart().equals(GOMIcon.LOCALNAME)) {
+ if (this.icon != null)
+ throw new GDataParseException(String.format(
+ AtomParser.DUPLICATE_ELEMENT, GOMIcon.LOCALNAME));
+
+ this.icon = new GOMIconImpl();
+ return this.icon;
+
+ }
+ if (aName.getLocalPart().equals(GOMGenerator.LOCALNAME)) {
+ if (this.generator != null)
+ throw new GDataParseException(String.format(
+ AtomParser.DUPLICATE_ELEMENT,
+ GOMGenerator.LOCALNAME));
+
+ this.generator = new GOMGeneratorImpl();
+ return this.generator;
+
+ }
+ if (aName.getLocalPart().equals(GOMRights.LOCALNAME)) {
+ if (this.rights != null)
+ throw new GDataParseException(String
+ .format(AtomParser.DUPLICATE_ELEMENT,
+ GOMRights.LOCALNAME));
+
+ this.rights = new GOMRightsImpl();
+ return this.rights;
+
+ }
+
+ }
+ throw new GDataParseException(String.format(
+ AtomParser.URECOGNIZED_ELEMENT_CHILD, this.localName, aName
+ .getLocalPart()));
+
+ }
+
+ /**
+ * @see org.apache.lucene.gdata.gom.GOMElement#writeAtomOutput(org.apache.lucene.gdata.gom.writer.GOMStaxWriter)
+ */
+ public void writeAtomOutput(GOMOutputWriter aStreamWriter)
+ throws XMLStreamException {
+ aStreamWriter.writeStartElement(this.localName,
+ this.extensionAttributes);
+ List<GOMAttribute> xmlNamespaceAttributes = getXmlNamespaceAttributes();
+ for (GOMAttribute attribute : xmlNamespaceAttributes) {
+ aStreamWriter.writeAttribute(attribute);
+ }
+ writeInnerAtomOutput(aStreamWriter);
+ aStreamWriter.writeEndElement();
+
+ }
+
+ /**
+ * @param aStreamWriter
+ * @throws XMLStreamException
+ */
+ protected void writeInnerAtomOutput(GOMOutputWriter aStreamWriter)
+ throws XMLStreamException {
+ if (this.id != null)
+ this.id.writeAtomOutput(aStreamWriter);
+ if (this.title != null)
+ this.title.writeAtomOutput(aStreamWriter);
+ if (this.subtitle != null)
+ this.subtitle.writeAtomOutput(aStreamWriter);
+ for (GOMAuthor authors : this.authors) {
+ authors.writeAtomOutput(aStreamWriter);
+ }
+ for (GOMCategory category : this.categories) {
+ category.writeAtomOutput(aStreamWriter);
+ }
+ for (GOMContributor contributor : this.contributors) {
+ contributor.writeAtomOutput(aStreamWriter);
+ }
+ for (GOMLink link : this.links) {
+ link.writeAtomOutput(aStreamWriter);
+ }
+ if (this.rights != null)
+ this.rights.writeAtomOutput(aStreamWriter);
+ if (this.updated != null)
+ this.updated.writeAtomOutput(aStreamWriter);
+ if (this.logo != null)
+ this.logo.writeAtomOutput(aStreamWriter);
+ if (this.icon != null)
+ this.icon.writeAtomOutput(aStreamWriter);
+ if (this.generator != null)
+ this.generator.writeAtomOutput(aStreamWriter);
+ }
+
+ /**
+ * @see org.apache.lucene.gdata.gom.GOMElement#writeRssOutput(org.apache.lucene.gdata.gom.writer.GOMStaxWriter)
+ */
+ public void writeRssOutput(GOMOutputWriter aStreamWriter)
+ throws XMLStreamException {
+ // no rss output
+
+ }
+
+}
diff --git a/contrib/gdata-server/src/gom/java/org/apache/lucene/gdata/gom/core/GOMSubtitleImpl.java b/contrib/gdata-server/src/gom/java/org/apache/lucene/gdata/gom/core/GOMSubtitleImpl.java
new file mode 100644
index 00000000000..603759576c0
--- /dev/null
+++ b/contrib/gdata-server/src/gom/java/org/apache/lucene/gdata/gom/core/GOMSubtitleImpl.java
@@ -0,0 +1,39 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.lucene.gdata.gom.core;
+
+import javax.xml.namespace.QName;
+
+import org.apache.lucene.gdata.gom.GOMNamespace;
+import org.apache.lucene.gdata.gom.GOMSubtitle;
+
+/**
+ * @author Simon Willnauer
+ *
+ */
+public class GOMSubtitleImpl extends GOMTextContructImpl implements GOMSubtitle {
+
+ /**
+ *
+ */
+ public GOMSubtitleImpl() {
+ this.localName = GOMSubtitle.LOCALNAME;
+ this.rssLocalName = GOMSubtitle.RSS_LOCALNAME;
+ this.qname = new QName(GOMNamespace.ATOM_NS_URI, this.localName);
+ }
+
+}
diff --git a/contrib/gdata-server/src/gom/java/org/apache/lucene/gdata/gom/core/GOMSummaryImpl.java b/contrib/gdata-server/src/gom/java/org/apache/lucene/gdata/gom/core/GOMSummaryImpl.java
new file mode 100644
index 00000000000..dd5e2499fb6
--- /dev/null
+++ b/contrib/gdata-server/src/gom/java/org/apache/lucene/gdata/gom/core/GOMSummaryImpl.java
@@ -0,0 +1,57 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.lucene.gdata.gom.core;
+
+import javax.xml.namespace.QName;
+import javax.xml.stream.XMLStreamException;
+
+import org.apache.lucene.gdata.gom.GOMNamespace;
+import org.apache.lucene.gdata.gom.GOMSummary;
+import org.apache.lucene.gdata.gom.writer.GOMOutputWriter;
+
+/**
+ * @author Simon Willnauer
+ *
+ */
+public class GOMSummaryImpl extends GOMTextContructImpl implements GOMSummary {
+ protected static final QName ATOM_QNAME = new QName(
+ GOMNamespace.ATOM_NS_URI, LOCALNAME, GOMNamespace.ATOM_NS_PREFIX);
+
+ /**
+ *
+ */
+ public GOMSummaryImpl() {
+ this.localName = GOMSummary.LOCALNAME;
+ this.qname = new QName(GOMNamespace.ATOM_NS_URI, this.localName);
+
+ }
+
+ /**
+ * @see org.apache.lucene.gdata.gom.core.GOMTextContructImpl#writeRssOutput(org.apache.lucene.gdata.gom.writer.GOMStaxWriter)
+ */
+ @Override
+ public void writeRssOutput(GOMOutputWriter aStreamWriter)
+ throws XMLStreamException {
+ /*
+ * RSS does not support markup as child elements StaX Writer will encode
+ * all containing markup into valid xml entities
+ */
+ aStreamWriter.writeSimpleXMLElement(ATOM_QNAME,
+ getXmlNamespaceAttributes(), this.textValue);
+ }
+
+}
diff --git a/contrib/gdata-server/src/gom/java/org/apache/lucene/gdata/gom/core/GOMTextContructImpl.java b/contrib/gdata-server/src/gom/java/org/apache/lucene/gdata/gom/core/GOMTextContructImpl.java
new file mode 100644
index 00000000000..564f3133f3e
--- /dev/null
+++ b/contrib/gdata-server/src/gom/java/org/apache/lucene/gdata/gom/core/GOMTextContructImpl.java
@@ -0,0 +1,270 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.lucene.gdata.gom.core;
+
+import java.io.StringWriter;
+import java.util.List;
+
+import javax.xml.namespace.QName;
+import javax.xml.stream.XMLOutputFactory;
+import javax.xml.stream.XMLStreamException;
+import javax.xml.stream.XMLStreamWriter;
+
+import org.apache.lucene.gdata.gom.ContentType;
+import org.apache.lucene.gdata.gom.GOMAttribute;
+import org.apache.lucene.gdata.gom.GOMTextConstruct;
+import org.apache.lucene.gdata.gom.core.utils.GOMUtils;
+import org.apache.lucene.gdata.gom.writer.GOMOutputWriter;
+
+/**
+ * @author Simon Willnauer
+ *
+ */
+public abstract class GOMTextContructImpl extends AbstractGOMElement implements
+ GOMTextConstruct {
+
+ protected ContentType contentType;
+
+ protected String rssLocalName;
+
+ /*
+ * parses the xhtml content
+ */
+ protected transient XMLBlobContentParser blobParser = null;
+
+ /*
+ * this string builder contains the html while parsing the incoming text
+ * contruct. process element value will be called multiple times
+ */
+ protected transient StringBuilder htmlBuilder = null;
+
+ /**
+ * @return the contentType
+ *
+ */
+ public ContentType getContentType() {
+ return this.contentType;
+ }
+
+ /**
+ * @see org.apache.lucene.gdata.gom.core.AtomParser#processElementValue(java.lang.String)
+ */
+ public void processElementValue(String aValue) {
+ if (this.htmlBuilder != null)
+ this.htmlBuilder.append(aValue);
+ else {
+ this.textValue = aValue;
+ }
+ }
+
+ /**
+ * @see org.apache.lucene.gdata.gom.core.AtomParser#processAttribute(javax.xml.namespace.QName,
+ * java.lang.String)
+ */
+ public void processAttribute(QName aQName, String aValue) {
+ if (aQName == null)
+ throw new GDataParseException("QName must not be null");
+ if ("type".equals(aQName.getLocalPart()) && aValue != null) {
+ if (this.contentType != null)
+ throw new GDataParseException(String.format(
+ DUPLICATE_ATTRIBUTE, "type"));
+ this.contentType = ContentType.valueOf(aValue.toUpperCase());
+ if (this.contentType == ContentType.HTML)
+ this.htmlBuilder = new StringBuilder();
+ }
+ super.processAttribute(aQName, aValue);
+
+ }
+
+ /**
+ * @see org.apache.lucene.gdata.gom.core.AtomParser#processEndElement()
+ */
+ public void processEndElement() {
+ if (this.contentType == null)
+ throw new GDataParseException(String.format(
+ MISSING_ELEMENT_ATTRIBUTE, this.qname, "type"));
+ switch (this.contentType) {
+ case XHTML:
+ if (this.blobParser != null) {
+ this.textValue = this.blobParser.toString();
+ this.blobParser.close();
+ this.blobParser = null;
+ }
+
+ break;
+ case HTML:
+ if (this.htmlBuilder != null) {
+ this.textValue = this.htmlBuilder.toString();
+ this.htmlBuilder = null;
+ }
+
+ default:
+ break;
+ }
+
+ }
+
+ /**
+ * @see org.apache.lucene.gdata.gom.GOMElement#writeAtomOutput(org.apache.lucene.gdata.gom.writer.GOMStaxWriter)
+ */
+ public void writeAtomOutput(GOMOutputWriter aStreamWriter)
+ throws XMLStreamException {
+ List<GOMAttribute> xmlNamespaceAttributes = getXmlNamespaceAttributes();
+ xmlNamespaceAttributes.add(GOMUtils
+ .getAttributeByContentTypeDefaultNs(this.contentType));
+ if (this.contentType == ContentType.XHTML) {
+ /*
+ * if the content is xhtml write it unescaped
+ */
+ aStreamWriter.writeStartElement(this.localName,
+ xmlNamespaceAttributes);
+ aStreamWriter.writeContentUnescaped(this.textValue);
+ aStreamWriter.writeEndElement();
+
+ } else {
+ // html and text will be escaped by stax writer
+ aStreamWriter.writeSimpleXMLElement(this.localName,
+ xmlNamespaceAttributes, this.textValue);
+ }
+
+ }
+
+ /**
+ * @see org.apache.lucene.gdata.gom.GOMElement#writeRssOutput(org.apache.lucene.gdata.gom.writer.GOMStaxWriter)
+ */
+ public void writeRssOutput(GOMOutputWriter aStreamWriter)
+ throws XMLStreamException {
+ /*
+ * RSS does not support markup as child elements StaX Writer will encode
+ * all containing markup into valid xml entities
+ */
+ aStreamWriter.writeSimpleXMLElement(this.rssLocalName,
+ getXmlNamespaceAttributes(), this.textValue);
+ }
+
+ /**
+ * @see org.apache.lucene.gdata.gom.core.AtomParser#getChildParser(javax.xml.namespace.QName)
+ */
+ @Override
+ public AtomParser getChildParser(QName aName) {
+ if (aName == null)
+ throw new GDataParseException("QName must not be null");
+ if (this.contentType == ContentType.XHTML
+ && aName.getLocalPart().equals("div")) {
+ if (this.blobParser != null)
+ throw new GDataParseException(String.format(
+ DUPLICATE_ELEMENT, "div"));
+ this.blobParser = new XMLBlobContentParser();
+ return this.blobParser.getChildParser(aName);
+ }
+
+ return super.getChildParser(aName);
+
+ }
+
+ class XMLBlobContentParser implements AtomParser {
+ private StringWriter writer;
+
+ private XMLStreamWriter xmlWriter;
+
+ /**
+ *
+ */
+ public XMLBlobContentParser() {
+ super();
+ this.writer = new StringWriter();
+ try {
+ this.xmlWriter = XMLOutputFactory.newInstance()
+ .createXMLStreamWriter(this.writer);
+ } catch (Exception e) {
+ throw new GDataParseException(e);
+ }
+ }
+
+ /**
+ * @see org.apache.lucene.gdata.gom.core.AtomParser#processElementValue(java.lang.String)
+ */
+ public void processElementValue(String aValue) {
+ try {
+ this.xmlWriter.writeCharacters(aValue);
+ } catch (XMLStreamException e) {
+ throw new GDataParseException(e);
+ }
+
+ }
+
+ /**
+ * @see org.apache.lucene.gdata.gom.core.AtomParser#processAttribute(javax.xml.namespace.QName,
+ * java.lang.String)
+ */
+ public void processAttribute(QName aQName, String aValue) {
+ try {
+ this.xmlWriter.writeAttribute(aQName.getNamespaceURI(), aQName
+ .getLocalPart(), aQName.getPrefix(), aValue);
+ } catch (XMLStreamException e) {
+ throw new GDataParseException(e);
+ }
+
+ }
+
+ /**
+ * @see org.apache.lucene.gdata.gom.core.AtomParser#processEndElement()
+ */
+ public void processEndElement() {
+ try {
+ this.xmlWriter.writeEndElement();
+ } catch (XMLStreamException e) {
+ throw new GDataParseException(e);
+ }
+
+ }
+
+ /**
+ * @see org.apache.lucene.gdata.gom.core.AtomParser#getChildParser(javax.xml.namespace.QName)
+ */
+ public AtomParser getChildParser(QName aName) {
+ try {
+ this.xmlWriter.writeStartElement(aName.getNamespaceURI(), aName
+ .getLocalPart(), aName.getPrefix());
+ } catch (XMLStreamException e) {
+ throw new GDataParseException(e);
+ }
+ return this;
+ }
+
+ /**
+ * @see java.lang.Object#toString()
+ */
+ public String toString() {
+ return this.writer.toString();
+ }
+
+ /**
+ *
+ */
+ public void close() {
+ try {
+ this.xmlWriter.close();
+ this.writer.close();
+ } catch (Exception e) {
+ throw new GDataParseException(e);
+ }
+ }
+
+ }
+
+}
diff --git a/contrib/gdata-server/src/gom/java/org/apache/lucene/gdata/gom/core/GOMTitleImpl.java b/contrib/gdata-server/src/gom/java/org/apache/lucene/gdata/gom/core/GOMTitleImpl.java
new file mode 100644
index 00000000000..2db83287bb2
--- /dev/null
+++ b/contrib/gdata-server/src/gom/java/org/apache/lucene/gdata/gom/core/GOMTitleImpl.java
@@ -0,0 +1,38 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.lucene.gdata.gom.core;
+
+import javax.xml.namespace.QName;
+
+import org.apache.lucene.gdata.gom.GOMNamespace;
+import org.apache.lucene.gdata.gom.GOMTitle;
+
+/**
+ * @author Simon Willnauer
+ */
+public class GOMTitleImpl extends GOMTextContructImpl implements GOMTitle {
+ /**
+ *
+ */
+ public GOMTitleImpl() {
+ super();
+ this.localName = LOCALNAME;
+ this.rssLocalName = LOCALNAME;
+ this.qname = new QName(GOMNamespace.ATOM_NS_URI, this.localName);
+ }
+
+}
diff --git a/contrib/gdata-server/src/gom/java/org/apache/lucene/gdata/gom/core/GOMUpdatedImpl.java b/contrib/gdata-server/src/gom/java/org/apache/lucene/gdata/gom/core/GOMUpdatedImpl.java
new file mode 100644
index 00000000000..7d27ca22a6b
--- /dev/null
+++ b/contrib/gdata-server/src/gom/java/org/apache/lucene/gdata/gom/core/GOMUpdatedImpl.java
@@ -0,0 +1,58 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.lucene.gdata.gom.core;
+
+import javax.xml.namespace.QName;
+import javax.xml.stream.XMLStreamException;
+
+import org.apache.lucene.gdata.gom.GOMNamespace;
+import org.apache.lucene.gdata.gom.GOMUpdated;
+import org.apache.lucene.gdata.gom.core.utils.GOMUtils;
+import org.apache.lucene.gdata.gom.writer.GOMOutputWriter;
+
+/**
+ * @author Simon Willnauer
+ *
+ */
+public class GOMUpdatedImpl extends GOMDateConstructImpl implements GOMUpdated {
+ protected static final QName ATOM_QNAME = new QName(
+ GOMNamespace.ATOM_NS_URI, LOCALNAME, GOMNamespace.ATOM_NS_PREFIX);
+
+ /**
+ *
+ */
+ public GOMUpdatedImpl() {
+ super();
+ this.localName = LOCALNAME;
+ this.qname = new QName(GOMNamespace.ATOM_NS_URI, this.localName);
+ }
+
+ /**
+ * @see org.apache.lucene.gdata.gom.GOMElement#writeRssOutput(org.apache.lucene.gdata.gom.writer.GOMStaxWriter)
+ */
+ public void writeRssOutput(GOMOutputWriter aStreamWriter)
+ throws XMLStreamException {
+ if (this.rfc3339String == null)
+ this.rfc3339String = GOMUtils
+ .buildRfc3339DateFormat(this.date == 0 ? System
+ .currentTimeMillis() : this.date);
+ aStreamWriter.writeSimpleXMLElement(ATOM_QNAME,
+ getXmlNamespaceAttributes(), this.rfc3339String);
+
+ }
+
+}
diff --git a/contrib/gdata-server/src/gom/java/org/apache/lucene/gdata/gom/core/SimpleElementParser.java b/contrib/gdata-server/src/gom/java/org/apache/lucene/gdata/gom/core/SimpleElementParser.java
new file mode 100644
index 00000000000..495b07b0bf8
--- /dev/null
+++ b/contrib/gdata-server/src/gom/java/org/apache/lucene/gdata/gom/core/SimpleElementParser.java
@@ -0,0 +1,62 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.lucene.gdata.gom.core;
+
+import javax.xml.namespace.QName;
+
+/**
+ * @author Simon Willnauer
+ *
+ */
+abstract class SimpleElementParser implements AtomParser {
+ protected String aString = null;
+
+ protected String localname = null;
+
+ /**
+ * @see org.apache.lucene.gdata.gom.core.AtomParser#processElementValue(java.lang.String)
+ */
+ public void processElementValue(String aValue) {
+ this.aString = aValue;
+
+ }
+
+ /**
+ * @see org.apache.lucene.gdata.gom.core.AtomParser#processAttribute(javax.xml.namespace.QName,
+ * java.lang.String)
+ */
+ public void processAttribute(QName aQName, String aValue) {
+ //
+
+ }
+
+ /**
+ * @see org.apache.lucene.gdata.gom.core.AtomParser#processEndElement()
+ */
+ public abstract void processEndElement();
+
+ /**
+ * @see org.apache.lucene.gdata.gom.core.AtomParser#getChildParser(javax.xml.namespace.QName)
+ */
+ public AtomParser getChildParser(QName aName) {
+ if (aName == null)
+ throw new GDataParseException("QName must not be null");
+ throw new GDataParseException(String.format(
+ AtomParser.UNEXPECTED_ELEMENT_CHILD, this.localname));
+ }
+
+}
diff --git a/contrib/gdata-server/src/gom/java/org/apache/lucene/gdata/gom/core/SimpleGOMElementImpl.java b/contrib/gdata-server/src/gom/java/org/apache/lucene/gdata/gom/core/SimpleGOMElementImpl.java
new file mode 100644
index 00000000000..8c1cc218b51
--- /dev/null
+++ b/contrib/gdata-server/src/gom/java/org/apache/lucene/gdata/gom/core/SimpleGOMElementImpl.java
@@ -0,0 +1,121 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.lucene.gdata.gom.core;
+
+import javax.xml.namespace.QName;
+import javax.xml.stream.XMLStreamException;
+
+import org.apache.lucene.gdata.gom.GOMNamespace;
+import org.apache.lucene.gdata.gom.writer.GOMOutputWriter;
+
+/**
+ * @author Simon Willnauer
+ *
+ */
+public class SimpleGOMElementImpl extends AbstractGOMElement {
+ public static final String ELEMENT_OS_ITEMS_PER_PAGE = "itemsPerPage";
+
+ public static final String ELEMENT_OS_START_INDEX = "startIndex";
+
+ private SimpleValidator validator;
+
+ /**
+ *
+ */
+ public SimpleGOMElementImpl(String aLocalName, GOMNamespace aNamespace) {
+ super();
+ if (aLocalName == null)
+ throw new IllegalArgumentException("localname must not be null");
+ if (aNamespace == null)
+ throw new IllegalArgumentException("Namespace must not be null");
+ this.localName = aLocalName;
+ this.qname = new QName(aNamespace.getNamespaceUri(), this.localName,
+ aNamespace.getNamespacePrefix());
+ }
+
+ SimpleGOMElementImpl() {
+ // for subclasses
+ }
+
+ /**
+ * @see org.apache.lucene.gdata.gom.core.AbstractGOMElement#processElementValue(java.lang.String)
+ */
+ @Override
+ public void processElementValue(String aValue) {
+ if (this.textValue != null)
+ throw new GDataParseException(String.format(
+ AtomParser.DUPLICATE_ELEMENT_VALUE, this.localName));
+ this.textValue = aValue;
+ }
+
+ /**
+ * @see org.apache.lucene.gdata.gom.core.AbstractGOMElement#processEndElement()
+ */
+ @Override
+ public void processEndElement() {
+ if (this.validator != null)
+ this.validator.validate(this.textValue);
+
+ }
+
+ /**
+ * @see org.apache.lucene.gdata.gom.GOMElement#writeAtomOutput(org.apache.lucene.gdata.gom.writer.GOMStaxWriter)
+ */
+ public void writeAtomOutput(GOMOutputWriter aStreamWriter)
+ throws XMLStreamException {
+ aStreamWriter.writeSimpleXMLElement(this.qname,
+ getXmlNamespaceAttributes(), this.textValue);
+
+ }
+
+ /**
+ * @see org.apache.lucene.gdata.gom.GOMElement#writeRssOutput(org.apache.lucene.gdata.gom.writer.GOMStaxWriter)
+ */
+ public void writeRssOutput(GOMOutputWriter aStreamWriter)
+ throws XMLStreamException {
+ writeAtomOutput(aStreamWriter);
+
+ }
+
+ protected abstract static class SimpleValidator {
+ String localName;
+
+ protected SimpleValidator(String aLocalName) {
+ this.localName = aLocalName;
+ }
+
+ /**
+ * @param aTextValue
+ */
+ protected void validate(String aTextValue) {
+ if (aTextValue == null)
+ throw new GDataParseException(String.format(
+ AtomParser.MISSING_ELEMENT_VALUE_PLAIN,
+ this.localName));
+ }
+
+ }
+
+ /**
+ * @param aValidator
+ * The validator to set.
+ */
+ public void setValidator(SimpleValidator aValidator) {
+ validator = aValidator;
+ }
+
+}
diff --git a/contrib/gdata-server/src/gom/java/org/apache/lucene/gdata/gom/core/core-aid.gif b/contrib/gdata-server/src/gom/java/org/apache/lucene/gdata/gom/core/core-aid.gif
new file mode 100644
index 00000000000..9d42f36182b
Binary files /dev/null and b/contrib/gdata-server/src/gom/java/org/apache/lucene/gdata/gom/core/core-aid.gif differ
diff --git a/contrib/gdata-server/src/gom/java/org/apache/lucene/gdata/gom/core/core-aid.ucd b/contrib/gdata-server/src/gom/java/org/apache/lucene/gdata/gom/core/core-aid.ucd
new file mode 100644
index 00000000000..01145fb56f0
--- /dev/null
+++ b/contrib/gdata-server/src/gom/java/org/apache/lucene/gdata/gom/core/core-aid.ucd
@@ -0,0 +1,257 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<editmodel:ClassDiagramEditModel xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:editmodel="editmodel.xmi" xmlns:options="options.xmi" name="core-aid" description="" id="org.apache.lucene.gdata.gom.core" metadata="uml2-1.0" initialized="true" zoom="1.5" scrolledX="1601" scrolledY="503" tag="1000" key="3230303631303036204764617461556D6C2F73696D6F6E">
+ <children xsi:type="editmodel:ClassEditModel" name="GDataParseException" location="50,1339" size="240,151" id="org.apache.lucene.gdata.gom.core/GDataParseException" runTimeClassModel="GDataParseException(Ljava.lang.String;),GDataParseException(),GDataParseException(Ljava.lang.String;Ljava.lang.Throwable;),GDataParseException(Ljava.lang.Throwable;)">
+ <children xsi:type="editmodel:CompartmentEditModel"/>
+ <children xsi:type="editmodel:CompartmentEditModel" size="217,72">
+ <children xsi:type="editmodel:MethodEditModel" name="GDataParseException" id="org.apache.lucene.gdata.gom.core/GDataParseException#GDataParseException()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="GDataParseException" id="org.apache.lucene.gdata.gom.core/GDataParseException#GDataParseException(Ljava.lang.String;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="GDataParseException" id="org.apache.lucene.gdata.gom.core/GDataParseException#GDataParseException(Ljava.lang.Throwable;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="GDataParseException" id="org.apache.lucene.gdata.gom.core/GDataParseException#GDataParseException(Ljava.lang.String;Ljava.lang.Throwable;)"/>
+ </children>
+ <children xsi:type="editmodel:CompartmentEditModel"/>
+ <classifierPreferences xsi:type="editmodel:UMLClassDiagramClassifierPreference" showStereotype="true" showMethodsParameterTypes="true" showMethodsReturnType="true" showMethodsParameterNames="true" showMethodsParameterKinds="true" attributeSorter="Natural" methodSorter="Natural" innerClassSorter="Natural" showPrivateAttributes="true" showProtectedAttributes="true" showPublicAttributes="true" showPackageAttributes="true" showStaticAttributes="true" showProtectedMethods="true" showPublicMethods="true" showPackageMethods="true" showPrivateMethods="true" showStaticMethods="true" showProtectedInnerClasses="true" showPublicInnerClasses="true" showPackageInnerClasses="true" showPrivateInnerClasses="true" showStaticInnerClasses="true" showAssociationMember="true" showMethods="true" showAttributes="true" showLiterals="true"/>
+ </children>
+ <children xsi:type="editmodel:ClassEditModel" targetConnections="//@children.6/@sourceConnections.0" name="GOMFeedImpl" location="220,250" size="233,889" id="org.apache.lucene.gdata.gom.core/GOMFeedImpl" runTimeClassModel="getId(),contributors,getTitle(),getLogo(),namespaces,getIcon(),setIcon(Lorg.apache.lucene.gdata.gom.GOMIcon;),id,logo,links,getNamespaces(),setTitle(Lorg.apache.lucene.gdata.gom.GOMTitle;),getLinks(),rights,entries,setSubtitle(Lorg.apache.lucene.gdata.gom.GOMSubtitle;),getChildren(),setLogo(Lorg.apache.lucene.gdata.gom.GOMLogo;),GOMFeedImpl(),getGenerator(),addCategory(Lorg.apache.lucene.gdata.gom.GOMCategory;),processEndElement(),processAttribute(Ljavax.xml.namespace.QName;Ljava.lang.String;),getContributor(),addAuthor(Lorg.apache.lucene.gdata.gom.GOMAuthor;),addEntry(Lorg.apache.lucene.gdata.gom.GOMEntry;),title,getRights(),categories,setId(Lorg.apache.lucene.gdata.gom.GOMId;),updated,setGenerator(Lorg.apache.lucene.gdata.gom.GOMGenerator;),addChild(Lorg.apache.lucene.gdata.gom.GOMElement;),getChildParser(Ljavax.xml.namespace.QName;),getAuthors(),icon,writeRssOutput(Ljavax.xml.stream.XMLStreamWriter;),setRights(Lorg.apache.lucene.gdata.gom.GOMRights;),writeAtomOutput(Ljavax.xml.stream.XMLStreamWriter;),addContributor(Lorg.apache.lucene.gdata.gom.GOMContributor;),addNamespace(Lorg.apache.lucene.gdata.gom.core.GOMNamespace;),processElementValue(Ljava.lang.String;),authors,getLocalName(),getUpdated(),getSubtitle(),setUpdated(Lorg.apache.lucene.gdata.gom.GOMTime;),generator,getEntries(),subtitle,getCategories()">
+ <children xsi:type="editmodel:CompartmentEditModel" size="109,144">
+ <children xsi:type="editmodel:AttributeEditModel" name="generator" id="org.apache.lucene.gdata.gom.core/GOMFeedImpl#generator"/>
+ <children xsi:type="editmodel:AttributeEditModel" name="icon" id="org.apache.lucene.gdata.gom.core/GOMFeedImpl#icon"/>
+ <children xsi:type="editmodel:AttributeEditModel" name="id" id="org.apache.lucene.gdata.gom.core/GOMFeedImpl#id"/>
+ <children xsi:type="editmodel:AttributeEditModel" name="logo" id="org.apache.lucene.gdata.gom.core/GOMFeedImpl#logo"/>
+ <children xsi:type="editmodel:AttributeEditModel" name="rights" id="org.apache.lucene.gdata.gom.core/GOMFeedImpl#rights"/>
+ <children xsi:type="editmodel:AttributeEditModel" name="subtitle" id="org.apache.lucene.gdata.gom.core/GOMFeedImpl#subtitle"/>
+ <children xsi:type="editmodel:AttributeEditModel" name="title" id="org.apache.lucene.gdata.gom.core/GOMFeedImpl#title"/>
+ <children xsi:type="editmodel:AttributeEditModel" name="updated" id="org.apache.lucene.gdata.gom.core/GOMFeedImpl#updated"/>
+ </children>
+ <children xsi:type="editmodel:CompartmentEditModel" size="210,666">
+ <children xsi:type="editmodel:MethodEditModel" name="GOMFeedImpl" id="org.apache.lucene.gdata.gom.core/GOMFeedImpl#GOMFeedImpl()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="addAuthor" id="org.apache.lucene.gdata.gom.core/GOMFeedImpl#addAuthor(Lorg.apache.lucene.gdata.gom.GOMAuthor;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="addCategory" id="org.apache.lucene.gdata.gom.core/GOMFeedImpl#addCategory(Lorg.apache.lucene.gdata.gom.GOMCategory;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="addChild" id="org.apache.lucene.gdata.gom.core/GOMFeedImpl#addChild(Lorg.apache.lucene.gdata.gom.GOMElement;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="addContributor" id="org.apache.lucene.gdata.gom.core/GOMFeedImpl#addContributor(Lorg.apache.lucene.gdata.gom.GOMContributor;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="addEntry" id="org.apache.lucene.gdata.gom.core/GOMFeedImpl#addEntry(Lorg.apache.lucene.gdata.gom.GOMEntry;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="addNamespace" id="org.apache.lucene.gdata.gom.core/GOMFeedImpl#addNamespace(Lorg.apache.lucene.gdata.gom.core.GOMNamespace;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getAuthors" id="org.apache.lucene.gdata.gom.core/GOMFeedImpl#getAuthors()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getCategories" id="org.apache.lucene.gdata.gom.core/GOMFeedImpl#getCategories()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getChildParser" id="org.apache.lucene.gdata.gom.core/GOMFeedImpl#getChildParser(Ljavax.xml.namespace.QName;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getChildren" id="org.apache.lucene.gdata.gom.core/GOMFeedImpl#getChildren()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getContributor" id="org.apache.lucene.gdata.gom.core/GOMFeedImpl#getContributor()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getEntries" id="org.apache.lucene.gdata.gom.core/GOMFeedImpl#getEntries()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getGenerator" id="org.apache.lucene.gdata.gom.core/GOMFeedImpl#getGenerator()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getIcon" id="org.apache.lucene.gdata.gom.core/GOMFeedImpl#getIcon()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getId" id="org.apache.lucene.gdata.gom.core/GOMFeedImpl#getId()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getLinks" id="org.apache.lucene.gdata.gom.core/GOMFeedImpl#getLinks()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getLocalName" id="org.apache.lucene.gdata.gom.core/GOMFeedImpl#getLocalName()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getLogo" id="org.apache.lucene.gdata.gom.core/GOMFeedImpl#getLogo()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getNamespaces" id="org.apache.lucene.gdata.gom.core/GOMFeedImpl#getNamespaces()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getRights" id="org.apache.lucene.gdata.gom.core/GOMFeedImpl#getRights()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getSubtitle" id="org.apache.lucene.gdata.gom.core/GOMFeedImpl#getSubtitle()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getTitle" id="org.apache.lucene.gdata.gom.core/GOMFeedImpl#getTitle()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getUpdated" id="org.apache.lucene.gdata.gom.core/GOMFeedImpl#getUpdated()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="processAttribute" id="org.apache.lucene.gdata.gom.core/GOMFeedImpl#processAttribute(Ljavax.xml.namespace.QName;Ljava.lang.String;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="processElementValue" id="org.apache.lucene.gdata.gom.core/GOMFeedImpl#processElementValue(Ljava.lang.String;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="processEndElement" id="org.apache.lucene.gdata.gom.core/GOMFeedImpl#processEndElement()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="setGenerator" id="org.apache.lucene.gdata.gom.core/GOMFeedImpl#setGenerator(Lorg.apache.lucene.gdata.gom.GOMGenerator;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="setIcon" id="org.apache.lucene.gdata.gom.core/GOMFeedImpl#setIcon(Lorg.apache.lucene.gdata.gom.GOMIcon;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="setId" id="org.apache.lucene.gdata.gom.core/GOMFeedImpl#setId(Lorg.apache.lucene.gdata.gom.GOMId;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="setLogo" id="org.apache.lucene.gdata.gom.core/GOMFeedImpl#setLogo(Lorg.apache.lucene.gdata.gom.GOMLogo;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="setRights" id="org.apache.lucene.gdata.gom.core/GOMFeedImpl#setRights(Lorg.apache.lucene.gdata.gom.GOMRights;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="setSubtitle" id="org.apache.lucene.gdata.gom.core/GOMFeedImpl#setSubtitle(Lorg.apache.lucene.gdata.gom.GOMSubtitle;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="setTitle" id="org.apache.lucene.gdata.gom.core/GOMFeedImpl#setTitle(Lorg.apache.lucene.gdata.gom.GOMTitle;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="setUpdated" id="org.apache.lucene.gdata.gom.core/GOMFeedImpl#setUpdated(Lorg.apache.lucene.gdata.gom.GOMTime;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="writeAtomOutput" id="org.apache.lucene.gdata.gom.core/GOMFeedImpl#writeAtomOutput(Ljavax.xml.stream.XMLStreamWriter;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="writeRssOutput" id="org.apache.lucene.gdata.gom.core/GOMFeedImpl#writeRssOutput(Ljavax.xml.stream.XMLStreamWriter;)"/>
+ </children>
+ <children xsi:type="editmodel:CompartmentEditModel"/>
+ <sourceConnections xsi:type="editmodel:DependencyEditModel" autoLocated="true" id="org.apache.lucene.gdata.gom.core/GOMFeedImpl->org.apache.lucene.gdata.gom.core/AtomParser" source="//@children.1" target="//@children.3" targetEnd="//@children.1/@sourceConnections.0/@children.2" label="//@children.1/@sourceConnections.0/@children.0" sourceEnd="//@children.1/@sourceConnections.0/@children.1" connectionRouterKind="Manhattan">
+ <children xsi:type="editmodel:WireLabelEditModel" name="«import»" size="29,10" fontInfo="Arial-8-0" anchorKind="MiddlePart"/>
+ <children xsi:type="editmodel:AssociationEndEditModel" location="233,34" attachSource="true"/>
+ <children xsi:type="editmodel:AssociationEndEditModel" location="0,234"/>
+ </sourceConnections>
+ <sourceConnections xsi:type="editmodel:DependencyEditModel" autoLocated="true" id="org.apache.lucene.gdata.gom.core/GOMFeedImpl->org.apache.lucene.gdata.gom.core/GOMNamespace" source="//@children.1" target="//@children.6" targetEnd="//@children.1/@sourceConnections.1/@children.2" label="//@children.1/@sourceConnections.1/@children.0" sourceEnd="//@children.1/@sourceConnections.1/@children.1" connectionRouterKind="Manhattan">
+ <children xsi:type="editmodel:WireLabelEditModel" name="«import»" size="29,10" fontInfo="Arial-8-0" anchorKind="MiddlePart"/>
+ <children xsi:type="editmodel:AssociationEndEditModel" location="233,592" attachSource="true"/>
+ <children xsi:type="editmodel:AssociationEndEditModel" location="0,102"/>
+ </sourceConnections>
+ <sourceConnections xsi:type="editmodel:DependencyEditModel" id="org.apache.lucene.gdata.gom.core/GOMFeedImpl->org.apache.lucene.gdata.gom.core/GOMAttributeImpl" source="//@children.1" target="//@children.7" targetEnd="//@children.1/@sourceConnections.2/@children.2" label="//@children.1/@sourceConnections.2/@children.0" sourceEnd="//@children.1/@sourceConnections.2/@children.1" connectionRouterKind="Manhattan">
+ <children xsi:type="editmodel:WireLabelEditModel" size="0,10" fontInfo="Arial-8-0" anchorKind="MiddlePart"/>
+ <children xsi:type="editmodel:AssociationEndEditModel" location="0,12" attachSource="true"/>
+ <children xsi:type="editmodel:AssociationEndEditModel" location="173,193"/>
+ </sourceConnections>
+ <sourceConnections xsi:type="editmodel:DependencyEditModel" autoLocated="true" id="org.apache.lucene.gdata.gom.core/GOMFeedImpl->org.apache.lucene.gdata.gom.core/GOMAttributeImpl" source="//@children.1" target="//@children.7" targetEnd="//@children.1/@sourceConnections.3/@children.2" label="//@children.1/@sourceConnections.3/@children.0" sourceEnd="//@children.1/@sourceConnections.3/@children.1" connectionRouterKind="Manhattan">
+ <children xsi:type="editmodel:WireLabelEditModel" name="«import»" size="29,10" fontInfo="Arial-8-0" anchorKind="MiddlePart"/>
+ <children xsi:type="editmodel:AssociationEndEditModel" location="233,10" attachSource="true"/>
+ <children xsi:type="editmodel:AssociationEndEditModel" location="10,205"/>
+ </sourceConnections>
+ <classifierPreferences xsi:type="editmodel:UMLClassDiagramClassifierPreference" showStereotype="true" showMethodsParameterTypes="true" showMethodsReturnType="true" showMethodsParameterNames="true" showMethodsParameterKinds="true" attributeSorter="Natural" methodSorter="Natural" innerClassSorter="Natural" showPrivateAttributes="true" showProtectedAttributes="true" showPublicAttributes="true" showPackageAttributes="true" showStaticAttributes="true" showProtectedMethods="true" showPublicMethods="true" showPackageMethods="true" showPrivateMethods="true" showStaticMethods="true" showProtectedInnerClasses="true" showPublicInnerClasses="true" showPackageInnerClasses="true" showPrivateInnerClasses="true" showStaticInnerClasses="true" packageIndication="2" showAssociationMember="true" showMethods="true" showAttributes="true" showLiterals="true"/>
+ </children>
+ <children xsi:type="editmodel:ClassEditModel" targetConnections="//@children.5/@sourceConnections.2 //@children.5/@sourceConnections.4" name="GOMFactory" location="1873,241" size="147,133" id="org.apache.lucene.gdata.gom.core/GOMFactory" runTimeClassModel="createInstance(),createFeed(),GOMFactory()">
+ <children xsi:type="editmodel:CompartmentEditModel"/>
+ <children xsi:type="editmodel:CompartmentEditModel" size="124,54">
+ <children xsi:type="editmodel:MethodEditModel" name="GOMFactory" id="org.apache.lucene.gdata.gom.core/GOMFactory#GOMFactory()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="createInstance" id="org.apache.lucene.gdata.gom.core/GOMFactory#createInstance()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="createFeed" id="org.apache.lucene.gdata.gom.core/GOMFactory#createFeed()"/>
+ </children>
+ <children xsi:type="editmodel:CompartmentEditModel"/>
+ <classifierPreferences xsi:type="editmodel:UMLClassDiagramClassifierPreference" showStereotype="true" showMethodsParameterTypes="true" showMethodsReturnType="true" showMethodsParameterNames="true" showMethodsParameterKinds="true" attributeSorter="Natural" methodSorter="Natural" innerClassSorter="Natural" showPrivateAttributes="true" showProtectedAttributes="true" showPublicAttributes="true" showPackageAttributes="true" showStaticAttributes="true" showProtectedMethods="true" showPublicMethods="true" showPackageMethods="true" showPrivateMethods="true" showStaticMethods="true" showProtectedInnerClasses="true" showPublicInnerClasses="true" showPackageInnerClasses="true" showPrivateInnerClasses="true" showStaticInnerClasses="true" showAssociationMember="true" showMethods="true" showAttributes="true" showLiterals="true"/>
+ </children>
+ <children xsi:type="editmodel:InterfaceEditModel" targetConnections="//@children.5/@sourceConnections.0 //@children.1/@sourceConnections.0" name="AtomParser" location="1051,50" size="233,269" id="org.apache.lucene.gdata.gom.core/AtomParser" runTimeClassModel="uNEXPECTED_ATTRIBUTE,uNEXPECTED_ELEMENENT_VALUE,uNEXPECTED_ELEMENENT_CHILD,getChildParser(Ljavax.xml.namespace.QName;),uNEXPECTED_ELEMENENT,processEndElement(),mISSING_ELEMEMENT_CHILD,processElementValue(Ljava.lang.String;),processAttribute(Ljavax.xml.namespace.QName;Ljava.lang.String;),mISSING_ELEMEMENT_ATTRIBUTE">
+ <children xsi:type="editmodel:CompartmentEditModel" size="179,108">
+ <children xsi:type="editmodel:AttributeEditModel" name="uNEXPECTED_ELEMENENT" id="org.apache.lucene.gdata.gom.core/AtomParser#uNEXPECTED_ELEMENENT"/>
+ <children xsi:type="editmodel:AttributeEditModel" name="uNEXPECTED_ELEMENENT_CHILD" id="org.apache.lucene.gdata.gom.core/AtomParser#uNEXPECTED_ELEMENENT_CHILD"/>
+ <children xsi:type="editmodel:AttributeEditModel" name="uNEXPECTED_ATTRIBUTE" id="org.apache.lucene.gdata.gom.core/AtomParser#uNEXPECTED_ATTRIBUTE"/>
+ <children xsi:type="editmodel:AttributeEditModel" name="uNEXPECTED_ELEMENENT_VALUE" id="org.apache.lucene.gdata.gom.core/AtomParser#uNEXPECTED_ELEMENENT_VALUE"/>
+ <children xsi:type="editmodel:AttributeEditModel" name="mISSING_ELEMEMENT_ATTRIBUTE" id="org.apache.lucene.gdata.gom.core/AtomParser#mISSING_ELEMEMENT_ATTRIBUTE"/>
+ <children xsi:type="editmodel:AttributeEditModel" name="mISSING_ELEMEMENT_CHILD" id="org.apache.lucene.gdata.gom.core/AtomParser#mISSING_ELEMEMENT_CHILD"/>
+ </children>
+ <children xsi:type="editmodel:CompartmentEditModel" size="210,72">
+ <children xsi:type="editmodel:MethodEditModel" name="processElementValue" id="org.apache.lucene.gdata.gom.core/AtomParser#processElementValue(Ljava.lang.String;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="processAttribute" id="org.apache.lucene.gdata.gom.core/AtomParser#processAttribute(Ljavax.xml.namespace.QName;Ljava.lang.String;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="processEndElement" id="org.apache.lucene.gdata.gom.core/AtomParser#processEndElement()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getChildParser" id="org.apache.lucene.gdata.gom.core/AtomParser#getChildParser(Ljavax.xml.namespace.QName;)"/>
+ </children>
+ <children xsi:type="editmodel:CompartmentEditModel"/>
+ <sourceConnections xsi:type="editmodel:AssociationEditModel" autoLocated="true" id="org.apache.lucene.gdata.gom.core/AtomParser@parserStack+org.apache.lucene.gdata.gom.core/GOMBuilder@" source="//@children.3" target="//@children.5" targetEnd="//@children.3/@sourceConnections.0/@children.2" label="//@children.3/@sourceConnections.0/@children.0" sourceEnd="//@children.3/@sourceConnections.0/@children.1" connectionRouterKind="Manhattan">
+ <children xsi:type="editmodel:WireLabelEditModel" size="0,10" fontInfo="Arial-8-0" anchorKind="MiddlePart"/>
+ <children xsi:type="editmodel:AssociationEndEditModel" name="parserStack" location="233,259" id="org.apache.lucene.gdata.gom.core/AtomParser@parserStack+org.apache.lucene.gdata.gom.core/GOMBuilder@|org.apache.lucene.gdata.gom.core/AtomParser#parserStack" attachSource="true" multiplicityLabel="//@children.3/@sourceConnections.0/@children.1/@children.1" roleLabel="//@children.3/@sourceConnections.0/@children.1/@children.0" navigable="true">
+ <children xsi:type="editmodel:LabelEditModel" name=" - parserStack" location="1291,291" size="47,10" fontInfo="Arial-8-0" anchorKind="FirstPart"/>
+ <children xsi:type="editmodel:LabelEditModel" name="*" location="1291,315" size="3,10" fontInfo="Arial-8-0" anchorKind="FirstPart"/>
+ </children>
+ <children xsi:type="editmodel:AssociationEndEditModel" location="10,0" id="org.apache.lucene.gdata.gom.core/AtomParser@parserStack+org.apache.lucene.gdata.gom.core/GOMBuilder@|org.apache.lucene.gdata.gom.core/GOMBuilder#" roleLabel="//@children.3/@sourceConnections.0/@children.2/@children.0">
+ <children xsi:type="editmodel:LabelEditModel" location="1391,481" size="0,10" fontInfo="Arial-8-0" anchorKind="LastPart"/>
+ </children>
+ </sourceConnections>
+ <classifierPreferences xsi:type="editmodel:UMLClassDiagramClassifierPreference" showStereotype="true" showMethodsParameterTypes="true" showMethodsReturnType="true" showMethodsParameterNames="true" showMethodsParameterKinds="true" attributeSorter="Natural" methodSorter="Natural" innerClassSorter="Natural" showPrivateAttributes="true" showProtectedAttributes="true" showPublicAttributes="true" showPackageAttributes="true" showStaticAttributes="true" showProtectedMethods="true" showPublicMethods="true" showPackageMethods="true" showPrivateMethods="true" showStaticMethods="true" showProtectedInnerClasses="true" showPublicInnerClasses="true" showPackageInnerClasses="true" showPrivateInnerClasses="true" showStaticInnerClasses="true" showAssociationMember="true" showMethods="true" showAttributes="true" showLiterals="true"/>
+ </children>
+ <children xsi:type="editmodel:ClassEditModel" targetConnections="//@children.5/@sourceConnections.3 //@children.5/@sourceConnections.6 //@children.5/@sourceConnections.8" name="GOMDocumentImpl" location="1623,994" size="227,295" id="org.apache.lucene.gdata.gom.core/GOMDocumentImpl" runTimeClassModel="setCharacterEncoding(Ljava.lang.String;),charEncoding,GOMDocumentImpl(),setVersion(Ljava.lang.String;),getCharacterEncoding(),writeRssOutput(Ljavax.xml.stream.XMLStreamWriter;),root,getRootElement(),getVersion(),writeAtomOutput(Ljavax.xml.stream.XMLStreamWriter;),setRootElement,version">
+ <children xsi:type="editmodel:CompartmentEditModel" size="91,54">
+ <children xsi:type="editmodel:AttributeEditModel" name="root" id="org.apache.lucene.gdata.gom.core/GOMDocumentImpl#root"/>
+ <children xsi:type="editmodel:AttributeEditModel" name="version" id="org.apache.lucene.gdata.gom.core/GOMDocumentImpl#version"/>
+ <children xsi:type="editmodel:AttributeEditModel" name="charEncoding" id="org.apache.lucene.gdata.gom.core/GOMDocumentImpl#charEncoding"/>
+ </children>
+ <children xsi:type="editmodel:CompartmentEditModel" size="204,162">
+ <children xsi:type="editmodel:MethodEditModel" name="GOMDocumentImpl" id="org.apache.lucene.gdata.gom.core/GOMDocumentImpl#GOMDocumentImpl()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getRootElement" id="org.apache.lucene.gdata.gom.core/GOMDocumentImpl#getRootElement()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="setVersion" id="org.apache.lucene.gdata.gom.core/GOMDocumentImpl#setVersion(Ljava.lang.String;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getVersion" id="org.apache.lucene.gdata.gom.core/GOMDocumentImpl#getVersion()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getCharacterEncoding" id="org.apache.lucene.gdata.gom.core/GOMDocumentImpl#getCharacterEncoding()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="setCharacterEncoding" id="org.apache.lucene.gdata.gom.core/GOMDocumentImpl#setCharacterEncoding(Ljava.lang.String;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="writeAtomOutput" id="org.apache.lucene.gdata.gom.core/GOMDocumentImpl#writeAtomOutput(Ljavax.xml.stream.XMLStreamWriter;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="setRootElement" id="org.apache.lucene.gdata.gom.core/GOMDocumentImpl#setRootElement"/>
+ <children xsi:type="editmodel:MethodEditModel" name="writeRssOutput" id="org.apache.lucene.gdata.gom.core/GOMDocumentImpl#writeRssOutput(Ljavax.xml.stream.XMLStreamWriter;)"/>
+ </children>
+ <children xsi:type="editmodel:CompartmentEditModel"/>
+ <classifierPreferences xsi:type="editmodel:UMLClassDiagramClassifierPreference" showStereotype="true" showMethodsParameterTypes="true" showMethodsReturnType="true" showMethodsParameterNames="true" showMethodsParameterKinds="true" attributeSorter="Natural" methodSorter="Natural" innerClassSorter="Natural" showPrivateAttributes="true" showProtectedAttributes="true" showPublicAttributes="true" showPackageAttributes="true" showStaticAttributes="true" showProtectedMethods="true" showPublicMethods="true" showPackageMethods="true" showPrivateMethods="true" showStaticMethods="true" showProtectedInnerClasses="true" showPublicInnerClasses="true" showPackageInnerClasses="true" showPrivateInnerClasses="true" showStaticInnerClasses="true" showAssociationMember="true" showMethods="true" showAttributes="true" showLiterals="true"/>
+ </children>
+ <children xsi:type="editmodel:ClassEditModel" targetConnections="//@children.3/@sourceConnections.0" name="GOMBuilder" location="1388,498" size="259,295" id="org.apache.lucene.gdata.gom.core/GOMBuilder" runTimeClassModel="parserStack,next(),processAttributes(Lorg.apache.lucene.gdata.gom.core.AtomParser;),buildGOMEntry(),lastLocalName,streamReader,parse(Ljavax.xml.stream.XMLStreamReader;),buildGOMFeed(),GOMBuilder(Ljavax.xml.stream.XMLStreamReader;),startFeedDocument(Lorg.apache.lucene.gdata.gom.GOMDocument;),factory">
+ <children xsi:type="editmodel:CompartmentEditModel" size="136,54">
+ <children xsi:type="editmodel:AttributeEditModel" name="streamReader" id="org.apache.lucene.gdata.gom.core/GOMBuilder#streamReader"/>
+ <children xsi:type="editmodel:AttributeEditModel" name="factory" id="org.apache.lucene.gdata.gom.core/GOMBuilder#factory"/>
+ <children xsi:type="editmodel:AttributeEditModel" name="lastLocalName" id="org.apache.lucene.gdata.gom.core/GOMBuilder#lastLocalName"/>
+ <children xsi:type="editmodel:AttributeEditModel" name="parserStack" id="org.apache.lucene.gdata.gom.core/AtomParser@parserStack+org.apache.lucene.gdata.gom.core/GOMBuilder@|org.apache.lucene.gdata.gom.core/AtomParser#parserStack"/>
+ </children>
+ <children xsi:type="editmodel:CompartmentEditModel" size="236,126">
+ <children xsi:type="editmodel:MethodEditModel" name="GOMBuilder" id="org.apache.lucene.gdata.gom.core/GOMBuilder#GOMBuilder(Ljavax.xml.stream.XMLStreamReader;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="buildGOMFeed" id="org.apache.lucene.gdata.gom.core/GOMBuilder#buildGOMFeed()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="parse" id="org.apache.lucene.gdata.gom.core/GOMBuilder#parse(Ljavax.xml.stream.XMLStreamReader;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="processAttributes" id="org.apache.lucene.gdata.gom.core/GOMBuilder#processAttributes(Lorg.apache.lucene.gdata.gom.core.AtomParser;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="buildGOMEntry" id="org.apache.lucene.gdata.gom.core/GOMBuilder#buildGOMEntry()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="startFeedDocument" id="org.apache.lucene.gdata.gom.core/GOMBuilder#startFeedDocument(Lorg.apache.lucene.gdata.gom.GOMDocument;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="next" id="org.apache.lucene.gdata.gom.core/GOMBuilder#next()"/>
+ </children>
+ <children xsi:type="editmodel:CompartmentEditModel"/>
+ <sourceConnections xsi:type="editmodel:DependencyEditModel" id="org.apache.lucene.gdata.gom.core/GOMBuilder->org.apache.lucene.gdata.gom.core/AtomParser" source="//@children.5" target="//@children.3" targetEnd="//@children.5/@sourceConnections.0/@children.2" label="//@children.5/@sourceConnections.0/@children.0" sourceEnd="//@children.5/@sourceConnections.0/@children.1" connectionRouterKind="Manhattan">
+ <children xsi:type="editmodel:WireLabelEditModel" name="«import»" size="29,10" fontInfo="Arial-8-0" anchorKind="MiddlePart"/>
+ <children xsi:type="editmodel:AssociationEndEditModel" location="0,20" attachSource="true"/>
+ <children xsi:type="editmodel:AssociationEndEditModel" location="213,269"/>
+ </sourceConnections>
+ <sourceConnections xsi:type="editmodel:DependencyEditModel" id="org.apache.lucene.gdata.gom.core/GOMBuilder->org.apache.lucene.gdata.gom.core/GOMNamespace" source="//@children.5" target="//@children.6" targetEnd="//@children.5/@sourceConnections.1/@children.2" label="//@children.5/@sourceConnections.1/@children.0" sourceEnd="//@children.5/@sourceConnections.1/@children.1" connectionRouterKind="Manhattan">
+ <children xsi:type="editmodel:WireLabelEditModel" size="0,10" fontInfo="Arial-8-0" anchorKind="MiddlePart"/>
+ <children xsi:type="editmodel:AssociationEndEditModel" location="0,236" attachSource="true"/>
+ <children xsi:type="editmodel:AssociationEndEditModel" location="135,58"/>
+ </sourceConnections>
+ <sourceConnections xsi:type="editmodel:DependencyEditModel" autoLocated="true" id="org.apache.lucene.gdata.gom.core/GOMBuilder->org.apache.lucene.gdata.gom.core/GOMFactory" source="//@children.5" target="//@children.2" targetEnd="//@children.5/@sourceConnections.2/@children.2" label="//@children.5/@sourceConnections.2/@children.0" sourceEnd="//@children.5/@sourceConnections.2/@children.1" connectionRouterKind="Manhattan">
+ <children xsi:type="editmodel:WireLabelEditModel" name="«access»" size="32,10" fontInfo="Arial-8-0" anchorKind="MiddlePart"/>
+ <children xsi:type="editmodel:AssociationEndEditModel" location="249,0" attachSource="true"/>
+ <children xsi:type="editmodel:AssociationEndEditModel" location="0,123"/>
+ </sourceConnections>
+ <sourceConnections xsi:type="editmodel:DependencyEditModel" id="org.apache.lucene.gdata.gom.core/GOMBuilder->org.apache.lucene.gdata.gom.core/GOMDocumentImpl" source="//@children.5" target="//@children.4" targetEnd="//@children.5/@sourceConnections.3/@children.2" label="//@children.5/@sourceConnections.3/@children.0" sourceEnd="//@children.5/@sourceConnections.3/@children.1" connectionRouterKind="Manhattan">
+ <children xsi:type="editmodel:WireLabelEditModel" size="0,10" fontInfo="Arial-8-0" anchorKind="MiddlePart"/>
+ <children xsi:type="editmodel:AssociationEndEditModel" location="256,295" attachSource="true"/>
+ <children xsi:type="editmodel:AssociationEndEditModel" location="21,0"/>
+ </sourceConnections>
+ <sourceConnections xsi:type="editmodel:DependencyEditModel" id="org.apache.lucene.gdata.gom.core/GOMBuilder->org.apache.lucene.gdata.gom.core/GOMFactory" source="//@children.5" target="//@children.2" targetEnd="//@children.5/@sourceConnections.4/@children.2" label="//@children.5/@sourceConnections.4/@children.0" sourceEnd="//@children.5/@sourceConnections.4/@children.1" connectionRouterKind="Manhattan">
+ <children xsi:type="editmodel:WireLabelEditModel" name="«import»" size="29,10" fontInfo="Arial-8-0" anchorKind="MiddlePart"/>
+ <children xsi:type="editmodel:AssociationEndEditModel" location="258,0" attachSource="true"/>
+ <children xsi:type="editmodel:AssociationEndEditModel" location="10,143"/>
+ </sourceConnections>
+ <sourceConnections xsi:type="editmodel:DependencyEditModel" id="org.apache.lucene.gdata.gom.core/GOMBuilder->org.apache.lucene.gdata.gom.core/GOMNamespace" source="//@children.5" target="//@children.6" targetEnd="//@children.5/@sourceConnections.5/@children.2" label="//@children.5/@sourceConnections.5/@children.0" sourceEnd="//@children.5/@sourceConnections.5/@children.1" connectionRouterKind="Manhattan">
+ <children xsi:type="editmodel:WireLabelEditModel" name="«import»" size="29,10" fontInfo="Arial-8-0" anchorKind="MiddlePart"/>
+ <children xsi:type="editmodel:AssociationEndEditModel" location="0,216" attachSource="true"/>
+ <children xsi:type="editmodel:AssociationEndEditModel" location="135,78"/>
+ </sourceConnections>
+ <sourceConnections xsi:type="editmodel:DependencyEditModel" id="org.apache.lucene.gdata.gom.core/GOMBuilder->org.apache.lucene.gdata.gom.core/GOMDocumentImpl" source="//@children.5" target="//@children.4" targetEnd="//@children.5/@sourceConnections.6/@children.2" label="//@children.5/@sourceConnections.6/@children.0" sourceEnd="//@children.5/@sourceConnections.6/@children.1" connectionRouterKind="Manhattan">
+ <children xsi:type="editmodel:WireLabelEditModel" size="0,10" fontInfo="Arial-8-0" anchorKind="MiddlePart"/>
+ <children xsi:type="editmodel:AssociationEndEditModel" location="236,295" attachSource="true"/>
+ <children xsi:type="editmodel:AssociationEndEditModel" location="1,0"/>
+ </sourceConnections>
+ <sourceConnections xsi:type="editmodel:DependencyEditModel" autoLocated="true" id="org.apache.lucene.gdata.gom.core/GOMBuilder->org.apache.lucene.gdata.gom.core/GOMNamespace" source="//@children.5" target="//@children.6" targetEnd="//@children.5/@sourceConnections.7/@children.2" label="//@children.5/@sourceConnections.7/@children.0" sourceEnd="//@children.5/@sourceConnections.7/@children.1" connectionRouterKind="Manhattan">
+ <children xsi:type="editmodel:WireLabelEditModel" size="0,10" fontInfo="Arial-8-0" anchorKind="MiddlePart"/>
+ <children xsi:type="editmodel:AssociationEndEditModel" location="0,268" attachSource="true"/>
+ <children xsi:type="editmodel:AssociationEndEditModel" location="135,26"/>
+ </sourceConnections>
+ <sourceConnections xsi:type="editmodel:DependencyEditModel" autoLocated="true" id="org.apache.lucene.gdata.gom.core/GOMBuilder->org.apache.lucene.gdata.gom.core/GOMDocumentImpl" source="//@children.5" target="//@children.4" targetEnd="//@children.5/@sourceConnections.8/@children.2" label="//@children.5/@sourceConnections.8/@children.0" sourceEnd="//@children.5/@sourceConnections.8/@children.1" connectionRouterKind="Manhattan">
+ <children xsi:type="editmodel:WireLabelEditModel" size="0,10" fontInfo="Arial-8-0" anchorKind="MiddlePart"/>
+ <children xsi:type="editmodel:AssociationEndEditModel" location="246,295" attachSource="true"/>
+ <children xsi:type="editmodel:AssociationEndEditModel" location="11,0"/>
+ </sourceConnections>
+ <sourceConnections xsi:type="editmodel:DependencyEditModel" id="org.apache.lucene.gdata.gom.core/GOMBuilder->org.apache.lucene.gdata.gom.core/GOMNamespace" source="//@children.5" target="//@children.6" targetEnd="//@children.5/@sourceConnections.9/@children.2" label="//@children.5/@sourceConnections.9/@children.0" sourceEnd="//@children.5/@sourceConnections.9/@children.1" connectionRouterKind="Manhattan">
+ <children xsi:type="editmodel:WireLabelEditModel" size="0,10" fontInfo="Arial-8-0" anchorKind="MiddlePart"/>
+ <children xsi:type="editmodel:AssociationEndEditModel" location="0,246" attachSource="true"/>
+ <children xsi:type="editmodel:AssociationEndEditModel" location="135,48"/>
+ </sourceConnections>
+ <classifierPreferences xsi:type="editmodel:UMLClassDiagramClassifierPreference" showStereotype="true" showMethodsParameterTypes="true" showMethodsReturnType="true" showMethodsParameterNames="true" showMethodsParameterKinds="true" attributeSorter="Natural" methodSorter="Natural" innerClassSorter="Natural" showPrivateAttributes="true" showProtectedAttributes="true" showPublicAttributes="true" showPackageAttributes="true" showStaticAttributes="true" showProtectedMethods="true" showPublicMethods="true" showPackageMethods="true" showPrivateMethods="true" showStaticMethods="true" showProtectedInnerClasses="true" showPublicInnerClasses="true" showPackageInnerClasses="true" showPrivateInnerClasses="true" showStaticInnerClasses="true" showAssociationMember="true" showMethods="true" showAttributes="true" showLiterals="true"/>
+ </children>
+ <children xsi:type="editmodel:ClassEditModel" targetConnections="//@children.5/@sourceConnections.1 //@children.5/@sourceConnections.5 //@children.1/@sourceConnections.1 //@children.5/@sourceConnections.7 //@children.5/@sourceConnections.9" name="GOMNamespace" location="590,740" size="135,205" id="org.apache.lucene.gdata.gom.core/GOMNamespace" runTimeClassModel="setUri(Ljava.lang.String;),GOMNamespace(),getUri(),getPrefix(),uri,prefix,setPrefix(Ljava.lang.String;)">
+ <children xsi:type="editmodel:CompartmentEditModel" size="62,36">
+ <children xsi:type="editmodel:AttributeEditModel" name="prefix" id="org.apache.lucene.gdata.gom.core/GOMNamespace#prefix"/>
+ <children xsi:type="editmodel:AttributeEditModel" name="uri" id="org.apache.lucene.gdata.gom.core/GOMNamespace#uri"/>
+ </children>
+ <children xsi:type="editmodel:CompartmentEditModel" size="112,90">
+ <children xsi:type="editmodel:MethodEditModel" name="GOMNamespace" id="org.apache.lucene.gdata.gom.core/GOMNamespace#GOMNamespace()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getPrefix" id="org.apache.lucene.gdata.gom.core/GOMNamespace#getPrefix()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="setPrefix" id="org.apache.lucene.gdata.gom.core/GOMNamespace#setPrefix(Ljava.lang.String;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getUri" id="org.apache.lucene.gdata.gom.core/GOMNamespace#getUri()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="setUri" id="org.apache.lucene.gdata.gom.core/GOMNamespace#setUri(Ljava.lang.String;)"/>
+ </children>
+ <children xsi:type="editmodel:CompartmentEditModel"/>
+ <sourceConnections xsi:type="editmodel:AssociationEditModel" id="org.apache.lucene.gdata.gom.core/GOMNamespace@namespaces+org.apache.lucene.gdata.gom.core/GOMFeedImpl@" source="//@children.6" target="//@children.1" targetEnd="//@children.6/@sourceConnections.0/@children.2" label="//@children.6/@sourceConnections.0/@children.0" sourceEnd="//@children.6/@sourceConnections.0/@children.1" connectionRouterKind="Manhattan">
+ <children xsi:type="editmodel:WireLabelEditModel" size="0,10" fontInfo="Arial-8-0" anchorKind="MiddlePart"/>
+ <children xsi:type="editmodel:AssociationEndEditModel" name="namespaces" location="0,112" id="org.apache.lucene.gdata.gom.core/GOMNamespace@namespaces+org.apache.lucene.gdata.gom.core/GOMFeedImpl@|org.apache.lucene.gdata.gom.core/GOMNamespace#namespaces" attachSource="true" multiplicityLabel="//@children.6/@sourceConnections.0/@children.1/@children.1" roleLabel="//@children.6/@sourceConnections.0/@children.1/@children.0" navigable="true">
+ <children xsi:type="editmodel:LabelEditModel" name=" - namespaces" location="534,859" size="49,10" fontInfo="Arial-8-0" anchorKind="FirstPart"/>
+ <children xsi:type="editmodel:LabelEditModel" name="*" location="580,835" size="3,10" fontInfo="Arial-8-0" anchorKind="FirstPart"/>
+ </children>
+ <children xsi:type="editmodel:AssociationEndEditModel" location="233,532" id="org.apache.lucene.gdata.gom.core/GOMNamespace@namespaces+org.apache.lucene.gdata.gom.core/GOMFeedImpl@|org.apache.lucene.gdata.gom.core/GOMFeedImpl#"/>
+ </sourceConnections>
+ <classifierPreferences xsi:type="editmodel:UMLClassDiagramClassifierPreference" showStereotype="true" showMethodsParameterTypes="true" showMethodsReturnType="true" showMethodsParameterNames="true" showMethodsParameterKinds="true" attributeSorter="Natural" methodSorter="Natural" innerClassSorter="Natural" showPrivateAttributes="true" showProtectedAttributes="true" showPublicAttributes="true" showPackageAttributes="true" showStaticAttributes="true" showProtectedMethods="true" showPublicMethods="true" showPackageMethods="true" showPrivateMethods="true" showStaticMethods="true" showProtectedInnerClasses="true" showPublicInnerClasses="true" showPackageInnerClasses="true" showPrivateInnerClasses="true" showStaticInnerClasses="true" showAssociationMember="true" showMethods="true" showAttributes="true" showLiterals="true"/>
+ </children>
+ <children xsi:type="editmodel:ClassEditModel" targetConnections="//@children.1/@sourceConnections.2 //@children.1/@sourceConnections.3" name="GOMAttributeImpl" location="640,-20" size="173,205" id="org.apache.lucene.gdata.gom.core/GOMAttributeImpl" runTimeClassModel="GOMAttributeImpl(),setLocalName(Ljava.lang.String;),setTextValue(Ljava.lang.String;),setQName(Ljavax.xml.namespace.QName;),getQname(),getTextValue(),getLocalName()">
+ <children xsi:type="editmodel:CompartmentEditModel"/>
+ <children xsi:type="editmodel:CompartmentEditModel" size="150,126">
+ <children xsi:type="editmodel:MethodEditModel" name="GOMAttributeImpl" id="org.apache.lucene.gdata.gom.core/GOMAttributeImpl#GOMAttributeImpl()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getQname" id="org.apache.lucene.gdata.gom.core/GOMAttributeImpl#getQname()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="setQName" id="org.apache.lucene.gdata.gom.core/GOMAttributeImpl#setQName(Ljavax.xml.namespace.QName;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="setLocalName" id="org.apache.lucene.gdata.gom.core/GOMAttributeImpl#setLocalName(Ljava.lang.String;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getLocalName" id="org.apache.lucene.gdata.gom.core/GOMAttributeImpl#getLocalName()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getTextValue" id="org.apache.lucene.gdata.gom.core/GOMAttributeImpl#getTextValue()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="setTextValue" id="org.apache.lucene.gdata.gom.core/GOMAttributeImpl#setTextValue(Ljava.lang.String;)"/>
+ </children>
+ <children xsi:type="editmodel:CompartmentEditModel"/>
+ <classifierPreferences xsi:type="editmodel:UMLClassDiagramClassifierPreference" showStereotype="true" showMethodsParameterTypes="true" showMethodsReturnType="true" showMethodsParameterNames="true" showMethodsParameterKinds="true" attributeSorter="Natural" methodSorter="Natural" innerClassSorter="Natural" showPrivateAttributes="true" showProtectedAttributes="true" showPublicAttributes="true" showPackageAttributes="true" showStaticAttributes="true" showProtectedMethods="true" showPublicMethods="true" showPackageMethods="true" showPrivateMethods="true" showStaticMethods="true" showProtectedInnerClasses="true" showPublicInnerClasses="true" showPackageInnerClasses="true" showPrivateInnerClasses="true" showStaticInnerClasses="true" showAssociationMember="true" showMethods="true" showAttributes="true" showLiterals="true"/>
+ </children>
+ <diagramOptions xsi:type="options:ClassDiagramOptions" properties="wireOptions=0"/>
+ <boardSetting snapToGeometry="true" gridEnabled="true" gridSpacing="10,10" gridOrigin="0,0" rulerUnit="pixel">
+ <leftRuler/>
+ <topRuler/>
+ </boardSetting>
+ <classDiagramPreferences xsi:type="editmodel:UMLClassDiagramPreference" showMethodsParameterTypes="true" showMethodsReturnType="true" showMethodsParameterNames="true" showMethodsParameterKinds="true" attributeSorter="Natural" methodSorter="Natural" showClassStereotype="true" showPackageStereotype="true" innerClassSorter="Natural" showPrivateAttributes="true" showProtectedAttributes="true" showPublicAttributes="true" showPackageAttributes="true" showStaticAttributes="true" showProtectedMethods="true" showPublicMethods="true" showPackageMethods="true" showPrivateMethods="true" showStaticMethods="true" showProtectedInnerClasses="true" showPublicInnerClasses="true" showPackageInnerClasses="true" showPrivateInnerClasses="true" showStaticInnerClasses="true" packageIndication="2" showInterfaceStereotype="true" showAssociationMember="true" showMethods="true" showAttributes="true" showLiterlas="true"/>
+</editmodel:ClassDiagramEditModel>
diff --git a/contrib/gdata-server/src/gom/java/org/apache/lucene/gdata/gom/core/core-aid.uml b/contrib/gdata-server/src/gom/java/org/apache/lucene/gdata/gom/core/core-aid.uml
new file mode 100644
index 00000000000..7bce9e619c3
--- /dev/null
+++ b/contrib/gdata-server/src/gom/java/org/apache/lucene/gdata/gom/core/core-aid.uml
@@ -0,0 +1,968 @@
+<?xml version="1.0" encoding="ASCII"?>
+<uml:Model xmi:version="2.1" xmlns:xmi="http://schema.omg.org/spec/XMI/2.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:uml="http://www.eclipse.org/uml2/2.0.0/UML" xmi:id="_B7TvIH5gEdujQd6ed5A7Ug" name="core">
+ <packagedElement xmi:type="uml:Interface" xmi:id="_r7Q00H5eEdujQd6ed5A7Ug" name="AtomParser" clientDependency="_r7sSoH5eEdujQd6ed5A7Ug _r7uu4X5eEdujQd6ed5A7Ug">
+ <ownedAttribute xmi:id="_r7dCEH5eEdujQd6ed5A7Ug" name="uNEXPECTED_ELEMENENT_VALUE" visibility="public" isLeaf="true" isStatic="true" type="_r7dpIX5eEdujQd6ed5A7Ug">
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_r7lk8H5eEdujQd6ed5A7Ug" value="1"/>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_r7k94X5eEdujQd6ed5A7Ug"/>
+ </ownedAttribute>
+ <ownedAttribute xmi:id="_r7eQMH5eEdujQd6ed5A7Ug" name="uNEXPECTED_ATTRIBUTE" visibility="public" isLeaf="true" isStatic="true" type="_r7dpIX5eEdujQd6ed5A7Ug">
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_r7pPUX5eEdujQd6ed5A7Ug" value="1"/>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_r7pPUH5eEdujQd6ed5A7Ug"/>
+ </ownedAttribute>
+ <ownedAttribute xmi:id="_r7e3QH5eEdujQd6ed5A7Ug" name="uNEXPECTED_ELEMENENT_CHILD" visibility="public" isLeaf="true" isStatic="true" type="_r7dpIX5eEdujQd6ed5A7Ug">
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_r7p2YH5eEdujQd6ed5A7Ug" value="1"/>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_r7pPUn5eEdujQd6ed5A7Ug"/>
+ </ownedAttribute>
+ <ownedAttribute xmi:id="_r7e3QX5eEdujQd6ed5A7Ug" name="uNEXPECTED_ELEMENENT" visibility="public" isLeaf="true" isStatic="true" type="_r7dpIX5eEdujQd6ed5A7Ug">
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_r7p2Yn5eEdujQd6ed5A7Ug" value="1"/>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_r7p2YX5eEdujQd6ed5A7Ug"/>
+ </ownedAttribute>
+ <ownedAttribute xmi:id="_r7feUH5eEdujQd6ed5A7Ug" name="mISSING_ELEMEMENT_CHILD" visibility="public" isLeaf="true" isStatic="true" type="_r7dpIX5eEdujQd6ed5A7Ug">
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_r7qdcH5eEdujQd6ed5A7Ug" value="1"/>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_r7p2Y35eEdujQd6ed5A7Ug"/>
+ </ownedAttribute>
+ <ownedAttribute xmi:id="_r7gFYH5eEdujQd6ed5A7Ug" name="mISSING_ELEMEMENT_ATTRIBUTE" visibility="public" isLeaf="true" isStatic="true" type="_r7dpIX5eEdujQd6ed5A7Ug">
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_r7qdcn5eEdujQd6ed5A7Ug" value="1"/>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_r7qdcX5eEdujQd6ed5A7Ug"/>
+ </ownedAttribute>
+ <ownedOperation xmi:id="_r7gscH5eEdujQd6ed5A7Ug" name="processAttribute" visibility="public" isAbstract="true" concurrency="concurrent">
+ <ownedParameter xmi:id="_-KrWIH5fEdujQd6ed5A7Ug" name="aQName" type="_r7h6kH5eEdujQd6ed5A7Ug"/>
+ <ownedParameter xmi:id="_-KrWIX5fEdujQd6ed5A7Ug" name="aValue" type="_r7dpIX5eEdujQd6ed5A7Ug"/>
+ </ownedOperation>
+ <ownedOperation xmi:id="_r7jIsH5eEdujQd6ed5A7Ug" name="getChildParser" visibility="public" isAbstract="true" concurrency="concurrent">
+ <ownedParameter xmi:id="_-Kr9MH5fEdujQd6ed5A7Ug" name="name" type="_r7h6kH5eEdujQd6ed5A7Ug"/>
+ <ownedParameter xmi:id="_-KskQH5fEdujQd6ed5A7Ug" type="_r7Q00H5eEdujQd6ed5A7Ug" direction="return"/>
+ </ownedOperation>
+ <ownedOperation xmi:id="_r7jvwX5eEdujQd6ed5A7Ug" name="processEndElement" visibility="public" isAbstract="true" concurrency="concurrent"/>
+ <ownedOperation xmi:id="_r7kW0H5eEdujQd6ed5A7Ug" name="processElementValue" visibility="public" isAbstract="true" concurrency="concurrent">
+ <ownedParameter xmi:id="_-KtLUH5fEdujQd6ed5A7Ug" name="aValue" type="_r7dpIX5eEdujQd6ed5A7Ug"/>
+ </ownedOperation>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Class" xmi:id="_r7h6kH5eEdujQd6ed5A7Ug" name="QName"/>
+ <packagedElement xmi:type="uml:Class" xmi:id="_r8CQ4H5eEdujQd6ed5A7Ug" name="GOMNamespace" clientDependency="_r8qjAH5eEdujQd6ed5A7Ug">
+ <ownedAttribute xmi:id="_r8kcYH5eEdujQd6ed5A7Ug" name="uri" visibility="private" type="_r7dpIX5eEdujQd6ed5A7Ug">
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_r8ot0X5eEdujQd6ed5A7Ug" value="1"/>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_r8ot0H5eEdujQd6ed5A7Ug"/>
+ </ownedAttribute>
+ <ownedAttribute xmi:id="_r8lDcH5eEdujQd6ed5A7Ug" name="prefix" visibility="private" type="_r7dpIX5eEdujQd6ed5A7Ug">
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_r8pU4X5eEdujQd6ed5A7Ug" value="1"/>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_r8pU4H5eEdujQd6ed5A7Ug"/>
+ </ownedAttribute>
+ <ownedOperation xmi:id="_r8lqgH5eEdujQd6ed5A7Ug" name="setUri" visibility="public" concurrency="concurrent">
+ <ownedParameter xmi:id="_r8mRkH5eEdujQd6ed5A7Ug" name="aUri" type="_r7dpIX5eEdujQd6ed5A7Ug"/>
+ </ownedOperation>
+ <ownedOperation xmi:id="_r8mRkX5eEdujQd6ed5A7Ug" name="getPrefix" visibility="public" concurrency="concurrent">
+ <ownedParameter xmi:id="_r8m4oH5eEdujQd6ed5A7Ug" type="_r7dpIX5eEdujQd6ed5A7Ug" direction="return"/>
+ </ownedOperation>
+ <ownedOperation xmi:id="_r8m4oX5eEdujQd6ed5A7Ug" name="setPrefix" visibility="public" concurrency="concurrent">
+ <ownedParameter xmi:id="_r8nfsH5eEdujQd6ed5A7Ug" name="aPrefix" type="_r7dpIX5eEdujQd6ed5A7Ug"/>
+ </ownedOperation>
+ <ownedOperation xmi:id="_r8nfsX5eEdujQd6ed5A7Ug" name="getUri" visibility="public" concurrency="concurrent">
+ <ownedParameter xmi:id="_r8oGwH5eEdujQd6ed5A7Ug" type="_r7dpIX5eEdujQd6ed5A7Ug" direction="return"/>
+ </ownedOperation>
+ <ownedOperation xmi:id="_r8oGwX5eEdujQd6ed5A7Ug" name="GOMNamespace" visibility="public" concurrency="concurrent"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Class" xmi:id="_r8824H5eEdujQd6ed5A7Ug" name="GDataParseException" clientDependency="_r9GA0H5eEdujQd6ed5A7Ug _r9IdEn5eEdujQd6ed5A7Ug">
+ <generalization xmi:id="_r8-FAH5eEdujQd6ed5A7Ug" general="_r89d8H5eEdujQd6ed5A7Ug"/>
+ <ownedOperation xmi:id="_r9AhQH5eEdujQd6ed5A7Ug" name="GDataParseException" visibility="public" concurrency="concurrent"/>
+ <ownedOperation xmi:id="_r9BIUH5eEdujQd6ed5A7Ug" name="GDataParseException" visibility="public" concurrency="concurrent">
+ <ownedParameter xmi:id="_r9CWcH5eEdujQd6ed5A7Ug" name="arg0" type="_r7dpIX5eEdujQd6ed5A7Ug"/>
+ </ownedOperation>
+ <ownedOperation xmi:id="_r9CWcX5eEdujQd6ed5A7Ug" name="GDataParseException" visibility="public" concurrency="concurrent">
+ <ownedParameter xmi:id="_r9C9gH5eEdujQd6ed5A7Ug" name="arg0" type="_r7dpIX5eEdujQd6ed5A7Ug"/>
+ <ownedParameter xmi:id="_r9ELoX5eEdujQd6ed5A7Ug" name="arg1" type="_r9ELoH5eEdujQd6ed5A7Ug"/>
+ </ownedOperation>
+ <ownedOperation xmi:id="_r9EysH5eEdujQd6ed5A7Ug" name="GDataParseException" visibility="public" concurrency="concurrent">
+ <ownedParameter xmi:id="_r9EysX5eEdujQd6ed5A7Ug" name="arg0" type="_r9ELoH5eEdujQd6ed5A7Ug"/>
+ </ownedOperation>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Class" xmi:id="_r9WfgH5eEdujQd6ed5A7Ug" name="GOMAttributeImpl" clientDependency="_r9lJAH5eEdujQd6ed5A7Ug _r9nlQn5eEdujQd6ed5A7Ug">
+ <generalization xmi:id="_r9YUsH5eEdujQd6ed5A7Ug" general="_r9XtoH5eEdujQd6ed5A7Ug"/>
+ <ownedOperation xmi:id="_r9fCYH5eEdujQd6ed5A7Ug" name="setQName" visibility="public" concurrency="concurrent">
+ <ownedParameter xmi:id="_r9fpcH5eEdujQd6ed5A7Ug" name="aQname" type="_r7h6kH5eEdujQd6ed5A7Ug"/>
+ </ownedOperation>
+ <ownedOperation xmi:id="_r9fpcX5eEdujQd6ed5A7Ug" name="getTextValue" visibility="public" concurrency="concurrent">
+ <ownedParameter xmi:id="_r9gQgH5eEdujQd6ed5A7Ug" type="_r7dpIX5eEdujQd6ed5A7Ug" direction="return"/>
+ </ownedOperation>
+ <ownedOperation xmi:id="_r9gQgX5eEdujQd6ed5A7Ug" name="setTextValue" visibility="public" concurrency="concurrent">
+ <ownedParameter xmi:id="_r9g3kH5eEdujQd6ed5A7Ug" name="aTextValue" type="_r7dpIX5eEdujQd6ed5A7Ug"/>
+ </ownedOperation>
+ <ownedOperation xmi:id="_r9g3kX5eEdujQd6ed5A7Ug" name="setLocalName" visibility="public" concurrency="concurrent">
+ <ownedParameter xmi:id="_r9heoH5eEdujQd6ed5A7Ug" name="aLocalName" type="_r7dpIX5eEdujQd6ed5A7Ug"/>
+ </ownedOperation>
+ <ownedOperation xmi:id="_r9iFsH5eEdujQd6ed5A7Ug" name="getLocalName" visibility="public" concurrency="concurrent">
+ <ownedParameter xmi:id="_r9iFsX5eEdujQd6ed5A7Ug" type="_r7dpIX5eEdujQd6ed5A7Ug" direction="return"/>
+ </ownedOperation>
+ <ownedOperation xmi:id="_r9iswH5eEdujQd6ed5A7Ug" name="GOMAttributeImpl" visibility="public" concurrency="concurrent"/>
+ <ownedOperation xmi:id="_r9iswX5eEdujQd6ed5A7Ug" name="getQname" visibility="public" concurrency="concurrent">
+ <ownedParameter xmi:id="_r9j64H5eEdujQd6ed5A7Ug" type="_r7h6kH5eEdujQd6ed5A7Ug" direction="return"/>
+ </ownedOperation>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Interface" xmi:id="_r9XtoH5eEdujQd6ed5A7Ug" name="GOMAttribute">
+ <generalization xmi:id="_sHItoH5eEdujQd6ed5A7Ug" general="_sHIGkH5eEdujQd6ed5A7Ug"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Class" xmi:id="_r-JwwH5eEdujQd6ed5A7Ug" name="GOMFactory" clientDependency="_r-RskH5eEdujQd6ed5A7Ug _r-Thwn5eEdujQd6ed5A7Ug">
+ <ownedOperation xmi:id="_r-OpQH5eEdujQd6ed5A7Ug" name="GOMFactory" visibility="private" concurrency="concurrent"/>
+ <ownedOperation xmi:id="_r-OpQX5eEdujQd6ed5A7Ug" name="createInstance" visibility="public" isStatic="true" concurrency="concurrent">
+ <ownedParameter xmi:id="_r-PQUH5eEdujQd6ed5A7Ug" type="_r-JwwH5eEdujQd6ed5A7Ug" direction="return"/>
+ </ownedOperation>
+ <ownedOperation xmi:id="_r-PQUX5eEdujQd6ed5A7Ug" name="createFeed" visibility="public" concurrency="concurrent">
+ <ownedParameter xmi:id="_r-QecH5eEdujQd6ed5A7Ug" type="_r-P3YH5eEdujQd6ed5A7Ug" direction="return"/>
+ </ownedOperation>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Interface" xmi:id="_r-P3YH5eEdujQd6ed5A7Ug" name="GOMFeed" clientDependency="_ibYkkH5fEdujQd6ed5A7Ug _ibaZwn5fEdujQd6ed5A7Ug _ibc2AH5fEdujQd6ed5A7Ug _iberMn5fEdujQd6ed5A7Ug _ibggYn5fEdujQd6ed5A7Ug _ibi8oX5fEdujQd6ed5A7Ug _ibkx0n5fEdujQd6ed5A7Ug _ibmnAn5fEdujQd6ed5A7Ug _ibpDQH5fEdujQd6ed5A7Ug _ibq4cn5fEdujQd6ed5A7Ug _ibston5fEdujQd6ed5A7Ug _ibui0n5fEdujQd6ed5A7Ug _ibw_EX5fEdujQd6ed5A7Ug _iby0Qn5fEdujQd6ed5A7Ug _ib13kH5fEdujQd6ed5A7Ug">
+ <generalization xmi:id="_iaGyMH5fEdujQd6ed5A7Ug" general="_sHIGkH5eEdujQd6ed5A7Ug"/>
+ <generalization xmi:id="_iaIAUH5fEdujQd6ed5A7Ug" general="_r-kngH5eEdujQd6ed5A7Ug"/>
+ <ownedAttribute xmi:id="_ia3AIH5fEdujQd6ed5A7Ug" name="oPENSEARCH_NS_PREFIX" visibility="public" isLeaf="true" isStatic="true" type="_r7dpIX5eEdujQd6ed5A7Ug">
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_ibR24X5fEdujQd6ed5A7Ug" value="1"/>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_ibR24H5fEdujQd6ed5A7Ug"/>
+ </ownedAttribute>
+ <ownedAttribute xmi:id="_ia3AIX5fEdujQd6ed5A7Ug" name="lOCALNAME_RSS" visibility="public" isLeaf="true" isStatic="true" type="_r7dpIX5eEdujQd6ed5A7Ug">
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_ibSd8X5fEdujQd6ed5A7Ug" value="1"/>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_ibSd8H5fEdujQd6ed5A7Ug"/>
+ </ownedAttribute>
+ <ownedAttribute xmi:id="_ia3nMH5fEdujQd6ed5A7Ug" name="oPENSEARCH_NS_URI" visibility="public" isLeaf="true" isStatic="true" type="_r7dpIX5eEdujQd6ed5A7Ug">
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_ibSd835fEdujQd6ed5A7Ug" value="1"/>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_ibSd8n5fEdujQd6ed5A7Ug"/>
+ </ownedAttribute>
+ <ownedAttribute xmi:id="_ia4OQH5fEdujQd6ed5A7Ug" name="lOCALNAME" visibility="public" isLeaf="true" isStatic="true" type="_r7dpIX5eEdujQd6ed5A7Ug">
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_ibTFAX5fEdujQd6ed5A7Ug" value="1"/>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_ibTFAH5fEdujQd6ed5A7Ug"/>
+ </ownedAttribute>
+ <ownedOperation xmi:id="_ia41UH5fEdujQd6ed5A7Ug" name="getAuthors" visibility="public" isAbstract="true" concurrency="concurrent">
+ <ownedParameter xmi:id="_ia6DcH5fEdujQd6ed5A7Ug" type="_sAnO4H5eEdujQd6ed5A7Ug" direction="return"/>
+ </ownedOperation>
+ <ownedOperation xmi:id="_ia6DcX5fEdujQd6ed5A7Ug" name="addAuthor" visibility="public" isAbstract="true" concurrency="concurrent">
+ <ownedParameter xmi:id="_ia6qgH5fEdujQd6ed5A7Ug" name="aAuthor" type="_iKeawH5fEdujQd6ed5A7Ug"/>
+ </ownedOperation>
+ <ownedOperation xmi:id="_ia6qgX5fEdujQd6ed5A7Ug" name="setRights" visibility="public" isAbstract="true" concurrency="concurrent">
+ <ownedParameter xmi:id="_ia7RkH5fEdujQd6ed5A7Ug" name="aRights" type="_iJx3MX5fEdujQd6ed5A7Ug"/>
+ </ownedOperation>
+ <ownedOperation xmi:id="_ia74oH5fEdujQd6ed5A7Ug" name="getSubtitle" visibility="public" isAbstract="true" concurrency="concurrent">
+ <ownedParameter xmi:id="_ia8fsH5fEdujQd6ed5A7Ug" type="_iJ5L8X5fEdujQd6ed5A7Ug" direction="return"/>
+ </ownedOperation>
+ <ownedOperation xmi:id="_ia8fsX5fEdujQd6ed5A7Ug" name="getNamespaces" visibility="public" isAbstract="true" concurrency="concurrent">
+ <ownedParameter xmi:id="_ia9t0H5fEdujQd6ed5A7Ug" type="_sAnO4H5eEdujQd6ed5A7Ug" direction="return"/>
+ </ownedOperation>
+ <ownedOperation xmi:id="_ia-U4H5fEdujQd6ed5A7Ug" name="getCategories" visibility="public" isAbstract="true" concurrency="concurrent">
+ <ownedParameter xmi:id="_ia_jAH5fEdujQd6ed5A7Ug" type="_sAnO4H5eEdujQd6ed5A7Ug" direction="return"/>
+ </ownedOperation>
+ <ownedOperation xmi:id="_ia_jAX5fEdujQd6ed5A7Ug" name="setLogo" visibility="public" isAbstract="true" concurrency="concurrent">
+ <ownedParameter xmi:id="_ibAKEH5fEdujQd6ed5A7Ug" name="aLogo" type="_iJ2vsH5fEdujQd6ed5A7Ug"/>
+ </ownedOperation>
+ <ownedOperation xmi:id="_ibAxIH5fEdujQd6ed5A7Ug" name="addEntry" visibility="public" isAbstract="true" concurrency="concurrent">
+ <ownedParameter xmi:id="_ibB_QH5fEdujQd6ed5A7Ug" name="aEntry" type="_sA-bQH5eEdujQd6ed5A7Ug"/>
+ </ownedOperation>
+ <ownedOperation xmi:id="_ibCmUH5fEdujQd6ed5A7Ug" name="getTitle" visibility="public" isAbstract="true" concurrency="concurrent">
+ <ownedParameter xmi:id="_ibDNYH5fEdujQd6ed5A7Ug" type="_iJxQIH5fEdujQd6ed5A7Ug" direction="return"/>
+ </ownedOperation>
+ <ownedOperation xmi:id="_ibDNYX5fEdujQd6ed5A7Ug" name="addCategory" visibility="public" isAbstract="true" concurrency="concurrent">
+ <ownedParameter xmi:id="_ibD0cH5fEdujQd6ed5A7Ug" name="aCategory" type="_iKVQ0H5fEdujQd6ed5A7Ug"/>
+ </ownedOperation>
+ <ownedOperation xmi:id="_ibD0cX5fEdujQd6ed5A7Ug" name="setSubtitle" visibility="public" isAbstract="true" concurrency="concurrent">
+ <ownedParameter xmi:id="_ibEbgH5fEdujQd6ed5A7Ug" name="aSubtitle" type="_iJ5L8X5fEdujQd6ed5A7Ug"/>
+ </ownedOperation>
+ <ownedOperation xmi:id="_ibEbgX5fEdujQd6ed5A7Ug" name="getContributor" visibility="public" isAbstract="true" concurrency="concurrent">
+ <ownedParameter xmi:id="_ibGQsH5fEdujQd6ed5A7Ug" type="_sAnO4H5eEdujQd6ed5A7Ug" direction="return"/>
+ </ownedOperation>
+ <ownedOperation xmi:id="_ibGQsX5fEdujQd6ed5A7Ug" name="getRights" visibility="public" isAbstract="true" concurrency="concurrent">
+ <ownedParameter xmi:id="_ibG3wH5fEdujQd6ed5A7Ug" type="_iJx3MX5fEdujQd6ed5A7Ug" direction="return"/>
+ </ownedOperation>
+ <ownedOperation xmi:id="_ibG3wX5fEdujQd6ed5A7Ug" name="getEntries" visibility="public" isAbstract="true" concurrency="concurrent">
+ <ownedParameter xmi:id="_ibHe0H5fEdujQd6ed5A7Ug" type="_sAnO4H5eEdujQd6ed5A7Ug" direction="return"/>
+ </ownedOperation>
+ <ownedOperation xmi:id="_ibHe0X5fEdujQd6ed5A7Ug" name="addContributor" visibility="public" isAbstract="true" concurrency="concurrent">
+ <ownedParameter xmi:id="_ibIF4H5fEdujQd6ed5A7Ug" name="aContributor" type="_iKC88X5fEdujQd6ed5A7Ug"/>
+ </ownedOperation>
+ <ownedOperation xmi:id="_ibIF4X5fEdujQd6ed5A7Ug" name="getIcon" visibility="public" isAbstract="true" concurrency="concurrent">
+ <ownedParameter xmi:id="_ibIs8H5fEdujQd6ed5A7Ug" type="_iJ390H5fEdujQd6ed5A7Ug" direction="return"/>
+ </ownedOperation>
+ <ownedOperation xmi:id="_ibIs8X5fEdujQd6ed5A7Ug" name="addNamespace" visibility="public" isAbstract="true" concurrency="concurrent">
+ <ownedParameter xmi:id="_ibJUAH5fEdujQd6ed5A7Ug" name="aNamespace" type="_r8CQ4H5eEdujQd6ed5A7Ug"/>
+ </ownedOperation>
+ <ownedOperation xmi:id="_ibJUAX5fEdujQd6ed5A7Ug" name="setIcon" visibility="public" isAbstract="true" concurrency="concurrent">
+ <ownedParameter xmi:id="_ibJ7EH5fEdujQd6ed5A7Ug" name="aIcon" type="_iJ390H5fEdujQd6ed5A7Ug"/>
+ </ownedOperation>
+ <ownedOperation xmi:id="_ibKiIH5fEdujQd6ed5A7Ug" name="getId" visibility="public" isAbstract="true" concurrency="concurrent">
+ <ownedParameter xmi:id="_ibKiIX5fEdujQd6ed5A7Ug" type="_iJ1hkH5fEdujQd6ed5A7Ug" direction="return"/>
+ </ownedOperation>
+ <ownedOperation xmi:id="_ibLJMH5fEdujQd6ed5A7Ug" name="getGenerator" visibility="public" isAbstract="true" concurrency="concurrent">
+ <ownedParameter xmi:id="_ibLJMX5fEdujQd6ed5A7Ug" type="_iJ4k4H5fEdujQd6ed5A7Ug" direction="return"/>
+ </ownedOperation>
+ <ownedOperation xmi:id="_ibLwQH5fEdujQd6ed5A7Ug" name="setId" visibility="public" isAbstract="true" concurrency="concurrent">
+ <ownedParameter xmi:id="_ibLwQX5fEdujQd6ed5A7Ug" name="aId" type="_iJ1hkH5fEdujQd6ed5A7Ug"/>
+ </ownedOperation>
+ <ownedOperation xmi:id="_ibMXUH5fEdujQd6ed5A7Ug" name="getUpdated" visibility="public" isAbstract="true" concurrency="concurrent">
+ <ownedParameter xmi:id="_ibM-YH5fEdujQd6ed5A7Ug" type="_iJ06gH5fEdujQd6ed5A7Ug" direction="return"/>
+ </ownedOperation>
+ <ownedOperation xmi:id="_ibM-YX5fEdujQd6ed5A7Ug" name="getLogo" visibility="public" isAbstract="true" concurrency="concurrent">
+ <ownedParameter xmi:id="_ibNlcH5fEdujQd6ed5A7Ug" type="_iJ2vsH5fEdujQd6ed5A7Ug" direction="return"/>
+ </ownedOperation>
+ <ownedOperation xmi:id="_ibNlcX5fEdujQd6ed5A7Ug" name="setGenerator" visibility="public" isAbstract="true" concurrency="concurrent">
+ <ownedParameter xmi:id="_ibOMgH5fEdujQd6ed5A7Ug" name="aGenerator" type="_iJ4k4H5fEdujQd6ed5A7Ug"/>
+ </ownedOperation>
+ <ownedOperation xmi:id="_ibOMgX5fEdujQd6ed5A7Ug" name="getLinks" visibility="public" isAbstract="true" concurrency="concurrent">
+ <ownedParameter xmi:id="_ibPaoH5fEdujQd6ed5A7Ug" type="_sAnO4H5eEdujQd6ed5A7Ug" direction="return"/>
+ </ownedOperation>
+ <ownedOperation xmi:id="_ibQBsH5fEdujQd6ed5A7Ug" name="setUpdated" visibility="public" isAbstract="true" concurrency="concurrent">
+ <ownedParameter xmi:id="_ibQowH5fEdujQd6ed5A7Ug" name="aUpdated" type="_iJ06gH5fEdujQd6ed5A7Ug"/>
+ </ownedOperation>
+ <ownedOperation xmi:id="_ibQowX5fEdujQd6ed5A7Ug" name="setTitle" visibility="public" isAbstract="true" concurrency="concurrent">
+ <ownedParameter xmi:id="_ibRP0H5fEdujQd6ed5A7Ug" name="aTitle" type="_iJxQIH5fEdujQd6ed5A7Ug"/>
+ </ownedOperation>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Class" xmi:id="_r-RFgH5eEdujQd6ed5A7Ug" name="GOMFeedImpl" visibility="package" clientDependency="_iL0ekH5fEdujQd6ed5A7Ug _iL2TwX5fEdujQd6ed5A7Ug _iL4wAH5fEdujQd6ed5A7Ug _iL6lMn5fEdujQd6ed5A7Ug _iL8aYn5fEdujQd6ed5A7Ug _iL-2oX5fEdujQd6ed5A7Ug _iMAr0n5fEdujQd6ed5A7Ug _iMChAn5fEdujQd6ed5A7Ug _iMEWMn5fEdujQd6ed5A7Ug _iMGycX5fEdujQd6ed5A7Ug _iMInon5fEdujQd6ed5A7Ug _iMKc0n5fEdujQd6ed5A7Ug _iMM5En5fEdujQd6ed5A7Ug _iMOuQn5fEdujQd6ed5A7Ug _iMQjcn5fEdujQd6ed5A7Ug _iMSYoX5fEdujQd6ed5A7Ug _iMU04X5fEdujQd6ed5A7Ug _iMWqEn5fEdujQd6ed5A7Ug _iMYfQn5fEdujQd6ed5A7Ug _iMa7gH5fEdujQd6ed5A7Ug _iMcwsn5fEdujQd6ed5A7Ug _iMel4n5fEdujQd6ed5A7Ug _iMgbEn5fEdujQd6ed5A7Ug _iMi3Un5fEdujQd6ed5A7Ug _iMksgn5fEdujQd6ed5A7Ug _iMmhsn5fEdujQd6ed5A7Ug _iMo98X5fEdujQd6ed5A7Ug _iMqzIn5fEdujQd6ed5A7Ug _iMsoUX5fEdujQd6ed5A7Ug _iMudgn5fEdujQd6ed5A7Ug">
+ <generalization xmi:id="_iHk3wH5fEdujQd6ed5A7Ug" general="_iHkQsH5fEdujQd6ed5A7Ug"/>
+ <generalization xmi:id="_iHnUAH5fEdujQd6ed5A7Ug" general="_r-P3YH5eEdujQd6ed5A7Ug"/>
+ <ownedAttribute xmi:id="_iJwCAH5fEdujQd6ed5A7Ug" name="contributors" visibility="private" type="_iKC88X5fEdujQd6ed5A7Ug" association="_iKwHkX5fEdujQd6ed5A7Ug">
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_iKfo4H5fEdujQd6ed5A7Ug" value="*"/>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_iKfB0X5fEdujQd6ed5A7Ug"/>
+ </ownedAttribute>
+ <ownedAttribute xmi:id="_iJwpEH5fEdujQd6ed5A7Ug" name="title" visibility="private" type="_iJxQIH5fEdujQd6ed5A7Ug">
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_iKfo435fEdujQd6ed5A7Ug" value="1"/>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_iKfo4n5fEdujQd6ed5A7Ug"/>
+ </ownedAttribute>
+ <ownedAttribute xmi:id="_iJx3MH5fEdujQd6ed5A7Ug" name="rights" visibility="private" type="_iJx3MX5fEdujQd6ed5A7Ug">
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_iKgP8X5fEdujQd6ed5A7Ug" value="1"/>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_iKgP8H5fEdujQd6ed5A7Ug"/>
+ </ownedAttribute>
+ <ownedAttribute xmi:id="_iJyeQH5fEdujQd6ed5A7Ug" name="categories" visibility="private" type="_iKVQ0H5fEdujQd6ed5A7Ug" association="_iK5RgH5fEdujQd6ed5A7Ug">
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_iKgP835fEdujQd6ed5A7Ug" value="*"/>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_iKgP8n5fEdujQd6ed5A7Ug"/>
+ </ownedAttribute>
+ <ownedAttribute xmi:id="_iJzFUH5fEdujQd6ed5A7Ug" name="namespaces" visibility="private" type="_r8CQ4H5eEdujQd6ed5A7Ug" association="_iK6foH5fEdujQd6ed5A7Ug">
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_iKg3An5fEdujQd6ed5A7Ug" value="*"/>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_iKg3AX5fEdujQd6ed5A7Ug"/>
+ </ownedAttribute>
+ <ownedAttribute xmi:id="_iJzFUX5fEdujQd6ed5A7Ug" name="authors" visibility="private" type="_iKeawH5fEdujQd6ed5A7Ug" association="_iLiKsX5fEdujQd6ed5A7Ug">
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_iKheEH5fEdujQd6ed5A7Ug" value="*"/>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_iKg3BH5fEdujQd6ed5A7Ug"/>
+ </ownedAttribute>
+ <ownedAttribute xmi:id="_iJzsYH5fEdujQd6ed5A7Ug" name="entries" visibility="private" type="_sA-bQH5eEdujQd6ed5A7Ug" association="_iLEQoX5fEdujQd6ed5A7Ug">
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_iKheE35fEdujQd6ed5A7Ug" value="*"/>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_iKheEn5fEdujQd6ed5A7Ug"/>
+ </ownedAttribute>
+ <ownedAttribute xmi:id="_iJ0TcH5fEdujQd6ed5A7Ug" name="updated" visibility="private" type="_iJ06gH5fEdujQd6ed5A7Ug">
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_iKjTQX5fEdujQd6ed5A7Ug" value="1"/>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_iKjTQH5fEdujQd6ed5A7Ug"/>
+ </ownedAttribute>
+ <ownedAttribute xmi:id="_iJ06gX5fEdujQd6ed5A7Ug" name="id" visibility="private" type="_iJ1hkH5fEdujQd6ed5A7Ug">
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_iKj6UX5fEdujQd6ed5A7Ug" value="1"/>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_iKj6UH5fEdujQd6ed5A7Ug"/>
+ </ownedAttribute>
+ <ownedAttribute xmi:id="_iJ2IoH5fEdujQd6ed5A7Ug" name="logo" visibility="private" type="_iJ2vsH5fEdujQd6ed5A7Ug">
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_iKkhYH5fEdujQd6ed5A7Ug" value="1"/>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_iKj6Un5fEdujQd6ed5A7Ug"/>
+ </ownedAttribute>
+ <ownedAttribute xmi:id="_iJ2vsX5fEdujQd6ed5A7Ug" name="links" visibility="private" type="_iLjY0H5fEdujQd6ed5A7Ug" association="_iLr7sH5fEdujQd6ed5A7Ug">
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_iKkhYn5fEdujQd6ed5A7Ug" value="*"/>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_iKkhYX5fEdujQd6ed5A7Ug"/>
+ </ownedAttribute>
+ <ownedAttribute xmi:id="_iJ3WwH5fEdujQd6ed5A7Ug" name="icon" visibility="private" type="_iJ390H5fEdujQd6ed5A7Ug">
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_iKlIcX5fEdujQd6ed5A7Ug" value="1"/>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_iKlIcH5fEdujQd6ed5A7Ug"/>
+ </ownedAttribute>
+ <ownedAttribute xmi:id="_iJ390X5fEdujQd6ed5A7Ug" name="generator" visibility="private" type="_iJ4k4H5fEdujQd6ed5A7Ug">
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_iKlIc35fEdujQd6ed5A7Ug" value="1"/>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_iKlIcn5fEdujQd6ed5A7Ug"/>
+ </ownedAttribute>
+ <ownedAttribute xmi:id="_iJ5L8H5fEdujQd6ed5A7Ug" name="subtitle" visibility="private" type="_iJ5L8X5fEdujQd6ed5A7Ug">
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_iKlvgX5fEdujQd6ed5A7Ug" value="1"/>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_iKlvgH5fEdujQd6ed5A7Ug"/>
+ </ownedAttribute>
+ <ownedOperation xmi:id="_iJ5zAH5fEdujQd6ed5A7Ug" name="getAuthors" visibility="public" concurrency="concurrent">
+ <ownedParameter xmi:id="_iJ6aEH5fEdujQd6ed5A7Ug" type="_sAnO4H5eEdujQd6ed5A7Ug" direction="return"/>
+ </ownedOperation>
+ <ownedOperation xmi:id="_iJ6aEX5fEdujQd6ed5A7Ug" name="setLogo" visibility="public" concurrency="concurrent">
+ <ownedParameter xmi:id="_iJ7BIH5fEdujQd6ed5A7Ug" name="aLogo" type="_iJ2vsH5fEdujQd6ed5A7Ug"/>
+ </ownedOperation>
+ <ownedOperation xmi:id="_iJ7BIX5fEdujQd6ed5A7Ug" name="processEndElement" visibility="public" concurrency="concurrent"/>
+ <ownedOperation xmi:id="_iJ7oMH5fEdujQd6ed5A7Ug" name="getRights" visibility="public" concurrency="concurrent">
+ <ownedParameter xmi:id="_iJ8PQH5fEdujQd6ed5A7Ug" type="_iJx3MX5fEdujQd6ed5A7Ug" direction="return"/>
+ </ownedOperation>
+ <ownedOperation xmi:id="_iJ8PQX5fEdujQd6ed5A7Ug" name="setIcon" visibility="public" concurrency="concurrent">
+ <ownedParameter xmi:id="_iJ82UH5fEdujQd6ed5A7Ug" name="aIcon" type="_iJ390H5fEdujQd6ed5A7Ug"/>
+ </ownedOperation>
+ <ownedOperation xmi:id="_iJ82UX5fEdujQd6ed5A7Ug" name="getUpdated" visibility="public" concurrency="concurrent">
+ <ownedParameter xmi:id="_iJ9dYH5fEdujQd6ed5A7Ug" type="_iJ06gH5fEdujQd6ed5A7Ug" direction="return"/>
+ </ownedOperation>
+ <ownedOperation xmi:id="_iJ9dYX5fEdujQd6ed5A7Ug" name="setId" visibility="public" concurrency="concurrent">
+ <ownedParameter xmi:id="_iJ-rgH5fEdujQd6ed5A7Ug" name="aId" type="_iJ1hkH5fEdujQd6ed5A7Ug"/>
+ </ownedOperation>
+ <ownedOperation xmi:id="_iJ-rgX5fEdujQd6ed5A7Ug" name="getIcon" visibility="public" concurrency="concurrent">
+ <ownedParameter xmi:id="_iJ_SkH5fEdujQd6ed5A7Ug" type="_iJ390H5fEdujQd6ed5A7Ug" direction="return"/>
+ </ownedOperation>
+ <ownedOperation xmi:id="_iJ_SkX5fEdujQd6ed5A7Ug" name="getId" visibility="public" concurrency="concurrent">
+ <ownedParameter xmi:id="_iJ_5oH5fEdujQd6ed5A7Ug" type="_iJ1hkH5fEdujQd6ed5A7Ug" direction="return"/>
+ </ownedOperation>
+ <ownedOperation xmi:id="_iJ_5oX5fEdujQd6ed5A7Ug" name="getGenerator" visibility="public" concurrency="concurrent">
+ <ownedParameter xmi:id="_iKAgsH5fEdujQd6ed5A7Ug" type="_iJ4k4H5fEdujQd6ed5A7Ug" direction="return"/>
+ </ownedOperation>
+ <ownedOperation xmi:id="_iKAgsX5fEdujQd6ed5A7Ug" name="getEntries" visibility="public" concurrency="concurrent">
+ <ownedParameter xmi:id="_iKBHwH5fEdujQd6ed5A7Ug" type="_sAnO4H5eEdujQd6ed5A7Ug" direction="return"/>
+ </ownedOperation>
+ <ownedOperation xmi:id="_iKBHwX5fEdujQd6ed5A7Ug" name="getNamespaces" visibility="public" concurrency="concurrent">
+ <ownedParameter xmi:id="_iKBu0H5fEdujQd6ed5A7Ug" type="_sAnO4H5eEdujQd6ed5A7Ug" direction="return"/>
+ </ownedOperation>
+ <ownedOperation xmi:id="_iKBu0X5fEdujQd6ed5A7Ug" name="GOMFeedImpl" visibility="package" concurrency="concurrent"/>
+ <ownedOperation xmi:id="_iKCV4H5fEdujQd6ed5A7Ug" name="getLocalName" visibility="public" concurrency="concurrent">
+ <ownedParameter xmi:id="_iKCV4X5fEdujQd6ed5A7Ug" type="_r7dpIX5eEdujQd6ed5A7Ug" direction="return"/>
+ </ownedOperation>
+ <ownedOperation xmi:id="_iKC88H5fEdujQd6ed5A7Ug" name="addContributor" visibility="public" concurrency="concurrent">
+ <ownedParameter xmi:id="_iKDkAH5fEdujQd6ed5A7Ug" name="aContributor" type="_iKC88X5fEdujQd6ed5A7Ug"/>
+ </ownedOperation>
+ <ownedOperation xmi:id="_iKELEH5fEdujQd6ed5A7Ug" name="getLinks" visibility="public" concurrency="concurrent">
+ <ownedParameter xmi:id="_iKEyIH5fEdujQd6ed5A7Ug" type="_sAnO4H5eEdujQd6ed5A7Ug" direction="return"/>
+ </ownedOperation>
+ <ownedOperation xmi:id="_iKEyIX5fEdujQd6ed5A7Ug" name="getTitle" visibility="public" concurrency="concurrent">
+ <ownedParameter xmi:id="_iKFZMH5fEdujQd6ed5A7Ug" type="_iJxQIH5fEdujQd6ed5A7Ug" direction="return"/>
+ </ownedOperation>
+ <ownedOperation xmi:id="_iKFZMX5fEdujQd6ed5A7Ug" name="setSubtitle" visibility="public" concurrency="concurrent">
+ <ownedParameter xmi:id="_iKFZMn5fEdujQd6ed5A7Ug" name="aSubtitle" type="_iJ5L8X5fEdujQd6ed5A7Ug"/>
+ </ownedOperation>
+ <ownedOperation xmi:id="_iKGAQH5fEdujQd6ed5A7Ug" name="addNamespace" visibility="public" concurrency="concurrent">
+ <ownedParameter xmi:id="_iKGnUH5fEdujQd6ed5A7Ug" name="aNamespace" type="_r8CQ4H5eEdujQd6ed5A7Ug"/>
+ </ownedOperation>
+ <ownedOperation xmi:id="_iKGnUX5fEdujQd6ed5A7Ug" name="addChild" visibility="public" concurrency="concurrent">
+ <ownedParameter xmi:id="_iKJDkH5fEdujQd6ed5A7Ug" name="aElement" type="_r-kngH5eEdujQd6ed5A7Ug"/>
+ </ownedOperation>
+ <ownedOperation xmi:id="_iKJqoH5fEdujQd6ed5A7Ug" name="setRights" visibility="public" concurrency="concurrent">
+ <ownedParameter xmi:id="_iKKRsH5fEdujQd6ed5A7Ug" name="aRights" type="_iJx3MX5fEdujQd6ed5A7Ug"/>
+ </ownedOperation>
+ <ownedOperation xmi:id="_iKKRsX5fEdujQd6ed5A7Ug" name="getSubtitle" visibility="public" concurrency="concurrent">
+ <ownedParameter xmi:id="_iKK4wH5fEdujQd6ed5A7Ug" type="_iJ5L8X5fEdujQd6ed5A7Ug" direction="return"/>
+ </ownedOperation>
+ <ownedOperation xmi:id="_iKK4wX5fEdujQd6ed5A7Ug" name="addEntry" visibility="public" concurrency="concurrent">
+ <ownedParameter xmi:id="_iKLf0H5fEdujQd6ed5A7Ug" name="aEntry" type="_sA-bQH5eEdujQd6ed5A7Ug"/>
+ </ownedOperation>
+ <ownedOperation xmi:id="_iKMG4H5fEdujQd6ed5A7Ug" name="setTitle" visibility="public" concurrency="concurrent">
+ <ownedParameter xmi:id="_iKMt8H5fEdujQd6ed5A7Ug" name="aTitle" type="_iJxQIH5fEdujQd6ed5A7Ug"/>
+ </ownedOperation>
+ <ownedOperation xmi:id="_iKMt8X5fEdujQd6ed5A7Ug" name="setGenerator" visibility="public" concurrency="concurrent">
+ <ownedParameter xmi:id="_iKNVAH5fEdujQd6ed5A7Ug" name="aGenerator" type="_iJ4k4H5fEdujQd6ed5A7Ug"/>
+ </ownedOperation>
+ <ownedOperation xmi:id="_iKNVAX5fEdujQd6ed5A7Ug" name="getCategories" visibility="public" concurrency="concurrent">
+ <ownedParameter xmi:id="_iKN8EH5fEdujQd6ed5A7Ug" type="_sAnO4H5eEdujQd6ed5A7Ug" direction="return"/>
+ </ownedOperation>
+ <ownedOperation xmi:id="_iKOjIH5fEdujQd6ed5A7Ug" name="processAttribute" visibility="public" concurrency="concurrent">
+ <ownedParameter xmi:id="_iKQYUH5fEdujQd6ed5A7Ug" name="aQName" type="_r7h6kH5eEdujQd6ed5A7Ug"/>
+ <ownedParameter xmi:id="_iKQ_YH5fEdujQd6ed5A7Ug" name="aValue" type="_r7dpIX5eEdujQd6ed5A7Ug"/>
+ </ownedOperation>
+ <ownedOperation xmi:id="_iKQ_YX5fEdujQd6ed5A7Ug" name="setUpdated" visibility="public" concurrency="concurrent">
+ <ownedParameter xmi:id="_iKRmcH5fEdujQd6ed5A7Ug" name="aUpdated" type="_iJ06gH5fEdujQd6ed5A7Ug"/>
+ </ownedOperation>
+ <ownedOperation xmi:id="_iKSNgH5fEdujQd6ed5A7Ug" name="getContributor" visibility="public" concurrency="concurrent">
+ <ownedParameter xmi:id="_iKS0kH5fEdujQd6ed5A7Ug" type="_sAnO4H5eEdujQd6ed5A7Ug" direction="return"/>
+ </ownedOperation>
+ <ownedOperation xmi:id="_iKS0kX5fEdujQd6ed5A7Ug" name="processElementValue" visibility="public" concurrency="concurrent">
+ <ownedParameter xmi:id="_iKTboH5fEdujQd6ed5A7Ug" name="aValue" type="_r7dpIX5eEdujQd6ed5A7Ug"/>
+ </ownedOperation>
+ <ownedOperation xmi:id="_iKTboX5fEdujQd6ed5A7Ug" name="getChildren" visibility="public" concurrency="concurrent">
+ <ownedParameter xmi:id="_iKUpwH5fEdujQd6ed5A7Ug" type="_iKUCsH5fEdujQd6ed5A7Ug" direction="return"/>
+ </ownedOperation>
+ <ownedOperation xmi:id="_iKUpwX5fEdujQd6ed5A7Ug" name="addCategory" visibility="public" concurrency="concurrent">
+ <ownedParameter xmi:id="_iKVQ0X5fEdujQd6ed5A7Ug" name="aCategory" type="_iKVQ0H5fEdujQd6ed5A7Ug"/>
+ </ownedOperation>
+ <ownedOperation xmi:id="_iKV34H5fEdujQd6ed5A7Ug" name="writeAtomOutput" visibility="public" concurrency="concurrent" raisedException="_r_OHwH5eEdujQd6ed5A7Ug">
+ <ownedParameter xmi:id="_iKYUIH5fEdujQd6ed5A7Ug" name="aStreamWriter" type="_r_MSkH5eEdujQd6ed5A7Ug"/>
+ </ownedOperation>
+ <ownedOperation xmi:id="_iKawYH5fEdujQd6ed5A7Ug" name="getChildParser" visibility="public" concurrency="concurrent">
+ <ownedParameter xmi:id="_iKbXcH5fEdujQd6ed5A7Ug" name="aName" type="_r7h6kH5eEdujQd6ed5A7Ug"/>
+ <ownedParameter xmi:id="_iKb-gH5fEdujQd6ed5A7Ug" type="_r7Q00H5eEdujQd6ed5A7Ug" direction="return"/>
+ </ownedOperation>
+ <ownedOperation xmi:id="_iKb-gX5fEdujQd6ed5A7Ug" name="getLogo" visibility="public" concurrency="concurrent">
+ <ownedParameter xmi:id="_iKclkH5fEdujQd6ed5A7Ug" type="_iJ2vsH5fEdujQd6ed5A7Ug" direction="return"/>
+ </ownedOperation>
+ <ownedOperation xmi:id="_iKclkX5fEdujQd6ed5A7Ug" name="writeRssOutput" visibility="public" concurrency="concurrent" raisedException="_r_OHwH5eEdujQd6ed5A7Ug">
+ <ownedParameter xmi:id="_iKdMoH5fEdujQd6ed5A7Ug" name="aStreamWriter" type="_r_MSkH5eEdujQd6ed5A7Ug"/>
+ </ownedOperation>
+ <ownedOperation xmi:id="_iKdzsH5fEdujQd6ed5A7Ug" name="addAuthor" visibility="public" concurrency="concurrent">
+ <ownedParameter xmi:id="_iKfB0H5fEdujQd6ed5A7Ug" name="aAuthor" type="_iKeawH5fEdujQd6ed5A7Ug"/>
+ </ownedOperation>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Interface" xmi:id="_r-kngH5eEdujQd6ed5A7Ug" name="GOMElement"/>
+ <packagedElement xmi:type="uml:Class" xmi:id="_r-yp8H5eEdujQd6ed5A7Ug" name="GOMDocumentImpl" clientDependency="_r_vsMH5eEdujQd6ed5A7Ug _r_xhYn5eEdujQd6ed5A7Ug _r_z9on5eEdujQd6ed5A7Ug _r_1y0n5eEdujQd6ed5A7Ug _r_3oAX5eEdujQd6ed5A7Ug">
+ <generalization xmi:id="_r-1GMH5eEdujQd6ed5A7Ug" general="_r-0fIH5eEdujQd6ed5A7Ug"/>
+ <ownedAttribute xmi:id="_r_HaEH5eEdujQd6ed5A7Ug" name="charEncoding" visibility="private" type="_r7dpIX5eEdujQd6ed5A7Ug">
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_r_l7MX5eEdujQd6ed5A7Ug" value="1"/>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_r_l7MH5eEdujQd6ed5A7Ug"/>
+ </ownedAttribute>
+ <ownedAttribute xmi:id="_r_HaEX5eEdujQd6ed5A7Ug" name="root" visibility="private">
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_r_miQX5eEdujQd6ed5A7Ug" value="1"/>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_r_miQH5eEdujQd6ed5A7Ug"/>
+ </ownedAttribute>
+ <ownedAttribute xmi:id="_r_KdYH5eEdujQd6ed5A7Ug" name="version" visibility="private" type="_r7dpIX5eEdujQd6ed5A7Ug">
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_r_nJUH5eEdujQd6ed5A7Ug" value="1"/>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_r_miQn5eEdujQd6ed5A7Ug"/>
+ </ownedAttribute>
+ <ownedOperation xmi:id="_r_LEcH5eEdujQd6ed5A7Ug" name="writeRssOutput" visibility="public" concurrency="concurrent" raisedException="_r_OHwH5eEdujQd6ed5A7Ug">
+ <ownedParameter xmi:id="_r_M5oH5eEdujQd6ed5A7Ug" name="aStreamWriter" type="_r_MSkH5eEdujQd6ed5A7Ug"/>
+ </ownedOperation>
+ <ownedOperation xmi:id="_r_Ou0H5eEdujQd6ed5A7Ug" name="getRootElement" visibility="public" concurrency="concurrent"/>
+ <ownedOperation xmi:id="_r_RyIH5eEdujQd6ed5A7Ug" name="writeAtomOutput" visibility="public" concurrency="concurrent" raisedException="_r_OHwH5eEdujQd6ed5A7Ug">
+ <ownedParameter xmi:id="_r_SZMH5eEdujQd6ed5A7Ug" name="aStreamWriter" type="_r_MSkH5eEdujQd6ed5A7Ug"/>
+ </ownedOperation>
+ <ownedOperation xmi:id="_r_SZMX5eEdujQd6ed5A7Ug" name="setVersion" visibility="public" concurrency="concurrent">
+ <ownedParameter xmi:id="_r_TAQH5eEdujQd6ed5A7Ug" name="aVersion" type="_r7dpIX5eEdujQd6ed5A7Ug"/>
+ </ownedOperation>
+ <ownedOperation xmi:id="_r_TnUH5eEdujQd6ed5A7Ug" name="getCharacterEncoding" visibility="public" concurrency="concurrent">
+ <ownedParameter xmi:id="_r_hCsH5eEdujQd6ed5A7Ug" type="_r7dpIX5eEdujQd6ed5A7Ug" direction="return"/>
+ </ownedOperation>
+ <ownedOperation xmi:id="_r_hCsX5eEdujQd6ed5A7Ug" name="setCharacterEncoding" visibility="public" concurrency="concurrent">
+ <ownedParameter xmi:id="_r_hpwH5eEdujQd6ed5A7Ug" name="aEncoding" type="_r7dpIX5eEdujQd6ed5A7Ug"/>
+ </ownedOperation>
+ <ownedOperation xmi:id="_r_iQ0H5eEdujQd6ed5A7Ug" name="getVersion" visibility="public" concurrency="concurrent">
+ <ownedParameter xmi:id="_r_iQ0X5eEdujQd6ed5A7Ug" type="_r7dpIX5eEdujQd6ed5A7Ug" direction="return"/>
+ </ownedOperation>
+ <ownedOperation xmi:id="_r_i34H5eEdujQd6ed5A7Ug" name="GOMDocumentImpl" visibility="public" concurrency="concurrent"/>
+ <ownedOperation xmi:id="_r_i34X5eEdujQd6ed5A7Ug" name="setRootElement" visibility="public" concurrency="concurrent">
+ <ownedParameter xmi:id="_r_lUIH5eEdujQd6ed5A7Ug" name="aRootElement"/>
+ </ownedOperation>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Interface" xmi:id="_r-0fIH5eEdujQd6ed5A7Ug" name="GOMDocument" clientDependency="_sH6wwH5eEdujQd6ed5A7Ug _sH9NAn5eEdujQd6ed5A7Ug _sH_CMn5eEdujQd6ed5A7Ug _sIA3Yn5eEdujQd6ed5A7Ug _sIDToX5eEdujQd6ed5A7Ug">
+ <ownedOperation xmi:id="_sHmAoH5eEdujQd6ed5A7Ug" name="writeAtomOutput" visibility="public" isAbstract="true" concurrency="concurrent" raisedException="_r_OHwH5eEdujQd6ed5A7Ug">
+ <ownedParameter xmi:id="_sHnOwH5eEdujQd6ed5A7Ug" name="aStreamWriter" type="_r_MSkH5eEdujQd6ed5A7Ug"/>
+ </ownedOperation>
+ <ownedOperation xmi:id="_sHoc4H5eEdujQd6ed5A7Ug" name="writeRssOutput" visibility="public" isAbstract="true" concurrency="concurrent" raisedException="_r_OHwH5eEdujQd6ed5A7Ug">
+ <ownedParameter xmi:id="_sHpD8H5eEdujQd6ed5A7Ug" name="aStreamWriter" type="_r_MSkH5eEdujQd6ed5A7Ug"/>
+ </ownedOperation>
+ <ownedOperation xmi:id="_sHprAH5eEdujQd6ed5A7Ug" name="getVersion" visibility="public" isAbstract="true" concurrency="concurrent">
+ <ownedParameter xmi:id="_sHqSEH5eEdujQd6ed5A7Ug" type="_r7dpIX5eEdujQd6ed5A7Ug" direction="return"/>
+ </ownedOperation>
+ <ownedOperation xmi:id="_sHqSEX5eEdujQd6ed5A7Ug" name="getCharacterEncoding" visibility="public" isAbstract="true" concurrency="concurrent">
+ <ownedParameter xmi:id="_sHq5IH5eEdujQd6ed5A7Ug" type="_r7dpIX5eEdujQd6ed5A7Ug" direction="return"/>
+ </ownedOperation>
+ <ownedOperation xmi:id="_sHq5IX5eEdujQd6ed5A7Ug" name="getRootElement" visibility="public" isAbstract="true" concurrency="concurrent"/>
+ <ownedOperation xmi:id="_sHwYsH5eEdujQd6ed5A7Ug" name="setCharacterEncoding" visibility="public" isAbstract="true" concurrency="concurrent">
+ <ownedParameter xmi:id="_sHw_wH5eEdujQd6ed5A7Ug" name="aEncoding" type="_r7dpIX5eEdujQd6ed5A7Ug"/>
+ </ownedOperation>
+ <ownedOperation xmi:id="_sHxm0H5eEdujQd6ed5A7Ug" name="setVersion" visibility="public" isAbstract="true" concurrency="concurrent">
+ <ownedParameter xmi:id="_sHxm0X5eEdujQd6ed5A7Ug" name="aVersion" type="_r7dpIX5eEdujQd6ed5A7Ug"/>
+ </ownedOperation>
+ <ownedOperation xmi:id="_sHyN4H5eEdujQd6ed5A7Ug" name="setRootElement" visibility="public" isAbstract="true" concurrency="concurrent">
+ <ownedParameter xmi:id="_sH0qIH5eEdujQd6ed5A7Ug" name="aRootElement"/>
+ </ownedOperation>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Interface" xmi:id="_r_MSkH5eEdujQd6ed5A7Ug" name="XMLStreamWriter" isAbstract="true"/>
+ <packagedElement xmi:type="uml:Class" xmi:id="_r_OHwH5eEdujQd6ed5A7Ug" name="XMLStreamException"/>
+ <packagedElement xmi:type="uml:Class" xmi:id="_sAJ74H5eEdujQd6ed5A7Ug" name="GOMBuilder" clientDependency="_sBMdsX5eEdujQd6ed5A7Ug _sBOS4X5eEdujQd6ed5A7Ug _sBQIEn5eEdujQd6ed5A7Ug _sBSkUX5eEdujQd6ed5A7Ug _sBUZgX5eEdujQd6ed5A7Ug _sBWOsn5eEdujQd6ed5A7Ug _sBYq8n5eEdujQd6ed5A7Ug _sBagIn5eEdujQd6ed5A7Ug _sBcVUX5eEdujQd6ed5A7Ug _sBexkn5eEdujQd6ed5A7Ug _sBhN0H5eEdujQd6ed5A7Ug _sBjDAn5eEdujQd6ed5A7Ug _sBmGUH5eEdujQd6ed5A7Ug _sBn7gn5eEdujQd6ed5A7Ug _sBqXwX5eEdujQd6ed5A7Ug _sBsM8X5eEdujQd6ed5A7Ug _sBuCIn5eEdujQd6ed5A7Ug _lnc38H5fEdujQd6ed5A7Ug _lngiUX5fEdujQd6ed5A7Ug _lni-kH5fEdujQd6ed5A7Ug _lnkzwX5fEdujQd6ed5A7Ug _ln4VwH5fEdujQd6ed5A7Ug _ln8AIX5fEdujQd6ed5A7Ug _ln-cYX5fEdujQd6ed5A7Ug _loA4oH5fEdujQd6ed5A7Ug _-nSZoH5fEdujQd6ed5A7Ug _-nUO0X5fEdujQd6ed5A7Ug _-nWrEH5fEdujQd6ed5A7Ug _-nYgQX5fEdujQd6ed5A7Ug _BYTvwH5gEdujQd6ed5A7Ug _BYWMAX5gEdujQd6ed5A7Ug _BYYBMX5gEdujQd6ed5A7Ug _BYadcH5gEdujQd6ed5A7Ug">
+ <ownedAttribute xmi:id="_sAkyoH5eEdujQd6ed5A7Ug" name="parserStack" visibility="private" isLeaf="true" type="_r7Q00H5eEdujQd6ed5A7Ug" association="_sBCFoH5eEdujQd6ed5A7Ug">
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_sA_CUX5eEdujQd6ed5A7Ug" value="*"/>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_sA_CUH5eEdujQd6ed5A7Ug"/>
+ </ownedAttribute>
+ <ownedAttribute xmi:id="_sAnO4X5eEdujQd6ed5A7Ug" name="lastLocalName" visibility="private" type="_r7h6kH5eEdujQd6ed5A7Ug">
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_sBAQcn5eEdujQd6ed5A7Ug" value="1"/>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_sBAQcX5eEdujQd6ed5A7Ug"/>
+ </ownedAttribute>
+ <ownedAttribute xmi:id="_sAn18H5eEdujQd6ed5A7Ug" name="streamReader" visibility="private" isLeaf="true" type="_sAodAH5eEdujQd6ed5A7Ug">
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_sBAQdH5eEdujQd6ed5A7Ug" value="1"/>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_sBAQc35eEdujQd6ed5A7Ug"/>
+ </ownedAttribute>
+ <ownedAttribute xmi:id="_sAodAX5eEdujQd6ed5A7Ug" name="factory" visibility="private" isLeaf="true" type="_r-JwwH5eEdujQd6ed5A7Ug">
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_sBA3gX5eEdujQd6ed5A7Ug" value="1"/>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_sBA3gH5eEdujQd6ed5A7Ug"/>
+ </ownedAttribute>
+ <ownedOperation xmi:id="_sApEEH5eEdujQd6ed5A7Ug" name="next" visibility="private" concurrency="concurrent" raisedException="_r_OHwH5eEdujQd6ed5A7Ug">
+ <ownedParameter xmi:id="_BYLM4H5gEdujQd6ed5A7Ug" direction="return">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/JavaPrimitiveTypes.library.uml#int"/>
+ </ownedParameter>
+ </ownedOperation>
+ <ownedOperation xmi:id="_sArgUH5eEdujQd6ed5A7Ug" name="parse" visibility="private" concurrency="concurrent" raisedException="_r_OHwH5eEdujQd6ed5A7Ug">
+ <ownedParameter xmi:id="_BYMbAH5gEdujQd6ed5A7Ug" name="aReader" type="_sAodAH5eEdujQd6ed5A7Ug"/>
+ </ownedOperation>
+ <ownedOperation xmi:id="_sA6w4H5eEdujQd6ed5A7Ug" name="processAttributes" visibility="private" concurrency="concurrent">
+ <ownedParameter xmi:id="_BYNpIH5gEdujQd6ed5A7Ug" name="childParser" type="_r7Q00H5eEdujQd6ed5A7Ug"/>
+ </ownedOperation>
+ <ownedOperation xmi:id="_sA7X8X5eEdujQd6ed5A7Ug" name="startFeedDocument" visibility="private" concurrency="concurrent" raisedException="_r_OHwH5eEdujQd6ed5A7Ug">
+ <ownedParameter xmi:id="_BYLz8H5gEdujQd6ed5A7Ug" name="aDocument" type="_r-0fIH5eEdujQd6ed5A7Ug"/>
+ <ownedParameter xmi:id="_BYLz8X5gEdujQd6ed5A7Ug" type="_r-P3YH5eEdujQd6ed5A7Ug" direction="return"/>
+ </ownedOperation>
+ <ownedOperation xmi:id="_sA8mEH5eEdujQd6ed5A7Ug" name="buildGOMFeed" visibility="public" concurrency="concurrent" raisedException="_r_OHwH5eEdujQd6ed5A7Ug">
+ <ownedParameter xmi:id="_BYOQMH5gEdujQd6ed5A7Ug" type="_r-0fIH5eEdujQd6ed5A7Ug" direction="return"/>
+ </ownedOperation>
+ <ownedOperation xmi:id="_sA9NIH5eEdujQd6ed5A7Ug" name="GOMBuilder" visibility="public" concurrency="concurrent">
+ <ownedParameter xmi:id="_BYNCEH5gEdujQd6ed5A7Ug" name="arg0" type="_sAodAH5eEdujQd6ed5A7Ug"/>
+ </ownedOperation>
+ <ownedOperation xmi:id="_sA90MX5eEdujQd6ed5A7Ug" name="buildGOMEntry" visibility="public" concurrency="concurrent">
+ <ownedParameter xmi:id="_BYO3QH5gEdujQd6ed5A7Ug" type="_sA-bQH5eEdujQd6ed5A7Ug" direction="return"/>
+ </ownedOperation>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Interface" xmi:id="_sAodAH5eEdujQd6ed5A7Ug" name="XMLStreamReader" isAbstract="true"/>
+ <packagedElement xmi:type="uml:Interface" xmi:id="_sA-bQH5eEdujQd6ed5A7Ug" name="GOMEntry">
+ <generalization xmi:id="_iK8U0H5fEdujQd6ed5A7Ug" general="_sHIGkH5eEdujQd6ed5A7Ug"/>
+ <generalization xmi:id="_iK9i8H5fEdujQd6ed5A7Ug" general="_r-kngH5eEdujQd6ed5A7Ug"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Association" xmi:id="_sBCFoH5eEdujQd6ed5A7Ug" memberEnd="_sAkyoH5eEdujQd6ed5A7Ug _sBCssH5eEdujQd6ed5A7Ug">
+ <name xsi:nil="true"/>
+ <ownedEnd xmi:id="_sBCssH5eEdujQd6ed5A7Ug" name="" type="_sAJ74H5eEdujQd6ed5A7Ug" association="_sBCFoH5eEdujQd6ed5A7Ug">
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_sBCssX5eEdujQd6ed5A7Ug" value="1"/>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_sBCssn5eEdujQd6ed5A7Ug"/>
+ </ownedEnd>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Interface" xmi:id="_sHIGkH5eEdujQd6ed5A7Ug" name="GOMXmlEntity"/>
+ <packagedElement xmi:type="uml:Class" xmi:id="_iHkQsH5fEdujQd6ed5A7Ug" name="AbstractGOMElement" visibility="package" clientDependency="_iZqtUH5fEdujQd6ed5A7Ug _iZtJkn5fEdujQd6ed5A7Ug _iZu-wn5fEdujQd6ed5A7Ug _iZxbAX5fEdujQd6ed5A7Ug _iZzQMn5fEdujQd6ed5A7Ug _iZ1FYn5fEdujQd6ed5A7Ug _iZ3hoX5fEdujQd6ed5A7Ug _iZ5W0X5fEdujQd6ed5A7Ug _iZ7MAn5fEdujQd6ed5A7Ug" isAbstract="true">
+ <generalization xmi:id="_iYpZoH5fEdujQd6ed5A7Ug" general="_r-kngH5eEdujQd6ed5A7Ug"/>
+ <ownedAttribute xmi:id="_iZZAgH5fEdujQd6ed5A7Ug" name="extensionAttributes" visibility="protected" type="_r9XtoH5eEdujQd6ed5A7Ug" association="_iZnqAH5fEdujQd6ed5A7Ug">
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_iZlNwX5fEdujQd6ed5A7Ug" value="*"/>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_iZlNwH5fEdujQd6ed5A7Ug"/>
+ </ownedAttribute>
+ <ownedAttribute xmi:id="_iZZnkH5fEdujQd6ed5A7Ug" name="textValue" visibility="protected" type="_r7dpIX5eEdujQd6ed5A7Ug">
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_iZl00n5fEdujQd6ed5A7Ug" value="1"/>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_iZl00X5fEdujQd6ed5A7Ug"/>
+ </ownedAttribute>
+ <ownedAttribute xmi:id="_iZaOoH5fEdujQd6ed5A7Ug" name="qname" visibility="protected" type="_r7h6kH5eEdujQd6ed5A7Ug">
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_iZmb4H5fEdujQd6ed5A7Ug" value="1"/>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_iZl0035fEdujQd6ed5A7Ug"/>
+ </ownedAttribute>
+ <ownedAttribute xmi:id="_iZaOoX5fEdujQd6ed5A7Ug" name="localName" visibility="protected" type="_r7dpIX5eEdujQd6ed5A7Ug">
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_iZmb4n5fEdujQd6ed5A7Ug" value="1"/>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_iZmb4X5fEdujQd6ed5A7Ug"/>
+ </ownedAttribute>
+ <ownedAttribute xmi:id="_iZa1sH5fEdujQd6ed5A7Ug" name="parent" visibility="protected" type="_r-kngH5eEdujQd6ed5A7Ug">
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_iZnC8X5fEdujQd6ed5A7Ug" value="1"/>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_iZnC8H5fEdujQd6ed5A7Ug"/>
+ </ownedAttribute>
+ <ownedOperation xmi:id="_iZbcwH5fEdujQd6ed5A7Ug" name="getAttributes" visibility="public" concurrency="concurrent">
+ <ownedParameter xmi:id="_iZcD0H5fEdujQd6ed5A7Ug" type="_iKUCsH5fEdujQd6ed5A7Ug" direction="return"/>
+ </ownedOperation>
+ <ownedOperation xmi:id="_iZcD0X5fEdujQd6ed5A7Ug" name="addAttribute" visibility="public" concurrency="concurrent">
+ <ownedParameter xmi:id="_iZcD0n5fEdujQd6ed5A7Ug" name="aAttribute" type="_r9XtoH5eEdujQd6ed5A7Ug"/>
+ </ownedOperation>
+ <ownedOperation xmi:id="_iZcq4H5fEdujQd6ed5A7Ug" name="getChildParser" visibility="public" concurrency="concurrent">
+ <ownedParameter xmi:id="_iZdR8H5fEdujQd6ed5A7Ug" name="aName" type="_r7h6kH5eEdujQd6ed5A7Ug"/>
+ <ownedParameter xmi:id="_iZdR8X5fEdujQd6ed5A7Ug" type="_r7Q00H5eEdujQd6ed5A7Ug" direction="return"/>
+ </ownedOperation>
+ <ownedOperation xmi:id="_iZdR8n5fEdujQd6ed5A7Ug" name="getLocalName" visibility="public" concurrency="concurrent">
+ <ownedParameter xmi:id="_iZegEH5fEdujQd6ed5A7Ug" type="_r7dpIX5eEdujQd6ed5A7Ug" direction="return"/>
+ </ownedOperation>
+ <ownedOperation xmi:id="_iZegEX5fEdujQd6ed5A7Ug" name="setQName" visibility="public" concurrency="concurrent">
+ <ownedParameter xmi:id="_iZfHIH5fEdujQd6ed5A7Ug" name="aQname" type="_r7h6kH5eEdujQd6ed5A7Ug"/>
+ </ownedOperation>
+ <ownedOperation xmi:id="_iZfHIX5fEdujQd6ed5A7Ug" name="setLocalName" visibility="public" concurrency="concurrent">
+ <ownedParameter xmi:id="_iZfuMH5fEdujQd6ed5A7Ug" name="aLocalName" type="_r7dpIX5eEdujQd6ed5A7Ug"/>
+ </ownedOperation>
+ <ownedOperation xmi:id="_iZgVQH5fEdujQd6ed5A7Ug" name="processElementValue" visibility="public" concurrency="concurrent">
+ <ownedParameter xmi:id="_iZgVQX5fEdujQd6ed5A7Ug" name="aValue" type="_r7dpIX5eEdujQd6ed5A7Ug"/>
+ </ownedOperation>
+ <ownedOperation xmi:id="_iZg8UH5fEdujQd6ed5A7Ug" name="getTextValue" visibility="public" concurrency="concurrent">
+ <ownedParameter xmi:id="_iZhjYH5fEdujQd6ed5A7Ug" type="_r7dpIX5eEdujQd6ed5A7Ug" direction="return"/>
+ </ownedOperation>
+ <ownedOperation xmi:id="_iZhjYX5fEdujQd6ed5A7Ug" name="processEndElement" visibility="public" concurrency="concurrent"/>
+ <ownedOperation xmi:id="_iZiKcH5fEdujQd6ed5A7Ug" name="getParent" visibility="public" concurrency="concurrent">
+ <ownedParameter xmi:id="_iZixgH5fEdujQd6ed5A7Ug" type="_r-kngH5eEdujQd6ed5A7Ug" direction="return"/>
+ </ownedOperation>
+ <ownedOperation xmi:id="_iZixgX5fEdujQd6ed5A7Ug" name="getQname" visibility="public" concurrency="concurrent">
+ <ownedParameter xmi:id="_iZjYkH5fEdujQd6ed5A7Ug" type="_r7h6kH5eEdujQd6ed5A7Ug" direction="return"/>
+ </ownedOperation>
+ <ownedOperation xmi:id="_iZjYkX5fEdujQd6ed5A7Ug" name="processAttribute" visibility="public" concurrency="concurrent">
+ <ownedParameter xmi:id="_iZjYkn5fEdujQd6ed5A7Ug" name="aQName" type="_r7h6kH5eEdujQd6ed5A7Ug"/>
+ <ownedParameter xmi:id="_iZj_oH5fEdujQd6ed5A7Ug" name="aValue" type="_r7dpIX5eEdujQd6ed5A7Ug"/>
+ </ownedOperation>
+ <ownedOperation xmi:id="_iZj_oX5fEdujQd6ed5A7Ug" name="setTextValue" visibility="public" concurrency="concurrent">
+ <ownedParameter xmi:id="_iZkmsH5fEdujQd6ed5A7Ug" name="aTextValue" type="_r7dpIX5eEdujQd6ed5A7Ug"/>
+ </ownedOperation>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Interface" xmi:id="_iJxQIH5fEdujQd6ed5A7Ug" name="GOMTitle"/>
+ <packagedElement xmi:type="uml:Interface" xmi:id="_iJx3MX5fEdujQd6ed5A7Ug" name="GOMRights"/>
+ <packagedElement xmi:type="uml:Interface" xmi:id="_iJ06gH5fEdujQd6ed5A7Ug" name="GOMTime"/>
+ <packagedElement xmi:type="uml:Interface" xmi:id="_iJ1hkH5fEdujQd6ed5A7Ug" name="GOMId"/>
+ <packagedElement xmi:type="uml:Interface" xmi:id="_iJ2vsH5fEdujQd6ed5A7Ug" name="GOMLogo"/>
+ <packagedElement xmi:type="uml:Interface" xmi:id="_iJ390H5fEdujQd6ed5A7Ug" name="GOMIcon"/>
+ <packagedElement xmi:type="uml:Interface" xmi:id="_iJ4k4H5fEdujQd6ed5A7Ug" name="GOMGenerator"/>
+ <packagedElement xmi:type="uml:Interface" xmi:id="_iJ5L8X5fEdujQd6ed5A7Ug" name="GOMSubtitle"/>
+ <packagedElement xmi:type="uml:Interface" xmi:id="_iKC88X5fEdujQd6ed5A7Ug" name="GOMContributor">
+ <generalization xmi:id="_iKoy0H5fEdujQd6ed5A7Ug" general="_r-kngH5eEdujQd6ed5A7Ug"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Interface" xmi:id="_iKVQ0H5fEdujQd6ed5A7Ug" name="GOMCategory">
+ <generalization xmi:id="_iKx8wH5fEdujQd6ed5A7Ug" general="_r-kngH5eEdujQd6ed5A7Ug"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Interface" xmi:id="_iKeawH5fEdujQd6ed5A7Ug" name="GOMAuthor">
+ <generalization xmi:id="_iLGs4H5fEdujQd6ed5A7Ug" general="_r-kngH5eEdujQd6ed5A7Ug"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Association" xmi:id="_iKwHkX5fEdujQd6ed5A7Ug" memberEnd="_iJwCAH5fEdujQd6ed5A7Ug _iKwuoH5fEdujQd6ed5A7Ug">
+ <name xsi:nil="true"/>
+ <ownedEnd xmi:id="_iKwuoH5fEdujQd6ed5A7Ug" name="" type="_r-RFgH5eEdujQd6ed5A7Ug" association="_iKwHkX5fEdujQd6ed5A7Ug">
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_iKwuoX5fEdujQd6ed5A7Ug" value="1"/>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_iKwuon5fEdujQd6ed5A7Ug"/>
+ </ownedEnd>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Association" xmi:id="_iK5RgH5fEdujQd6ed5A7Ug" memberEnd="_iJyeQH5fEdujQd6ed5A7Ug _iK5RgX5fEdujQd6ed5A7Ug">
+ <name xsi:nil="true"/>
+ <ownedEnd xmi:id="_iK5RgX5fEdujQd6ed5A7Ug" name="" type="_r-RFgH5eEdujQd6ed5A7Ug" association="_iK5RgH5fEdujQd6ed5A7Ug">
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_iK5Rgn5fEdujQd6ed5A7Ug" value="1"/>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_iK5Rg35fEdujQd6ed5A7Ug"/>
+ </ownedEnd>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Association" xmi:id="_iK6foH5fEdujQd6ed5A7Ug" memberEnd="_iJzFUH5fEdujQd6ed5A7Ug _iK6foX5fEdujQd6ed5A7Ug">
+ <name xsi:nil="true"/>
+ <ownedEnd xmi:id="_iK6foX5fEdujQd6ed5A7Ug" name="" type="_r-RFgH5eEdujQd6ed5A7Ug" association="_iK6foH5fEdujQd6ed5A7Ug">
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_iK6fon5fEdujQd6ed5A7Ug" value="1"/>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_iK6fo35fEdujQd6ed5A7Ug"/>
+ </ownedEnd>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Association" xmi:id="_iLEQoX5fEdujQd6ed5A7Ug" memberEnd="_iJzsYH5fEdujQd6ed5A7Ug _iLE3sH5fEdujQd6ed5A7Ug">
+ <name xsi:nil="true"/>
+ <ownedEnd xmi:id="_iLE3sH5fEdujQd6ed5A7Ug" name="" type="_r-RFgH5eEdujQd6ed5A7Ug" association="_iLEQoX5fEdujQd6ed5A7Ug">
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_iLE3sX5fEdujQd6ed5A7Ug" value="1"/>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_iLE3sn5fEdujQd6ed5A7Ug"/>
+ </ownedEnd>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Association" xmi:id="_iLiKsX5fEdujQd6ed5A7Ug" memberEnd="_iJzFUX5fEdujQd6ed5A7Ug _iLixwH5fEdujQd6ed5A7Ug">
+ <name xsi:nil="true"/>
+ <ownedEnd xmi:id="_iLixwH5fEdujQd6ed5A7Ug" name="" type="_r-RFgH5eEdujQd6ed5A7Ug" association="_iLiKsX5fEdujQd6ed5A7Ug">
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_iLixwX5fEdujQd6ed5A7Ug" value="1"/>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_iLixwn5fEdujQd6ed5A7Ug"/>
+ </ownedEnd>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Interface" xmi:id="_iLjY0H5fEdujQd6ed5A7Ug" name="GOMLink">
+ <generalization xmi:id="_iLkm8H5fEdujQd6ed5A7Ug" general="_r-kngH5eEdujQd6ed5A7Ug"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Association" xmi:id="_iLr7sH5fEdujQd6ed5A7Ug" memberEnd="_iJ2vsX5fEdujQd6ed5A7Ug _iLr7sX5fEdujQd6ed5A7Ug">
+ <name xsi:nil="true"/>
+ <ownedEnd xmi:id="_iLr7sX5fEdujQd6ed5A7Ug" name="" type="_r-RFgH5eEdujQd6ed5A7Ug" association="_iLr7sH5fEdujQd6ed5A7Ug">
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_iLr7sn5fEdujQd6ed5A7Ug" value="1"/>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_iLr7s35fEdujQd6ed5A7Ug"/>
+ </ownedEnd>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Class" xmi:id="_iLtw4H5fEdujQd6ed5A7Ug" name="GOMTitleImp"/>
+ <packagedElement xmi:type="uml:Class" xmi:id="_iLu_AH5fEdujQd6ed5A7Ug" name="GOMIdImpl" visibility="package"/>
+ <packagedElement xmi:type="uml:Association" xmi:id="_iZnqAH5fEdujQd6ed5A7Ug" memberEnd="_iZZAgH5fEdujQd6ed5A7Ug _iZoREH5fEdujQd6ed5A7Ug">
+ <name xsi:nil="true"/>
+ <ownedEnd xmi:id="_iZoREH5fEdujQd6ed5A7Ug" name="" type="_iHkQsH5fEdujQd6ed5A7Ug" association="_iZnqAH5fEdujQd6ed5A7Ug">
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_iZoREX5fEdujQd6ed5A7Ug" value="1"/>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_iZoREn5fEdujQd6ed5A7Ug"/>
+ </ownedEnd>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Package" xmi:id="_r7dCEX5eEdujQd6ed5A7Ug" name="java.lang">
+ <packagedElement xmi:type="uml:Class" xmi:id="_r7dpIX5eEdujQd6ed5A7Ug" name="String" isLeaf="true"/>
+ <packagedElement xmi:type="uml:Class" xmi:id="_r89d8H5eEdujQd6ed5A7Ug" name="RuntimeException">
+ <generalization xmi:id="_sEm-EH5eEdujQd6ed5A7Ug" general="_sEmXAH5eEdujQd6ed5A7Ug"/>
+ <ownedAttribute xmi:id="_sGP80H5eEdujQd6ed5A7Ug" name="serialVersionUID" visibility="package" isLeaf="true" isStatic="true" isReadOnly="true">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/JavaPrimitiveTypes.library.uml#long"/>
+ </ownedAttribute>
+ <ownedOperation xmi:id="_sGRyAH5eEdujQd6ed5A7Ug" name="RuntimeException" visibility="public" concurrency="concurrent">
+ <ownedParameter xmi:id="_sGyvYH5eEdujQd6ed5A7Ug" name="arg0" type="_r7dpIX5eEdujQd6ed5A7Ug"/>
+ <ownedParameter xmi:id="_sGyvYX5eEdujQd6ed5A7Ug" name="arg1" type="_r9ELoH5eEdujQd6ed5A7Ug"/>
+ </ownedOperation>
+ <ownedOperation xmi:id="_sGzWcH5eEdujQd6ed5A7Ug" name="RuntimeException" visibility="public" concurrency="concurrent">
+ <ownedParameter xmi:id="_sGz9gH5eEdujQd6ed5A7Ug" name="arg0" type="_r7dpIX5eEdujQd6ed5A7Ug"/>
+ </ownedOperation>
+ <ownedOperation xmi:id="_sGz9gX5eEdujQd6ed5A7Ug" name="RuntimeException" visibility="public" concurrency="concurrent">
+ <ownedParameter xmi:id="_sG0kkH5eEdujQd6ed5A7Ug" name="arg0" type="_r9ELoH5eEdujQd6ed5A7Ug"/>
+ </ownedOperation>
+ <ownedOperation xmi:id="_sG0kkX5eEdujQd6ed5A7Ug" name="RuntimeException" visibility="public" concurrency="concurrent"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Class" xmi:id="_r9ELoH5eEdujQd6ed5A7Ug" name="Throwable"/>
+ <packagedElement xmi:type="uml:Class" xmi:id="_sBHlMH5eEdujQd6ed5A7Ug" name="System" isLeaf="true"/>
+ <packagedElement xmi:type="uml:Class" xmi:id="_sEmXAH5eEdujQd6ed5A7Ug" name="Exception"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Package" xmi:id="_sAlZsH5eEdujQd6ed5A7Ug" name="java.util">
+ <packagedElement xmi:type="uml:Class" xmi:id="_sAmAwH5eEdujQd6ed5A7Ug" name="Stack"/>
+ <packagedElement xmi:type="uml:Interface" xmi:id="_sAnO4H5eEdujQd6ed5A7Ug" name="List" isAbstract="true"/>
+ <packagedElement xmi:type="uml:Class" xmi:id="_sBG-IH5eEdujQd6ed5A7Ug" name="LinkedList"/>
+ <packagedElement xmi:type="uml:Interface" xmi:id="_iKUCsH5fEdujQd6ed5A7Ug" name="Iterator" isAbstract="true"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_l_ahcH5eEdujQd6ed5A7Ug">
+ <supplier xmi:type="uml:Package" href="platform:/resource/GdataUml/.repository.uml2#_l83jwH5eEdujQd6ed5A7Ug"/>
+ <client xmi:type="uml:Package" href="platform:/resource/GdataUml/.repository.uml2#_l85Y8H5eEdujQd6ed5A7Ug"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_mVVuIH5eEdujQd6ed5A7Ug">
+ <supplier xmi:type="uml:Package" href="platform:/resource/GdataUml/.repository.uml2#_l84K0H5eEdujQd6ed5A7Ug"/>
+ <client xmi:type="uml:Package" href="platform:/resource/GdataUml/.repository.uml2#_l85Y8H5eEdujQd6ed5A7Ug"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_mVYKYH5eEdujQd6ed5A7Ug">
+ <supplier xmi:type="uml:Package" href="platform:/resource/GdataUml/.repository.uml2#_l_Z6YH5eEdujQd6ed5A7Ug"/>
+ <client xmi:type="uml:Package" href="platform:/resource/GdataUml/.repository.uml2#_l85Y8H5eEdujQd6ed5A7Ug"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_mVZ_kn5eEdujQd6ed5A7Ug">
+ <supplier xmi:type="uml:Package" href="platform:/resource/GdataUml/.repository.uml2#_l_Z6YH5eEdujQd6ed5A7Ug"/>
+ <client xmi:type="uml:Package" href="platform:/resource/GdataUml/.repository.uml2#_l85Y8H5eEdujQd6ed5A7Ug"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_mVcb0H5eEdujQd6ed5A7Ug">
+ <supplier xmi:type="uml:Package" href="platform:/resource/GdataUml/.repository.uml2#_l_Z6YH5eEdujQd6ed5A7Ug"/>
+ <client xmi:type="uml:Package" href="platform:/resource/GdataUml/.repository.uml2#_l85Y8H5eEdujQd6ed5A7Ug"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_mVpQIH5eEdujQd6ed5A7Ug">
+ <supplier xmi:type="uml:Package" href="platform:/resource/GdataUml/.repository.uml2#_l84K0H5eEdujQd6ed5A7Ug"/>
+ <client xmi:type="uml:Package" href="platform:/resource/GdataUml/.repository.uml2#_l83jwH5eEdujQd6ed5A7Ug"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_mVrsYH5eEdujQd6ed5A7Ug">
+ <supplier xmi:type="uml:Package" href="platform:/resource/GdataUml/.repository.uml2#_l_Z6YH5eEdujQd6ed5A7Ug"/>
+ <client xmi:type="uml:Package" href="platform:/resource/GdataUml/.repository.uml2#_l83jwH5eEdujQd6ed5A7Ug"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_mVthkX5eEdujQd6ed5A7Ug">
+ <supplier xmi:type="uml:Package" href="platform:/resource/GdataUml/.repository.uml2#_l_Z6YH5eEdujQd6ed5A7Ug"/>
+ <client xmi:type="uml:Package" href="platform:/resource/GdataUml/.repository.uml2#_l83jwH5eEdujQd6ed5A7Ug"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_mVv90X5eEdujQd6ed5A7Ug">
+ <supplier xmi:type="uml:Package" href="platform:/resource/GdataUml/.repository.uml2#_mVmz4H5eEdujQd6ed5A7Ug"/>
+ <client xmi:type="uml:Package" href="platform:/resource/GdataUml/.repository.uml2#_l83jwH5eEdujQd6ed5A7Ug"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_mV6V4H5eEdujQd6ed5A7Ug">
+ <supplier xmi:type="uml:Package" href="platform:/resource/GdataUml/.repository.uml2#_l83jwH5eEdujQd6ed5A7Ug"/>
+ <client xmi:type="uml:Package" href="platform:/resource/GdataUml/.repository.uml2#_l84K0H5eEdujQd6ed5A7Ug"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_mV8yIX5eEdujQd6ed5A7Ug">
+ <supplier xmi:type="uml:Package" href="platform:/resource/GdataUml/.repository.uml2#_l83jwH5eEdujQd6ed5A7Ug"/>
+ <client xmi:type="uml:Package" href="platform:/resource/GdataUml/.repository.uml2#_l84K0H5eEdujQd6ed5A7Ug"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_mV_OYH5eEdujQd6ed5A7Ug">
+ <supplier xmi:type="uml:Package" href="platform:/resource/GdataUml/.repository.uml2#_l_Z6YH5eEdujQd6ed5A7Ug"/>
+ <client xmi:type="uml:Package" href="platform:/resource/GdataUml/.repository.uml2#_l84K0H5eEdujQd6ed5A7Ug"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_mWBDkX5eEdujQd6ed5A7Ug">
+ <supplier xmi:type="uml:Package" href="platform:/resource/GdataUml/.repository.uml2#_l_Z6YH5eEdujQd6ed5A7Ug"/>
+ <client xmi:type="uml:Package" href="platform:/resource/GdataUml/.repository.uml2#_l84K0H5eEdujQd6ed5A7Ug"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_mWDf0H5eEdujQd6ed5A7Ug">
+ <supplier xmi:type="uml:Package" href="platform:/resource/GdataUml/.repository.uml2#_mVmz4H5eEdujQd6ed5A7Ug"/>
+ <client xmi:type="uml:Package" href="platform:/resource/GdataUml/.repository.uml2#_l84K0H5eEdujQd6ed5A7Ug"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_mWHxQH5eEdujQd6ed5A7Ug">
+ <supplier xmi:type="uml:Package" href="platform:/resource/GdataUml/.repository.uml2#_l83jwH5eEdujQd6ed5A7Ug"/>
+ <client xmi:type="uml:Package" href="platform:/resource/GdataUml/.repository.uml2#_l8xdIH5eEdujQd6ed5A7Ug"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_mWKNgn5eEdujQd6ed5A7Ug">
+ <supplier xmi:type="uml:Package" href="platform:/resource/GdataUml/.repository.uml2#_l84K0H5eEdujQd6ed5A7Ug"/>
+ <client xmi:type="uml:Package" href="platform:/resource/GdataUml/.repository.uml2#_l8xdIH5eEdujQd6ed5A7Ug"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_mWMCsX5eEdujQd6ed5A7Ug">
+ <supplier xmi:type="uml:Package" href="platform:/resource/GdataUml/.repository.uml2#_l84K0H5eEdujQd6ed5A7Ug"/>
+ <client xmi:type="uml:Package" href="platform:/resource/GdataUml/.repository.uml2#_l8xdIH5eEdujQd6ed5A7Ug"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_mWOe8X5eEdujQd6ed5A7Ug">
+ <supplier xmi:type="uml:Package" href="platform:/resource/GdataUml/.repository.uml2#_l_Z6YH5eEdujQd6ed5A7Ug"/>
+ <client xmi:type="uml:Package" href="platform:/resource/GdataUml/.repository.uml2#_l8xdIH5eEdujQd6ed5A7Ug"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_mWQ7MX5eEdujQd6ed5A7Ug">
+ <supplier xmi:type="uml:Package" href="platform:/resource/GdataUml/.repository.uml2#_l_Z6YH5eEdujQd6ed5A7Ug"/>
+ <client xmi:type="uml:Package" href="platform:/resource/GdataUml/.repository.uml2#_l8xdIH5eEdujQd6ed5A7Ug"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_mWXo4H5eEdujQd6ed5A7Ug">
+ <supplier xmi:type="uml:Package" href="platform:/resource/GdataUml/.repository.uml2#_l_Z6YH5eEdujQd6ed5A7Ug"/>
+ <client xmi:type="uml:Package" href="platform:/resource/GdataUml/.repository.uml2#_l81ukH5eEdujQd6ed5A7Ug"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_mWZeEn5eEdujQd6ed5A7Ug">
+ <supplier xmi:type="uml:Package" href="platform:/resource/GdataUml/.repository.uml2#_l_Z6YH5eEdujQd6ed5A7Ug"/>
+ <client xmi:type="uml:Package" href="platform:/resource/GdataUml/.repository.uml2#_l81ukH5eEdujQd6ed5A7Ug"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_mWb6UX5eEdujQd6ed5A7Ug">
+ <supplier xmi:type="uml:Package" href="platform:/resource/GdataUml/.repository.uml2#_l_Z6YH5eEdujQd6ed5A7Ug"/>
+ <client xmi:type="uml:Package" href="platform:/resource/GdataUml/.repository.uml2#_l81ukH5eEdujQd6ed5A7Ug"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_r7sSoH5eEdujQd6ed5A7Ug" supplier="_r7dpIX5eEdujQd6ed5A7Ug" client="_r7Q00H5eEdujQd6ed5A7Ug"/>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_r7uu4X5eEdujQd6ed5A7Ug" supplier="_r7h6kH5eEdujQd6ed5A7Ug" client="_r7Q00H5eEdujQd6ed5A7Ug"/>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_r72DoH5eEdujQd6ed5A7Ug">
+ <supplier xmi:type="uml:Package" href="platform:/resource/GdataUml/.repository.uml2#_l_Z6YH5eEdujQd6ed5A7Ug"/>
+ <client xmi:type="uml:Package" href="platform:/resource/GdataUml/.repository.uml2#_l84K0H5eEdujQd6ed5A7Ug"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_r8qjAH5eEdujQd6ed5A7Ug" supplier="_r7dpIX5eEdujQd6ed5A7Ug" client="_r8CQ4H5eEdujQd6ed5A7Ug"/>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_r8x3wH5eEdujQd6ed5A7Ug">
+ <supplier xmi:type="uml:Package" href="platform:/resource/GdataUml/.repository.uml2#_l_Z6YH5eEdujQd6ed5A7Ug"/>
+ <client xmi:type="uml:Package" href="platform:/resource/GdataUml/.repository.uml2#_l84K0H5eEdujQd6ed5A7Ug"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_r9GA0H5eEdujQd6ed5A7Ug" supplier="_r9ELoH5eEdujQd6ed5A7Ug" client="_r8824H5eEdujQd6ed5A7Ug"/>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_r9IdEn5eEdujQd6ed5A7Ug" supplier="_r7dpIX5eEdujQd6ed5A7Ug" client="_r8824H5eEdujQd6ed5A7Ug"/>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_r9Px0H5eEdujQd6ed5A7Ug">
+ <supplier xmi:type="uml:Package" href="platform:/resource/GdataUml/.repository.uml2#_l_Z6YH5eEdujQd6ed5A7Ug"/>
+ <client xmi:type="uml:Package" href="platform:/resource/GdataUml/.repository.uml2#_l84K0H5eEdujQd6ed5A7Ug"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_r9lJAH5eEdujQd6ed5A7Ug" supplier="_r7dpIX5eEdujQd6ed5A7Ug" client="_r9WfgH5eEdujQd6ed5A7Ug"/>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_r9nlQn5eEdujQd6ed5A7Ug" supplier="_r7h6kH5eEdujQd6ed5A7Ug" client="_r9WfgH5eEdujQd6ed5A7Ug"/>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_r9wIIH5eEdujQd6ed5A7Ug">
+ <supplier xmi:type="uml:Package" href="platform:/resource/GdataUml/.repository.uml2#_l_Z6YH5eEdujQd6ed5A7Ug"/>
+ <client xmi:type="uml:Package" href="platform:/resource/GdataUml/.repository.uml2#_l84K0H5eEdujQd6ed5A7Ug"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_r-RskH5eEdujQd6ed5A7Ug" supplier="_r-P3YH5eEdujQd6ed5A7Ug" client="_r-JwwH5eEdujQd6ed5A7Ug"/>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_r-Thwn5eEdujQd6ed5A7Ug" supplier="_r-RFgH5eEdujQd6ed5A7Ug" client="_r-JwwH5eEdujQd6ed5A7Ug"/>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_r-cEoH5eEdujQd6ed5A7Ug">
+ <supplier xmi:type="uml:Package" href="platform:/resource/GdataUml/.repository.uml2#_l_Z6YH5eEdujQd6ed5A7Ug"/>
+ <client xmi:type="uml:Package" href="platform:/resource/GdataUml/.repository.uml2#_l84K0H5eEdujQd6ed5A7Ug"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_r-l1oH5eEdujQd6ed5A7Ug" supplier="_r-kngH5eEdujQd6ed5A7Ug"/>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_r-tKYH5eEdujQd6ed5A7Ug">
+ <supplier xmi:type="uml:Package" href="platform:/resource/GdataUml/.repository.uml2#_l_Z6YH5eEdujQd6ed5A7Ug"/>
+ <client xmi:type="uml:Package" href="platform:/resource/GdataUml/.repository.uml2#_l84K0H5eEdujQd6ed5A7Ug"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_r_vsMH5eEdujQd6ed5A7Ug" supplier="_r7dpIX5eEdujQd6ed5A7Ug" client="_r-yp8H5eEdujQd6ed5A7Ug"/>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_r_xhYn5eEdujQd6ed5A7Ug" supplier="_r_MSkH5eEdujQd6ed5A7Ug" client="_r-yp8H5eEdujQd6ed5A7Ug"/>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_r_z9on5eEdujQd6ed5A7Ug" supplier="_r-kngH5eEdujQd6ed5A7Ug" client="_r-yp8H5eEdujQd6ed5A7Ug"/>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_r_1y0n5eEdujQd6ed5A7Ug" supplier="_r_OHwH5eEdujQd6ed5A7Ug" client="_r-yp8H5eEdujQd6ed5A7Ug"/>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_r_3oAX5eEdujQd6ed5A7Ug" supplier="_r_OHwH5eEdujQd6ed5A7Ug" client="_r-yp8H5eEdujQd6ed5A7Ug"/>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_sAAK4H5eEdujQd6ed5A7Ug">
+ <supplier xmi:type="uml:Package" href="platform:/resource/GdataUml/.repository.uml2#_l_Z6YH5eEdujQd6ed5A7Ug"/>
+ <client xmi:type="uml:Package" href="platform:/resource/GdataUml/.repository.uml2#_l84K0H5eEdujQd6ed5A7Ug"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_sBMdsX5eEdujQd6ed5A7Ug" supplier="_sAmAwH5eEdujQd6ed5A7Ug" client="_sAJ74H5eEdujQd6ed5A7Ug"/>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_sBOS4X5eEdujQd6ed5A7Ug" supplier="_sAmAwH5eEdujQd6ed5A7Ug" client="_sAJ74H5eEdujQd6ed5A7Ug"/>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_sBQIEn5eEdujQd6ed5A7Ug" supplier="_sAodAH5eEdujQd6ed5A7Ug" client="_sAJ74H5eEdujQd6ed5A7Ug"/>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_sBSkUX5eEdujQd6ed5A7Ug" supplier="_r_OHwH5eEdujQd6ed5A7Ug" client="_sAJ74H5eEdujQd6ed5A7Ug"/>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_sBUZgX5eEdujQd6ed5A7Ug" supplier="_r_OHwH5eEdujQd6ed5A7Ug" client="_sAJ74H5eEdujQd6ed5A7Ug"/>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_sBWOsn5eEdujQd6ed5A7Ug" supplier="_r-P3YH5eEdujQd6ed5A7Ug" client="_sAJ74H5eEdujQd6ed5A7Ug"/>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_sBYq8n5eEdujQd6ed5A7Ug" supplier="_r7h6kH5eEdujQd6ed5A7Ug" client="_sAJ74H5eEdujQd6ed5A7Ug"/>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_sBagIn5eEdujQd6ed5A7Ug" supplier="_sBG-IH5eEdujQd6ed5A7Ug" client="_sAJ74H5eEdujQd6ed5A7Ug"/>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_sBcVUX5eEdujQd6ed5A7Ug" supplier="_sBHlMH5eEdujQd6ed5A7Ug" client="_sAJ74H5eEdujQd6ed5A7Ug"/>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_sBexkn5eEdujQd6ed5A7Ug" supplier="_r-yp8H5eEdujQd6ed5A7Ug" client="_sAJ74H5eEdujQd6ed5A7Ug"/>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_sBhN0H5eEdujQd6ed5A7Ug" supplier="_r7Q00H5eEdujQd6ed5A7Ug" client="_sAJ74H5eEdujQd6ed5A7Ug"/>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_sBjDAn5eEdujQd6ed5A7Ug" supplier="_sA-bQH5eEdujQd6ed5A7Ug" client="_sAJ74H5eEdujQd6ed5A7Ug"/>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_sBmGUH5eEdujQd6ed5A7Ug" supplier="_r-JwwH5eEdujQd6ed5A7Ug" client="_sAJ74H5eEdujQd6ed5A7Ug"/>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_sBn7gn5eEdujQd6ed5A7Ug" supplier="_r-JwwH5eEdujQd6ed5A7Ug" client="_sAJ74H5eEdujQd6ed5A7Ug"/>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_sBqXwX5eEdujQd6ed5A7Ug" supplier="_r8CQ4H5eEdujQd6ed5A7Ug" client="_sAJ74H5eEdujQd6ed5A7Ug"/>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_sBsM8X5eEdujQd6ed5A7Ug" supplier="_r8CQ4H5eEdujQd6ed5A7Ug" client="_sAJ74H5eEdujQd6ed5A7Ug"/>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_sBuCIn5eEdujQd6ed5A7Ug" supplier="_r-0fIH5eEdujQd6ed5A7Ug" client="_sAJ74H5eEdujQd6ed5A7Ug"/>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_sB6PYH5eEdujQd6ed5A7Ug">
+ <supplier xmi:type="uml:Package" href="platform:/resource/GdataUml/.repository.uml2#_l_Z6YH5eEdujQd6ed5A7Ug"/>
+ <client xmi:type="uml:Package" href="platform:/resource/GdataUml/.repository.uml2#_l84K0H5eEdujQd6ed5A7Ug"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_sHONMH5eEdujQd6ed5A7Ug">
+ <supplier xmi:type="uml:Package" href="platform:/resource/GdataUml/.repository.uml2#_l_Z6YH5eEdujQd6ed5A7Ug"/>
+ <client xmi:type="uml:Package" href="platform:/resource/GdataUml/.repository.uml2#_l83jwH5eEdujQd6ed5A7Ug"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_sH6wwH5eEdujQd6ed5A7Ug" supplier="_r7dpIX5eEdujQd6ed5A7Ug" client="_r-0fIH5eEdujQd6ed5A7Ug"/>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_sH9NAn5eEdujQd6ed5A7Ug" supplier="_r_MSkH5eEdujQd6ed5A7Ug" client="_r-0fIH5eEdujQd6ed5A7Ug"/>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_sH_CMn5eEdujQd6ed5A7Ug" supplier="_r-kngH5eEdujQd6ed5A7Ug" client="_r-0fIH5eEdujQd6ed5A7Ug"/>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_sIA3Yn5eEdujQd6ed5A7Ug" supplier="_r_OHwH5eEdujQd6ed5A7Ug" client="_r-0fIH5eEdujQd6ed5A7Ug"/>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_sIDToX5eEdujQd6ed5A7Ug" supplier="_r_OHwH5eEdujQd6ed5A7Ug" client="_r-0fIH5eEdujQd6ed5A7Ug"/>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_sILPcH5eEdujQd6ed5A7Ug">
+ <supplier xmi:type="uml:Package" href="platform:/resource/GdataUml/.repository.uml2#_l_Z6YH5eEdujQd6ed5A7Ug"/>
+ <client xmi:type="uml:Package" href="platform:/resource/GdataUml/.repository.uml2#_l83jwH5eEdujQd6ed5A7Ug"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_9V9KEH5eEdujQd6ed5A7Ug">
+ <supplier xmi:type="uml:Package" href="platform:/resource/GdataUml/.repository.uml2#_l_Z6YH5eEdujQd6ed5A7Ug"/>
+ <client xmi:type="uml:Package" href="platform:/resource/GdataUml/.repository.uml2#_l84K0H5eEdujQd6ed5A7Ug"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_9fSFMH5eEdujQd6ed5A7Ug">
+ <supplier xmi:type="uml:Package" href="platform:/resource/GdataUml/.repository.uml2#_l_Z6YH5eEdujQd6ed5A7Ug"/>
+ <client xmi:type="uml:Package" href="platform:/resource/GdataUml/.repository.uml2#_l84K0H5eEdujQd6ed5A7Ug"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_-avn4H5eEdujQd6ed5A7Ug">
+ <supplier xmi:type="uml:Package" href="platform:/resource/GdataUml/.repository.uml2#_l_Z6YH5eEdujQd6ed5A7Ug"/>
+ <client xmi:type="uml:Package" href="platform:/resource/GdataUml/.repository.uml2#_l84K0H5eEdujQd6ed5A7Ug"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_iKuSYH5fEdujQd6ed5A7Ug">
+ <supplier xmi:type="uml:Package" href="platform:/resource/GdataUml/.repository.uml2#_l_Z6YH5eEdujQd6ed5A7Ug"/>
+ <client xmi:type="uml:Package" href="platform:/resource/GdataUml/.repository.uml2#_l83jwH5eEdujQd6ed5A7Ug"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_iK21QH5fEdujQd6ed5A7Ug">
+ <supplier xmi:type="uml:Package" href="platform:/resource/GdataUml/.repository.uml2#_l_Z6YH5eEdujQd6ed5A7Ug"/>
+ <client xmi:type="uml:Package" href="platform:/resource/GdataUml/.repository.uml2#_l83jwH5eEdujQd6ed5A7Ug"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_iLCbcH5fEdujQd6ed5A7Ug">
+ <supplier xmi:type="uml:Package" href="platform:/resource/GdataUml/.repository.uml2#_l_Z6YH5eEdujQd6ed5A7Ug"/>
+ <client xmi:type="uml:Package" href="platform:/resource/GdataUml/.repository.uml2#_l83jwH5eEdujQd6ed5A7Ug"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_iLfucH5fEdujQd6ed5A7Ug">
+ <supplier xmi:type="uml:Package" href="platform:/resource/GdataUml/.repository.uml2#_l_Z6YH5eEdujQd6ed5A7Ug"/>
+ <client xmi:type="uml:Package" href="platform:/resource/GdataUml/.repository.uml2#_l83jwH5eEdujQd6ed5A7Ug"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_iLpfcH5fEdujQd6ed5A7Ug">
+ <supplier xmi:type="uml:Package" href="platform:/resource/GdataUml/.repository.uml2#_l_Z6YH5eEdujQd6ed5A7Ug"/>
+ <client xmi:type="uml:Package" href="platform:/resource/GdataUml/.repository.uml2#_l83jwH5eEdujQd6ed5A7Ug"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_iL0ekH5fEdujQd6ed5A7Ug" supplier="_iLu_AH5fEdujQd6ed5A7Ug" client="_r-RFgH5eEdujQd6ed5A7Ug"/>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_iL2TwX5fEdujQd6ed5A7Ug" supplier="_iKVQ0H5fEdujQd6ed5A7Ug" client="_r-RFgH5eEdujQd6ed5A7Ug"/>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_iL4wAH5fEdujQd6ed5A7Ug" supplier="_iJ2vsH5fEdujQd6ed5A7Ug" client="_r-RFgH5eEdujQd6ed5A7Ug"/>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_iL6lMn5fEdujQd6ed5A7Ug" supplier="_iJx3MX5fEdujQd6ed5A7Ug" client="_r-RFgH5eEdujQd6ed5A7Ug"/>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_iL8aYn5fEdujQd6ed5A7Ug" supplier="_sBG-IH5eEdujQd6ed5A7Ug" client="_r-RFgH5eEdujQd6ed5A7Ug"/>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_iL-2oX5fEdujQd6ed5A7Ug" supplier="_iJ06gH5fEdujQd6ed5A7Ug" client="_r-RFgH5eEdujQd6ed5A7Ug"/>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_iMAr0n5fEdujQd6ed5A7Ug" supplier="_r7h6kH5eEdujQd6ed5A7Ug" client="_r-RFgH5eEdujQd6ed5A7Ug"/>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_iMChAn5fEdujQd6ed5A7Ug" supplier="_iLjY0H5fEdujQd6ed5A7Ug" client="_r-RFgH5eEdujQd6ed5A7Ug"/>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_iMEWMn5fEdujQd6ed5A7Ug" supplier="_iJ4k4H5fEdujQd6ed5A7Ug" client="_r-RFgH5eEdujQd6ed5A7Ug"/>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_iMGycX5fEdujQd6ed5A7Ug" supplier="_sAnO4H5eEdujQd6ed5A7Ug" client="_r-RFgH5eEdujQd6ed5A7Ug"/>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_iMInon5fEdujQd6ed5A7Ug" supplier="_iJxQIH5fEdujQd6ed5A7Ug" client="_r-RFgH5eEdujQd6ed5A7Ug"/>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_iMKc0n5fEdujQd6ed5A7Ug" supplier="_iJ1hkH5fEdujQd6ed5A7Ug" client="_r-RFgH5eEdujQd6ed5A7Ug"/>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_iMM5En5fEdujQd6ed5A7Ug" supplier="_iKeawH5fEdujQd6ed5A7Ug" client="_r-RFgH5eEdujQd6ed5A7Ug"/>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_iMOuQn5fEdujQd6ed5A7Ug" supplier="_sA-bQH5eEdujQd6ed5A7Ug" client="_r-RFgH5eEdujQd6ed5A7Ug"/>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_iMQjcn5fEdujQd6ed5A7Ug" supplier="_r_OHwH5eEdujQd6ed5A7Ug" client="_r-RFgH5eEdujQd6ed5A7Ug"/>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_iMSYoX5fEdujQd6ed5A7Ug" supplier="_r_OHwH5eEdujQd6ed5A7Ug" client="_r-RFgH5eEdujQd6ed5A7Ug"/>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_iMU04X5fEdujQd6ed5A7Ug" supplier="_iKC88X5fEdujQd6ed5A7Ug" client="_r-RFgH5eEdujQd6ed5A7Ug"/>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_iMWqEn5fEdujQd6ed5A7Ug" supplier="_iKUCsH5fEdujQd6ed5A7Ug" client="_r-RFgH5eEdujQd6ed5A7Ug"/>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_iMYfQn5fEdujQd6ed5A7Ug" supplier="_iLtw4H5fEdujQd6ed5A7Ug" client="_r-RFgH5eEdujQd6ed5A7Ug"/>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_iMa7gH5fEdujQd6ed5A7Ug" supplier="_r7Q00H5eEdujQd6ed5A7Ug" client="_r-RFgH5eEdujQd6ed5A7Ug"/>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_iMcwsn5fEdujQd6ed5A7Ug" supplier="_r_MSkH5eEdujQd6ed5A7Ug" client="_r-RFgH5eEdujQd6ed5A7Ug"/>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_iMel4n5fEdujQd6ed5A7Ug" supplier="_iJ5L8X5fEdujQd6ed5A7Ug" client="_r-RFgH5eEdujQd6ed5A7Ug"/>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_iMgbEn5fEdujQd6ed5A7Ug" supplier="_r9XtoH5eEdujQd6ed5A7Ug" client="_r-RFgH5eEdujQd6ed5A7Ug"/>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_iMi3Un5fEdujQd6ed5A7Ug" supplier="_iJ390H5fEdujQd6ed5A7Ug" client="_r-RFgH5eEdujQd6ed5A7Ug"/>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_iMksgn5fEdujQd6ed5A7Ug" supplier="_r8CQ4H5eEdujQd6ed5A7Ug" client="_r-RFgH5eEdujQd6ed5A7Ug"/>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_iMmhsn5fEdujQd6ed5A7Ug" supplier="_r7dpIX5eEdujQd6ed5A7Ug" client="_r-RFgH5eEdujQd6ed5A7Ug"/>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_iMo98X5fEdujQd6ed5A7Ug" supplier="_r7dpIX5eEdujQd6ed5A7Ug" client="_r-RFgH5eEdujQd6ed5A7Ug"/>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_iMqzIn5fEdujQd6ed5A7Ug" supplier="_r9WfgH5eEdujQd6ed5A7Ug" client="_r-RFgH5eEdujQd6ed5A7Ug"/>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_iMsoUX5fEdujQd6ed5A7Ug" supplier="_r9WfgH5eEdujQd6ed5A7Ug" client="_r-RFgH5eEdujQd6ed5A7Ug"/>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_iMudgn5fEdujQd6ed5A7Ug" supplier="_r-kngH5eEdujQd6ed5A7Ug" client="_r-RFgH5eEdujQd6ed5A7Ug"/>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_iM1LMH5fEdujQd6ed5A7Ug">
+ <supplier xmi:type="uml:Package" href="platform:/resource/GdataUml/.repository.uml2#_l_Z6YH5eEdujQd6ed5A7Ug"/>
+ <client xmi:type="uml:Package" href="platform:/resource/GdataUml/.repository.uml2#_l84K0H5eEdujQd6ed5A7Ug"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_iZqtUH5fEdujQd6ed5A7Ug" supplier="_iKUCsH5fEdujQd6ed5A7Ug" client="_iHkQsH5fEdujQd6ed5A7Ug"/>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_iZtJkn5fEdujQd6ed5A7Ug" supplier="_r7dpIX5eEdujQd6ed5A7Ug" client="_iHkQsH5fEdujQd6ed5A7Ug"/>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_iZu-wn5fEdujQd6ed5A7Ug" supplier="_r7dpIX5eEdujQd6ed5A7Ug" client="_iHkQsH5fEdujQd6ed5A7Ug"/>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_iZxbAX5fEdujQd6ed5A7Ug" supplier="_sAnO4H5eEdujQd6ed5A7Ug" client="_iHkQsH5fEdujQd6ed5A7Ug"/>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_iZzQMn5fEdujQd6ed5A7Ug" supplier="_r7h6kH5eEdujQd6ed5A7Ug" client="_iHkQsH5fEdujQd6ed5A7Ug"/>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_iZ1FYn5fEdujQd6ed5A7Ug" supplier="_r-kngH5eEdujQd6ed5A7Ug" client="_iHkQsH5fEdujQd6ed5A7Ug"/>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_iZ3hoX5fEdujQd6ed5A7Ug" supplier="_sBG-IH5eEdujQd6ed5A7Ug" client="_iHkQsH5fEdujQd6ed5A7Ug"/>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_iZ5W0X5fEdujQd6ed5A7Ug" supplier="_r7Q00H5eEdujQd6ed5A7Ug" client="_iHkQsH5fEdujQd6ed5A7Ug"/>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_iZ7MAn5fEdujQd6ed5A7Ug" supplier="_r9XtoH5eEdujQd6ed5A7Ug" client="_iHkQsH5fEdujQd6ed5A7Ug"/>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_iaDH0H5fEdujQd6ed5A7Ug">
+ <supplier xmi:type="uml:Package" href="platform:/resource/GdataUml/.repository.uml2#_l_Z6YH5eEdujQd6ed5A7Ug"/>
+ <client xmi:type="uml:Package" href="platform:/resource/GdataUml/.repository.uml2#_l84K0H5eEdujQd6ed5A7Ug"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_ibYkkH5fEdujQd6ed5A7Ug" supplier="_iKVQ0H5fEdujQd6ed5A7Ug" client="_r-P3YH5eEdujQd6ed5A7Ug"/>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_ibaZwn5fEdujQd6ed5A7Ug" supplier="_iJx3MX5fEdujQd6ed5A7Ug" client="_r-P3YH5eEdujQd6ed5A7Ug"/>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_ibc2AH5fEdujQd6ed5A7Ug" supplier="_iJ390H5fEdujQd6ed5A7Ug" client="_r-P3YH5eEdujQd6ed5A7Ug"/>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_iberMn5fEdujQd6ed5A7Ug" supplier="_sAnO4H5eEdujQd6ed5A7Ug" client="_r-P3YH5eEdujQd6ed5A7Ug"/>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_ibggYn5fEdujQd6ed5A7Ug" supplier="_iKeawH5fEdujQd6ed5A7Ug" client="_r-P3YH5eEdujQd6ed5A7Ug"/>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_ibi8oX5fEdujQd6ed5A7Ug" supplier="_iJ1hkH5fEdujQd6ed5A7Ug" client="_r-P3YH5eEdujQd6ed5A7Ug"/>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_ibkx0n5fEdujQd6ed5A7Ug" supplier="_iJxQIH5fEdujQd6ed5A7Ug" client="_r-P3YH5eEdujQd6ed5A7Ug"/>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_ibmnAn5fEdujQd6ed5A7Ug" supplier="_iJ5L8X5fEdujQd6ed5A7Ug" client="_r-P3YH5eEdujQd6ed5A7Ug"/>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_ibpDQH5fEdujQd6ed5A7Ug" supplier="_sA-bQH5eEdujQd6ed5A7Ug" client="_r-P3YH5eEdujQd6ed5A7Ug"/>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_ibq4cn5fEdujQd6ed5A7Ug" supplier="_iKC88X5fEdujQd6ed5A7Ug" client="_r-P3YH5eEdujQd6ed5A7Ug"/>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_ibston5fEdujQd6ed5A7Ug" supplier="_iJ06gH5fEdujQd6ed5A7Ug" client="_r-P3YH5eEdujQd6ed5A7Ug"/>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_ibui0n5fEdujQd6ed5A7Ug" supplier="_iJ2vsH5fEdujQd6ed5A7Ug" client="_r-P3YH5eEdujQd6ed5A7Ug"/>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_ibw_EX5fEdujQd6ed5A7Ug" supplier="_r8CQ4H5eEdujQd6ed5A7Ug" client="_r-P3YH5eEdujQd6ed5A7Ug"/>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_iby0Qn5fEdujQd6ed5A7Ug" supplier="_iJ4k4H5fEdujQd6ed5A7Ug" client="_r-P3YH5eEdujQd6ed5A7Ug"/>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_ib13kH5fEdujQd6ed5A7Ug" supplier="_r7dpIX5eEdujQd6ed5A7Ug" client="_r-P3YH5eEdujQd6ed5A7Ug"/>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_ib7XIH5fEdujQd6ed5A7Ug">
+ <supplier xmi:type="uml:Package" href="platform:/resource/GdataUml/.repository.uml2#_l_Z6YH5eEdujQd6ed5A7Ug"/>
+ <client xmi:type="uml:Package" href="platform:/resource/GdataUml/.repository.uml2#_l83jwH5eEdujQd6ed5A7Ug"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_lnc38H5fEdujQd6ed5A7Ug" supplier="_r_OHwH5eEdujQd6ed5A7Ug" client="_sAJ74H5eEdujQd6ed5A7Ug"/>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_lngiUX5fEdujQd6ed5A7Ug" supplier="_sAmAwH5eEdujQd6ed5A7Ug" client="_sAJ74H5eEdujQd6ed5A7Ug"/>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_lni-kH5fEdujQd6ed5A7Ug" supplier="_r-yp8H5eEdujQd6ed5A7Ug" client="_sAJ74H5eEdujQd6ed5A7Ug"/>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_lnkzwX5fEdujQd6ed5A7Ug" supplier="_r8CQ4H5eEdujQd6ed5A7Ug" client="_sAJ74H5eEdujQd6ed5A7Ug"/>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_lnsIgH5fEdujQd6ed5A7Ug">
+ <supplier xmi:type="uml:Package" href="platform:/resource/GdataUml/.repository.uml2#_l_Z6YH5eEdujQd6ed5A7Ug"/>
+ <client xmi:type="uml:Package" href="platform:/resource/GdataUml/.repository.uml2#_l84K0H5eEdujQd6ed5A7Ug"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_ln4VwH5fEdujQd6ed5A7Ug" supplier="_r_OHwH5eEdujQd6ed5A7Ug" client="_sAJ74H5eEdujQd6ed5A7Ug"/>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_ln8AIX5fEdujQd6ed5A7Ug" supplier="_sAmAwH5eEdujQd6ed5A7Ug" client="_sAJ74H5eEdujQd6ed5A7Ug"/>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_ln-cYX5fEdujQd6ed5A7Ug" supplier="_r-yp8H5eEdujQd6ed5A7Ug" client="_sAJ74H5eEdujQd6ed5A7Ug"/>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_loA4oH5fEdujQd6ed5A7Ug" supplier="_r8CQ4H5eEdujQd6ed5A7Ug" client="_sAJ74H5eEdujQd6ed5A7Ug"/>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_loG_QH5fEdujQd6ed5A7Ug">
+ <supplier xmi:type="uml:Package" href="platform:/resource/GdataUml/.repository.uml2#_l_Z6YH5eEdujQd6ed5A7Ug"/>
+ <client xmi:type="uml:Package" href="platform:/resource/GdataUml/.repository.uml2#_l84K0H5eEdujQd6ed5A7Ug"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_9vB78H5fEdujQd6ed5A7Ug">
+ <supplier xmi:type="uml:Package" href="platform:/resource/GdataUml/.repository.uml2#_l_Z6YH5eEdujQd6ed5A7Ug"/>
+ <client xmi:type="uml:Package" href="platform:/resource/GdataUml/.repository.uml2#_l84K0H5eEdujQd6ed5A7Ug"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_-K0gEH5fEdujQd6ed5A7Ug">
+ <supplier xmi:type="uml:Package" href="platform:/resource/GdataUml/.repository.uml2#_l_Z6YH5eEdujQd6ed5A7Ug"/>
+ <client xmi:type="uml:Package" href="platform:/resource/GdataUml/.repository.uml2#_l84K0H5eEdujQd6ed5A7Ug"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_-nSZoH5fEdujQd6ed5A7Ug" supplier="_r_OHwH5eEdujQd6ed5A7Ug" client="_sAJ74H5eEdujQd6ed5A7Ug"/>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_-nUO0X5fEdujQd6ed5A7Ug" supplier="_sAmAwH5eEdujQd6ed5A7Ug" client="_sAJ74H5eEdujQd6ed5A7Ug"/>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_-nWrEH5fEdujQd6ed5A7Ug" supplier="_r-yp8H5eEdujQd6ed5A7Ug" client="_sAJ74H5eEdujQd6ed5A7Ug"/>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_-nYgQX5fEdujQd6ed5A7Ug" supplier="_r8CQ4H5eEdujQd6ed5A7Ug" client="_sAJ74H5eEdujQd6ed5A7Ug"/>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_-nfN8H5fEdujQd6ed5A7Ug">
+ <supplier xmi:type="uml:Package" href="platform:/resource/GdataUml/.repository.uml2#_l_Z6YH5eEdujQd6ed5A7Ug"/>
+ <client xmi:type="uml:Package" href="platform:/resource/GdataUml/.repository.uml2#_l84K0H5eEdujQd6ed5A7Ug"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_BYTvwH5gEdujQd6ed5A7Ug" supplier="_r_OHwH5eEdujQd6ed5A7Ug" client="_sAJ74H5eEdujQd6ed5A7Ug"/>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_BYWMAX5gEdujQd6ed5A7Ug" supplier="_sAmAwH5eEdujQd6ed5A7Ug" client="_sAJ74H5eEdujQd6ed5A7Ug"/>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_BYYBMX5gEdujQd6ed5A7Ug" supplier="_r-yp8H5eEdujQd6ed5A7Ug" client="_sAJ74H5eEdujQd6ed5A7Ug"/>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_BYadcH5gEdujQd6ed5A7Ug" supplier="_r8CQ4H5eEdujQd6ed5A7Ug" client="_sAJ74H5eEdujQd6ed5A7Ug"/>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_BYhLIH5gEdujQd6ed5A7Ug">
+ <supplier xmi:type="uml:Package" href="platform:/resource/GdataUml/.repository.uml2#_l_Z6YH5eEdujQd6ed5A7Ug"/>
+ <client xmi:type="uml:Package" href="platform:/resource/GdataUml/.repository.uml2#_l84K0H5eEdujQd6ed5A7Ug"/>
+ </packagedElement>
+</uml:Model>
diff --git a/contrib/gdata-server/src/gom/java/org/apache/lucene/gdata/gom/core/extension/GOMExtensionFactory.java b/contrib/gdata-server/src/gom/java/org/apache/lucene/gdata/gom/core/extension/GOMExtensionFactory.java
new file mode 100644
index 00000000000..eddcfdfac73
--- /dev/null
+++ b/contrib/gdata-server/src/gom/java/org/apache/lucene/gdata/gom/core/extension/GOMExtensionFactory.java
@@ -0,0 +1,35 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.lucene.gdata.gom.core.extension;
+
+import java.util.List;
+
+import javax.xml.namespace.QName;
+
+import org.apache.lucene.gdata.gom.GOMExtension;
+import org.apache.lucene.gdata.gom.GOMNamespace;
+
+/**
+ * @author Simon Willnauer
+ *
+ */
+public interface GOMExtensionFactory {
+
+ public abstract List<GOMNamespace> getNamespaces();
+
+ public abstract GOMExtension canHandleExtensionElement(QName name);
+}
diff --git a/contrib/gdata-server/src/gom/java/org/apache/lucene/gdata/gom/core/utils/AtomParserUtils.java b/contrib/gdata-server/src/gom/java/org/apache/lucene/gdata/gom/core/utils/AtomParserUtils.java
new file mode 100644
index 00000000000..41549420c57
--- /dev/null
+++ b/contrib/gdata-server/src/gom/java/org/apache/lucene/gdata/gom/core/utils/AtomParserUtils.java
@@ -0,0 +1,174 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.lucene.gdata.gom.core.utils;
+
+import java.net.URI;
+import java.net.URISyntaxException;
+import java.util.regex.Pattern;
+
+import org.apache.lucene.gdata.gom.AtomMediaType;
+import org.apache.lucene.gdata.gom.GOMLink;
+
+/**
+ * @author Simon Willnauer
+ *
+ */
+public class AtomParserUtils {
+ private static final Pattern ATOM_MEDIA_TYPE_PATTERN = Pattern
+ .compile(".+/.+");
+
+ /**
+ * Replaces all xml character with the corresponding entity.
+ *
+ * <ul>
+ * <li>&lt;!ENTITY lt &quot;&amp;#38;#60;&quot;&gt;</li>
+ * <li>&lt;!ENTITY gt &quot;&amp;#62;&quot;&gt;</li>
+ * <li>&lt;!ENTITY amp &quot;&amp;#38;#38;&quot;&gt;</li>
+ * <li>&lt;!ENTITY apos &quot;&amp;#39;&quot;&gt;</li>
+ * <li>&lt;!ENTITY quot &quot;&amp;#34;&quot;&gt;</li>
+ * </ul>
+ *
+ * see <a
+ * href="http://www.w3.org/TR/2006/REC-xml-20060816/#intern-replacement">W3C
+ * specification</a>
+ *
+ * @param aString -
+ * a string may container xml characters like '<'
+ * @return the input string with escaped xml characters
+ */
+ public static String escapeXMLCharacter(String aString) {
+ StringBuilder builder = new StringBuilder();
+ char[] cs = aString.toCharArray();
+ for (int i = 0; i < cs.length; i++) {
+ switch (cs[i]) {
+ case '<':
+ builder.append("&lt;");
+ break;
+ case '>':
+ builder.append("&gt;");
+ break;
+ case '"':
+ builder.append("&quot;");
+ break;
+ case '\'':
+ builder.append("&apos;");
+ break;
+ case '&':
+ builder.append("&amp;");
+ break;
+ case '\0':
+ // this breaks some xml serializer like soap serializer -->
+ // remove it
+ break;
+ default:
+ builder.append(cs[i]);
+ }
+ }
+
+ return builder.toString();
+
+ }
+
+ /**
+ * @param aMediaType
+ * @return
+ */
+ public static boolean isAtomMediaType(String aMediaType) {
+ return (aMediaType == null || aMediaType.length() < 3) ? false
+ : ATOM_MEDIA_TYPE_PATTERN.matcher(aMediaType).matches();
+ }
+
+ /**
+ * @param aMediaType
+ * @return
+ */
+ public static AtomMediaType getAtomMediaType(String aMediaType) {
+ if (aMediaType == null || !isAtomMediaType(aMediaType))
+ throw new IllegalArgumentException(
+ "aMediaType must be a media type and not be null ");
+ if (aMediaType.endsWith("+xml") || aMediaType.endsWith("/xml"))
+ return AtomMediaType.XML;
+ if (aMediaType.startsWith("text/"))
+ return AtomMediaType.TEXT;
+ return AtomMediaType.BINARY;
+ }
+
+ /**
+ * @param xmlBase
+ * @param atomUri
+ * @return
+ * @throws URISyntaxException
+ */
+ public static String getAbsolutAtomURI(String xmlBase, String atomUri)
+ throws URISyntaxException {
+ if (atomUri == null)
+ throw new IllegalArgumentException("atomUri must not be null");
+ if (atomUri.startsWith("www."))
+ atomUri = "http://" + atomUri;
+ URI aUri = new URI(atomUri);
+
+ if (xmlBase == null || xmlBase.length() == 0) {
+ if (!aUri.isAbsolute()) {
+ throw new URISyntaxException(atomUri,
+ " -- no xml:base specified atom uri must be an absolute url");
+ }
+ }
+
+ return atomUri;
+ }
+
+ /**
+ * Compares two links with rel attribute "alternate" Checks if href and type
+ * are equal
+ *
+ * @param left -
+ * left link to compare
+ * @param right -
+ * right link to compare
+ * @return <code>true</code> if and only if href and type are equal,
+ * otherwise <code>false</code>
+ */
+ public static boolean compareAlternateLinks(GOMLink left, GOMLink right) {
+ if ((left.getType() == null) ^ right.getType() == null
+ || (left.getType() == null && right.getType() == null)) {
+ return false;
+ } else {
+ if (!left.getType().equalsIgnoreCase(right.getType()))
+ return false;
+ }
+
+ if (((left.getHrefLang() == null) ^ right.getHrefLang() == null)
+ || (left.getHrefLang() == null && right.getHrefLang() == null)) {
+ return false;
+ } else {
+ if (!left.getHrefLang().equalsIgnoreCase(right.getHrefLang()))
+ return false;
+ }
+ return true;
+
+ }
+
+ public static void main(String[] args) {
+ // String s = new String(
+ // "<!ENTITY lt \"&#38;#60;\"><!ENTITY gt \"&#62;\"><!ENTITY amp
+ // \"&#38;#38;\"><!ENTITY apos \"&#39;\"><!ENTITY quot \"&#34;\">");
+ // System.out.println(escapeXMLCharacter(s));
+ //
+ System.out.println(isAtomMediaType("t/h"));
+ }
+
+}
diff --git a/contrib/gdata-server/src/gom/java/org/apache/lucene/gdata/gom/core/utils/GOMUtils.java b/contrib/gdata-server/src/gom/java/org/apache/lucene/gdata/gom/core/utils/GOMUtils.java
new file mode 100644
index 00000000000..28d374f30d8
--- /dev/null
+++ b/contrib/gdata-server/src/gom/java/org/apache/lucene/gdata/gom/core/utils/GOMUtils.java
@@ -0,0 +1,424 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.lucene.gdata.gom.core.utils;
+
+import java.math.BigDecimal;
+import java.util.Calendar;
+import java.util.List;
+import java.util.TimeZone;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+import org.apache.lucene.gdata.gom.ContentType;
+import org.apache.lucene.gdata.gom.GOMAttribute;
+import org.apache.lucene.gdata.gom.GOMLink;
+import org.apache.lucene.gdata.gom.GOMNamespace;
+import org.apache.lucene.gdata.gom.core.GDataParseException;
+import org.apache.lucene.gdata.gom.core.GOMAttributeImpl;
+
+/**
+ * @author Simon Willnauer
+ *
+ */
+public class GOMUtils {
+
+ /*
+ * Possible values 2003-12-13T18:30:02Z 2003-12-13T18:30:02.25Z
+ * 2003-12-13T18:30:02+01:00 2003-12-13T18:30:02.25+01:00
+ */
+ private static final Pattern RFC3339_DATE_PATTERN = Pattern.compile(
+ "(\\d\\d\\d\\d)" + // #YEAR
+ "\\-(\\d\\d)" + // #MONTH
+ "\\-(\\d\\d)[Tt]" + // #DAY
+ "(\\d\\d)" + // #HOURS
+ ":(\\d\\d)" + // #MINUTES
+ ":(\\d\\d)" + // #SECONDS
+ "(\\.(\\d+))?" + // #MILLISorless
+ "([Zz]|((\\+|\\-)(\\d\\d):(\\d\\d)))?"// #TIMEZONESHIFT
+ , Pattern.COMMENTS);
+
+ static final String ATTRIBUTE_TYPE = "type";
+
+ static final GOMAttribute TEXT_TYPE;
+
+ static final GOMAttribute HTML_TYPE;
+
+ static final GOMAttribute XHTML_TYPE;
+
+ static final GOMAttribute TEXT_TYPE_DEFAULT_NS;
+
+ static final GOMAttribute HTML_TYPE_DEFAULT_NS;
+
+ static final GOMAttribute XHTML_TYPE_DEFAULT_NS;
+
+ static {
+ TEXT_TYPE = new GOMAttributeImpl(GOMNamespace.ATOM_NS_URI,
+ GOMNamespace.ATOM_NS_PREFIX, ATTRIBUTE_TYPE, ContentType.TEXT
+ .name().toLowerCase());
+ HTML_TYPE = new GOMAttributeImpl(GOMNamespace.ATOM_NS_URI,
+ GOMNamespace.ATOM_NS_PREFIX, ATTRIBUTE_TYPE, ContentType.HTML
+ .name().toLowerCase());
+ XHTML_TYPE = new GOMAttributeImpl(GOMNamespace.ATOM_NS_URI,
+ GOMNamespace.ATOM_NS_PREFIX, ATTRIBUTE_TYPE, ContentType.XHTML
+ .name().toLowerCase());
+
+ TEXT_TYPE_DEFAULT_NS = new GOMAttributeImpl(ATTRIBUTE_TYPE,
+ ContentType.TEXT.name().toLowerCase());
+ HTML_TYPE_DEFAULT_NS = new GOMAttributeImpl(ATTRIBUTE_TYPE,
+ ContentType.HTML.name().toLowerCase());
+ XHTML_TYPE_DEFAULT_NS = new GOMAttributeImpl(ATTRIBUTE_TYPE,
+ ContentType.XHTML.name().toLowerCase());
+
+ }
+
+ /**
+ * @param type
+ * @return
+ */
+ public static GOMAttribute getAttributeByContentType(ContentType type) {
+ switch (type) {
+ case HTML:
+ return HTML_TYPE;
+ case XHTML:
+ return XHTML_TYPE;
+
+ default:
+ return TEXT_TYPE;
+ }
+
+ }
+
+ /**
+ * @param type
+ * @return
+ */
+ public static GOMAttribute getAttributeByContentTypeDefaultNs(
+ ContentType type) {
+ if (type == null)
+ return TEXT_TYPE_DEFAULT_NS;
+ switch (type) {
+ case HTML:
+ return HTML_TYPE_DEFAULT_NS;
+ case XHTML:
+ return XHTML_TYPE_DEFAULT_NS;
+
+ default:
+ return TEXT_TYPE_DEFAULT_NS;
+ }
+
+ }
+
+ /**
+ * Builds a atom namespace attribute
+ *
+ * @param aValue
+ * attribute value
+ * @param aName
+ * attribute name
+ * @return a GOMAttribute
+ */
+ public static GOMAttribute buildAtomAttribute(String aValue, String aName) {
+ return new GOMAttributeImpl(GOMNamespace.ATOM_NS_URI,
+ GOMNamespace.ATOM_NS_PREFIX, aName, aValue);
+ }
+
+ /**
+ * @param aValue
+ * @param aName
+ * @return
+ */
+ public static GOMAttribute buildDefaultNamespaceAttribute(String aValue,
+ String aName) {
+ return new GOMAttributeImpl(aName, aValue);
+ }
+
+ /**
+ * @param aValue
+ * @param aName
+ * @return
+ */
+ public static GOMAttribute buildXMLNamespaceAttribute(String aValue,
+ String aName) {
+ return new GOMAttributeImpl(GOMNamespace.XML_NS_URI,
+ GOMNamespace.XML_NS_PREFIX, aName, aValue);
+ }
+
+ /**
+ * @param aString
+ * @return
+ */
+ public static boolean isRfc3339DateFormat(String aString) {
+ Matcher aMatcher = RFC3339_DATE_PATTERN.matcher(aString);
+ return aMatcher.matches();
+ }
+
+ /**
+ * @param aString
+ * @return
+ */
+ public static long parseRfc3339DateFormat(String aString) {
+ if (aString == null)
+ throw new IllegalArgumentException(
+ "Date-Time String must not be null");
+ Matcher aMatcher = RFC3339_DATE_PATTERN.matcher(aString);
+
+ if (!aMatcher.matches()) {
+ throw new GDataParseException(
+ "Invalid RFC3339 date / time pattern -- " + aString);
+ }
+ int grCount = aMatcher.groupCount();
+ if (grCount > 13)
+ throw new GDataParseException(
+ "Invalid RFC3339 date / time pattern -- " + aString);
+
+ Integer timeZoneShift = null;
+ Calendar dateTime = null;
+ try {
+
+ if (aMatcher.group(9) == null) {
+ // skip time zone
+ } else if (aMatcher.group(9).equalsIgnoreCase("Z")) {
+ timeZoneShift = new Integer(0);
+ } else {
+ timeZoneShift = new Integer((Integer
+ .valueOf(aMatcher.group(12)) * 60 + Integer
+ .valueOf(aMatcher.group(13))));
+ if (aMatcher.group(11).equals("-")) {
+ timeZoneShift = new Integer(-timeZoneShift.intValue());
+ }
+ }
+
+ dateTime = Calendar.getInstance(TimeZone.getTimeZone("GMT"));
+ ;
+ dateTime.clear();
+ dateTime.set(Integer.valueOf(aMatcher.group(1)), Integer
+ .valueOf(aMatcher.group(2)) - 1, Integer.valueOf(aMatcher
+ .group(3)), Integer.valueOf(aMatcher.group(4)), Integer
+ .valueOf(aMatcher.group(5)), Integer.valueOf(aMatcher
+ .group(6)));
+ // seconds with milliseconds
+ if (aMatcher.group(8) != null && aMatcher.group(8).length() > 0) {
+
+ dateTime.set(Calendar.MILLISECOND, new BigDecimal("0."/*
+ * use
+ * big
+ * dec
+ * this
+ * could
+ * be
+ * big!!
+ */
+ + aMatcher.group(8)).movePointRight(3).intValue());
+ }
+ } catch (NumberFormatException e) {
+ throw new GDataParseException(
+ "Invalid RFC3339 date / time pattern -- " + aString, e);
+ }
+
+ long retVal = dateTime.getTimeInMillis();
+ if (timeZoneShift != null) {
+ retVal -= timeZoneShift.intValue() * 60000;
+ }
+
+ return retVal;
+ }
+
+ /**
+ * @param aMillisecondLong
+ * @return
+ */
+ public static String buildRfc3339DateFormat(long aMillisecondLong) {
+ Calendar instance = Calendar.getInstance(TimeZone.getTimeZone("GMT"));
+ instance.setTimeInMillis(aMillisecondLong);
+
+ StringBuilder builder = new StringBuilder();
+ // 2003-12-13T18:30:02.25+01:00
+ int time = 0;
+ time = instance.get(Calendar.YEAR);
+ if (time < 1000)
+ builder.append("0");
+ if (time < 100)
+ builder.append("0");
+ if (time < 10)
+ builder.append("0");
+ builder.append(time);
+ builder.append('-');
+ time = instance.get(Calendar.MONTH);
+ if (time < 10)
+ builder.append(0);
+ builder.append(time);
+ builder.append('-');
+ time = instance.get(Calendar.DAY_OF_MONTH);
+ if (time < 10)
+ builder.append(0);
+ builder.append(time);
+ builder.append('T');
+ time = instance.get(Calendar.HOUR_OF_DAY);
+ if (time < 10)
+ builder.append(0);
+ builder.append(time);
+ builder.append(':');
+ time = instance.get(Calendar.MINUTE);
+ if (time < 10)
+ builder.append(0);
+ builder.append(time);
+ builder.append(':');
+ time = instance.get(Calendar.SECOND);
+ if (time < 10)
+ builder.append(0);
+ builder.append(time);
+ builder.append('.');
+ builder.append(instance.get(Calendar.MILLISECOND));
+ // this is always GMT offset -> 0
+ builder.append('Z');
+
+ return builder.toString();
+ }
+
+ /**
+ * @param aMillisecondLong
+ * @return
+ */
+ public static String buildRfc822Date(long aMillisecondLong) {
+ /*
+ * Rather implement it for a special case as use SDF. SDF is very
+ * expensive to create and not thread safe so it should be synchronized
+ * of pooled
+ */
+ Calendar instance = Calendar.getInstance(TimeZone.getTimeZone("GMT"));
+ instance.setTimeInMillis(aMillisecondLong);
+
+ StringBuilder builder = new StringBuilder();
+ // Sun, 06 Aug 2006 00:53:49 +0000
+ // EEE, dd MMM yyyy HH:mm:ss Z
+
+ switch (instance.get(Calendar.DAY_OF_WEEK)) {
+ case Calendar.SUNDAY:
+ builder.append("Sun");
+ break;
+ case Calendar.MONDAY:
+ builder.append("Mon");
+ break;
+ case Calendar.TUESDAY:
+ builder.append("Tue");
+ break;
+ case Calendar.WEDNESDAY:
+ builder.append("Wed");
+ break;
+ case Calendar.THURSDAY:
+ builder.append("Thu");
+ break;
+ case Calendar.FRIDAY:
+ builder.append("Fri");
+ break;
+ case Calendar.SATURDAY:
+ builder.append("Sat");
+ break;
+ default:
+ break;
+ }
+ builder.append(',');
+ builder.append(' ');
+
+ int time = 0;
+ time = instance.get(Calendar.DAY_OF_MONTH);
+ if (time < 10)
+ builder.append(0);
+ builder.append(time);
+ builder.append(' ');
+ switch (instance.get(Calendar.MONTH)) {
+ case Calendar.JANUARY:
+ builder.append("Jan");
+ break;
+ case Calendar.FEBRUARY:
+ builder.append("Feb");
+ break;
+ case Calendar.MARCH:
+ builder.append("Mar");
+ break;
+ case Calendar.APRIL:
+ builder.append("Apr");
+ break;
+ case Calendar.MAY:
+ builder.append("May");
+ break;
+ case Calendar.JUNE:
+ builder.append("Jun");
+ break;
+ case Calendar.JULY:
+ builder.append("Jul");
+ break;
+ case Calendar.AUGUST:
+ builder.append("Aug");
+ break;
+ case Calendar.SEPTEMBER:
+ builder.append("Sep");
+ break;
+ case Calendar.OCTOBER:
+ builder.append("Oct");
+ break;
+ case Calendar.NOVEMBER:
+ builder.append("Nov");
+ break;
+ case Calendar.DECEMBER:
+ builder.append("Dec");
+ break;
+
+ default:
+ break;
+ }
+ builder.append(' ');
+ time = instance.get(Calendar.YEAR);
+ if (time < 1000)
+ builder.append("0");
+ if (time < 100)
+ builder.append("0");
+ if (time < 10)
+ builder.append("0");
+ builder.append(time);
+ builder.append(' ');
+
+ time = instance.get(Calendar.HOUR_OF_DAY);
+ if (time < 10)
+ builder.append(0);
+ builder.append(time);
+ builder.append(':');
+ time = instance.get(Calendar.MINUTE);
+ if (time < 10)
+ builder.append(0);
+ builder.append(time);
+ builder.append(':');
+ time = instance.get(Calendar.SECOND);
+ if (time < 10)
+ builder.append(0);
+ builder.append(time);
+
+ // this is always GMT offset -> 0
+ builder.append(" +0000");
+ return builder.toString();
+ }
+
+ public GOMLink getHtmlLink(List<GOMLink> links) {
+ for (GOMLink link : links) {
+ if ((link.getRel() == null || link.getRel().equals("alternate"))
+ && (link.getType() == null || link.getType()
+ .equalsIgnoreCase("html")))
+ return link;
+ }
+ return null;
+ }
+}
diff --git a/contrib/gdata-server/src/gom/java/org/apache/lucene/gdata/gom/gom-aid.ucd b/contrib/gdata-server/src/gom/java/org/apache/lucene/gdata/gom/gom-aid.ucd
new file mode 100644
index 00000000000..13d0c02e624
--- /dev/null
+++ b/contrib/gdata-server/src/gom/java/org/apache/lucene/gdata/gom/gom-aid.ucd
@@ -0,0 +1,182 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<editmodel:ClassDiagramEditModel xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:editmodel="editmodel.xmi" xmlns:options="options.xmi" name="gom-aid" id="org.apache.lucene.gdata.gom" metadata="uml2-1.0" initialized="true" scrolledY="430" tag="1000" key="3230303631303036204764617461556D6C2F73696D6F6E">
+ <children xsi:type="editmodel:InterfaceEditModel" name="GOMDocument" location="830,279" size="227,233" id="org.apache.lucene.gdata.gom/GOMDocument" runTimeClassModel="setCharacterEncoding(Ljava.lang.String;),setVersion(Ljava.lang.String;),writeRssOutput(Ljavax.xml.stream.XMLStreamWriter;),getCharacterEncoding(),getRootElement(),writeAtomOutput(Ljavax.xml.stream.XMLStreamWriter;),getVersion(),setRootElement">
+ <children xsi:type="editmodel:CompartmentEditModel"/>
+ <children xsi:type="editmodel:CompartmentEditModel" size="204,144">
+ <children xsi:type="editmodel:MethodEditModel" name="setCharacterEncoding" id="org.apache.lucene.gdata.gom/GOMDocument#setCharacterEncoding(Ljava.lang.String;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getCharacterEncoding" id="org.apache.lucene.gdata.gom/GOMDocument#getCharacterEncoding()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getVersion" id="org.apache.lucene.gdata.gom/GOMDocument#getVersion()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="setVersion" id="org.apache.lucene.gdata.gom/GOMDocument#setVersion(Ljava.lang.String;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="writeRssOutput" id="org.apache.lucene.gdata.gom/GOMDocument#writeRssOutput(Ljavax.xml.stream.XMLStreamWriter;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="setRootElement" id="org.apache.lucene.gdata.gom/GOMDocument#setRootElement"/>
+ <children xsi:type="editmodel:MethodEditModel" name="writeAtomOutput" id="org.apache.lucene.gdata.gom/GOMDocument#writeAtomOutput(Ljavax.xml.stream.XMLStreamWriter;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getRootElement" id="org.apache.lucene.gdata.gom/GOMDocument#getRootElement()"/>
+ </children>
+ <children xsi:type="editmodel:CompartmentEditModel"/>
+ <sourceConnections xsi:type="editmodel:DependencyEditModel" autoLocated="true" id="org.apache.lucene.gdata.gom/GOMDocument->org.apache.lucene.gdata.gom/GOMElement" source="//@children.0" target="//@children.7" targetEnd="//@children.0/@sourceConnections.0/@children.2" label="//@children.0/@sourceConnections.0/@children.0" sourceEnd="//@children.0/@sourceConnections.0/@children.1" connectionRouterKind="Manhattan">
+ <children xsi:type="editmodel:WireLabelEditModel" name="«import»" size="29,10" fontInfo="Arial-8-0" anchorKind="MiddlePart"/>
+ <children xsi:type="editmodel:AssociationEndEditModel" location="0,116" attachSource="true"/>
+ <children xsi:type="editmodel:AssociationEndEditModel" location="227,134"/>
+ </sourceConnections>
+ <classifierPreferences xsi:type="editmodel:UMLClassDiagramClassifierPreference" showStereotype="true" showMethodsParameterTypes="true" showMethodsReturnType="true" showMethodsParameterNames="true" showMethodsParameterKinds="true" attributeSorter="Natural" methodSorter="Natural" innerClassSorter="Natural" showPrivateAttributes="true" showProtectedAttributes="true" showPublicAttributes="true" showPackageAttributes="true" showStaticAttributes="true" showProtectedMethods="true" showPublicMethods="true" showPackageMethods="true" showPrivateMethods="true" showStaticMethods="true" showProtectedInnerClasses="true" showPublicInnerClasses="true" showPackageInnerClasses="true" showPrivateInnerClasses="true" showStaticInnerClasses="true" showAssociationMember="true" showMethods="true" showLiterals="true"/>
+ </children>
+ <children xsi:type="editmodel:InterfaceEditModel" name="GOMExtension" location="92,580" size="116,107" id="org.apache.lucene.gdata.gom/GOMExtension" runTimeClassModel="">
+ <children xsi:type="editmodel:CompartmentEditModel"/>
+ <children xsi:type="editmodel:CompartmentEditModel"/>
+ <children xsi:type="editmodel:CompartmentEditModel"/>
+ <sourceConnections xsi:type="editmodel:GeneralizationEditModel" autoLocated="true" id="org.apache.lucene.gdata.gom/GOMElement&lt;-org.apache.lucene.gdata.gom/GOMExtension" source="//@children.1" target="//@children.5/@sourceConnections.0" targetEnd="//@children.1/@sourceConnections.0/@children.1" sourceEnd="//@children.1/@sourceConnections.0/@children.0" connectionRouterKind="GeneralizationManhattan">
+ <children xsi:type="editmodel:AssociationEndEditModel" location="58,0" anchorKind="FixedAtEdge" attachSource="true"/>
+ <children xsi:type="editmodel:AssociationEndEditModel" location="203,224"/>
+ </sourceConnections>
+ <sourceConnections xsi:type="editmodel:GeneralizationEditModel" autoLocated="true" id="org.apache.lucene.gdata.gom/GOMXmlEntity&lt;-org.apache.lucene.gdata.gom/GOMExtension" source="//@children.1" target="//@children.4/@sourceConnections.0" targetEnd="//@children.1/@sourceConnections.1/@children.1" sourceEnd="//@children.1/@sourceConnections.1/@children.0" connectionRouterKind="GeneralizationManhattan">
+ <children xsi:type="editmodel:AssociationEndEditModel" location="45,0" attachSource="true"/>
+ <children xsi:type="editmodel:AssociationEndEditModel" location="0,1"/>
+ <bendpoints location="553,525" secondRelativeDimension="-148,344" firstRelativeDimension="16,-24"/>
+ <bendpoints location="553,206" secondRelativeDimension="-100,58" firstRelativeDimension="47,-342"/>
+ <bendpoints location="686,206" secondRelativeDimension="-11,25" firstRelativeDimension="161,-341"/>
+ </sourceConnections>
+ <classifierPreferences xsi:type="editmodel:UMLClassDiagramClassifierPreference" showStereotype="true" showMethodsParameterTypes="true" showMethodsReturnType="true" showMethodsParameterNames="true" showMethodsParameterKinds="true" attributeSorter="Natural" methodSorter="Natural" innerClassSorter="Natural" showPrivateAttributes="true" showProtectedAttributes="true" showPublicAttributes="true" showPackageAttributes="true" showStaticAttributes="true" showProtectedMethods="true" showPublicMethods="true" showPackageMethods="true" showPrivateMethods="true" showStaticMethods="true" showProtectedInnerClasses="true" showPublicInnerClasses="true" showPackageInnerClasses="true" showPrivateInnerClasses="true" showStaticInnerClasses="true" showAssociationMember="true" showMethods="true" showAttributes="true" showLiterals="true"/>
+ </children>
+ <children xsi:type="editmodel:InterfaceEditModel" targetConnections="//@children.3/@sourceConnections.3" name="GOMAuthor" location="300,580" size="99,69" id="org.apache.lucene.gdata.gom/GOMAuthor" runTimeClassModel="">
+ <children xsi:type="editmodel:CompartmentEditModel"/>
+ <children xsi:type="editmodel:CompartmentEditModel"/>
+ <children xsi:type="editmodel:CompartmentEditModel"/>
+ <sourceConnections xsi:type="editmodel:GeneralizationEditModel" autoLocated="true" id="org.apache.lucene.gdata.gom/GOMElement&lt;-org.apache.lucene.gdata.gom/GOMAuthor" source="//@children.2" target="//@children.5/@sourceConnections.0" targetEnd="//@children.2/@sourceConnections.0/@children.1" sourceEnd="//@children.2/@sourceConnections.0/@children.0" connectionRouterKind="GeneralizationManhattan">
+ <children xsi:type="editmodel:AssociationEndEditModel" location="49,0" anchorKind="FixedAtEdge" attachSource="true"/>
+ <children xsi:type="editmodel:AssociationEndEditModel" location="0,234"/>
+ </sourceConnections>
+ <classifierPreferences xsi:type="editmodel:UMLClassDiagramClassifierPreference" showStereotype="true" showMethodsParameterTypes="true" showMethodsReturnType="true" showMethodsParameterNames="true" showMethodsParameterKinds="true" attributeSorter="Natural" methodSorter="Natural" innerClassSorter="Natural" showPrivateAttributes="true" showProtectedAttributes="true" showPublicAttributes="true" showPackageAttributes="true" showStaticAttributes="true" showProtectedMethods="true" showPublicMethods="true" showPackageMethods="true" showPrivateMethods="true" showStaticMethods="true" showProtectedInnerClasses="true" showPublicInnerClasses="true" showPackageInnerClasses="true" showPrivateInnerClasses="true" showStaticInnerClasses="true" showAssociationMember="true" showMethods="true"/>
+ </children>
+ <children xsi:type="editmodel:InterfaceEditModel" name="GOMFeed" location="429,580" size="217,647" id="org.apache.lucene.gdata.gom/GOMFeed" runTimeClassModel="oPENSEARCH_NS_PREFIX,getId(),addAuthor(Lorg.apache.lucene.gdata.gom.GOMAuthor;),addEntry(Lorg.apache.lucene.gdata.gom.GOMEntry;),getLogo(),getTitle(),getRights(),setId(Lorg.apache.lucene.gdata.gom.GOMId;),getIcon(),setIcon(Lorg.apache.lucene.gdata.gom.GOMIcon;),setTitle(Lorg.apache.lucene.gdata.gom.GOMTitle;),getNamespaces(),setGenerator(Lorg.apache.lucene.gdata.gom.GOMGenerator;),lOCALNAME_RSS,getAuthors(),getLinks(),setRights(Lorg.apache.lucene.gdata.gom.GOMRights;),addContributor(Lorg.apache.lucene.gdata.gom.GOMContributor;),addNamespace(Lorg.apache.lucene.gdata.gom.core.GOMNamespace;),setSubtitle(Lorg.apache.lucene.gdata.gom.GOMSubtitle;),lOCALNAME,getUpdated(),setLogo(Lorg.apache.lucene.gdata.gom.GOMLogo;),getSubtitle(),getGenerator(),addCategory(Lorg.apache.lucene.gdata.gom.GOMCategory;),setUpdated(Lorg.apache.lucene.gdata.gom.GOMTime;),oPENSEARCH_NS_URI,getCategories(),getEntries(),getContributor()">
+ <children xsi:type="editmodel:CompartmentEditModel" size="146,72">
+ <children xsi:type="editmodel:AttributeEditModel" name="oPENSEARCH_NS_PREFIX" id="org.apache.lucene.gdata.gom/GOMFeed#oPENSEARCH_NS_PREFIX"/>
+ <children xsi:type="editmodel:AttributeEditModel" name="lOCALNAME_RSS" id="org.apache.lucene.gdata.gom/GOMFeed#lOCALNAME_RSS"/>
+ <children xsi:type="editmodel:AttributeEditModel" name="oPENSEARCH_NS_URI" id="org.apache.lucene.gdata.gom/GOMFeed#oPENSEARCH_NS_URI"/>
+ <children xsi:type="editmodel:AttributeEditModel" name="lOCALNAME" id="org.apache.lucene.gdata.gom/GOMFeed#lOCALNAME"/>
+ </children>
+ <children xsi:type="editmodel:CompartmentEditModel" size="194,486">
+ <children xsi:type="editmodel:MethodEditModel" name="addEntry" id="org.apache.lucene.gdata.gom/GOMFeed#addEntry(Lorg.apache.lucene.gdata.gom.GOMEntry;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getEntries" id="org.apache.lucene.gdata.gom/GOMFeed#getEntries()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="addAuthor" id="org.apache.lucene.gdata.gom/GOMFeed#addAuthor(Lorg.apache.lucene.gdata.gom.GOMAuthor;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getAuthors" id="org.apache.lucene.gdata.gom/GOMFeed#getAuthors()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="setId" id="org.apache.lucene.gdata.gom/GOMFeed#setId(Lorg.apache.lucene.gdata.gom.GOMId;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getId" id="org.apache.lucene.gdata.gom/GOMFeed#getId()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getCategories" id="org.apache.lucene.gdata.gom/GOMFeed#getCategories()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="addContributor" id="org.apache.lucene.gdata.gom/GOMFeed#addContributor(Lorg.apache.lucene.gdata.gom.GOMContributor;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="addCategory" id="org.apache.lucene.gdata.gom/GOMFeed#addCategory(Lorg.apache.lucene.gdata.gom.GOMCategory;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getContributor" id="org.apache.lucene.gdata.gom/GOMFeed#getContributor()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getGenerator" id="org.apache.lucene.gdata.gom/GOMFeed#getGenerator()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="setGenerator" id="org.apache.lucene.gdata.gom/GOMFeed#setGenerator(Lorg.apache.lucene.gdata.gom.GOMGenerator;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="setLogo" id="org.apache.lucene.gdata.gom/GOMFeed#setLogo(Lorg.apache.lucene.gdata.gom.GOMLogo;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getLogo" id="org.apache.lucene.gdata.gom/GOMFeed#getLogo()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getRights" id="org.apache.lucene.gdata.gom/GOMFeed#getRights()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getLinks" id="org.apache.lucene.gdata.gom/GOMFeed#getLinks()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="setSubtitle" id="org.apache.lucene.gdata.gom/GOMFeed#setSubtitle(Lorg.apache.lucene.gdata.gom.GOMSubtitle;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="setIcon" id="org.apache.lucene.gdata.gom/GOMFeed#setIcon(Lorg.apache.lucene.gdata.gom.GOMIcon;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getSubtitle" id="org.apache.lucene.gdata.gom/GOMFeed#getSubtitle()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="setRights" id="org.apache.lucene.gdata.gom/GOMFeed#setRights(Lorg.apache.lucene.gdata.gom.GOMRights;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getUpdated" id="org.apache.lucene.gdata.gom/GOMFeed#getUpdated()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="setUpdated" id="org.apache.lucene.gdata.gom/GOMFeed#setUpdated(Lorg.apache.lucene.gdata.gom.GOMTime;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getTitle" id="org.apache.lucene.gdata.gom/GOMFeed#getTitle()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getNamespaces" id="org.apache.lucene.gdata.gom/GOMFeed#getNamespaces()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getIcon" id="org.apache.lucene.gdata.gom/GOMFeed#getIcon()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="setTitle" id="org.apache.lucene.gdata.gom/GOMFeed#setTitle(Lorg.apache.lucene.gdata.gom.GOMTitle;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="addNamespace" id="org.apache.lucene.gdata.gom/GOMFeed#addNamespace(Lorg.apache.lucene.gdata.gom.core.GOMNamespace;)"/>
+ </children>
+ <children xsi:type="editmodel:CompartmentEditModel"/>
+ <sourceConnections xsi:type="editmodel:GeneralizationEditModel" autoLocated="true" id="org.apache.lucene.gdata.gom/GOMElement&lt;-org.apache.lucene.gdata.gom/GOMFeed" source="//@children.3" target="//@children.5/@sourceConnections.0" targetEnd="//@children.3/@sourceConnections.0/@children.1" sourceEnd="//@children.3/@sourceConnections.0/@children.0" connectionRouterKind="GeneralizationManhattan">
+ <children xsi:type="editmodel:AssociationEndEditModel" location="106,0" anchorKind="FixedAtEdge" attachSource="true"/>
+ <children xsi:type="editmodel:AssociationEndEditModel" location="58,269"/>
+ </sourceConnections>
+ <sourceConnections xsi:type="editmodel:DependencyEditModel" autoLocated="true" id="org.apache.lucene.gdata.gom/GOMFeed->org.apache.lucene.gdata.gom/GOMEntry" source="//@children.3" target="//@children.5" targetEnd="//@children.3/@sourceConnections.1/@children.2" label="//@children.3/@sourceConnections.1/@children.0" sourceEnd="//@children.3/@sourceConnections.1/@children.1" connectionRouterKind="Manhattan">
+ <children xsi:type="editmodel:WireLabelEditModel" name="«import»" size="29,10" fontInfo="Arial-8-0" anchorKind="MiddlePart"/>
+ <children xsi:type="editmodel:AssociationEndEditModel" location="214,89" attachSource="true"/>
+ <children xsi:type="editmodel:AssociationEndEditModel" location="0,34"/>
+ </sourceConnections>
+ <sourceConnections xsi:type="editmodel:GeneralizationEditModel" autoLocated="true" id="org.apache.lucene.gdata.gom/GOMXmlEntity&lt;-org.apache.lucene.gdata.gom/GOMFeed" source="//@children.3" target="//@children.4/@sourceConnections.0" targetEnd="//@children.3/@sourceConnections.2/@children.1" sourceEnd="//@children.3/@sourceConnections.2/@children.0" connectionRouterKind="GeneralizationManhattan">
+ <children xsi:type="editmodel:AssociationEndEditModel" location="0,16" attachSource="true"/>
+ <children xsi:type="editmodel:AssociationEndEditModel" location="1,1"/>
+ <bendpoints location="910,525" secondRelativeDimension="141,344" firstRelativeDimension="14,-24"/>
+ <bendpoints location="910,206" secondRelativeDimension="92,56" firstRelativeDimension="48,-342"/>
+ <bendpoints location="879,206" secondRelativeDimension="61,45" firstRelativeDimension="23,-341"/>
+ </sourceConnections>
+ <sourceConnections xsi:type="editmodel:DependencyEditModel" autoLocated="true" id="org.apache.lucene.gdata.gom/GOMFeed->org.apache.lucene.gdata.gom/GOMAuthor" source="//@children.3" target="//@children.2" targetEnd="//@children.3/@sourceConnections.3/@children.2" label="//@children.3/@sourceConnections.3/@children.0" sourceEnd="//@children.3/@sourceConnections.3/@children.1" connectionRouterKind="Manhattan">
+ <children xsi:type="editmodel:WireLabelEditModel" name="«import»" size="29,10" fontInfo="Arial-8-0" anchorKind="MiddlePart"/>
+ <children xsi:type="editmodel:AssociationEndEditModel" location="0,34" attachSource="true"/>
+ <children xsi:type="editmodel:AssociationEndEditModel" location="72,34"/>
+ </sourceConnections>
+ <classifierPreferences xsi:type="editmodel:UMLClassDiagramClassifierPreference" showStereotype="true" showMethodsParameterTypes="true" showMethodsReturnType="true" showMethodsParameterNames="true" showMethodsParameterKinds="true" attributeSorter="Natural" methodSorter="Natural" innerClassSorter="Natural" showPrivateAttributes="true" showProtectedAttributes="true" showPublicAttributes="true" showPackageAttributes="true" showStaticAttributes="true" showProtectedMethods="true" showPublicMethods="true" showPackageMethods="true" showPrivateMethods="true" showStaticMethods="true" showProtectedInnerClasses="true" showPublicInnerClasses="true" showPackageInnerClasses="true" showPrivateInnerClasses="true" showStaticInnerClasses="true" showAssociationMember="true" showMethods="true" showAttributes="true" showLiterals="true"/>
+ </children>
+ <children xsi:type="editmodel:InterfaceEditModel" targetConnections="//@children.7/@sourceConnections.1" name="GOMAttribute" location="50,261" size="108,69" id="org.apache.lucene.gdata.gom/GOMAttribute" runTimeClassModel="">
+ <children xsi:type="editmodel:CompartmentEditModel"/>
+ <children xsi:type="editmodel:CompartmentEditModel"/>
+ <children xsi:type="editmodel:CompartmentEditModel"/>
+ <sourceConnections xsi:type="editmodel:GeneralizationEditModel" targetConnections="//@children.7/@sourceConnections.0 //@children.1/@sourceConnections.1 //@children.3/@sourceConnections.2 //@children.5/@sourceConnections.1" autoLocated="true" id="org.apache.lucene.gdata.gom/GOMXmlEntity&lt;-org.apache.lucene.gdata.gom/GOMAttribute" source="//@children.4" target="//@children.6" targetEnd="//@children.4/@sourceConnections.0/@children.1" sourceEnd="//@children.4/@sourceConnections.0/@children.0" connectionRouterKind="GeneralizationManhattan">
+ <children xsi:type="editmodel:AssociationEndEditModel" location="54,0" anchorKind="FixedAtEdge" attachSource="true"/>
+ <children xsi:type="editmodel:AssociationEndEditModel" location="85,197" anchorKind="FixedAtEdge"/>
+ </sourceConnections>
+ <classifierPreferences xsi:type="editmodel:UMLClassDiagramClassifierPreference" showStereotype="true" showMethodsParameterTypes="true" showMethodsReturnType="true" showMethodsParameterNames="true" showMethodsParameterKinds="true" attributeSorter="Natural" methodSorter="Natural" innerClassSorter="Natural" showPrivateAttributes="true" showProtectedAttributes="true" showPublicAttributes="true" showPackageAttributes="true" showStaticAttributes="true" showProtectedMethods="true" showPublicMethods="true" showPackageMethods="true" showPrivateMethods="true" showStaticMethods="true" showProtectedInnerClasses="true" showPublicInnerClasses="true" showPackageInnerClasses="true" showPrivateInnerClasses="true" showStaticInnerClasses="true" showAssociationMember="true" showMethods="true" showAttributes="true" showLiterals="true"/>
+ </children>
+ <children xsi:type="editmodel:InterfaceEditModel" targetConnections="//@children.3/@sourceConnections.1" name="GOMEntry" location="607,580" size="92,69" id="org.apache.lucene.gdata.gom/GOMEntry" runTimeClassModel="">
+ <children xsi:type="editmodel:CompartmentEditModel"/>
+ <children xsi:type="editmodel:CompartmentEditModel"/>
+ <children xsi:type="editmodel:CompartmentEditModel"/>
+ <sourceConnections xsi:type="editmodel:GeneralizationEditModel" targetConnections="//@children.3/@sourceConnections.0 //@children.1/@sourceConnections.0 //@children.2/@sourceConnections.0" autoLocated="true" id="org.apache.lucene.gdata.gom/GOMElement&lt;-org.apache.lucene.gdata.gom/GOMEntry" source="//@children.5" target="//@children.7" targetEnd="//@children.5/@sourceConnections.0/@children.1" sourceEnd="//@children.5/@sourceConnections.0/@children.0" connectionRouterKind="GeneralizationManhattan">
+ <children xsi:type="editmodel:AssociationEndEditModel" location="46,0" anchorKind="FixedAtEdge" attachSource="true"/>
+ <children xsi:type="editmodel:AssociationEndEditModel" location="112,269" anchorKind="FixedAtEdge"/>
+ </sourceConnections>
+ <sourceConnections xsi:type="editmodel:GeneralizationEditModel" autoLocated="true" id="org.apache.lucene.gdata.gom/GOMXmlEntity&lt;-org.apache.lucene.gdata.gom/GOMEntry" source="//@children.5" target="//@children.4/@sourceConnections.0" targetEnd="//@children.5/@sourceConnections.1/@children.1" sourceEnd="//@children.5/@sourceConnections.1/@children.0" connectionRouterKind="Manual">
+ <children xsi:type="editmodel:AssociationEndEditModel" location="10,0" attachSource="true"/>
+ <children xsi:type="editmodel:AssociationEndEditModel" location="1,1"/>
+ <bendpoints location="1003,525" secondRelativeDimension="216,344" firstRelativeDimension="0,-24"/>
+ <bendpoints location="1003,206" secondRelativeDimension="185,74" firstRelativeDimension="1,-342"/>
+ <bendpoints location="879,206" secondRelativeDimension="61,45" firstRelativeDimension="-111,-341"/>
+ </sourceConnections>
+ <classifierPreferences xsi:type="editmodel:UMLClassDiagramClassifierPreference" showStereotype="true" showMethodsParameterTypes="true" showMethodsReturnType="true" showMethodsParameterNames="true" showMethodsParameterKinds="true" attributeSorter="Natural" methodSorter="Natural" innerClassSorter="Natural" showPrivateAttributes="true" showProtectedAttributes="true" showPublicAttributes="true" showPackageAttributes="true" showStaticAttributes="true" showProtectedMethods="true" showPublicMethods="true" showPackageMethods="true" showPrivateMethods="true" showStaticMethods="true" showProtectedInnerClasses="true" showPublicInnerClasses="true" showPackageInnerClasses="true" showPrivateInnerClasses="true" showStaticInnerClasses="true" showAssociationMember="true" showMethods="true" showAttributes="true" showLiterals="true"/>
+ </children>
+ <children xsi:type="editmodel:InterfaceEditModel" targetConnections="//@children.4/@sourceConnections.0" name="GOMXmlEntity" location="510,0" size="173,197" id="org.apache.lucene.gdata.gom/GOMXmlEntity" runTimeClassModel="setLocalName(Ljava.lang.String;),setTextValue(Ljava.lang.String;),setQName(Ljavax.xml.namespace.QName;),getQname(),getTextValue(),getLocalName()">
+ <children xsi:type="editmodel:CompartmentEditModel"/>
+ <children xsi:type="editmodel:CompartmentEditModel" size="150,108">
+ <children xsi:type="editmodel:MethodEditModel" name="getQname" id="org.apache.lucene.gdata.gom/GOMXmlEntity#getQname()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getTextValue" id="org.apache.lucene.gdata.gom/GOMXmlEntity#getTextValue()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="setQName" id="org.apache.lucene.gdata.gom/GOMXmlEntity#setQName(Ljavax.xml.namespace.QName;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="setTextValue" id="org.apache.lucene.gdata.gom/GOMXmlEntity#setTextValue(Ljava.lang.String;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getLocalName" id="org.apache.lucene.gdata.gom/GOMXmlEntity#getLocalName()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="setLocalName" id="org.apache.lucene.gdata.gom/GOMXmlEntity#setLocalName(Ljava.lang.String;)"/>
+ </children>
+ <children xsi:type="editmodel:CompartmentEditModel"/>
+ <classifierPreferences xsi:type="editmodel:UMLClassDiagramClassifierPreference" showStereotype="true" showMethodsParameterTypes="true" showMethodsReturnType="true" showMethodsParameterNames="true" showMethodsParameterKinds="true" attributeSorter="Natural" methodSorter="Natural" innerClassSorter="Natural" showPrivateAttributes="true" showProtectedAttributes="true" showPublicAttributes="true" showPackageAttributes="true" showStaticAttributes="true" showProtectedMethods="true" showPublicMethods="true" showPackageMethods="true" showPrivateMethods="true" showStaticMethods="true" showProtectedInnerClasses="true" showPublicInnerClasses="true" showPackageInnerClasses="true" showPrivateInnerClasses="true" showStaticInnerClasses="true" showAssociationMember="true" showMethods="true" showLiterals="true"/>
+ </children>
+ <children xsi:type="editmodel:InterfaceEditModel" targetConnections="//@children.0/@sourceConnections.0 //@children.5/@sourceConnections.0" name="GOMElement" location="312,261" size="227,269" id="org.apache.lucene.gdata.gom/GOMElement" runTimeClassModel="getAttributes(),aTOM_NS_URI,addChild(Lorg.apache.lucene.gdata.gom.GOMElement;),aTOM_NS_PREFIX,writeRssOutput(Ljavax.xml.stream.XMLStreamWriter;),getParent(),addAttribute(Lorg.apache.lucene.gdata.gom.GOMAttribute;),getChildren(),writeAtomOutput(Ljavax.xml.stream.XMLStreamWriter;)">
+ <children xsi:type="editmodel:CompartmentEditModel" size="114,36">
+ <children xsi:type="editmodel:AttributeEditModel" name="aTOM_NS_URI" id="org.apache.lucene.gdata.gom/GOMElement#aTOM_NS_URI"/>
+ <children xsi:type="editmodel:AttributeEditModel" name="aTOM_NS_PREFIX" id="org.apache.lucene.gdata.gom/GOMElement#aTOM_NS_PREFIX"/>
+ </children>
+ <children xsi:type="editmodel:CompartmentEditModel" size="204,180">
+ <children xsi:type="editmodel:MethodEditModel" name="addAttribute" id="org.apache.lucene.gdata.gom/GOMElement#addAttribute(Lorg.apache.lucene.gdata.gom.GOMAttribute;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="addChild" id="org.apache.lucene.gdata.gom/GOMElement#addChild(Lorg.apache.lucene.gdata.gom.GOMElement;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getAttributes" id="org.apache.lucene.gdata.gom/GOMElement#getAttributes()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getChildren" id="org.apache.lucene.gdata.gom/GOMElement#getChildren()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="getParent" id="org.apache.lucene.gdata.gom/GOMElement#getParent()"/>
+ <children xsi:type="editmodel:MethodEditModel" name="writeAtomOutput" id="org.apache.lucene.gdata.gom/GOMElement#writeAtomOutput(Ljavax.xml.stream.XMLStreamWriter;)"/>
+ <children xsi:type="editmodel:MethodEditModel" name="writeRssOutput" id="org.apache.lucene.gdata.gom/GOMElement#writeRssOutput(Ljavax.xml.stream.XMLStreamWriter;)"/>
+ </children>
+ <children xsi:type="editmodel:CompartmentEditModel"/>
+ <sourceConnections xsi:type="editmodel:GeneralizationEditModel" autoLocated="true" id="org.apache.lucene.gdata.gom/GOMXmlEntity&lt;-org.apache.lucene.gdata.gom/GOMElement" source="//@children.7" target="//@children.4/@sourceConnections.0" targetEnd="//@children.7/@sourceConnections.0/@children.1" sourceEnd="//@children.7/@sourceConnections.0/@children.0" connectionRouterKind="GeneralizationManhattan">
+ <children xsi:type="editmodel:AssociationEndEditModel" location="112,0" anchorKind="FixedAtEdge" attachSource="true"/>
+ <children xsi:type="editmodel:AssociationEndEditModel" location="91,161"/>
+ </sourceConnections>
+ <sourceConnections xsi:type="editmodel:DependencyEditModel" autoLocated="true" id="org.apache.lucene.gdata.gom/GOMElement->org.apache.lucene.gdata.gom/GOMAttribute" source="//@children.7" target="//@children.4" targetEnd="//@children.7/@sourceConnections.1/@children.2" label="//@children.7/@sourceConnections.1/@children.0" sourceEnd="//@children.7/@sourceConnections.1/@children.1" connectionRouterKind="Manhattan">
+ <children xsi:type="editmodel:WireLabelEditModel" name="«import»" size="29,10" fontInfo="Arial-8-0" anchorKind="MiddlePart"/>
+ <children xsi:type="editmodel:AssociationEndEditModel" location="0,34" attachSource="true"/>
+ <children xsi:type="editmodel:AssociationEndEditModel" location="108,34"/>
+ </sourceConnections>
+ <classifierPreferences xsi:type="editmodel:UMLClassDiagramClassifierPreference" showStereotype="true" showMethodsParameterTypes="true" showMethodsReturnType="true" showMethodsParameterNames="true" showMethodsParameterKinds="true" attributeSorter="Natural" methodSorter="Natural" innerClassSorter="Natural" showPrivateAttributes="true" showProtectedAttributes="true" showPublicAttributes="true" showPackageAttributes="true" showStaticAttributes="true" showProtectedMethods="true" showPublicMethods="true" showPackageMethods="true" showPrivateMethods="true" showStaticMethods="true" showProtectedInnerClasses="true" showPublicInnerClasses="true" showPackageInnerClasses="true" showPrivateInnerClasses="true" showStaticInnerClasses="true" showAssociationMember="true" showMethods="true" showAttributes="true" showLiterals="true"/>
+ </children>
+ <diagramOptions xsi:type="options:ClassDiagramOptions" showScope="All" properties="wireOptions=7"/>
+ <boardSetting snapToGeometry="true" gridEnabled="true" gridSpacing="10,10" gridOrigin="0,0" rulerUnit="pixel">
+ <leftRuler/>
+ <topRuler/>
+ </boardSetting>
+ <classDiagramPreferences xsi:type="editmodel:UMLClassDiagramPreference" showMethodsParameterTypes="true" showMethodsReturnType="true" showMethodsParameterNames="true" showMethodsParameterKinds="true" attributeSorter="Natural" methodSorter="Natural" showClassStereotype="true" showPackageStereotype="true" innerClassSorter="Natural" showPrivateAttributes="true" showProtectedAttributes="true" showPublicAttributes="true" showPackageAttributes="true" showStaticAttributes="true" showProtectedMethods="true" showPublicMethods="true" showPackageMethods="true" showPrivateMethods="true" showStaticMethods="true" showProtectedInnerClasses="true" showPublicInnerClasses="true" showPackageInnerClasses="true" showPrivateInnerClasses="true" showStaticInnerClasses="true" showInterfaceStereotype="true" showAssociationMember="true" showMethods="true" showAttributes="true" showLiterlas="true"/>
+</editmodel:ClassDiagramEditModel>
diff --git a/contrib/gdata-server/src/gom/java/org/apache/lucene/gdata/gom/gom-aid.uml b/contrib/gdata-server/src/gom/java/org/apache/lucene/gdata/gom/gom-aid.uml
new file mode 100644
index 00000000000..000bc0c2eb1
--- /dev/null
+++ b/contrib/gdata-server/src/gom/java/org/apache/lucene/gdata/gom/gom-aid.uml
@@ -0,0 +1,610 @@
+<?xml version="1.0" encoding="ASCII"?>
+<uml:Model xmi:version="2.1" xmlns:xmi="http://schema.omg.org/spec/XMI/2.1" xmlns:uml="http://www.eclipse.org/uml2/2.0.0/UML" xmi:id="_BOQb4H5gEdujQd6ed5A7Ug" name="gom">
+ <packagedElement xmi:type="uml:Package" xmi:id="_l6OfcH5eEdujQd6ed5A7Ug" name="."/>
+ <packagedElement xmi:type="uml:Package" xmi:id="_r7dCEX5eEdujQd6ed5A7Ug" name="java.lang">
+ <packagedElement xmi:type="uml:Class" xmi:id="_r7dpIX5eEdujQd6ed5A7Ug" name="String" isLeaf="true"/>
+ <packagedElement xmi:type="uml:Class" xmi:id="_r89d8H5eEdujQd6ed5A7Ug" name="RuntimeException">
+ <generalization xmi:id="_sEm-EH5eEdujQd6ed5A7Ug" general="_sEmXAH5eEdujQd6ed5A7Ug"/>
+ <ownedAttribute xmi:id="_sGP80H5eEdujQd6ed5A7Ug" name="serialVersionUID" visibility="package" isLeaf="true" isStatic="true" isReadOnly="true">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/JavaPrimitiveTypes.library.uml#long"/>
+ </ownedAttribute>
+ <ownedOperation xmi:id="_sGRyAH5eEdujQd6ed5A7Ug" name="RuntimeException" visibility="public" concurrency="concurrent">
+ <ownedParameter xmi:id="_sGyvYH5eEdujQd6ed5A7Ug" name="arg0" type="_r7dpIX5eEdujQd6ed5A7Ug"/>
+ <ownedParameter xmi:id="_sGyvYX5eEdujQd6ed5A7Ug" name="arg1" type="_r9ELoH5eEdujQd6ed5A7Ug"/>
+ </ownedOperation>
+ <ownedOperation xmi:id="_sGzWcH5eEdujQd6ed5A7Ug" name="RuntimeException" visibility="public" concurrency="concurrent">
+ <ownedParameter xmi:id="_sGz9gH5eEdujQd6ed5A7Ug" name="arg0" type="_r7dpIX5eEdujQd6ed5A7Ug"/>
+ </ownedOperation>
+ <ownedOperation xmi:id="_sGz9gX5eEdujQd6ed5A7Ug" name="RuntimeException" visibility="public" concurrency="concurrent">
+ <ownedParameter xmi:id="_sG0kkH5eEdujQd6ed5A7Ug" name="arg0" type="_r9ELoH5eEdujQd6ed5A7Ug"/>
+ </ownedOperation>
+ <ownedOperation xmi:id="_sG0kkX5eEdujQd6ed5A7Ug" name="RuntimeException" visibility="public" concurrency="concurrent"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Class" xmi:id="_r9ELoH5eEdujQd6ed5A7Ug" name="Throwable"/>
+ <packagedElement xmi:type="uml:Class" xmi:id="_sBHlMH5eEdujQd6ed5A7Ug" name="System" isLeaf="true"/>
+ <packagedElement xmi:type="uml:Class" xmi:id="_sEmXAH5eEdujQd6ed5A7Ug" name="Exception"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Package" xmi:id="_sAlZsH5eEdujQd6ed5A7Ug" name="java.util">
+ <packagedElement xmi:type="uml:Class" xmi:id="_sAmAwH5eEdujQd6ed5A7Ug" name="Stack"/>
+ <packagedElement xmi:type="uml:Interface" xmi:id="_sAnO4H5eEdujQd6ed5A7Ug" name="List" isAbstract="true"/>
+ <packagedElement xmi:type="uml:Class" xmi:id="_sBG-IH5eEdujQd6ed5A7Ug" name="LinkedList"/>
+ <packagedElement xmi:type="uml:Interface" xmi:id="_iKUCsH5fEdujQd6ed5A7Ug" name="Iterator" isAbstract="true"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_l_ahcH5eEdujQd6ed5A7Ug">
+ <supplier xmi:type="uml:Package" href="platform:/resource/GdataUml/.repository.uml2#_l83jwH5eEdujQd6ed5A7Ug"/>
+ <client xmi:type="uml:Package" href="platform:/resource/GdataUml/.repository.uml2#_l85Y8H5eEdujQd6ed5A7Ug"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_mVVuIH5eEdujQd6ed5A7Ug">
+ <supplier xmi:type="uml:Package" href="platform:/resource/GdataUml/.repository.uml2#_l84K0H5eEdujQd6ed5A7Ug"/>
+ <client xmi:type="uml:Package" href="platform:/resource/GdataUml/.repository.uml2#_l85Y8H5eEdujQd6ed5A7Ug"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_mVYKYH5eEdujQd6ed5A7Ug">
+ <supplier xmi:type="uml:Package" href="platform:/resource/GdataUml/.repository.uml2#_l_Z6YH5eEdujQd6ed5A7Ug"/>
+ <client xmi:type="uml:Package" href="platform:/resource/GdataUml/.repository.uml2#_l85Y8H5eEdujQd6ed5A7Ug"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_mVZ_kn5eEdujQd6ed5A7Ug">
+ <supplier xmi:type="uml:Package" href="platform:/resource/GdataUml/.repository.uml2#_l_Z6YH5eEdujQd6ed5A7Ug"/>
+ <client xmi:type="uml:Package" href="platform:/resource/GdataUml/.repository.uml2#_l85Y8H5eEdujQd6ed5A7Ug"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_mVcb0H5eEdujQd6ed5A7Ug">
+ <supplier xmi:type="uml:Package" href="platform:/resource/GdataUml/.repository.uml2#_l_Z6YH5eEdujQd6ed5A7Ug"/>
+ <client xmi:type="uml:Package" href="platform:/resource/GdataUml/.repository.uml2#_l85Y8H5eEdujQd6ed5A7Ug"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_mVpQIH5eEdujQd6ed5A7Ug">
+ <supplier xmi:type="uml:Package" href="platform:/resource/GdataUml/.repository.uml2#_l84K0H5eEdujQd6ed5A7Ug"/>
+ <client xmi:type="uml:Package" href="platform:/resource/GdataUml/.repository.uml2#_l83jwH5eEdujQd6ed5A7Ug"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_mVrsYH5eEdujQd6ed5A7Ug">
+ <supplier xmi:type="uml:Package" href="platform:/resource/GdataUml/.repository.uml2#_l_Z6YH5eEdujQd6ed5A7Ug"/>
+ <client xmi:type="uml:Package" href="platform:/resource/GdataUml/.repository.uml2#_l83jwH5eEdujQd6ed5A7Ug"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_mVthkX5eEdujQd6ed5A7Ug">
+ <supplier xmi:type="uml:Package" href="platform:/resource/GdataUml/.repository.uml2#_l_Z6YH5eEdujQd6ed5A7Ug"/>
+ <client xmi:type="uml:Package" href="platform:/resource/GdataUml/.repository.uml2#_l83jwH5eEdujQd6ed5A7Ug"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_mVv90X5eEdujQd6ed5A7Ug">
+ <supplier xmi:type="uml:Package" href="platform:/resource/GdataUml/.repository.uml2#_mVmz4H5eEdujQd6ed5A7Ug"/>
+ <client xmi:type="uml:Package" href="platform:/resource/GdataUml/.repository.uml2#_l83jwH5eEdujQd6ed5A7Ug"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_mV6V4H5eEdujQd6ed5A7Ug">
+ <supplier xmi:type="uml:Package" href="platform:/resource/GdataUml/.repository.uml2#_l83jwH5eEdujQd6ed5A7Ug"/>
+ <client xmi:type="uml:Package" href="platform:/resource/GdataUml/.repository.uml2#_l84K0H5eEdujQd6ed5A7Ug"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_mV8yIX5eEdujQd6ed5A7Ug">
+ <supplier xmi:type="uml:Package" href="platform:/resource/GdataUml/.repository.uml2#_l83jwH5eEdujQd6ed5A7Ug"/>
+ <client xmi:type="uml:Package" href="platform:/resource/GdataUml/.repository.uml2#_l84K0H5eEdujQd6ed5A7Ug"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_mV_OYH5eEdujQd6ed5A7Ug">
+ <supplier xmi:type="uml:Package" href="platform:/resource/GdataUml/.repository.uml2#_l_Z6YH5eEdujQd6ed5A7Ug"/>
+ <client xmi:type="uml:Package" href="platform:/resource/GdataUml/.repository.uml2#_l84K0H5eEdujQd6ed5A7Ug"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_mWBDkX5eEdujQd6ed5A7Ug">
+ <supplier xmi:type="uml:Package" href="platform:/resource/GdataUml/.repository.uml2#_l_Z6YH5eEdujQd6ed5A7Ug"/>
+ <client xmi:type="uml:Package" href="platform:/resource/GdataUml/.repository.uml2#_l84K0H5eEdujQd6ed5A7Ug"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_mWDf0H5eEdujQd6ed5A7Ug">
+ <supplier xmi:type="uml:Package" href="platform:/resource/GdataUml/.repository.uml2#_mVmz4H5eEdujQd6ed5A7Ug"/>
+ <client xmi:type="uml:Package" href="platform:/resource/GdataUml/.repository.uml2#_l84K0H5eEdujQd6ed5A7Ug"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_mWHxQH5eEdujQd6ed5A7Ug">
+ <supplier xmi:type="uml:Package" href="platform:/resource/GdataUml/.repository.uml2#_l83jwH5eEdujQd6ed5A7Ug"/>
+ <client xmi:type="uml:Package" href="platform:/resource/GdataUml/.repository.uml2#_l8xdIH5eEdujQd6ed5A7Ug"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_mWKNgn5eEdujQd6ed5A7Ug">
+ <supplier xmi:type="uml:Package" href="platform:/resource/GdataUml/.repository.uml2#_l84K0H5eEdujQd6ed5A7Ug"/>
+ <client xmi:type="uml:Package" href="platform:/resource/GdataUml/.repository.uml2#_l8xdIH5eEdujQd6ed5A7Ug"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_mWMCsX5eEdujQd6ed5A7Ug">
+ <supplier xmi:type="uml:Package" href="platform:/resource/GdataUml/.repository.uml2#_l84K0H5eEdujQd6ed5A7Ug"/>
+ <client xmi:type="uml:Package" href="platform:/resource/GdataUml/.repository.uml2#_l8xdIH5eEdujQd6ed5A7Ug"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_mWOe8X5eEdujQd6ed5A7Ug">
+ <supplier xmi:type="uml:Package" href="platform:/resource/GdataUml/.repository.uml2#_l_Z6YH5eEdujQd6ed5A7Ug"/>
+ <client xmi:type="uml:Package" href="platform:/resource/GdataUml/.repository.uml2#_l8xdIH5eEdujQd6ed5A7Ug"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_mWQ7MX5eEdujQd6ed5A7Ug">
+ <supplier xmi:type="uml:Package" href="platform:/resource/GdataUml/.repository.uml2#_l_Z6YH5eEdujQd6ed5A7Ug"/>
+ <client xmi:type="uml:Package" href="platform:/resource/GdataUml/.repository.uml2#_l8xdIH5eEdujQd6ed5A7Ug"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_mWXo4H5eEdujQd6ed5A7Ug">
+ <supplier xmi:type="uml:Package" href="platform:/resource/GdataUml/.repository.uml2#_l_Z6YH5eEdujQd6ed5A7Ug"/>
+ <client xmi:type="uml:Package" href="platform:/resource/GdataUml/.repository.uml2#_l81ukH5eEdujQd6ed5A7Ug"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_mWZeEn5eEdujQd6ed5A7Ug">
+ <supplier xmi:type="uml:Package" href="platform:/resource/GdataUml/.repository.uml2#_l_Z6YH5eEdujQd6ed5A7Ug"/>
+ <client xmi:type="uml:Package" href="platform:/resource/GdataUml/.repository.uml2#_l81ukH5eEdujQd6ed5A7Ug"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_mWb6UX5eEdujQd6ed5A7Ug">
+ <supplier xmi:type="uml:Package" href="platform:/resource/GdataUml/.repository.uml2#_l_Z6YH5eEdujQd6ed5A7Ug"/>
+ <client xmi:type="uml:Package" href="platform:/resource/GdataUml/.repository.uml2#_l81ukH5eEdujQd6ed5A7Ug"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_r7sSoH5eEdujQd6ed5A7Ug" supplier="_r7dpIX5eEdujQd6ed5A7Ug">
+ <client xmi:type="uml:Interface" href="platform:/resource/GdataUml/.repository.uml2#_r7Q00H5eEdujQd6ed5A7Ug"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_r7uu4X5eEdujQd6ed5A7Ug">
+ <supplier xmi:type="uml:Class" href="platform:/resource/GdataUml/.repository.uml2#_r7h6kH5eEdujQd6ed5A7Ug"/>
+ <client xmi:type="uml:Interface" href="platform:/resource/GdataUml/.repository.uml2#_r7Q00H5eEdujQd6ed5A7Ug"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_r72DoH5eEdujQd6ed5A7Ug">
+ <supplier xmi:type="uml:Package" href="platform:/resource/GdataUml/.repository.uml2#_l_Z6YH5eEdujQd6ed5A7Ug"/>
+ <client xmi:type="uml:Package" href="platform:/resource/GdataUml/.repository.uml2#_l84K0H5eEdujQd6ed5A7Ug"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_r8qjAH5eEdujQd6ed5A7Ug" supplier="_r7dpIX5eEdujQd6ed5A7Ug">
+ <client xmi:type="uml:Class" href="platform:/resource/GdataUml/.repository.uml2#_r8CQ4H5eEdujQd6ed5A7Ug"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_r8x3wH5eEdujQd6ed5A7Ug">
+ <supplier xmi:type="uml:Package" href="platform:/resource/GdataUml/.repository.uml2#_l_Z6YH5eEdujQd6ed5A7Ug"/>
+ <client xmi:type="uml:Package" href="platform:/resource/GdataUml/.repository.uml2#_l84K0H5eEdujQd6ed5A7Ug"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_r9GA0H5eEdujQd6ed5A7Ug" supplier="_r9ELoH5eEdujQd6ed5A7Ug">
+ <client xmi:type="uml:Class" href="platform:/resource/GdataUml/.repository.uml2#_r8824H5eEdujQd6ed5A7Ug"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_r9IdEn5eEdujQd6ed5A7Ug" supplier="_r7dpIX5eEdujQd6ed5A7Ug">
+ <client xmi:type="uml:Class" href="platform:/resource/GdataUml/.repository.uml2#_r8824H5eEdujQd6ed5A7Ug"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_r9Px0H5eEdujQd6ed5A7Ug">
+ <supplier xmi:type="uml:Package" href="platform:/resource/GdataUml/.repository.uml2#_l_Z6YH5eEdujQd6ed5A7Ug"/>
+ <client xmi:type="uml:Package" href="platform:/resource/GdataUml/.repository.uml2#_l84K0H5eEdujQd6ed5A7Ug"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_r9lJAH5eEdujQd6ed5A7Ug" supplier="_r7dpIX5eEdujQd6ed5A7Ug">
+ <client xmi:type="uml:Class" href="platform:/resource/GdataUml/.repository.uml2#_r9WfgH5eEdujQd6ed5A7Ug"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_r9nlQn5eEdujQd6ed5A7Ug">
+ <supplier xmi:type="uml:Class" href="platform:/resource/GdataUml/.repository.uml2#_r7h6kH5eEdujQd6ed5A7Ug"/>
+ <client xmi:type="uml:Class" href="platform:/resource/GdataUml/.repository.uml2#_r9WfgH5eEdujQd6ed5A7Ug"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_r9wIIH5eEdujQd6ed5A7Ug">
+ <supplier xmi:type="uml:Package" href="platform:/resource/GdataUml/.repository.uml2#_l_Z6YH5eEdujQd6ed5A7Ug"/>
+ <client xmi:type="uml:Package" href="platform:/resource/GdataUml/.repository.uml2#_l84K0H5eEdujQd6ed5A7Ug"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_r-RskH5eEdujQd6ed5A7Ug">
+ <supplier xmi:type="uml:Interface" href="platform:/resource/GdataUml/.repository.uml2#_r-P3YH5eEdujQd6ed5A7Ug"/>
+ <client xmi:type="uml:Class" href="platform:/resource/GdataUml/.repository.uml2#_r-JwwH5eEdujQd6ed5A7Ug"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_r-Thwn5eEdujQd6ed5A7Ug">
+ <supplier xmi:type="uml:Class" href="platform:/resource/GdataUml/.repository.uml2#_r-RFgH5eEdujQd6ed5A7Ug"/>
+ <client xmi:type="uml:Class" href="platform:/resource/GdataUml/.repository.uml2#_r-JwwH5eEdujQd6ed5A7Ug"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_r-cEoH5eEdujQd6ed5A7Ug">
+ <supplier xmi:type="uml:Package" href="platform:/resource/GdataUml/.repository.uml2#_l_Z6YH5eEdujQd6ed5A7Ug"/>
+ <client xmi:type="uml:Package" href="platform:/resource/GdataUml/.repository.uml2#_l84K0H5eEdujQd6ed5A7Ug"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_r-l1oH5eEdujQd6ed5A7Ug">
+ <supplier xmi:type="uml:Interface" href="platform:/resource/GdataUml/.repository.uml2#_r-kngH5eEdujQd6ed5A7Ug"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_r-tKYH5eEdujQd6ed5A7Ug">
+ <supplier xmi:type="uml:Package" href="platform:/resource/GdataUml/.repository.uml2#_l_Z6YH5eEdujQd6ed5A7Ug"/>
+ <client xmi:type="uml:Package" href="platform:/resource/GdataUml/.repository.uml2#_l84K0H5eEdujQd6ed5A7Ug"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_r_vsMH5eEdujQd6ed5A7Ug" supplier="_r7dpIX5eEdujQd6ed5A7Ug">
+ <client xmi:type="uml:Class" href="platform:/resource/GdataUml/.repository.uml2#_r-yp8H5eEdujQd6ed5A7Ug"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_r_xhYn5eEdujQd6ed5A7Ug">
+ <supplier xmi:type="uml:Interface" href="platform:/resource/GdataUml/.repository.uml2#_r_MSkH5eEdujQd6ed5A7Ug"/>
+ <client xmi:type="uml:Class" href="platform:/resource/GdataUml/.repository.uml2#_r-yp8H5eEdujQd6ed5A7Ug"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_r_z9on5eEdujQd6ed5A7Ug">
+ <supplier xmi:type="uml:Interface" href="platform:/resource/GdataUml/.repository.uml2#_r-kngH5eEdujQd6ed5A7Ug"/>
+ <client xmi:type="uml:Class" href="platform:/resource/GdataUml/.repository.uml2#_r-yp8H5eEdujQd6ed5A7Ug"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_r_1y0n5eEdujQd6ed5A7Ug">
+ <supplier xmi:type="uml:Class" href="platform:/resource/GdataUml/.repository.uml2#_r_OHwH5eEdujQd6ed5A7Ug"/>
+ <client xmi:type="uml:Class" href="platform:/resource/GdataUml/.repository.uml2#_r-yp8H5eEdujQd6ed5A7Ug"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_r_3oAX5eEdujQd6ed5A7Ug">
+ <supplier xmi:type="uml:Class" href="platform:/resource/GdataUml/.repository.uml2#_r_OHwH5eEdujQd6ed5A7Ug"/>
+ <client xmi:type="uml:Class" href="platform:/resource/GdataUml/.repository.uml2#_r-yp8H5eEdujQd6ed5A7Ug"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_sAAK4H5eEdujQd6ed5A7Ug">
+ <supplier xmi:type="uml:Package" href="platform:/resource/GdataUml/.repository.uml2#_l_Z6YH5eEdujQd6ed5A7Ug"/>
+ <client xmi:type="uml:Package" href="platform:/resource/GdataUml/.repository.uml2#_l84K0H5eEdujQd6ed5A7Ug"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_sBMdsX5eEdujQd6ed5A7Ug" supplier="_sAmAwH5eEdujQd6ed5A7Ug">
+ <client xmi:type="uml:Class" href="platform:/resource/GdataUml/.repository.uml2#_sAJ74H5eEdujQd6ed5A7Ug"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_sBOS4X5eEdujQd6ed5A7Ug" supplier="_sAmAwH5eEdujQd6ed5A7Ug">
+ <client xmi:type="uml:Class" href="platform:/resource/GdataUml/.repository.uml2#_sAJ74H5eEdujQd6ed5A7Ug"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_sBQIEn5eEdujQd6ed5A7Ug">
+ <supplier xmi:type="uml:Interface" href="platform:/resource/GdataUml/.repository.uml2#_sAodAH5eEdujQd6ed5A7Ug"/>
+ <client xmi:type="uml:Class" href="platform:/resource/GdataUml/.repository.uml2#_sAJ74H5eEdujQd6ed5A7Ug"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_sBSkUX5eEdujQd6ed5A7Ug">
+ <supplier xmi:type="uml:Class" href="platform:/resource/GdataUml/.repository.uml2#_r_OHwH5eEdujQd6ed5A7Ug"/>
+ <client xmi:type="uml:Class" href="platform:/resource/GdataUml/.repository.uml2#_sAJ74H5eEdujQd6ed5A7Ug"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_sBUZgX5eEdujQd6ed5A7Ug">
+ <supplier xmi:type="uml:Class" href="platform:/resource/GdataUml/.repository.uml2#_r_OHwH5eEdujQd6ed5A7Ug"/>
+ <client xmi:type="uml:Class" href="platform:/resource/GdataUml/.repository.uml2#_sAJ74H5eEdujQd6ed5A7Ug"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_sBWOsn5eEdujQd6ed5A7Ug">
+ <supplier xmi:type="uml:Interface" href="platform:/resource/GdataUml/.repository.uml2#_r-P3YH5eEdujQd6ed5A7Ug"/>
+ <client xmi:type="uml:Class" href="platform:/resource/GdataUml/.repository.uml2#_sAJ74H5eEdujQd6ed5A7Ug"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_sBYq8n5eEdujQd6ed5A7Ug">
+ <supplier xmi:type="uml:Class" href="platform:/resource/GdataUml/.repository.uml2#_r7h6kH5eEdujQd6ed5A7Ug"/>
+ <client xmi:type="uml:Class" href="platform:/resource/GdataUml/.repository.uml2#_sAJ74H5eEdujQd6ed5A7Ug"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_sBagIn5eEdujQd6ed5A7Ug" supplier="_sBG-IH5eEdujQd6ed5A7Ug">
+ <client xmi:type="uml:Class" href="platform:/resource/GdataUml/.repository.uml2#_sAJ74H5eEdujQd6ed5A7Ug"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_sBcVUX5eEdujQd6ed5A7Ug" supplier="_sBHlMH5eEdujQd6ed5A7Ug">
+ <client xmi:type="uml:Class" href="platform:/resource/GdataUml/.repository.uml2#_sAJ74H5eEdujQd6ed5A7Ug"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_sBexkn5eEdujQd6ed5A7Ug">
+ <supplier xmi:type="uml:Class" href="platform:/resource/GdataUml/.repository.uml2#_r-yp8H5eEdujQd6ed5A7Ug"/>
+ <client xmi:type="uml:Class" href="platform:/resource/GdataUml/.repository.uml2#_sAJ74H5eEdujQd6ed5A7Ug"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_sBhN0H5eEdujQd6ed5A7Ug">
+ <supplier xmi:type="uml:Interface" href="platform:/resource/GdataUml/.repository.uml2#_r7Q00H5eEdujQd6ed5A7Ug"/>
+ <client xmi:type="uml:Class" href="platform:/resource/GdataUml/.repository.uml2#_sAJ74H5eEdujQd6ed5A7Ug"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_sBjDAn5eEdujQd6ed5A7Ug">
+ <supplier xmi:type="uml:Interface" href="platform:/resource/GdataUml/.repository.uml2#_sA-bQH5eEdujQd6ed5A7Ug"/>
+ <client xmi:type="uml:Class" href="platform:/resource/GdataUml/.repository.uml2#_sAJ74H5eEdujQd6ed5A7Ug"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_sBmGUH5eEdujQd6ed5A7Ug">
+ <supplier xmi:type="uml:Class" href="platform:/resource/GdataUml/.repository.uml2#_r-JwwH5eEdujQd6ed5A7Ug"/>
+ <client xmi:type="uml:Class" href="platform:/resource/GdataUml/.repository.uml2#_sAJ74H5eEdujQd6ed5A7Ug"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_sBn7gn5eEdujQd6ed5A7Ug">
+ <supplier xmi:type="uml:Class" href="platform:/resource/GdataUml/.repository.uml2#_r-JwwH5eEdujQd6ed5A7Ug"/>
+ <client xmi:type="uml:Class" href="platform:/resource/GdataUml/.repository.uml2#_sAJ74H5eEdujQd6ed5A7Ug"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_sBqXwX5eEdujQd6ed5A7Ug">
+ <supplier xmi:type="uml:Class" href="platform:/resource/GdataUml/.repository.uml2#_r8CQ4H5eEdujQd6ed5A7Ug"/>
+ <client xmi:type="uml:Class" href="platform:/resource/GdataUml/.repository.uml2#_sAJ74H5eEdujQd6ed5A7Ug"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_sBsM8X5eEdujQd6ed5A7Ug">
+ <supplier xmi:type="uml:Class" href="platform:/resource/GdataUml/.repository.uml2#_r8CQ4H5eEdujQd6ed5A7Ug"/>
+ <client xmi:type="uml:Class" href="platform:/resource/GdataUml/.repository.uml2#_sAJ74H5eEdujQd6ed5A7Ug"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_sBuCIn5eEdujQd6ed5A7Ug">
+ <supplier xmi:type="uml:Interface" href="platform:/resource/GdataUml/.repository.uml2#_r-0fIH5eEdujQd6ed5A7Ug"/>
+ <client xmi:type="uml:Class" href="platform:/resource/GdataUml/.repository.uml2#_sAJ74H5eEdujQd6ed5A7Ug"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_sB6PYH5eEdujQd6ed5A7Ug">
+ <supplier xmi:type="uml:Package" href="platform:/resource/GdataUml/.repository.uml2#_l_Z6YH5eEdujQd6ed5A7Ug"/>
+ <client xmi:type="uml:Package" href="platform:/resource/GdataUml/.repository.uml2#_l84K0H5eEdujQd6ed5A7Ug"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_sHONMH5eEdujQd6ed5A7Ug">
+ <supplier xmi:type="uml:Package" href="platform:/resource/GdataUml/.repository.uml2#_l_Z6YH5eEdujQd6ed5A7Ug"/>
+ <client xmi:type="uml:Package" href="platform:/resource/GdataUml/.repository.uml2#_l83jwH5eEdujQd6ed5A7Ug"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_sH6wwH5eEdujQd6ed5A7Ug" supplier="_r7dpIX5eEdujQd6ed5A7Ug">
+ <client xmi:type="uml:Interface" href="platform:/resource/GdataUml/.repository.uml2#_r-0fIH5eEdujQd6ed5A7Ug"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_sH9NAn5eEdujQd6ed5A7Ug">
+ <supplier xmi:type="uml:Interface" href="platform:/resource/GdataUml/.repository.uml2#_r_MSkH5eEdujQd6ed5A7Ug"/>
+ <client xmi:type="uml:Interface" href="platform:/resource/GdataUml/.repository.uml2#_r-0fIH5eEdujQd6ed5A7Ug"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_sH_CMn5eEdujQd6ed5A7Ug">
+ <supplier xmi:type="uml:Interface" href="platform:/resource/GdataUml/.repository.uml2#_r-kngH5eEdujQd6ed5A7Ug"/>
+ <client xmi:type="uml:Interface" href="platform:/resource/GdataUml/.repository.uml2#_r-0fIH5eEdujQd6ed5A7Ug"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_sIA3Yn5eEdujQd6ed5A7Ug">
+ <supplier xmi:type="uml:Class" href="platform:/resource/GdataUml/.repository.uml2#_r_OHwH5eEdujQd6ed5A7Ug"/>
+ <client xmi:type="uml:Interface" href="platform:/resource/GdataUml/.repository.uml2#_r-0fIH5eEdujQd6ed5A7Ug"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_sIDToX5eEdujQd6ed5A7Ug">
+ <supplier xmi:type="uml:Class" href="platform:/resource/GdataUml/.repository.uml2#_r_OHwH5eEdujQd6ed5A7Ug"/>
+ <client xmi:type="uml:Interface" href="platform:/resource/GdataUml/.repository.uml2#_r-0fIH5eEdujQd6ed5A7Ug"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_sILPcH5eEdujQd6ed5A7Ug">
+ <supplier xmi:type="uml:Package" href="platform:/resource/GdataUml/.repository.uml2#_l_Z6YH5eEdujQd6ed5A7Ug"/>
+ <client xmi:type="uml:Package" href="platform:/resource/GdataUml/.repository.uml2#_l83jwH5eEdujQd6ed5A7Ug"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_9V9KEH5eEdujQd6ed5A7Ug">
+ <supplier xmi:type="uml:Package" href="platform:/resource/GdataUml/.repository.uml2#_l_Z6YH5eEdujQd6ed5A7Ug"/>
+ <client xmi:type="uml:Package" href="platform:/resource/GdataUml/.repository.uml2#_l84K0H5eEdujQd6ed5A7Ug"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_9fSFMH5eEdujQd6ed5A7Ug">
+ <supplier xmi:type="uml:Package" href="platform:/resource/GdataUml/.repository.uml2#_l_Z6YH5eEdujQd6ed5A7Ug"/>
+ <client xmi:type="uml:Package" href="platform:/resource/GdataUml/.repository.uml2#_l84K0H5eEdujQd6ed5A7Ug"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_-avn4H5eEdujQd6ed5A7Ug">
+ <supplier xmi:type="uml:Package" href="platform:/resource/GdataUml/.repository.uml2#_l_Z6YH5eEdujQd6ed5A7Ug"/>
+ <client xmi:type="uml:Package" href="platform:/resource/GdataUml/.repository.uml2#_l84K0H5eEdujQd6ed5A7Ug"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_iKuSYH5fEdujQd6ed5A7Ug">
+ <supplier xmi:type="uml:Package" href="platform:/resource/GdataUml/.repository.uml2#_l_Z6YH5eEdujQd6ed5A7Ug"/>
+ <client xmi:type="uml:Package" href="platform:/resource/GdataUml/.repository.uml2#_l83jwH5eEdujQd6ed5A7Ug"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_iK21QH5fEdujQd6ed5A7Ug">
+ <supplier xmi:type="uml:Package" href="platform:/resource/GdataUml/.repository.uml2#_l_Z6YH5eEdujQd6ed5A7Ug"/>
+ <client xmi:type="uml:Package" href="platform:/resource/GdataUml/.repository.uml2#_l83jwH5eEdujQd6ed5A7Ug"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_iLCbcH5fEdujQd6ed5A7Ug">
+ <supplier xmi:type="uml:Package" href="platform:/resource/GdataUml/.repository.uml2#_l_Z6YH5eEdujQd6ed5A7Ug"/>
+ <client xmi:type="uml:Package" href="platform:/resource/GdataUml/.repository.uml2#_l83jwH5eEdujQd6ed5A7Ug"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_iLfucH5fEdujQd6ed5A7Ug">
+ <supplier xmi:type="uml:Package" href="platform:/resource/GdataUml/.repository.uml2#_l_Z6YH5eEdujQd6ed5A7Ug"/>
+ <client xmi:type="uml:Package" href="platform:/resource/GdataUml/.repository.uml2#_l83jwH5eEdujQd6ed5A7Ug"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_iLpfcH5fEdujQd6ed5A7Ug">
+ <supplier xmi:type="uml:Package" href="platform:/resource/GdataUml/.repository.uml2#_l_Z6YH5eEdujQd6ed5A7Ug"/>
+ <client xmi:type="uml:Package" href="platform:/resource/GdataUml/.repository.uml2#_l83jwH5eEdujQd6ed5A7Ug"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_iL0ekH5fEdujQd6ed5A7Ug">
+ <supplier xmi:type="uml:Class" href="platform:/resource/GdataUml/.repository.uml2#_iLu_AH5fEdujQd6ed5A7Ug"/>
+ <client xmi:type="uml:Class" href="platform:/resource/GdataUml/.repository.uml2#_r-RFgH5eEdujQd6ed5A7Ug"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_iL2TwX5fEdujQd6ed5A7Ug">
+ <supplier xmi:type="uml:Interface" href="platform:/resource/GdataUml/.repository.uml2#_iKVQ0H5fEdujQd6ed5A7Ug"/>
+ <client xmi:type="uml:Class" href="platform:/resource/GdataUml/.repository.uml2#_r-RFgH5eEdujQd6ed5A7Ug"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_iL4wAH5fEdujQd6ed5A7Ug">
+ <supplier xmi:type="uml:Interface" href="platform:/resource/GdataUml/.repository.uml2#_iJ2vsH5fEdujQd6ed5A7Ug"/>
+ <client xmi:type="uml:Class" href="platform:/resource/GdataUml/.repository.uml2#_r-RFgH5eEdujQd6ed5A7Ug"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_iL6lMn5fEdujQd6ed5A7Ug">
+ <supplier xmi:type="uml:Interface" href="platform:/resource/GdataUml/.repository.uml2#_iJx3MX5fEdujQd6ed5A7Ug"/>
+ <client xmi:type="uml:Class" href="platform:/resource/GdataUml/.repository.uml2#_r-RFgH5eEdujQd6ed5A7Ug"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_iL8aYn5fEdujQd6ed5A7Ug" supplier="_sBG-IH5eEdujQd6ed5A7Ug">
+ <client xmi:type="uml:Class" href="platform:/resource/GdataUml/.repository.uml2#_r-RFgH5eEdujQd6ed5A7Ug"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_iL-2oX5fEdujQd6ed5A7Ug">
+ <supplier xmi:type="uml:Interface" href="platform:/resource/GdataUml/.repository.uml2#_iJ06gH5fEdujQd6ed5A7Ug"/>
+ <client xmi:type="uml:Class" href="platform:/resource/GdataUml/.repository.uml2#_r-RFgH5eEdujQd6ed5A7Ug"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_iMAr0n5fEdujQd6ed5A7Ug">
+ <supplier xmi:type="uml:Class" href="platform:/resource/GdataUml/.repository.uml2#_r7h6kH5eEdujQd6ed5A7Ug"/>
+ <client xmi:type="uml:Class" href="platform:/resource/GdataUml/.repository.uml2#_r-RFgH5eEdujQd6ed5A7Ug"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_iMChAn5fEdujQd6ed5A7Ug">
+ <supplier xmi:type="uml:Interface" href="platform:/resource/GdataUml/.repository.uml2#_iLjY0H5fEdujQd6ed5A7Ug"/>
+ <client xmi:type="uml:Class" href="platform:/resource/GdataUml/.repository.uml2#_r-RFgH5eEdujQd6ed5A7Ug"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_iMEWMn5fEdujQd6ed5A7Ug">
+ <supplier xmi:type="uml:Interface" href="platform:/resource/GdataUml/.repository.uml2#_iJ4k4H5fEdujQd6ed5A7Ug"/>
+ <client xmi:type="uml:Class" href="platform:/resource/GdataUml/.repository.uml2#_r-RFgH5eEdujQd6ed5A7Ug"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_iMGycX5fEdujQd6ed5A7Ug" supplier="_sAnO4H5eEdujQd6ed5A7Ug">
+ <client xmi:type="uml:Class" href="platform:/resource/GdataUml/.repository.uml2#_r-RFgH5eEdujQd6ed5A7Ug"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_iMInon5fEdujQd6ed5A7Ug">
+ <supplier xmi:type="uml:Interface" href="platform:/resource/GdataUml/.repository.uml2#_iJxQIH5fEdujQd6ed5A7Ug"/>
+ <client xmi:type="uml:Class" href="platform:/resource/GdataUml/.repository.uml2#_r-RFgH5eEdujQd6ed5A7Ug"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_iMKc0n5fEdujQd6ed5A7Ug">
+ <supplier xmi:type="uml:Interface" href="platform:/resource/GdataUml/.repository.uml2#_iJ1hkH5fEdujQd6ed5A7Ug"/>
+ <client xmi:type="uml:Class" href="platform:/resource/GdataUml/.repository.uml2#_r-RFgH5eEdujQd6ed5A7Ug"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_iMM5En5fEdujQd6ed5A7Ug">
+ <supplier xmi:type="uml:Interface" href="platform:/resource/GdataUml/.repository.uml2#_iKeawH5fEdujQd6ed5A7Ug"/>
+ <client xmi:type="uml:Class" href="platform:/resource/GdataUml/.repository.uml2#_r-RFgH5eEdujQd6ed5A7Ug"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_iMOuQn5fEdujQd6ed5A7Ug">
+ <supplier xmi:type="uml:Interface" href="platform:/resource/GdataUml/.repository.uml2#_sA-bQH5eEdujQd6ed5A7Ug"/>
+ <client xmi:type="uml:Class" href="platform:/resource/GdataUml/.repository.uml2#_r-RFgH5eEdujQd6ed5A7Ug"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_iMQjcn5fEdujQd6ed5A7Ug">
+ <supplier xmi:type="uml:Class" href="platform:/resource/GdataUml/.repository.uml2#_r_OHwH5eEdujQd6ed5A7Ug"/>
+ <client xmi:type="uml:Class" href="platform:/resource/GdataUml/.repository.uml2#_r-RFgH5eEdujQd6ed5A7Ug"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_iMSYoX5fEdujQd6ed5A7Ug">
+ <supplier xmi:type="uml:Class" href="platform:/resource/GdataUml/.repository.uml2#_r_OHwH5eEdujQd6ed5A7Ug"/>
+ <client xmi:type="uml:Class" href="platform:/resource/GdataUml/.repository.uml2#_r-RFgH5eEdujQd6ed5A7Ug"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_iMU04X5fEdujQd6ed5A7Ug">
+ <supplier xmi:type="uml:Interface" href="platform:/resource/GdataUml/.repository.uml2#_iKC88X5fEdujQd6ed5A7Ug"/>
+ <client xmi:type="uml:Class" href="platform:/resource/GdataUml/.repository.uml2#_r-RFgH5eEdujQd6ed5A7Ug"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_iMWqEn5fEdujQd6ed5A7Ug" supplier="_iKUCsH5fEdujQd6ed5A7Ug">
+ <client xmi:type="uml:Class" href="platform:/resource/GdataUml/.repository.uml2#_r-RFgH5eEdujQd6ed5A7Ug"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_iMYfQn5fEdujQd6ed5A7Ug">
+ <supplier xmi:type="uml:Class" href="platform:/resource/GdataUml/.repository.uml2#_iLtw4H5fEdujQd6ed5A7Ug"/>
+ <client xmi:type="uml:Class" href="platform:/resource/GdataUml/.repository.uml2#_r-RFgH5eEdujQd6ed5A7Ug"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_iMa7gH5fEdujQd6ed5A7Ug">
+ <supplier xmi:type="uml:Interface" href="platform:/resource/GdataUml/.repository.uml2#_r7Q00H5eEdujQd6ed5A7Ug"/>
+ <client xmi:type="uml:Class" href="platform:/resource/GdataUml/.repository.uml2#_r-RFgH5eEdujQd6ed5A7Ug"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_iMcwsn5fEdujQd6ed5A7Ug">
+ <supplier xmi:type="uml:Interface" href="platform:/resource/GdataUml/.repository.uml2#_r_MSkH5eEdujQd6ed5A7Ug"/>
+ <client xmi:type="uml:Class" href="platform:/resource/GdataUml/.repository.uml2#_r-RFgH5eEdujQd6ed5A7Ug"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_iMel4n5fEdujQd6ed5A7Ug">
+ <supplier xmi:type="uml:Interface" href="platform:/resource/GdataUml/.repository.uml2#_iJ5L8X5fEdujQd6ed5A7Ug"/>
+ <client xmi:type="uml:Class" href="platform:/resource/GdataUml/.repository.uml2#_r-RFgH5eEdujQd6ed5A7Ug"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_iMgbEn5fEdujQd6ed5A7Ug">
+ <supplier xmi:type="uml:Interface" href="platform:/resource/GdataUml/.repository.uml2#_r9XtoH5eEdujQd6ed5A7Ug"/>
+ <client xmi:type="uml:Class" href="platform:/resource/GdataUml/.repository.uml2#_r-RFgH5eEdujQd6ed5A7Ug"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_iMi3Un5fEdujQd6ed5A7Ug">
+ <supplier xmi:type="uml:Interface" href="platform:/resource/GdataUml/.repository.uml2#_iJ390H5fEdujQd6ed5A7Ug"/>
+ <client xmi:type="uml:Class" href="platform:/resource/GdataUml/.repository.uml2#_r-RFgH5eEdujQd6ed5A7Ug"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_iMksgn5fEdujQd6ed5A7Ug">
+ <supplier xmi:type="uml:Class" href="platform:/resource/GdataUml/.repository.uml2#_r8CQ4H5eEdujQd6ed5A7Ug"/>
+ <client xmi:type="uml:Class" href="platform:/resource/GdataUml/.repository.uml2#_r-RFgH5eEdujQd6ed5A7Ug"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_iMmhsn5fEdujQd6ed5A7Ug" supplier="_r7dpIX5eEdujQd6ed5A7Ug">
+ <client xmi:type="uml:Class" href="platform:/resource/GdataUml/.repository.uml2#_r-RFgH5eEdujQd6ed5A7Ug"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_iMo98X5fEdujQd6ed5A7Ug" supplier="_r7dpIX5eEdujQd6ed5A7Ug">
+ <client xmi:type="uml:Class" href="platform:/resource/GdataUml/.repository.uml2#_r-RFgH5eEdujQd6ed5A7Ug"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_iMqzIn5fEdujQd6ed5A7Ug">
+ <supplier xmi:type="uml:Class" href="platform:/resource/GdataUml/.repository.uml2#_r9WfgH5eEdujQd6ed5A7Ug"/>
+ <client xmi:type="uml:Class" href="platform:/resource/GdataUml/.repository.uml2#_r-RFgH5eEdujQd6ed5A7Ug"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_iMsoUX5fEdujQd6ed5A7Ug">
+ <supplier xmi:type="uml:Class" href="platform:/resource/GdataUml/.repository.uml2#_r9WfgH5eEdujQd6ed5A7Ug"/>
+ <client xmi:type="uml:Class" href="platform:/resource/GdataUml/.repository.uml2#_r-RFgH5eEdujQd6ed5A7Ug"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_iMudgn5fEdujQd6ed5A7Ug">
+ <supplier xmi:type="uml:Interface" href="platform:/resource/GdataUml/.repository.uml2#_r-kngH5eEdujQd6ed5A7Ug"/>
+ <client xmi:type="uml:Class" href="platform:/resource/GdataUml/.repository.uml2#_r-RFgH5eEdujQd6ed5A7Ug"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_iM1LMH5fEdujQd6ed5A7Ug">
+ <supplier xmi:type="uml:Package" href="platform:/resource/GdataUml/.repository.uml2#_l_Z6YH5eEdujQd6ed5A7Ug"/>
+ <client xmi:type="uml:Package" href="platform:/resource/GdataUml/.repository.uml2#_l84K0H5eEdujQd6ed5A7Ug"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_iZqtUH5fEdujQd6ed5A7Ug" supplier="_iKUCsH5fEdujQd6ed5A7Ug">
+ <client xmi:type="uml:Class" href="platform:/resource/GdataUml/.repository.uml2#_iHkQsH5fEdujQd6ed5A7Ug"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_iZtJkn5fEdujQd6ed5A7Ug" supplier="_r7dpIX5eEdujQd6ed5A7Ug">
+ <client xmi:type="uml:Class" href="platform:/resource/GdataUml/.repository.uml2#_iHkQsH5fEdujQd6ed5A7Ug"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_iZu-wn5fEdujQd6ed5A7Ug" supplier="_r7dpIX5eEdujQd6ed5A7Ug">
+ <client xmi:type="uml:Class" href="platform:/resource/GdataUml/.repository.uml2#_iHkQsH5fEdujQd6ed5A7Ug"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_iZxbAX5fEdujQd6ed5A7Ug" supplier="_sAnO4H5eEdujQd6ed5A7Ug">
+ <client xmi:type="uml:Class" href="platform:/resource/GdataUml/.repository.uml2#_iHkQsH5fEdujQd6ed5A7Ug"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_iZzQMn5fEdujQd6ed5A7Ug">
+ <supplier xmi:type="uml:Class" href="platform:/resource/GdataUml/.repository.uml2#_r7h6kH5eEdujQd6ed5A7Ug"/>
+ <client xmi:type="uml:Class" href="platform:/resource/GdataUml/.repository.uml2#_iHkQsH5fEdujQd6ed5A7Ug"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_iZ1FYn5fEdujQd6ed5A7Ug">
+ <supplier xmi:type="uml:Interface" href="platform:/resource/GdataUml/.repository.uml2#_r-kngH5eEdujQd6ed5A7Ug"/>
+ <client xmi:type="uml:Class" href="platform:/resource/GdataUml/.repository.uml2#_iHkQsH5fEdujQd6ed5A7Ug"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_iZ3hoX5fEdujQd6ed5A7Ug" supplier="_sBG-IH5eEdujQd6ed5A7Ug">
+ <client xmi:type="uml:Class" href="platform:/resource/GdataUml/.repository.uml2#_iHkQsH5fEdujQd6ed5A7Ug"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_iZ5W0X5fEdujQd6ed5A7Ug">
+ <supplier xmi:type="uml:Interface" href="platform:/resource/GdataUml/.repository.uml2#_r7Q00H5eEdujQd6ed5A7Ug"/>
+ <client xmi:type="uml:Class" href="platform:/resource/GdataUml/.repository.uml2#_iHkQsH5fEdujQd6ed5A7Ug"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_iZ7MAn5fEdujQd6ed5A7Ug">
+ <supplier xmi:type="uml:Interface" href="platform:/resource/GdataUml/.repository.uml2#_r9XtoH5eEdujQd6ed5A7Ug"/>
+ <client xmi:type="uml:Class" href="platform:/resource/GdataUml/.repository.uml2#_iHkQsH5fEdujQd6ed5A7Ug"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_iaDH0H5fEdujQd6ed5A7Ug">
+ <supplier xmi:type="uml:Package" href="platform:/resource/GdataUml/.repository.uml2#_l_Z6YH5eEdujQd6ed5A7Ug"/>
+ <client xmi:type="uml:Package" href="platform:/resource/GdataUml/.repository.uml2#_l84K0H5eEdujQd6ed5A7Ug"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_ibYkkH5fEdujQd6ed5A7Ug">
+ <supplier xmi:type="uml:Interface" href="platform:/resource/GdataUml/.repository.uml2#_iKVQ0H5fEdujQd6ed5A7Ug"/>
+ <client xmi:type="uml:Interface" href="platform:/resource/GdataUml/.repository.uml2#_r-P3YH5eEdujQd6ed5A7Ug"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_ibaZwn5fEdujQd6ed5A7Ug">
+ <supplier xmi:type="uml:Interface" href="platform:/resource/GdataUml/.repository.uml2#_iJx3MX5fEdujQd6ed5A7Ug"/>
+ <client xmi:type="uml:Interface" href="platform:/resource/GdataUml/.repository.uml2#_r-P3YH5eEdujQd6ed5A7Ug"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_ibc2AH5fEdujQd6ed5A7Ug">
+ <supplier xmi:type="uml:Interface" href="platform:/resource/GdataUml/.repository.uml2#_iJ390H5fEdujQd6ed5A7Ug"/>
+ <client xmi:type="uml:Interface" href="platform:/resource/GdataUml/.repository.uml2#_r-P3YH5eEdujQd6ed5A7Ug"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_iberMn5fEdujQd6ed5A7Ug" supplier="_sAnO4H5eEdujQd6ed5A7Ug">
+ <client xmi:type="uml:Interface" href="platform:/resource/GdataUml/.repository.uml2#_r-P3YH5eEdujQd6ed5A7Ug"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_ibggYn5fEdujQd6ed5A7Ug">
+ <supplier xmi:type="uml:Interface" href="platform:/resource/GdataUml/.repository.uml2#_iKeawH5fEdujQd6ed5A7Ug"/>
+ <client xmi:type="uml:Interface" href="platform:/resource/GdataUml/.repository.uml2#_r-P3YH5eEdujQd6ed5A7Ug"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_ibi8oX5fEdujQd6ed5A7Ug">
+ <supplier xmi:type="uml:Interface" href="platform:/resource/GdataUml/.repository.uml2#_iJ1hkH5fEdujQd6ed5A7Ug"/>
+ <client xmi:type="uml:Interface" href="platform:/resource/GdataUml/.repository.uml2#_r-P3YH5eEdujQd6ed5A7Ug"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_ibkx0n5fEdujQd6ed5A7Ug">
+ <supplier xmi:type="uml:Interface" href="platform:/resource/GdataUml/.repository.uml2#_iJxQIH5fEdujQd6ed5A7Ug"/>
+ <client xmi:type="uml:Interface" href="platform:/resource/GdataUml/.repository.uml2#_r-P3YH5eEdujQd6ed5A7Ug"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_ibmnAn5fEdujQd6ed5A7Ug">
+ <supplier xmi:type="uml:Interface" href="platform:/resource/GdataUml/.repository.uml2#_iJ5L8X5fEdujQd6ed5A7Ug"/>
+ <client xmi:type="uml:Interface" href="platform:/resource/GdataUml/.repository.uml2#_r-P3YH5eEdujQd6ed5A7Ug"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_ibpDQH5fEdujQd6ed5A7Ug">
+ <supplier xmi:type="uml:Interface" href="platform:/resource/GdataUml/.repository.uml2#_sA-bQH5eEdujQd6ed5A7Ug"/>
+ <client xmi:type="uml:Interface" href="platform:/resource/GdataUml/.repository.uml2#_r-P3YH5eEdujQd6ed5A7Ug"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_ibq4cn5fEdujQd6ed5A7Ug">
+ <supplier xmi:type="uml:Interface" href="platform:/resource/GdataUml/.repository.uml2#_iKC88X5fEdujQd6ed5A7Ug"/>
+ <client xmi:type="uml:Interface" href="platform:/resource/GdataUml/.repository.uml2#_r-P3YH5eEdujQd6ed5A7Ug"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_ibston5fEdujQd6ed5A7Ug">
+ <supplier xmi:type="uml:Interface" href="platform:/resource/GdataUml/.repository.uml2#_iJ06gH5fEdujQd6ed5A7Ug"/>
+ <client xmi:type="uml:Interface" href="platform:/resource/GdataUml/.repository.uml2#_r-P3YH5eEdujQd6ed5A7Ug"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_ibui0n5fEdujQd6ed5A7Ug">
+ <supplier xmi:type="uml:Interface" href="platform:/resource/GdataUml/.repository.uml2#_iJ2vsH5fEdujQd6ed5A7Ug"/>
+ <client xmi:type="uml:Interface" href="platform:/resource/GdataUml/.repository.uml2#_r-P3YH5eEdujQd6ed5A7Ug"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_ibw_EX5fEdujQd6ed5A7Ug">
+ <supplier xmi:type="uml:Class" href="platform:/resource/GdataUml/.repository.uml2#_r8CQ4H5eEdujQd6ed5A7Ug"/>
+ <client xmi:type="uml:Interface" href="platform:/resource/GdataUml/.repository.uml2#_r-P3YH5eEdujQd6ed5A7Ug"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_iby0Qn5fEdujQd6ed5A7Ug">
+ <supplier xmi:type="uml:Interface" href="platform:/resource/GdataUml/.repository.uml2#_iJ4k4H5fEdujQd6ed5A7Ug"/>
+ <client xmi:type="uml:Interface" href="platform:/resource/GdataUml/.repository.uml2#_r-P3YH5eEdujQd6ed5A7Ug"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_ib13kH5fEdujQd6ed5A7Ug" supplier="_r7dpIX5eEdujQd6ed5A7Ug">
+ <client xmi:type="uml:Interface" href="platform:/resource/GdataUml/.repository.uml2#_r-P3YH5eEdujQd6ed5A7Ug"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_ib7XIH5fEdujQd6ed5A7Ug">
+ <supplier xmi:type="uml:Package" href="platform:/resource/GdataUml/.repository.uml2#_l_Z6YH5eEdujQd6ed5A7Ug"/>
+ <client xmi:type="uml:Package" href="platform:/resource/GdataUml/.repository.uml2#_l83jwH5eEdujQd6ed5A7Ug"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_lnc38H5fEdujQd6ed5A7Ug">
+ <supplier xmi:type="uml:Class" href="platform:/resource/GdataUml/.repository.uml2#_r_OHwH5eEdujQd6ed5A7Ug"/>
+ <client xmi:type="uml:Class" href="platform:/resource/GdataUml/.repository.uml2#_sAJ74H5eEdujQd6ed5A7Ug"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_lngiUX5fEdujQd6ed5A7Ug" supplier="_sAmAwH5eEdujQd6ed5A7Ug">
+ <client xmi:type="uml:Class" href="platform:/resource/GdataUml/.repository.uml2#_sAJ74H5eEdujQd6ed5A7Ug"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_lni-kH5fEdujQd6ed5A7Ug">
+ <supplier xmi:type="uml:Class" href="platform:/resource/GdataUml/.repository.uml2#_r-yp8H5eEdujQd6ed5A7Ug"/>
+ <client xmi:type="uml:Class" href="platform:/resource/GdataUml/.repository.uml2#_sAJ74H5eEdujQd6ed5A7Ug"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_lnkzwX5fEdujQd6ed5A7Ug">
+ <supplier xmi:type="uml:Class" href="platform:/resource/GdataUml/.repository.uml2#_r8CQ4H5eEdujQd6ed5A7Ug"/>
+ <client xmi:type="uml:Class" href="platform:/resource/GdataUml/.repository.uml2#_sAJ74H5eEdujQd6ed5A7Ug"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_lnsIgH5fEdujQd6ed5A7Ug">
+ <supplier xmi:type="uml:Package" href="platform:/resource/GdataUml/.repository.uml2#_l_Z6YH5eEdujQd6ed5A7Ug"/>
+ <client xmi:type="uml:Package" href="platform:/resource/GdataUml/.repository.uml2#_l84K0H5eEdujQd6ed5A7Ug"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_ln4VwH5fEdujQd6ed5A7Ug">
+ <supplier xmi:type="uml:Class" href="platform:/resource/GdataUml/.repository.uml2#_r_OHwH5eEdujQd6ed5A7Ug"/>
+ <client xmi:type="uml:Class" href="platform:/resource/GdataUml/.repository.uml2#_sAJ74H5eEdujQd6ed5A7Ug"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_ln8AIX5fEdujQd6ed5A7Ug" supplier="_sAmAwH5eEdujQd6ed5A7Ug">
+ <client xmi:type="uml:Class" href="platform:/resource/GdataUml/.repository.uml2#_sAJ74H5eEdujQd6ed5A7Ug"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_ln-cYX5fEdujQd6ed5A7Ug">
+ <supplier xmi:type="uml:Class" href="platform:/resource/GdataUml/.repository.uml2#_r-yp8H5eEdujQd6ed5A7Ug"/>
+ <client xmi:type="uml:Class" href="platform:/resource/GdataUml/.repository.uml2#_sAJ74H5eEdujQd6ed5A7Ug"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_loA4oH5fEdujQd6ed5A7Ug">
+ <supplier xmi:type="uml:Class" href="platform:/resource/GdataUml/.repository.uml2#_r8CQ4H5eEdujQd6ed5A7Ug"/>
+ <client xmi:type="uml:Class" href="platform:/resource/GdataUml/.repository.uml2#_sAJ74H5eEdujQd6ed5A7Ug"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_loG_QH5fEdujQd6ed5A7Ug">
+ <supplier xmi:type="uml:Package" href="platform:/resource/GdataUml/.repository.uml2#_l_Z6YH5eEdujQd6ed5A7Ug"/>
+ <client xmi:type="uml:Package" href="platform:/resource/GdataUml/.repository.uml2#_l84K0H5eEdujQd6ed5A7Ug"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_9vB78H5fEdujQd6ed5A7Ug">
+ <supplier xmi:type="uml:Package" href="platform:/resource/GdataUml/.repository.uml2#_l_Z6YH5eEdujQd6ed5A7Ug"/>
+ <client xmi:type="uml:Package" href="platform:/resource/GdataUml/.repository.uml2#_l84K0H5eEdujQd6ed5A7Ug"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_-K0gEH5fEdujQd6ed5A7Ug">
+ <supplier xmi:type="uml:Package" href="platform:/resource/GdataUml/.repository.uml2#_l_Z6YH5eEdujQd6ed5A7Ug"/>
+ <client xmi:type="uml:Package" href="platform:/resource/GdataUml/.repository.uml2#_l84K0H5eEdujQd6ed5A7Ug"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_-nSZoH5fEdujQd6ed5A7Ug">
+ <supplier xmi:type="uml:Class" href="platform:/resource/GdataUml/.repository.uml2#_r_OHwH5eEdujQd6ed5A7Ug"/>
+ <client xmi:type="uml:Class" href="platform:/resource/GdataUml/.repository.uml2#_sAJ74H5eEdujQd6ed5A7Ug"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_-nUO0X5fEdujQd6ed5A7Ug" supplier="_sAmAwH5eEdujQd6ed5A7Ug">
+ <client xmi:type="uml:Class" href="platform:/resource/GdataUml/.repository.uml2#_sAJ74H5eEdujQd6ed5A7Ug"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_-nWrEH5fEdujQd6ed5A7Ug">
+ <supplier xmi:type="uml:Class" href="platform:/resource/GdataUml/.repository.uml2#_r-yp8H5eEdujQd6ed5A7Ug"/>
+ <client xmi:type="uml:Class" href="platform:/resource/GdataUml/.repository.uml2#_sAJ74H5eEdujQd6ed5A7Ug"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_-nYgQX5fEdujQd6ed5A7Ug">
+ <supplier xmi:type="uml:Class" href="platform:/resource/GdataUml/.repository.uml2#_r8CQ4H5eEdujQd6ed5A7Ug"/>
+ <client xmi:type="uml:Class" href="platform:/resource/GdataUml/.repository.uml2#_sAJ74H5eEdujQd6ed5A7Ug"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Usage" xmi:id="_-nfN8H5fEdujQd6ed5A7Ug">
+ <supplier xmi:type="uml:Package" href="platform:/resource/GdataUml/.repository.uml2#_l_Z6YH5eEdujQd6ed5A7Ug"/>
+ <client xmi:type="uml:Package" href="platform:/resource/GdataUml/.repository.uml2#_l84K0H5eEdujQd6ed5A7Ug"/>
+ </packagedElement>
+</uml:Model>
diff --git a/contrib/gdata-server/src/gom/java/org/apache/lucene/gdata/gom/writer/GOMOutputWriter.java b/contrib/gdata-server/src/gom/java/org/apache/lucene/gdata/gom/writer/GOMOutputWriter.java
new file mode 100644
index 00000000000..ab7a93de1c1
--- /dev/null
+++ b/contrib/gdata-server/src/gom/java/org/apache/lucene/gdata/gom/writer/GOMOutputWriter.java
@@ -0,0 +1,199 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.lucene.gdata.gom.writer;
+
+import java.util.List;
+
+import javax.xml.namespace.QName;
+import javax.xml.stream.XMLStreamException;
+
+import org.apache.lucene.gdata.gom.GOMAttribute;
+import org.apache.lucene.gdata.gom.GOMNamespace;
+
+/**
+ * @author Simon Willnauer
+ *
+ */
+public interface GOMOutputWriter {
+
+ /**
+ * Writes a simple element with full namespace
+ *
+ * @param aName -
+ * element QName
+ * @param aList -
+ * attribute list
+ * @param aValue -
+ * character value
+ * @throws XMLStreamException -
+ * if a write exception occurs
+ */
+ public abstract void writeSimpleXMLElement(QName aName,
+ List<GOMAttribute> aList, String aValue) throws XMLStreamException;
+
+ /**
+ * Writes a simple element with full namespace
+ *
+ * @param aName -
+ * element QName
+ * @param aAttribute -
+ * attribute
+ * @param aValue -
+ * character value
+ * @throws XMLStreamException -
+ * if a write exception occurs
+ */
+ public abstract void writeSimpleXMLElement(QName aName, String aValue,
+ GOMAttribute aAttribute) throws XMLStreamException;
+
+ /**
+ * Writes a simple element with full namespace
+ *
+ * @param aName -
+ * the local name of the element
+ * @param aAttribute -
+ * attribute
+ * @param aValue -
+ * character value
+ * @throws XMLStreamException -
+ * if a write exception occurs
+ */
+ public abstract void writeSimpleXMLElement(String aName, String aValue,
+ GOMAttribute aAttribute) throws XMLStreamException;
+
+ /**
+ * Writes a simple element with default namespace
+ *
+ * @param aName -
+ * elements name
+ * @param aList -
+ * attribute list
+ * @param aValue -
+ * character value
+ * @throws XMLStreamException -
+ * if a write exception occurs
+ */
+ public abstract void writeSimpleXMLElement(String aName,
+ List<GOMAttribute> aList, String aValue) throws XMLStreamException;
+
+ /**
+ * writes a attribute with the attribute namespace Uri
+ *
+ * @param attribute -
+ * the attribute
+ * @throws XMLStreamException -
+ * if a write exception occurs
+ */
+ public abstract void writeAttribute(GOMAttribute attribute)
+ throws XMLStreamException;
+
+ /**
+ * @param aName
+ * @param aList
+ * @throws XMLStreamException
+ */
+ public abstract void writeStartElement(String aName,
+ List<GOMAttribute> aList) throws XMLStreamException;
+
+ /**
+ * @param aName
+ * @param aAttribute
+ * @throws XMLStreamException
+ */
+ public abstract void writeStartElement(String aName, GOMAttribute aAttribute)
+ throws XMLStreamException;
+
+ /**
+ * @param aName
+ * @throws XMLStreamException
+ */
+ public abstract void writeStartElement(String aName)
+ throws XMLStreamException;
+
+ /**
+ * @param aName
+ * @param aList
+ * @throws XMLStreamException
+ */
+ public abstract void writeStartElement(QName aName, List<GOMAttribute> aList)
+ throws XMLStreamException;
+
+ /**
+ * @throws XMLStreamException
+ */
+ public abstract void writeEndElement() throws XMLStreamException;
+
+ /**
+ * @param aContent
+ * @throws XMLStreamException
+ */
+ public abstract void writeContent(String aContent)
+ throws XMLStreamException;
+
+ /**
+ * @param aContent
+ * @throws XMLStreamException
+ */
+ public abstract void writeContentUnescaped(String aContent)
+ throws XMLStreamException;
+
+ /**
+ * @param aNameSpace
+ * @throws XMLStreamException
+ */
+ public abstract void writeDefaultNamespace(GOMNamespace aNameSpace)
+ throws XMLStreamException;
+
+ /**
+ * @param aNameSpace
+ * @throws XMLStreamException
+ */
+ public abstract void writeNamespace(GOMNamespace aNameSpace)
+ throws XMLStreamException;
+
+ /**
+ * @param aString
+ * @param aString2
+ * @throws XMLStreamException
+ */
+ public abstract void writeStartDocument(String aString, String aString2)
+ throws XMLStreamException;
+
+ /**
+ * Writes a end element tag according to the start element tag
+ *
+ * @throws XMLStreamException -
+ * if no start tag has been written or the element stack points
+ * to a different element
+ */
+ public abstract void writeEndDocument() throws XMLStreamException;
+
+ /**
+ * Flush the GOMWriter
+ *
+ * @throws XMLStreamException
+ */
+ public abstract void flush() throws XMLStreamException;
+
+ /**
+ * Closes the GOM Writer
+ *
+ * @throws XMLStreamException
+ */
+ public abstract void close() throws XMLStreamException;
+
+}
\ No newline at end of file
diff --git a/contrib/gdata-server/src/gom/java/org/apache/lucene/gdata/gom/writer/GOMStaxWriter.java b/contrib/gdata-server/src/gom/java/org/apache/lucene/gdata/gom/writer/GOMStaxWriter.java
new file mode 100644
index 00000000000..db95f121409
--- /dev/null
+++ b/contrib/gdata-server/src/gom/java/org/apache/lucene/gdata/gom/writer/GOMStaxWriter.java
@@ -0,0 +1,302 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.lucene.gdata.gom.writer;
+
+import java.io.OutputStream;
+import java.io.OutputStreamWriter;
+import java.io.UnsupportedEncodingException;
+import java.io.Writer;
+import java.util.ArrayList;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+
+import javax.xml.namespace.QName;
+import javax.xml.stream.FactoryConfigurationError;
+import javax.xml.stream.XMLOutputFactory;
+import javax.xml.stream.XMLStreamException;
+import javax.xml.stream.XMLStreamWriter;
+
+import org.apache.lucene.gdata.gom.GOMAttribute;
+import org.apache.lucene.gdata.gom.GOMNamespace;
+
+/**
+ * @author Simon Willnauer
+ *
+ */
+public class GOMStaxWriter implements GOMOutputWriter {
+ private static final String STAX_OUTPUTFACTORY_KEY = "org.apache.lucene.gdata.gom.writer.GOMXmlOutputFactory";
+
+ private final Set<GOMNamespace> namespaceSet = new HashSet<GOMNamespace>(16);
+
+ private final XMLStreamWriter writer;
+ static {
+ /*
+ * set the system property to make sure the factory will be found
+ */
+ String property = System.getProperty(STAX_OUTPUTFACTORY_KEY);
+ if (property == null)
+ System.setProperty(STAX_OUTPUTFACTORY_KEY, STAX_OUTPUTFACTORY_KEY);
+ }
+
+ /**
+ * @param aOutputStream
+ * @param encoding
+ * @throws UnsupportedEncodingException
+ * @throws XMLStreamException
+ * @throws FactoryConfigurationError
+ */
+ public GOMStaxWriter(final OutputStream aOutputStream, String encoding)
+ throws UnsupportedEncodingException, XMLStreamException,
+ FactoryConfigurationError {
+ this(new OutputStreamWriter(aOutputStream, encoding));
+ }
+
+ /**
+ * Class constructor
+ *
+ *
+ * @param aOutputStream -
+ * a output stream to write the xml stream to.
+ * @throws XMLStreamException -
+ * if a write exception occurs
+ * @throws FactoryConfigurationError -
+ * if XMLOutputFactory throws an exception
+ *
+ */
+ public GOMStaxWriter(final OutputStream aOutputStream)
+ throws XMLStreamException, FactoryConfigurationError {
+ this(new OutputStreamWriter(aOutputStream));
+ }
+
+ /**
+ * Class constructor
+ *
+ * @param aWriter -
+ * a writer to write the xml stream to.
+ * @throws XMLStreamException -
+ * if a write exception occurs
+ * @throws FactoryConfigurationError -
+ * if XMLOutputFactory throws an exception
+ */
+ public GOMStaxWriter(final Writer aWriter) throws XMLStreamException,
+ FactoryConfigurationError {
+ if (aWriter == null)
+ throw new IllegalArgumentException("Given writer must not be null");
+
+ this.writer = XMLOutputFactory.newInstance(STAX_OUTPUTFACTORY_KEY,
+ GOMStaxWriter.class.getClassLoader()).createXMLStreamWriter(
+ aWriter);
+
+ }
+
+ /**
+ * @see org.apache.lucene.gdata.gom.writer.GOMOutputWriter#writeSimpleXMLElement(javax.xml.namespace.QName,
+ * java.util.List, java.lang.String)
+ */
+ public void writeSimpleXMLElement(QName aName, List<GOMAttribute> aList,
+ String aValue) throws XMLStreamException {
+ writeStartElement(aName, aList);
+ writeContent(aValue);
+ this.writer.writeEndElement();
+ }
+
+ /**
+ * @see org.apache.lucene.gdata.gom.writer.GOMOutputWriter#writeSimpleXMLElement(javax.xml.namespace.QName,
+ * java.lang.String, org.apache.lucene.gdata.gom.GOMAttribute)
+ */
+ public void writeSimpleXMLElement(QName aName, String aValue,
+ GOMAttribute aAttribute) throws XMLStreamException {
+ List<GOMAttribute> list = null;
+ if (aAttribute != null) {
+ list = new ArrayList<GOMAttribute>(1);
+ list.add(aAttribute);
+ }
+ writeSimpleXMLElement(aName, list, aValue);
+ }
+
+ /**
+ * @see org.apache.lucene.gdata.gom.writer.GOMOutputWriter#writeSimpleXMLElement(java.lang.String,
+ * java.lang.String, org.apache.lucene.gdata.gom.GOMAttribute)
+ */
+ public void writeSimpleXMLElement(String aName, String aValue,
+ GOMAttribute aAttribute) throws XMLStreamException {
+ List<GOMAttribute> list = null;
+ if (aAttribute != null) {
+ list = new ArrayList<GOMAttribute>(1);
+ list.add(aAttribute);
+ }
+ writeSimpleXMLElement(aName, list, aValue);
+ }
+
+ /**
+ * @see org.apache.lucene.gdata.gom.writer.GOMOutputWriter#writeSimpleXMLElement(java.lang.String,
+ * java.util.List, java.lang.String)
+ */
+ public void writeSimpleXMLElement(String aName, List<GOMAttribute> aList,
+ String aValue) throws XMLStreamException {
+ writeStartElement(aName, aList);
+ writeContent(aValue);
+ this.writer.writeEndElement();
+ }
+
+ /**
+ * @see org.apache.lucene.gdata.gom.writer.GOMOutputWriter#writeAttribute(org.apache.lucene.gdata.gom.GOMAttribute)
+ */
+ public void writeAttribute(GOMAttribute attribute)
+ throws XMLStreamException {
+ if (attribute.hasDefaultNamespace())
+ this.writer.writeAttribute(attribute.getLocalName(), attribute
+ .getTextValue());
+ else
+ this.writer.writeAttribute(attribute.getQname().getPrefix(),
+ attribute.getQname().getNamespaceURI(), attribute
+ .getLocalName(), attribute.getTextValue());
+ }
+
+ /**
+ * @see org.apache.lucene.gdata.gom.writer.GOMOutputWriter#writeStartElement(java.lang.String,
+ * java.util.List)
+ */
+ public void writeStartElement(String aName, List<GOMAttribute> aList)
+ throws XMLStreamException {
+ this.writer.writeStartElement(aName);
+ if (aList != null)
+ for (GOMAttribute attribute : aList) {
+ writeAttribute(attribute);
+ }
+ }
+
+ /**
+ * @see org.apache.lucene.gdata.gom.writer.GOMOutputWriter#writeStartElement(java.lang.String,
+ * org.apache.lucene.gdata.gom.GOMAttribute)
+ */
+ public void writeStartElement(String aName, GOMAttribute aAttribute)
+ throws XMLStreamException {
+ this.writer.writeStartElement(aName);
+ writeAttribute(aAttribute);
+ }
+
+ /**
+ * @see org.apache.lucene.gdata.gom.writer.GOMOutputWriter#writeStartElement(java.lang.String)
+ */
+ public void writeStartElement(String aName) throws XMLStreamException {
+ this.writer.writeStartElement(aName);
+ }
+
+ /**
+ * @see org.apache.lucene.gdata.gom.writer.GOMOutputWriter#writeStartElement(javax.xml.namespace.QName,
+ * java.util.List)
+ */
+ public void writeStartElement(QName aName, List<GOMAttribute> aList)
+ throws XMLStreamException {
+ this.writer.writeStartElement(aName.getPrefix(), aName.getLocalPart(),
+ aName.getNamespaceURI());
+ if (aList != null)
+ for (GOMAttribute attribute : aList) {
+ writeAttribute(attribute);
+ }
+ }
+
+ /**
+ * @see org.apache.lucene.gdata.gom.writer.GOMOutputWriter#writeEndElement()
+ */
+ public void writeEndElement() throws XMLStreamException {
+ this.writer.writeEndElement();
+ }
+
+ /**
+ * @see org.apache.lucene.gdata.gom.writer.GOMOutputWriter#writeContent(java.lang.String)
+ */
+ public void writeContent(String aContent) throws XMLStreamException {
+ if (aContent != null) {
+ char[] cs = aContent.toCharArray();
+ this.writer.writeCharacters(cs, 0, cs.length);
+ }
+ }
+
+ /**
+ * @see org.apache.lucene.gdata.gom.writer.GOMOutputWriter#writeContentUnescaped(java.lang.String)
+ */
+ public void writeContentUnescaped(String aContent)
+ throws XMLStreamException {
+ if (aContent != null)
+ this.writer.writeCharacters(aContent);
+ }
+
+ /**
+ * @see org.apache.lucene.gdata.gom.writer.GOMOutputWriter#writeDefaultNamespace(java.lang.String)
+ */
+ public void writeDefaultNamespace(String aNsUri) throws XMLStreamException {
+ this.writer.writeDefaultNamespace(aNsUri);
+
+ }
+
+ /**
+ * @see org.apache.lucene.gdata.gom.writer.GOMOutputWriter#writeDefaultNamespace(org.apache.lucene.gdata.gom.GOMNamespace)
+ */
+ public void writeDefaultNamespace(GOMNamespace aNameSpace)
+ throws XMLStreamException {
+ if (aNameSpace != null)
+ writeDefaultNamespace(aNameSpace.getNamespaceUri());
+ }
+
+ /**
+ * @see org.apache.lucene.gdata.gom.writer.GOMOutputWriter#writeNamespace(org.apache.lucene.gdata.gom.GOMNamespace)
+ */
+ public void writeNamespace(GOMNamespace aNameSpace)
+ throws XMLStreamException {
+ if (aNameSpace == null)
+ return;
+ if (this.namespaceSet.contains(aNameSpace))
+ return;
+ this.namespaceSet.add(aNameSpace);
+ this.writer.writeNamespace(aNameSpace.getNamespacePrefix(), aNameSpace
+ .getNamespaceUri());
+ }
+
+ /**
+ * @see org.apache.lucene.gdata.gom.writer.GOMOutputWriter#writeStartDocument(java.lang.String,
+ * java.lang.String)
+ */
+ public void writeStartDocument(String aString, String aString2)
+ throws XMLStreamException {
+ this.writer.writeStartDocument(aString, aString2);
+ }
+
+ /**
+ * @see org.apache.lucene.gdata.gom.writer.GOMOutputWriter#writeEndDocument()
+ */
+ public void writeEndDocument() throws XMLStreamException {
+ this.writer.writeEndDocument();
+ }
+
+ /**
+ * @see org.apache.lucene.gdata.gom.writer.GOMOutputWriter#flush()
+ */
+ public void flush() throws XMLStreamException {
+ this.writer.flush();
+ }
+
+ /**
+ * @see org.apache.lucene.gdata.gom.writer.GOMOutputWriter#close()
+ */
+ public void close() throws XMLStreamException {
+ this.writer.close();
+ }
+
+}
diff --git a/contrib/gdata-server/src/gom/java/org/apache/lucene/gdata/gom/writer/GOMXmlOutputFactory.java b/contrib/gdata-server/src/gom/java/org/apache/lucene/gdata/gom/writer/GOMXmlOutputFactory.java
new file mode 100644
index 00000000000..c2ed474b708
--- /dev/null
+++ b/contrib/gdata-server/src/gom/java/org/apache/lucene/gdata/gom/writer/GOMXmlOutputFactory.java
@@ -0,0 +1,82 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.lucene.gdata.gom.writer;
+
+import java.io.Writer;
+
+import javax.xml.stream.XMLStreamException;
+import javax.xml.stream.XMLStreamWriter;
+
+import com.bea.xml.stream.ConfigurationContextBase;
+import com.bea.xml.stream.XMLOutputFactoryBase;
+
+/**
+ * @author Simon Willnauer
+ *
+ */
+public class GOMXmlOutputFactory extends XMLOutputFactoryBase {
+ protected ConfigurationContextBase config = new ConfigurationContextBase();
+
+ /**
+ * @see com.bea.xml.stream.XMLOutputFactoryBase#createXMLStreamWriter(java.io.OutputStream,
+ * java.lang.String)
+ */
+ @Override
+ public XMLStreamWriter createXMLStreamWriter(Writer aWriter)
+ throws XMLStreamException {
+ GOMXmlWriter b = new GOMXmlWriter(aWriter);
+ b.setConfigurationContext(config);
+ return b;
+ }
+
+ /**
+ * @see com.bea.xml.stream.XMLOutputFactoryBase#setProperty(java.lang.String,
+ * java.lang.Object)
+ */
+ public void setProperty(java.lang.String name, Object value) {
+ config.setProperty(name, value);
+ }
+
+ /**
+ * @see com.bea.xml.stream.XMLOutputFactoryBase#getProperty(java.lang.String)
+ */
+ public Object getProperty(java.lang.String name) {
+ return config.getProperty(name);
+ }
+
+ /**
+ * @see com.bea.xml.stream.XMLOutputFactoryBase#isPrefixDefaulting()
+ */
+ public boolean isPrefixDefaulting() {
+ return config.isPrefixDefaulting();
+ }
+
+ /**
+ * @see com.bea.xml.stream.XMLOutputFactoryBase#setPrefixDefaulting(boolean)
+ */
+ public void setPrefixDefaulting(boolean value) {
+ config.setPrefixDefaulting(value);
+ }
+
+ /**
+ * @see com.bea.xml.stream.XMLOutputFactoryBase#isPropertySupported(java.lang.String)
+ */
+ public boolean isPropertySupported(String name) {
+ return config.isPropertySupported(name);
+ }
+
+}
diff --git a/contrib/gdata-server/src/gom/java/org/apache/lucene/gdata/gom/writer/GOMXmlWriter.java b/contrib/gdata-server/src/gom/java/org/apache/lucene/gdata/gom/writer/GOMXmlWriter.java
new file mode 100644
index 00000000000..755760274aa
--- /dev/null
+++ b/contrib/gdata-server/src/gom/java/org/apache/lucene/gdata/gom/writer/GOMXmlWriter.java
@@ -0,0 +1,86 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.lucene.gdata.gom.writer;
+
+import java.io.Writer;
+import java.nio.charset.CharsetEncoder;
+
+import javax.xml.stream.XMLStreamException;
+
+import com.bea.xml.stream.XMLWriterBase;
+
+/**
+ * @author Simon Willnauer
+ *
+ */
+public class GOMXmlWriter extends XMLWriterBase {
+ private CharsetEncoder encoder;
+
+ /**
+ *
+ */
+ public GOMXmlWriter() {
+ super();
+ }
+
+ /**
+ * @param arg0
+ */
+ public GOMXmlWriter(Writer arg0) {
+ super(arg0);
+ }
+
+ /**
+ * @see com.bea.xml.stream.XMLWriterBase#writeCharacters(java.lang.String)
+ */
+ @Override
+ public void writeCharacters(String aString) throws XMLStreamException {
+ closeStartElement();
+ char[] ch = aString.toCharArray();
+ escapeCharacters(ch, 0, ch.length);
+ }
+
+ /*
+ * The default implementation escapes all xml chars in the writeCharacters
+ * method. This is not expected for xhtml blobs. To make it easier to write
+ * xhtml blobs the writeCharacters(String) mehtod will be reimplemented for
+ * internal use.
+ */
+ private void escapeCharacters(char chars[], int start, int length)
+ throws XMLStreamException {
+ for (int i = 0; i < length; i++) {
+ final char c = chars[i + start];
+
+ if (c < 32) {
+ if ((c != '\t' && c != '\n')) {
+ write("&#");
+ write(Integer.toString(c));
+ write(';');
+ continue;
+ }
+ } else if (c > 127 && encoder != null && !encoder.canEncode(c)) {
+ write("&#");
+ write(Integer.toString(c));
+ write(';');
+ continue;
+ }
+
+ write(c);
+ }
+ }
+
+}
diff --git a/contrib/gdata-server/src/gom/test/org/apache/lucene/gdata/gom/GOMNamespaceTest.java b/contrib/gdata-server/src/gom/test/org/apache/lucene/gdata/gom/GOMNamespaceTest.java
new file mode 100644
index 00000000000..887d6a2cf0b
--- /dev/null
+++ b/contrib/gdata-server/src/gom/test/org/apache/lucene/gdata/gom/GOMNamespaceTest.java
@@ -0,0 +1,55 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.lucene.gdata.gom;
+
+import junit.framework.TestCase;
+
+/**
+ * Testcase for GOMNamespace
+ *
+ * @author Simon Willnauer
+ *
+ */
+public class GOMNamespaceTest extends TestCase {
+
+ /*
+ * Test method for
+ * 'org.apache.lucene.gdata.gom.GOMNamespace.GOMNamespace(String, String)'
+ */
+ public void testGOMNamespace() {
+ try {
+ GOMNamespace namespace = new GOMNamespace(null, "a");
+ fail("uri is null");
+ } catch (IllegalArgumentException e) {
+ //
+ }
+ try {
+ new GOMNamespace("a", null);
+ } catch (Exception e) {
+ fail("unexp. exc");
+ }
+
+ GOMNamespace namespace = new GOMNamespace(GOMNamespace.ATOM_NS_URI,
+ GOMNamespace.ATOM_NS_PREFIX);
+ assertEquals(GOMNamespace.ATOM_NS_PREFIX, namespace
+ .getNamespacePrefix());
+ assertEquals(GOMNamespace.ATOM_NS_URI, namespace.getNamespaceUri());
+ //
+
+ }
+
+}
diff --git a/contrib/gdata-server/src/gom/test/org/apache/lucene/gdata/gom/core/ArbitraryGOMXmlTest.java b/contrib/gdata-server/src/gom/test/org/apache/lucene/gdata/gom/core/ArbitraryGOMXmlTest.java
new file mode 100644
index 00000000000..0d0773ecc9e
--- /dev/null
+++ b/contrib/gdata-server/src/gom/test/org/apache/lucene/gdata/gom/core/ArbitraryGOMXmlTest.java
@@ -0,0 +1,179 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.lucene.gdata.gom.core;
+
+import java.io.StringWriter;
+import java.util.List;
+
+import javax.xml.namespace.QName;
+import javax.xml.stream.FactoryConfigurationError;
+import javax.xml.stream.XMLStreamException;
+
+import junit.framework.TestCase;
+
+import org.apache.lucene.gdata.gom.GOMAttribute;
+import org.apache.lucene.gdata.gom.writer.GOMStaxWriter;
+import org.apache.lucene.gdata.gom.writer.GOMOutputWriter;
+
+/**
+ * @author Simon Willnauer
+ *
+ */
+public class ArbitraryGOMXmlTest extends TestCase {
+ private ArbitraryGOMXml arbXML;
+
+ private QName name = new QName("testme");
+
+ protected void setUp() throws Exception {
+ super.setUp();
+
+ arbXML = new ArbitraryGOMXml(name);
+ }
+
+ protected void tearDown() throws Exception {
+ super.tearDown();
+ }
+
+ /*
+ * Test method for
+ * 'org.apache.lucene.gdata.gom.core.ArbitraryGOMXml.getChildParser(QName)'
+ */
+ public void testGetChildParser() {
+
+ try {
+ this.arbXML.getChildParser(null);
+ fail("qname is null");
+ } catch (GDataParseException e) {
+ assertEquals(0, this.arbXML.getChildren().size());
+ }
+ AtomParser childParser = this.arbXML.getChildParser(this.name);
+ assertTrue(childParser instanceof ArbitraryGOMXml);
+
+ assertEquals(name, ((ArbitraryGOMXml) childParser).getQname());
+ assertEquals(name.getLocalPart(), ((ArbitraryGOMXml) childParser)
+ .getLocalName());
+ assertEquals(1, this.arbXML.getChildren().size());
+ }
+
+ /*
+ * Test method for
+ * 'org.apache.lucene.gdata.gom.core.ArbitraryGOMXml.processAttribute(QName,
+ * String)'
+ */
+ public void testProcessAttribute() {
+ try {
+ this.arbXML.processAttribute(null, "test");
+ fail("qname is null");
+
+ } catch (GDataParseException e) {
+ assertTrue(this.arbXML.getAttributes().size() == 0);
+ }
+ this.arbXML.processAttribute(name, "testme");
+ {
+ List<GOMAttribute> attributes = this.arbXML.getAttributes();
+ assertTrue(attributes.size() == 1);
+ GOMAttribute attribute = attributes.get(0);
+ assertNotNull(attribute);
+ assertEquals(name, attribute.getQname());
+ assertEquals(name.getLocalPart(), attribute.getLocalName());
+ assertEquals("testme", attribute.getTextValue());
+ }
+
+ {
+ this.arbXML.processAttribute(name, null);
+ List<GOMAttribute> attributes = this.arbXML.getAttributes();
+ assertTrue(attributes.size() == 2);
+ GOMAttribute attribute = attributes.get(1);
+ assertNotNull(attribute);
+ assertEquals(name, attribute.getQname());
+ assertEquals(name.getLocalPart(), attribute.getLocalName());
+ assertEquals("", attribute.getTextValue());
+ }
+ }
+
+ /*
+ * Test method for
+ * 'org.apache.lucene.gdata.gom.core.ArbitraryGOMXml.processElementValue(String)'
+ */
+ public void testProcessElementValue() {
+ try {
+ this.arbXML.processElementValue(null);
+ fail("name is null");
+ } catch (GDataParseException e) {
+ //
+ }
+ this.arbXML.processElementValue("test value");
+
+ try {
+ this.arbXML.processElementValue("test value");
+ fail("value is already set");
+ } catch (GDataParseException e) {
+ //
+ }
+ assertEquals("test value", this.arbXML.getTextValue());
+
+ }
+
+ /*
+ * Test method for
+ * 'org.apache.lucene.gdata.gom.core.ArbitraryGOMXml.ArbitraryGOMXml(QName)'
+ */
+ public void testArbitraryGOMXml() {
+ try {
+ new ArbitraryGOMXml(null);
+ fail("qname is null");
+ } catch (IllegalArgumentException e) {
+
+ }
+ ArbitraryGOMXml xml = new ArbitraryGOMXml(name);
+ assertEquals(name, xml.getQname());
+ assertEquals(name.getLocalPart(), xml.getLocalName());
+ }
+
+ /*
+ * Test method for
+ * 'org.apache.lucene.gdata.gom.core.ArbitraryGOMXml.writeAtomOutput(GOMWriter)'
+ */
+ public void testWriteAtomOutput() throws XMLStreamException,
+ FactoryConfigurationError {
+ {
+ StringWriter writer = new StringWriter();
+ GOMOutputWriter w = new GOMStaxWriter(writer);
+ this.arbXML.writeAtomOutput(w);
+ assertNotNull(w.toString());
+ assertEquals("<" + this.name.getLocalPart() + "/>", writer
+ .toString());
+ }
+ try {
+ this.arbXML.writeAtomOutput(null);
+ fail("writer is null");
+
+ } catch (NullPointerException e) {
+ //
+ }
+ {
+ this.arbXML.processAttribute(name, "testme1");
+ this.arbXML.processElementValue("testme2");
+ StringWriter writer = new StringWriter();
+ GOMOutputWriter w = new GOMStaxWriter(writer);
+ this.arbXML.writeAtomOutput(w);
+ assertEquals("<" + this.name.getLocalPart()
+ + " testme=\"testme1\">" + "testme2" + "</"
+ + this.name.getLocalPart() + ">", writer.toString());
+ }
+ }
+}
diff --git a/contrib/gdata-server/src/gom/test/org/apache/lucene/gdata/gom/core/AtomUriElementTest.java b/contrib/gdata-server/src/gom/test/org/apache/lucene/gdata/gom/core/AtomUriElementTest.java
new file mode 100644
index 00000000000..9b44f736ae4
--- /dev/null
+++ b/contrib/gdata-server/src/gom/test/org/apache/lucene/gdata/gom/core/AtomUriElementTest.java
@@ -0,0 +1,136 @@
+package org.apache.lucene.gdata.gom.core;
+
+import java.io.StringWriter;
+
+import javax.xml.stream.FactoryConfigurationError;
+import javax.xml.stream.XMLStreamException;
+
+import org.apache.lucene.gdata.gom.GOMIcon;
+import org.apache.lucene.gdata.gom.GOMLogo;
+import org.apache.lucene.gdata.gom.writer.GOMStaxWriter;
+import org.apache.lucene.gdata.gom.writer.GOMOutputWriter;
+
+import junit.framework.TestCase;
+
+/**
+ * @author Simon Willnauer
+ *
+ */
+public class AtomUriElementTest extends TestCase {
+ GOMIconImpl iconImpl;
+
+ GOMLogoImpl logoImpl;
+
+ protected void setUp() throws Exception {
+ this.iconImpl = new GOMIconImpl();
+ this.logoImpl = new GOMLogoImpl();
+
+ }
+
+ /*
+ * Test method for
+ * 'org.apache.lucene.gdata.gom.core.AtomUriElement.processEndElement()'
+ */
+ public void testProcessEndElement() {
+ try {
+ this.iconImpl.processEndElement();
+ fail("no text value");
+ } catch (GDataParseException e) {
+ assertTrue(e.getMessage().indexOf("requires a element value") > 0);
+ }
+
+ try {
+ this.iconImpl.setTextValue("test");
+
+ this.iconImpl.processEndElement();
+ fail("no text value");
+ } catch (GDataParseException e) {
+ assertTrue(e.getMessage().indexOf("must be a") > 0);
+ }
+ try {
+ this.iconImpl.setTextValue("/test");
+
+ this.iconImpl.processEndElement();
+ fail("no text value");
+ } catch (GDataParseException e) {
+ assertTrue(e.getMessage().indexOf("must be a") > 0);
+ }
+ this.iconImpl.xmlBase = "http://www.apache.org";
+ this.iconImpl.setTextValue("/test");
+
+ this.iconImpl.processEndElement();
+
+ this.iconImpl.xmlBase = null;
+ this.iconImpl.setTextValue("http://www.apache.org/test");
+
+ }
+
+ public void testConstructor() {
+ assertEquals(GOMIcon.LOCALNAME, this.iconImpl.getLocalName());
+ assertEquals(GOMIcon.LOCALNAME, this.iconImpl.getQname().getLocalPart());
+ assertEquals(GOMLogo.LOCALNAME, this.logoImpl.getLocalName());
+ assertEquals(GOMLogo.LOCALNAME, this.logoImpl.getQname().getLocalPart());
+ }
+
+ public void testWriteRssOutput() throws XMLStreamException,
+ FactoryConfigurationError {
+
+ {
+ StringWriter stW = new StringWriter();
+ GOMOutputWriter writer = new GOMStaxWriter(stW);
+ this.iconImpl.writeRssOutput(writer);
+ assertEquals("<url/>", stW.toString());
+ }
+ {
+ StringWriter stW = new StringWriter();
+ GOMOutputWriter writer = new GOMStaxWriter(stW);
+ this.iconImpl.setTextValue("test");
+ this.iconImpl.writeRssOutput(writer);
+ assertEquals("<url>test</url>", stW.toString());
+ }
+
+ {
+ StringWriter stW = new StringWriter();
+ GOMOutputWriter writer = new GOMStaxWriter(stW);
+ this.logoImpl.writeRssOutput(writer);
+ assertEquals("<url/>", stW.toString());
+ }
+ {
+ StringWriter stW = new StringWriter();
+ GOMOutputWriter writer = new GOMStaxWriter(stW);
+ this.logoImpl.setTextValue("test");
+ this.logoImpl.writeRssOutput(writer);
+ assertEquals("<url>test</url>", stW.toString());
+ }
+ }
+
+ public void testWriteAtomOutput() throws XMLStreamException {
+ {
+ StringWriter stW = new StringWriter();
+ GOMOutputWriter writer = new GOMStaxWriter(stW);
+ this.iconImpl.writeAtomOutput(writer);
+ assertEquals("<icon/>", stW.toString());
+ }
+ {
+ StringWriter stW = new StringWriter();
+ GOMOutputWriter writer = new GOMStaxWriter(stW);
+ this.iconImpl.setTextValue("test");
+ this.iconImpl.writeAtomOutput(writer);
+ assertEquals("<icon>test</icon>", stW.toString());
+ }
+
+ {
+ StringWriter stW = new StringWriter();
+ GOMOutputWriter writer = new GOMStaxWriter(stW);
+ this.logoImpl.writeAtomOutput(writer);
+ assertEquals("<logo/>", stW.toString());
+ }
+ {
+ StringWriter stW = new StringWriter();
+ GOMOutputWriter writer = new GOMStaxWriter(stW);
+ this.logoImpl.setTextValue("test");
+ this.logoImpl.writeAtomOutput(writer);
+ assertEquals("<logo>test</logo>", stW.toString());
+ }
+ }
+}
diff --git a/contrib/gdata-server/src/gom/test/org/apache/lucene/gdata/gom/core/GOMAttributeImplTest.java b/contrib/gdata-server/src/gom/test/org/apache/lucene/gdata/gom/core/GOMAttributeImplTest.java
new file mode 100644
index 00000000000..094b0666718
--- /dev/null
+++ b/contrib/gdata-server/src/gom/test/org/apache/lucene/gdata/gom/core/GOMAttributeImplTest.java
@@ -0,0 +1,76 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.lucene.gdata.gom.core;
+
+import javax.xml.namespace.QName;
+
+import junit.framework.TestCase;
+
+/**
+ * @author Simon Willnauer
+ *
+ */
+public class GOMAttributeImplTest extends TestCase {
+ protected GOMAttributeImpl gomAttribute;
+
+ protected void setUp() throws Exception {
+ gomAttribute = new GOMAttributeImpl("test", "test");
+ }
+
+ /*
+ * Test method for
+ * 'org.apache.lucene.gdata.gom.core.GOMAttributeImpl.GOMAttributeImpl(String,
+ * String)'
+ */
+ public void testGOMAttributeImplStringString() {
+ GOMAttributeImpl impl = new GOMAttributeImpl("test", "test");
+ assertTrue(impl.hasDefaultNamespace());
+ assertTrue(impl.getLocalName().equals(impl.getTextValue()));
+ assertEquals("test", impl.getLocalName());
+
+ }
+
+ /*
+ * Test method for
+ * 'org.apache.lucene.gdata.gom.core.GOMAttributeImpl.GOMAttributeImpl(String,
+ * String, String, String)'
+ */
+ public void testGOMAttributeImplStringStringStringString() {
+ GOMAttributeImpl impl = new GOMAttributeImpl("www.apache.org", "ap",
+ "test", "test");
+ assertFalse(impl.hasDefaultNamespace());
+ assertTrue(impl.getLocalName().equals(impl.getTextValue()));
+ assertEquals("test", impl.getLocalName());
+ assertEquals("www.apache.org", impl.getQname().getNamespaceURI());
+ assertEquals("ap", impl.getQname().getPrefix());
+ }
+
+ /*
+ * Test method for
+ * 'org.apache.lucene.gdata.gom.core.GOMAttributeImpl.getQname()'
+ */
+ public void testGetQname() {
+ QName qname = gomAttribute.getQname();
+ assertSame(qname, gomAttribute.getQname());
+ assertTrue(gomAttribute.hasDefaultNamespace());
+ gomAttribute.setNamespaceUri("something else");
+ assertNotSame(qname, gomAttribute.getQname());
+ assertFalse(gomAttribute.hasDefaultNamespace());
+ }
+
+}
diff --git a/contrib/gdata-server/src/gom/test/org/apache/lucene/gdata/gom/core/GOMAuthorImplTest.java b/contrib/gdata-server/src/gom/test/org/apache/lucene/gdata/gom/core/GOMAuthorImplTest.java
new file mode 100644
index 00000000000..04d488826a9
--- /dev/null
+++ b/contrib/gdata-server/src/gom/test/org/apache/lucene/gdata/gom/core/GOMAuthorImplTest.java
@@ -0,0 +1,84 @@
+package org.apache.lucene.gdata.gom.core;
+
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+import java.io.StringWriter;
+
+import javax.xml.stream.XMLStreamException;
+
+import org.apache.lucene.gdata.gom.GOMAuthor;
+import org.apache.lucene.gdata.gom.writer.GOMStaxWriter;
+import org.apache.lucene.gdata.gom.writer.GOMOutputWriter;
+
+import junit.framework.TestCase;
+
+/**
+ * @author Simon Willnauer
+ *
+ */
+public class GOMAuthorImplTest extends TestCase {
+
+ /*
+ * Test method for
+ * 'org.apache.lucene.gdata.gom.core.GOMAuthorImpl.writeRssOutput(GOMWriter)'
+ */
+ public void testWriteRssOutput() throws XMLStreamException {
+ GOMAuthorImpl impl = new GOMAuthorImpl();
+ try {
+ impl.writeRssOutput(null);
+ fail("writer is null");
+ } catch (GDataParseException e) {
+ }
+ StringWriter writer2 = new StringWriter();
+
+ GOMOutputWriter writer = new GOMStaxWriter(writer2);
+ impl.writeRssOutput(writer, "test");
+ writer.flush();
+ writer2.flush();
+
+ assertEquals("<test></test>", writer2.toString());
+ impl.setEmail("[email protected]");
+ impl.setUri("someuri");
+ writer.close();
+
+ writer2 = new StringWriter();
+ writer = new GOMStaxWriter(writer2);
+ impl.writeRssOutput(writer);
+ writer.flush();
+ writer2.flush();
+ assertTrue(writer2.toString().length() > 0);
+
+ assertEquals("<" + GOMAuthor.LOCALNAME + ">" + impl.getEmail() + "</"
+ + GOMAuthor.LOCALNAME + ">", writer2.toString());
+
+ writer.close();
+
+ impl.setName("simonw");
+ writer2 = new StringWriter();
+ writer = new GOMStaxWriter(writer2);
+ impl.writeRssOutput(writer);
+ writer.flush();
+ writer2.flush();
+ assertTrue(writer2.toString().length() > 0);
+
+ assertEquals("<" + GOMAuthor.LOCALNAME + ">" + impl.getEmail() + "("
+ + impl.getName() + ")</" + GOMAuthor.LOCALNAME + ">", writer2
+ .toString());
+
+ }
+
+}
diff --git a/contrib/gdata-server/src/gom/test/org/apache/lucene/gdata/gom/core/GOMCategoryTest.java b/contrib/gdata-server/src/gom/test/org/apache/lucene/gdata/gom/core/GOMCategoryTest.java
new file mode 100644
index 00000000000..7da016feec4
--- /dev/null
+++ b/contrib/gdata-server/src/gom/test/org/apache/lucene/gdata/gom/core/GOMCategoryTest.java
@@ -0,0 +1,262 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.lucene.gdata.gom.core;
+
+import java.io.StringWriter;
+
+import javax.xml.namespace.QName;
+import javax.xml.stream.XMLStreamException;
+
+import org.apache.lucene.gdata.gom.GOMNamespace;
+import org.apache.lucene.gdata.gom.writer.GOMStaxWriter;
+import org.apache.lucene.gdata.gom.writer.GOMOutputWriter;
+
+import junit.framework.TestCase;
+
+/**
+ * @author Simon Willnauer
+ *
+ */
+public class GOMCategoryTest extends TestCase {
+ private QName qname = new QName(GOMNamespace.ATOM_NS_URI, "testme", "");
+
+ GOMCategoryImpl cat;
+
+ protected void setUp() throws Exception {
+ this.cat = new GOMCategoryImpl();
+ }
+
+ protected void tearDown() throws Exception {
+ super.tearDown();
+ }
+
+ /*
+ * Test method for
+ * 'org.apache.lucene.gdata.gom.core.GOMCategoryImpl.writeAtomOutput(GOMWriter)'
+ */
+ public void testWriteAtomOutput() throws XMLStreamException {
+ try {
+ this.cat.writeAtomOutput(null);
+ fail("wirter is null");
+ } catch (NullPointerException e) {
+ //
+ }
+ {
+ StringWriter strWriter = new StringWriter();
+ GOMOutputWriter writer = new GOMStaxWriter(strWriter);
+ this.cat.writeAtomOutput(writer);
+ assertEquals("<category term=\"\"/>", strWriter.toString());
+
+ }
+
+ {
+ StringWriter strWriter = new StringWriter();
+ GOMOutputWriter writer = new GOMStaxWriter(strWriter);
+ this.cat.term = "test";
+ this.cat.writeAtomOutput(writer);
+ assertEquals("<category term=\"test\"/>", strWriter.toString());
+
+ }
+
+ {
+ StringWriter strWriter = new StringWriter();
+ GOMOutputWriter writer = new GOMStaxWriter(strWriter);
+ this.cat.label = "python";
+ this.cat.scheme = "monty";
+
+ this.cat.writeAtomOutput(writer);
+ assertEquals(
+ "<category term=\"test\" scheme=\"monty\" label=\"python\"/>",
+ strWriter.toString());
+
+ }
+
+ }
+
+ /*
+ * Test method for
+ * 'org.apache.lucene.gdata.gom.core.GOMCategoryImpl.writeRssOutput(GOMWriter)'
+ */
+ public void testWriteRssOutput() throws XMLStreamException {
+ try {
+ this.cat.writeRssOutput(null);
+ fail("wirter is null");
+ } catch (NullPointerException e) {
+ //
+ }
+
+ {
+ StringWriter strWriter = new StringWriter();
+ GOMOutputWriter writer = new GOMStaxWriter(strWriter);
+ this.cat.writeRssOutput(writer);
+ assertEquals("<category domain=\"\"/>", strWriter.toString());
+ }
+
+ {
+ StringWriter strWriter = new StringWriter();
+ GOMOutputWriter writer = new GOMStaxWriter(strWriter);
+ this.cat.scheme = "www.apache.org";
+ this.cat.writeRssOutput(writer);
+ assertEquals("<category domain=\"www.apache.org\"/>", strWriter
+ .toString());
+ }
+
+ {
+ StringWriter strWriter = new StringWriter();
+ GOMOutputWriter writer = new GOMStaxWriter(strWriter);
+ this.cat.scheme = "www.apache.org";
+ this.cat.term = "Goo Data";
+ this.cat.writeRssOutput(writer);
+ assertEquals(
+ "<category domain=\"www.apache.org\">Goo Data</category>",
+ strWriter.toString());
+ }
+
+ {
+ StringWriter strWriter = new StringWriter();
+ GOMOutputWriter writer = new GOMStaxWriter(strWriter);
+ this.cat.scheme = "www.apache.org";
+ this.cat.term = "Goo Data";
+ this.cat.label = "ignore";
+ this.cat.writeRssOutput(writer);
+ assertEquals(
+ "<category domain=\"www.apache.org\">Goo Data</category>",
+ strWriter.toString());
+ }
+
+ }
+
+ /*
+ * Test method for
+ * 'org.apache.lucene.gdata.gom.core.AbstractGOMElement.processAttribute(QName,
+ * String)'
+ */
+ public void testProcessAttribute() {
+ try {
+ this.cat.processAttribute(null, "test");
+ fail("qname is null");
+ } catch (GDataParseException e) {
+ //
+ }
+ {
+ QName name = new QName("term");
+ this.cat.processAttribute(name, "helloworld");
+ assertEquals("helloworld", this.cat.getTerm());
+
+ try {
+ this.cat.processAttribute(name, "helloworld");
+ fail("duplicated attribute");
+ } catch (GDataParseException e) {
+ //
+ }
+ }
+
+ {
+ QName name = new QName("scheme");
+ this.cat.processAttribute(name, "helloworld1");
+ assertEquals("helloworld1", this.cat.getScheme());
+
+ try {
+ this.cat.processAttribute(name, "helloworld1");
+ fail("duplicated attribute");
+ } catch (GDataParseException e) {
+ //
+ }
+ }
+
+ {
+ QName name = new QName("label");
+ this.cat.processAttribute(name, "John Cleese");
+ assertEquals("John Cleese", this.cat.getLabel());
+
+ try {
+ this.cat.processAttribute(name, "John Cleese");
+ fail("duplicated attribute");
+ } catch (GDataParseException e) {
+ //
+ }
+ }
+
+ }
+
+ /*
+ * Test method for
+ * 'org.apache.lucene.gdata.gom.core.AbstractGOMElement.processElementValue(String)'
+ */
+ public void testProcessElementValue() {
+ try {
+ this.cat.processElementValue(null);
+ fail("element value is null");
+ } catch (GDataParseException e) {
+ //
+ }
+
+ try {
+ this.cat.processElementValue("and again");
+ fail("can't contain a text value");
+ } catch (GDataParseException e) {
+ //
+ assertNull(this.cat.getTextValue());
+ }
+
+ }
+
+ /*
+ * Test method for
+ * 'org.apache.lucene.gdata.gom.core.AbstractGOMElement.processEndElement()'
+ */
+ public void testProcessEndElement() {
+ try {
+ this.cat.processEndElement();
+ fail("term is not set");
+ } catch (GDataParseException e) {
+ //
+ }
+ this.cat.setTerm("my Term");
+ this.cat.processEndElement();
+ this.cat.setScheme("test");
+
+ try {
+ this.cat.processEndElement();
+ fail("scheme is not a absoulte uri");
+ } catch (GDataParseException e) {
+ //
+ }
+
+ this.cat.setScheme("/test");
+
+ try {
+ this.cat.processEndElement();
+ fail("scheme is not a absoulte uri and no xmlbase is set");
+ } catch (GDataParseException e) {
+ //
+ }
+ {
+ this.cat.xmlBase = "http://www.apache.org";
+ this.cat.processEndElement();
+ }
+
+ {
+ this.cat.xmlBase = null;
+ this.cat.setScheme("http://www.apache.org/test");
+ this.cat.processEndElement();
+ }
+
+ }
+
+}
diff --git a/contrib/gdata-server/src/gom/test/org/apache/lucene/gdata/gom/core/GOMContentImplTest.java b/contrib/gdata-server/src/gom/test/org/apache/lucene/gdata/gom/core/GOMContentImplTest.java
new file mode 100644
index 00000000000..e773f60c758
--- /dev/null
+++ b/contrib/gdata-server/src/gom/test/org/apache/lucene/gdata/gom/core/GOMContentImplTest.java
@@ -0,0 +1,275 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.lucene.gdata.gom.core;
+
+import java.io.StringWriter;
+
+import javax.xml.namespace.QName;
+import javax.xml.stream.FactoryConfigurationError;
+import javax.xml.stream.XMLStreamException;
+
+import org.apache.lucene.gdata.gom.AtomMediaType;
+import org.apache.lucene.gdata.gom.ContentType;
+import org.apache.lucene.gdata.gom.GOMContent;
+import org.apache.lucene.gdata.gom.GOMNamespace;
+import org.apache.lucene.gdata.gom.core.GOMTextContructImpl.XMLBlobContentParser;
+import org.apache.lucene.gdata.gom.writer.GOMOutputWriter;
+import org.apache.lucene.gdata.gom.writer.GOMStaxWriter;
+
+import junit.framework.TestCase;
+
+/**
+ * @author Simon Willnauer
+ *
+ */
+public class GOMContentImplTest extends TestCase {
+
+ private GOMContentImpl impl;
+
+ protected void setUp() throws Exception {
+ super.setUp();
+ this.impl = new GOMContentImpl();
+ }
+
+ /*
+ * Test method for
+ * 'org.apache.lucene.gdata.gom.core.GOMContentImpl.getChildParser(QName)'
+ */
+ public void testGetChildParser() {
+ try {
+ this.impl.getChildParser(new QName("test"));
+ fail("no blob specified");
+ } catch (GDataParseException e) {
+ //
+ }
+
+ this.impl.setAtomMediaType(AtomMediaType.XML);
+ AtomParser childParser = this.impl.getChildParser(new QName("test"));
+ assertNotNull(childParser);
+ assertTrue(childParser instanceof XMLBlobContentParser);
+
+ }
+
+ /*
+ * Test method for
+ * 'org.apache.lucene.gdata.gom.core.GOMContentImpl.processAttribute(QName,
+ * String)'
+ */
+ public void testProcessAttribute() {
+ try {
+ this.impl.processAttribute(null, "test");
+ fail("qname is null");
+ } catch (GDataParseException e) {
+ //
+ }
+ try {
+ this.impl.processAttribute(new QName("test"), null);
+ fail("value is null");
+ } catch (GDataParseException e) {
+ //
+ }
+ this.impl.processAttribute(new QName(GOMNamespace.ATOM_NS_URI, "type"),
+ "text/xml");
+ assertSame(AtomMediaType.XML, this.impl.getAtomMediaType());
+ try {
+ this.impl.processAttribute(new QName(GOMNamespace.ATOM_NS_URI,
+ "type"), "text/xml");
+ fail("duplicated attribute");
+ } catch (GDataParseException e) {
+ //
+ }
+ this.impl.setAtomMediaType(null);
+ this.impl.processAttribute(new QName(GOMNamespace.ATOM_NS_URI, "type"),
+ "text/plain");
+ assertSame(AtomMediaType.TEXT, this.impl.getAtomMediaType());
+
+ this.impl.setAtomMediaType(null);
+ this.impl.processAttribute(new QName(GOMNamespace.ATOM_NS_URI, "type"),
+ "image/jpeg");
+ assertSame(AtomMediaType.BINARY, this.impl.getAtomMediaType());
+
+ // test if super is called
+ this.impl.setAtomMediaType(null);
+ this.impl.processAttribute(new QName(GOMNamespace.ATOM_NS_URI, "type"),
+ "xhtml");
+ assertNull(this.impl.getAtomMediaType());
+ assertSame(ContentType.XHTML, this.impl.getContentType());
+
+ this.impl.processAttribute(new QName(GOMNamespace.ATOM_NS_URI, "src"),
+ "test");
+ assertEquals("test", this.impl.getSrc());
+ try {
+ this.impl.processAttribute(new QName(GOMNamespace.ATOM_NS_URI,
+ "src"), "text/xml");
+ fail("duplicated attribute");
+ } catch (GDataParseException e) {
+ //
+ }
+
+ }
+
+ /*
+ * Test method for
+ * 'org.apache.lucene.gdata.gom.core.GOMContentImpl.processElementValue(String)'
+ */
+ public void testProcessElementValue() {
+ assertNull(this.impl.getTextValue());
+ this.impl.processElementValue("test");
+ assertEquals("test", this.impl.getTextValue());
+ this.impl.setSrc("http://www.apache.org");
+ try {
+ this.impl.processElementValue("test");
+ fail("src is set no element value allowed");
+ } catch (GDataParseException e) {
+ //
+ }
+
+ }
+
+ /*
+ * Test method for
+ * 'org.apache.lucene.gdata.gom.core.GOMContentImpl.processEndElement()'
+ */
+ public void testProcessEndElement() {
+ try {
+ this.impl.processEndElement();
+ fail("no type attribute");
+ } catch (GDataParseException e) {
+ //
+ }
+ this.impl.processAttribute(new QName(GOMNamespace.ATOM_NS_URI, "type"),
+ "text/plain");
+ this.impl.processEndElement();
+ this.impl.setSrc("http://www.apache.org");
+ this.impl.processEndElement();
+
+ this.impl.setSrc("/test");
+ try {
+ this.impl.processEndElement();
+ fail("must be absolut uri");
+ } catch (GDataParseException e) {
+ //
+ }
+ this.impl.xmlBase = "http://www.apache.org";
+ this.impl.processEndElement();
+ }
+
+ /*
+ * Test method for
+ * 'org.apache.lucene.gdata.gom.core.GOMContentImpl.writeAtomOutput(GOMOutputWriter)'
+ */
+ public void testWriteAtomOutput() throws XMLStreamException,
+ FactoryConfigurationError {
+ {
+ StringWriter stW = new StringWriter();
+ GOMOutputWriter writer = new GOMStaxWriter(stW);
+ this.impl.writeAtomOutput(writer);
+ assertEquals("<content type=\"text\"/>", stW.toString());
+ }
+
+ {
+ this.impl.processAttribute(new QName(GOMNamespace.ATOM_NS_URI,
+ "type"), "image/jpeg");
+ StringWriter stW = new StringWriter();
+ GOMOutputWriter writer = new GOMStaxWriter(stW);
+ this.impl.writeAtomOutput(writer);
+ assertEquals("<content type=\"image/jpeg\"/>", stW.toString());
+ }
+
+ {
+ this.impl.setSrc("http://www.apache.org");
+ this.impl.setTextValue("hello world");
+ StringWriter stW = new StringWriter();
+ GOMOutputWriter writer = new GOMStaxWriter(stW);
+ this.impl.writeAtomOutput(writer);
+ assertEquals(
+ "<content type=\"image/jpeg\" src=\"http://www.apache.org\"/>",
+ stW.toString());
+ }
+
+ {
+ this.impl.setSrc(null);
+ this.impl.setTextValue("hello world");
+ StringWriter stW = new StringWriter();
+ GOMOutputWriter writer = new GOMStaxWriter(stW);
+ this.impl.writeAtomOutput(writer);
+ assertEquals("<content type=\"image/jpeg\">hello world</content>",
+ stW.toString());
+ }
+
+ }
+
+ /*
+ * Test method for
+ * 'org.apache.lucene.gdata.gom.core.GOMContentImpl.writeRssOutput(GOMOutputWriter)'
+ */
+ public void testWriteRssOutputGOMOutputWriter() throws XMLStreamException {
+ {
+ StringWriter stW = new StringWriter();
+ GOMOutputWriter writer = new GOMStaxWriter(stW);
+ this.impl.writeRssOutput(writer);
+ assertEquals("<description/>", stW.toString());
+ }
+
+ {
+ this.impl.setSrc("http://www.apache.org");
+ this.impl.setAtomMediaType(AtomMediaType.TEXT);
+ StringWriter stW = new StringWriter();
+ GOMOutputWriter writer = new GOMStaxWriter(stW);
+ this.impl.writeRssOutput(writer);
+ assertEquals("<link>http://www.apache.org</link>", stW.toString());
+ }
+
+ {
+ this.impl.setSrc(null);
+ this.impl.setAtomMediaType(AtomMediaType.TEXT);
+ this.impl.setTextValue("test");
+ StringWriter stW = new StringWriter();
+ GOMOutputWriter writer = new GOMStaxWriter(stW);
+ this.impl.writeRssOutput(writer);
+ assertEquals("<description>test</description>", stW.toString());
+ }
+
+ {
+ this.impl.setAtomMediaType(null);
+
+ this.impl.processAttribute(new QName(GOMNamespace.ATOM_NS_URI,
+ "type"), "image/jpeg");
+ StringWriter stW = new StringWriter();
+ GOMOutputWriter writer = new GOMStaxWriter(stW);
+ this.impl.writeRssOutput(writer);
+ assertEquals("<content type=\"image/jpeg\">test</content>", stW
+ .toString());
+ }
+
+ }
+
+ /*
+ * Test method for
+ * 'org.apache.lucene.gdata.gom.core.GOMContentImpl.GOMContentImpl()'
+ */
+ public void testGOMContentImpl() {
+ GOMContentImpl impl2 = new GOMContentImpl();
+ assertEquals(GOMContent.LOCALNAME, impl2.getLocalName());
+ assertEquals(GOMContent.LOCALNAME, impl2.getQname().getLocalPart());
+ assertEquals(GOMNamespace.ATOM_NS_URI, impl2.getQname()
+ .getNamespaceURI());
+
+ }
+
+}
diff --git a/contrib/gdata-server/src/gom/test/org/apache/lucene/gdata/gom/core/GOMDateConstructImplTest.java b/contrib/gdata-server/src/gom/test/org/apache/lucene/gdata/gom/core/GOMDateConstructImplTest.java
new file mode 100644
index 00000000000..75c5ff8bf43
--- /dev/null
+++ b/contrib/gdata-server/src/gom/test/org/apache/lucene/gdata/gom/core/GOMDateConstructImplTest.java
@@ -0,0 +1,171 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.lucene.gdata.gom.core;
+
+import java.io.StringWriter;
+import java.util.Date;
+
+import javax.xml.stream.FactoryConfigurationError;
+import javax.xml.stream.XMLStreamException;
+
+import junit.framework.TestCase;
+
+import org.apache.lucene.gdata.gom.writer.GOMStaxWriter;
+import org.apache.lucene.gdata.gom.writer.GOMOutputWriter;
+
+/**
+ * @author Simon Willnauer
+ *
+ */
+public class GOMDateConstructImplTest extends TestCase {
+ private static final String DATE = "2003-12-13T18:30:02+02:00";
+
+ private static final String DATE_RSS = "Sat, 13 Dec 2003 16:30:02 +0000";
+
+ private static final String DATE1 = "2003-12-13T18:30:02.25Z";
+
+ private GOMUpdatedImpl updateImpl;
+
+ private GOMPublishedImpl publishImpl;
+
+ protected void setUp() throws Exception {
+ this.updateImpl = new GOMUpdatedImpl();
+ this.publishImpl = new GOMPublishedImpl();
+ }
+
+ /*
+ * Test method for
+ * 'org.apache.lucene.gdata.gom.core.GOMDateConstructImpl.processElementValue(String)'
+ */
+ public void testProcessElementValue() {
+ try {
+ this.updateImpl.processElementValue(null);
+ fail("must not be null");
+ } catch (IllegalArgumentException e) {
+ //
+ }
+ try {
+ this.updateImpl.processElementValue("not a date");
+ fail("illegal string");
+ } catch (GDataParseException e) {
+ //
+ }
+
+ this.updateImpl.processElementValue(DATE);
+ assertNotNull(this.updateImpl.getDate());
+ this.updateImpl.processElementValue(DATE1);
+ assertNotNull(this.updateImpl.getDate());
+
+ }
+
+ /*
+ * Test method for
+ * 'org.apache.lucene.gdata.gom.core.GOMDateConstructImpl.processEndElement()'
+ */
+ public void testProcessEndElement() {
+ try {
+ this.updateImpl.processEndElement();
+ fail("no element value");
+ } catch (GDataParseException e) {
+ //
+ }
+ this.updateImpl.setDate(new Date());
+ this.updateImpl.processEndElement();
+ }
+
+ /*
+ * Test method for
+ * 'org.apache.lucene.gdata.gom.core.GOMDateConstructImpl.writeAtomOutput(GOMWriter)'
+ */
+ public void testWriteAtomOutput() throws XMLStreamException,
+ FactoryConfigurationError {
+ {
+ StringWriter strWriter = new StringWriter();
+ GOMOutputWriter writer = new GOMStaxWriter(strWriter);
+ this.updateImpl.writeAtomOutput(writer);
+ assertTrue(strWriter.toString().startsWith("<updated>"));
+ assertTrue(strWriter.toString().endsWith("</updated>"));
+ }
+ {
+ this.updateImpl.processElementValue(DATE);
+ StringWriter strWriter = new StringWriter();
+ GOMOutputWriter writer = new GOMStaxWriter(strWriter);
+ this.updateImpl.writeAtomOutput(writer);
+ assertEquals("<updated>" + DATE + "</updated>", strWriter
+ .toString());
+ }
+
+ {
+ StringWriter strWriter = new StringWriter();
+ GOMOutputWriter writer = new GOMStaxWriter(strWriter);
+ this.publishImpl.writeAtomOutput(writer);
+ assertTrue(strWriter.toString().startsWith("<published>"));
+ assertTrue(strWriter.toString().endsWith("</published>"));
+ }
+ {
+ this.publishImpl.processElementValue(DATE);
+ StringWriter strWriter = new StringWriter();
+ GOMOutputWriter writer = new GOMStaxWriter(strWriter);
+ this.publishImpl.writeAtomOutput(writer);
+ assertEquals("<published>" + DATE + "</published>", strWriter
+ .toString());
+ }
+
+ }
+
+ /*
+ * Test method for
+ * 'org.apache.lucene.gdata.gom.core.GOMDateConstructImpl.writeRssOutput(GOMWriter)'
+ */
+ public void testWriteRssOutput() throws XMLStreamException,
+ FactoryConfigurationError {
+ {
+ StringWriter strWriter = new StringWriter();
+ GOMOutputWriter writer = new GOMStaxWriter(strWriter);
+ this.updateImpl.writeRssOutput(writer);
+ assertTrue(strWriter.toString().startsWith("<atom:updated>"));
+ assertTrue(strWriter.toString().endsWith("</atom:updated>"));
+ }
+ {
+ this.updateImpl.processElementValue(DATE);
+ StringWriter strWriter = new StringWriter();
+ GOMOutputWriter writer = new GOMStaxWriter(strWriter);
+ this.updateImpl.writeRssOutput(writer);
+ assertEquals("<atom:updated>" + DATE + "</atom:updated>", strWriter
+ .toString());
+ }
+
+ {
+ StringWriter strWriter = new StringWriter();
+ GOMOutputWriter writer = new GOMStaxWriter(strWriter);
+ this.publishImpl.writeRssOutput(writer);
+
+ assertTrue(strWriter.toString().startsWith("<pubDate>"));
+ assertTrue(strWriter.toString().endsWith("</pubDate>"));
+ }
+ {
+ this.publishImpl.processElementValue(DATE);
+ StringWriter strWriter = new StringWriter();
+ GOMOutputWriter writer = new GOMStaxWriter(strWriter);
+ this.publishImpl.writeRssOutput(writer);
+ assertEquals("<pubDate>" + DATE_RSS + "</pubDate>", strWriter
+ .toString());
+ }
+
+ }
+
+}
diff --git a/contrib/gdata-server/src/gom/test/org/apache/lucene/gdata/gom/core/GOMDocumentImplTest.java b/contrib/gdata-server/src/gom/test/org/apache/lucene/gdata/gom/core/GOMDocumentImplTest.java
new file mode 100644
index 00000000000..29db97d695e
--- /dev/null
+++ b/contrib/gdata-server/src/gom/test/org/apache/lucene/gdata/gom/core/GOMDocumentImplTest.java
@@ -0,0 +1,107 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.lucene.gdata.gom.core;
+
+import java.io.StringWriter;
+
+import javax.xml.namespace.QName;
+import javax.xml.stream.FactoryConfigurationError;
+import javax.xml.stream.XMLStreamException;
+
+import org.apache.lucene.gdata.gom.writer.GOMStaxWriter;
+import org.apache.lucene.gdata.gom.writer.GOMOutputWriter;
+
+import junit.framework.TestCase;
+
+/**
+ * @author Simon Willnauer
+ *
+ */
+public class GOMDocumentImplTest extends TestCase {
+
+ /*
+ * Test method for
+ * 'org.apache.lucene.gdata.gom.core.GOMDocumentImpl.writeAtomOutput(GOMWriter)'
+ */
+ public void testWriteAtomOutput() throws XMLStreamException,
+ FactoryConfigurationError {
+ GOMDocumentImpl<ArbitraryGOMXml> impl = new GOMDocumentImpl<ArbitraryGOMXml>();
+ impl.setRootElement(new ArbitraryGOMXml(new QName("test")));
+ {
+ StringWriter strWriter = new StringWriter();
+ GOMOutputWriter writer = new GOMStaxWriter(strWriter);
+ impl.writeAtomOutput(writer);
+ assertEquals("<?xml version='1.0' encoding='UTF-8'?><test/>",
+ strWriter.toString());
+ }
+ impl.setRootElement(null);
+ {
+ StringWriter strWriter = new StringWriter();
+ GOMOutputWriter writer = new GOMStaxWriter(strWriter);
+ impl.writeAtomOutput(writer);
+ assertEquals("<?xml version='1.0' encoding='UTF-8'?>", strWriter
+ .toString());
+ }
+
+ impl.setVersion("2.0");
+ impl.setCharacterEncoding("ISO-8859-1");
+ {
+ StringWriter strWriter = new StringWriter();
+ GOMOutputWriter writer = new GOMStaxWriter(strWriter);
+ impl.writeAtomOutput(writer);
+ assertEquals("<?xml version='2.0' encoding='ISO-8859-1'?>",
+ strWriter.toString());
+ }
+ }
+
+ /*
+ * Test method for
+ * 'org.apache.lucene.gdata.gom.core.GOMDocumentImpl.writeRssOutput(GOMWriter)'
+ */
+ public void testWriteRssOutput() throws XMLStreamException,
+ FactoryConfigurationError {
+ GOMDocumentImpl<ArbitraryGOMXml> impl = new GOMDocumentImpl<ArbitraryGOMXml>();
+ impl.setRootElement(new ArbitraryGOMXml(new QName("test")));
+ {
+ StringWriter strWriter = new StringWriter();
+ GOMOutputWriter writer = new GOMStaxWriter(strWriter);
+ impl.writeRssOutput(writer);
+ assertEquals("<?xml version='1.0' encoding='UTF-8'?><test/>",
+ strWriter.toString());
+ }
+ impl.setRootElement(null);
+ {
+ StringWriter strWriter = new StringWriter();
+ GOMOutputWriter writer = new GOMStaxWriter(strWriter);
+ impl.writeRssOutput(writer);
+ assertEquals("<?xml version='1.0' encoding='UTF-8'?>", strWriter
+ .toString());
+ }
+
+ impl.setVersion("2.0");
+ impl.setCharacterEncoding("ISO-8859-1");
+ {
+ StringWriter strWriter = new StringWriter();
+ GOMOutputWriter writer = new GOMStaxWriter(strWriter);
+ impl.writeRssOutput(writer);
+ assertEquals("<?xml version='2.0' encoding='ISO-8859-1'?>",
+ strWriter.toString());
+ }
+ }
+
+}
diff --git a/contrib/gdata-server/src/gom/test/org/apache/lucene/gdata/gom/core/GOMEntryImplTest.java b/contrib/gdata-server/src/gom/test/org/apache/lucene/gdata/gom/core/GOMEntryImplTest.java
new file mode 100644
index 00000000000..4a4601d413f
--- /dev/null
+++ b/contrib/gdata-server/src/gom/test/org/apache/lucene/gdata/gom/core/GOMEntryImplTest.java
@@ -0,0 +1,526 @@
+package org.apache.lucene.gdata.gom.core;
+
+import java.io.StringWriter;
+import java.util.List;
+
+import javax.xml.namespace.QName;
+import javax.xml.stream.FactoryConfigurationError;
+import javax.xml.stream.XMLStreamException;
+
+import org.apache.lucene.gdata.gom.AtomMediaType;
+import org.apache.lucene.gdata.gom.GOMAuthor;
+import org.apache.lucene.gdata.gom.GOMCategory;
+import org.apache.lucene.gdata.gom.GOMContent;
+import org.apache.lucene.gdata.gom.GOMContributor;
+import org.apache.lucene.gdata.gom.GOMEntry;
+import org.apache.lucene.gdata.gom.GOMExtension;
+import org.apache.lucene.gdata.gom.GOMGenerator;
+import org.apache.lucene.gdata.gom.GOMIcon;
+import org.apache.lucene.gdata.gom.GOMId;
+import org.apache.lucene.gdata.gom.GOMLink;
+import org.apache.lucene.gdata.gom.GOMLogo;
+import org.apache.lucene.gdata.gom.GOMNamespace;
+import org.apache.lucene.gdata.gom.GOMPublished;
+import org.apache.lucene.gdata.gom.GOMRights;
+import org.apache.lucene.gdata.gom.GOMSource;
+import org.apache.lucene.gdata.gom.GOMSubtitle;
+import org.apache.lucene.gdata.gom.GOMSummary;
+import org.apache.lucene.gdata.gom.GOMTitle;
+import org.apache.lucene.gdata.gom.GOMUpdated;
+import org.apache.lucene.gdata.gom.core.GOMFeedImplTest.TestExtendsionFactory;
+import org.apache.lucene.gdata.gom.core.GOMFeedImplTest.TestExtension;
+import org.apache.lucene.gdata.gom.writer.GOMOutputWriter;
+import org.apache.lucene.gdata.gom.writer.GOMStaxWriter;
+
+import junit.framework.TestCase;
+
+public class GOMEntryImplTest extends TestCase {
+ private static final String TEST_LOCAL_NAME = GOMFeedImplTest.TEST_LOCAL_NAME;
+
+ private GOMEntryImpl impl;
+
+ protected void setUp() throws Exception {
+ super.setUp();
+ this.impl = new GOMEntryImpl();
+ }
+
+ public void testSetNamespace() {
+ assertEquals(0, this.impl.getNamespaces().size());
+ assertNotNull(this.impl.getDefaultNamespace());
+ this.impl.addNamespace(GOMNamespace.ATOM_NAMESPACE);
+ assertSame(GOMNamespace.ATOM_NAMESPACE, this.impl.getDefaultNamespace());
+ this.impl.addNamespace(GOMNamespace.OPENSEARCH_NAMESPACE);
+ assertEquals(1, this.impl.getNamespaces().size());
+ assertSame(GOMNamespace.OPENSEARCH_NAMESPACE, this.impl.getNamespaces()
+ .get(0));
+
+ // detect defaul ns
+ this.impl.addNamespace(new GOMNamespace(GOMNamespace.ATOM_NS_URI, ""));
+ assertEquals(1, this.impl.getNamespaces().size());
+ }
+
+ /*
+ * Test method for
+ * 'org.apache.lucene.gdata.gom.core.GOMEntryImpl.getChildParser(QName)'
+ */
+ public void testGetChildParser() {
+ {
+ // atomAuthor*
+ AtomParser parser = this.impl.getChildParser(new QName(
+ GOMNamespace.ATOM_NS_URI, "author"));
+ assertNotNull(parser);
+ assertTrue(parser instanceof GOMAuthor);
+ assertEquals(1, this.impl.getAuthors().size());
+ this.impl.getChildParser(new QName(GOMNamespace.ATOM_NS_URI,
+ "author"));
+ assertEquals(2, this.impl.getAuthors().size());
+ }
+
+ {
+ // atomCategory*
+ AtomParser parser = this.impl.getChildParser(new QName(
+ GOMNamespace.ATOM_NS_URI, "category"));
+ assertNotNull(parser);
+ assertTrue(parser instanceof GOMCategory);
+ assertEquals(1, this.impl.getCategories().size());
+ this.impl.getChildParser(new QName(GOMNamespace.ATOM_NS_URI,
+ "category"));
+ assertEquals(2, this.impl.getCategories().size());
+ }
+
+ {
+ // atomContributor*
+ AtomParser parser = this.impl.getChildParser(new QName(
+ GOMNamespace.ATOM_NS_URI, "contributor"));
+ assertNotNull(parser);
+ assertTrue(parser instanceof GOMContributor);
+ assertEquals(1, this.impl.getContributor().size());
+ this.impl.getChildParser(new QName(GOMNamespace.ATOM_NS_URI,
+ "contributor"));
+ assertEquals(2, this.impl.getContributor().size());
+ }
+
+ {
+ // atomId
+ AtomParser parser = this.impl.getChildParser(new QName(
+ GOMNamespace.ATOM_NS_URI, "id"));
+ assertNotNull(parser);
+ assertTrue(parser instanceof GOMId);
+ assertSame(parser, this.impl.getId());
+ try {
+ this.impl.getChildParser(new QName(GOMNamespace.ATOM_NS_URI,
+ "id"));
+ fail("exactly one time ");
+ } catch (GDataParseException e) {
+ //
+ }
+
+ }
+
+ {
+ // atomLink*
+ AtomParser parser = this.impl.getChildParser(new QName(
+ GOMNamespace.ATOM_NS_URI, "link"));
+ assertNotNull(parser);
+ assertTrue(parser instanceof GOMLink);
+ assertEquals(1, this.impl.getLinks().size());
+ this.impl
+ .getChildParser(new QName(GOMNamespace.ATOM_NS_URI, "link"));
+ assertEquals(2, this.impl.getLinks().size());
+
+ }
+
+ {
+ // atomRights?
+ AtomParser parser = this.impl.getChildParser(new QName(
+ GOMNamespace.ATOM_NS_URI, "rights"));
+ assertNotNull(parser);
+ assertTrue(parser instanceof GOMRights);
+ assertSame(parser, this.impl.getRights());
+ try {
+ this.impl.getChildParser(new QName(GOMNamespace.ATOM_NS_URI,
+ "rights"));
+ fail("zero or one");
+ } catch (GDataParseException e) {
+ //
+ }
+
+ }
+
+ {
+ // atomTitle
+ AtomParser parser = this.impl.getChildParser(new QName(
+ GOMNamespace.ATOM_NS_URI, "title"));
+ assertNotNull(parser);
+ assertTrue(parser instanceof GOMTitle);
+ assertSame(parser, this.impl.getTitle());
+ try {
+ this.impl.getChildParser(new QName(GOMNamespace.ATOM_NS_URI,
+ "title"));
+ fail("exactly one time ");
+ } catch (GDataParseException e) {
+ //
+ }
+
+ }
+
+ {
+ // atomUpdated
+ AtomParser parser = this.impl.getChildParser(new QName(
+ GOMNamespace.ATOM_NS_URI, "updated"));
+ assertNotNull(parser);
+ assertTrue(parser instanceof GOMUpdated);
+ assertSame(parser, this.impl.getUpdated());
+ try {
+ this.impl.getChildParser(new QName(GOMNamespace.ATOM_NS_URI,
+ "updated"));
+ fail("exactly one time ");
+ } catch (GDataParseException e) {
+ //
+ }
+
+ }
+
+ {
+ // atomSource?
+ AtomParser parser = this.impl.getChildParser(new QName(
+ GOMNamespace.ATOM_NS_URI, "source"));
+ assertNotNull(parser);
+ assertTrue(parser instanceof GOMSource);
+ assertEquals(parser, this.impl.getSource());
+ try {
+ this.impl.getChildParser(new QName(GOMNamespace.ATOM_NS_URI,
+ "source"));
+ fail("duplicated element");
+ } catch (GDataParseException e) {
+ //
+ }
+
+ }
+
+ {
+ // atomSummary?
+ AtomParser parser = this.impl.getChildParser(new QName(
+ GOMNamespace.ATOM_NS_URI, "summary"));
+ assertNotNull(parser);
+ assertTrue(parser instanceof GOMSummary);
+ assertEquals(parser, this.impl.getSummary());
+ try {
+ this.impl.getChildParser(new QName(GOMNamespace.ATOM_NS_URI,
+ "summary"));
+ fail("duplicated element");
+ } catch (GDataParseException e) {
+ //
+ }
+
+ }
+
+ {
+ // atomContent?
+ AtomParser parser = this.impl.getChildParser(new QName(
+ GOMNamespace.ATOM_NS_URI, "content"));
+ assertNotNull(parser);
+ assertTrue(parser instanceof GOMContent);
+ assertEquals(parser, this.impl.getContent());
+ try {
+ this.impl.getChildParser(new QName(GOMNamespace.ATOM_NS_URI,
+ "content"));
+ fail("duplicated element");
+ } catch (GDataParseException e) {
+ //
+ }
+
+ }
+
+ {
+ // atomContent?
+ AtomParser parser = this.impl.getChildParser(new QName(
+ GOMNamespace.ATOM_NS_URI, "published"));
+ assertNotNull(parser);
+ assertTrue(parser instanceof GOMPublished);
+ assertEquals(parser, this.impl.getPublished());
+ try {
+ this.impl.getChildParser(new QName(GOMNamespace.ATOM_NS_URI,
+ "published"));
+ fail("duplicated element");
+ } catch (GDataParseException e) {
+ //
+ }
+
+ }
+
+ }
+
+ /*
+ * Test method for
+ * 'org.apache.lucene.gdata.gom.core.GOMEntryImpl.processEndElement()'
+ */
+ public void testProcessEndElement() {
+ try {
+ this.impl.processEndElement();
+ fail("missing elements");
+ } catch (GDataParseException e) {
+ //
+ }
+
+ // atom:entry elements MUST contain exactly one atom:id element.
+ this.impl.setId(new GOMIdImpl());
+ /*
+ * atom:entry elements that contain no child atom:content element MUST
+ * contain at least one atom:link element with a rel attribute value of
+ * "alternate".
+ */
+ GOMLink link = new GOMLinkImpl();
+ link.setRel("alternate");
+ this.impl.addLink(link);
+ /*
+ * atom:entry elements MUST contain exactly one atom:title element.
+ */
+ this.impl.setTitle(new GOMTitleImpl());
+ /*
+ * atom:entry elements MUST contain exactly one atom:updated element.
+ */
+ this.impl.setUpdated(new GOMUpdatedImpl());
+
+ {
+ this.impl.setId(null);
+ try {
+ this.impl.processEndElement();
+ fail("id is missing");
+ } catch (GDataParseException e) {
+ //
+ }
+ this.impl.setId(new GOMIdImpl());
+ }
+
+ {
+ this.impl.getLinks().clear();
+ try {
+ this.impl.processEndElement();
+ fail("link alternate is missing");
+ } catch (GDataParseException e) {
+ //
+ }
+ this.impl.setContent(new GOMContentImpl());
+ this.impl.processEndElement();
+ this.impl.setContent(null);
+ this.impl.addLink(link);
+ }
+
+ {
+ this.impl.setTitle(null);
+ try {
+ this.impl.processEndElement();
+ fail("title is missing");
+ } catch (GDataParseException e) {
+ //
+ }
+ this.impl.setTitle(new GOMTitleImpl());
+ }
+ {
+ this.impl.setUpdated(null);
+ try {
+ this.impl.processEndElement();
+ fail("Updated is missing");
+ } catch (GDataParseException e) {
+ //
+ }
+ this.impl.setUpdated(new GOMUpdatedImpl());
+ }
+
+ /*
+ * atom:entry elements MUST NOT contain more than one atom:link element
+ * with a rel attribute value of "alternate" that has the same
+ * combination of type and hreflang attribute values.
+ */
+ link.setType("test");
+ link.setHrefLang("http://www.apache.org");
+ this.impl.addLink(link);
+ try {
+ this.impl.processEndElement();
+ fail("doulbe alternate link with same type and hreflang");
+
+ } catch (GDataParseException e) {
+ //
+ }
+ this.impl.getLinks().remove(0);
+ /*
+ * # atom:entry elements MUST contain an atom:summary element in either
+ * of the following cases:
+ *
+ * the atom:entry contains an atom:content that has a "src" attribute
+ * (and is thus empty). the atom:entry contains content that is encoded
+ * in Base64; i.e., the "type" attribute of atom:content is a MIME media
+ * type [MIMEREG], but is not an XML media type [RFC3023], does not
+ * begin with "text/", and does not end with "/xml" or "+xml".
+ *
+ *
+ */
+ GOMContent c = new GOMContentImpl();
+ c.setSrc("");
+ this.impl.setContent(c);
+ try {
+ this.impl.processEndElement();
+ fail("no summary");
+ } catch (GDataParseException e) {
+ //
+ }
+ c.setSrc(null);
+ c.setAtomMediaType(AtomMediaType.BINARY);
+ try {
+ this.impl.processEndElement();
+ fail("no summary");
+ } catch (GDataParseException e) {
+ //
+ }
+
+ }
+
+ /*
+ * Test method for
+ * 'org.apache.lucene.gdata.gom.core.GOMEntryImpl.GOMEntryImpl()'
+ */
+ public void testGOMEntryImpl() {
+ GOMEntryImpl impl2 = new GOMEntryImpl();
+ assertNotNull(impl2.getQname());
+ assertEquals(GOMEntry.LOCALNAME, impl.getQname().getLocalPart());
+ assertEquals(GOMEntry.LOCALNAME, this.impl.getLocalName());
+ assertEquals(GOMNamespace.ATOM_NS_URI, impl.getQname()
+ .getNamespaceURI());
+ }
+
+ /*
+ * Test method for
+ * 'org.apache.lucene.gdata.gom.core.GOMEntryImpl.writeAtomOutput(GOMOutputWriter)'
+ */
+ public void testWriteAtomOutput() throws XMLStreamException,
+ FactoryConfigurationError {
+ // write a whole feed and check if all elements are written
+ this.impl.addAuthor(new GOMAuthorImpl());
+ this.impl.addCategory(new GOMCategoryImpl());
+ this.impl.addContributor(new GOMContributorImpl());
+ this.impl.addLink(new GOMLinkImpl());
+ this.impl.setContent(new GOMContentImpl());
+ this.impl.setId(new GOMIdImpl());
+ this.impl.setRights(new GOMRightsImpl());
+ this.impl.setSummary(new GOMSummaryImpl());
+ this.impl.setTitle(new GOMTitleImpl());
+ this.impl.setUpdated(new GOMUpdatedImpl());
+ this.impl.setSource(new GOMSourceImpl());
+ this.impl.setPublished(new GOMPublishedImpl());
+ this.impl.extensions.add(new GOMFeedImplTest.TestExtension());
+ StringWriter stW = new StringWriter();
+ GOMOutputWriter writer = new GOMStaxWriter(stW);
+ this.impl.writeAtomOutput(writer);
+ String string = stW.toString();
+ assertTrue(string.contains("xmlns=\"http://www.w3.org/2005/Atom\""));
+ assertTrue(string.startsWith("<" + GOMEntry.LOCALNAME));
+ assertTrue(string.contains("<" + GOMAuthor.LOCALNAME));
+ assertTrue(string.contains("<" + GOMCategory.LOCALNAME));
+ assertTrue(string.contains("<" + GOMContributor.LOCALNAME));
+ assertTrue(string.contains("<" + GOMLink.LOCALNAME));
+ assertTrue(string.contains("<" + GOMId.LOCALNAME));
+ assertTrue(string.contains("<" + GOMRights.LOCALNAME));
+ assertTrue(string.contains("<" + GOMSummary.LOCALNAME));
+ assertTrue(string.contains("<" + GOMContent.LOCALNAME));
+ assertTrue(string.contains("<" + GOMTitle.LOCALNAME));
+ assertTrue(string.contains("<" + GOMUpdated.LOCALNAME));
+ assertTrue(string.contains("<" + GOMSource.LOCALNAME));
+ assertTrue(string.contains("<" + GOMPublished.LOCALNAME));
+ assertTrue(string.contains("<test"));
+ assertTrue(string.endsWith("</entry>"));
+ }
+
+ /*
+ * Test method for
+ * 'org.apache.lucene.gdata.gom.core.GOMEntryImpl.writeRssOutput(GOMOutputWriter)'
+ */
+ public void testWriteRssOutputGOMOutputWriter() throws XMLStreamException,
+ FactoryConfigurationError {
+ // write a whole feed and check if all elements are written
+ this.impl.addAuthor(new GOMAuthorImpl());
+ this.impl.addCategory(new GOMCategoryImpl());
+ this.impl.addContributor(new GOMContributorImpl());
+ GOMLink link = new GOMLinkImpl();
+ link.setRel("enclosure");
+ link.setHref("test");
+ link.setType("testType");
+ this.impl.addLink(link);
+ this.impl.setContent(new GOMContentImpl());
+ this.impl.setId(new GOMIdImpl());
+ this.impl.setRights(new GOMRightsImpl());
+ GOMSummaryImpl summ = new GOMSummaryImpl();
+ summ.xmlLang = "de";
+ this.impl.setSummary(summ);
+ this.impl.setTitle(new GOMTitleImpl());
+ this.impl.setUpdated(new GOMUpdatedImpl());
+ this.impl.setSource(new GOMSourceImpl());
+ this.impl.setPublished(new GOMPublishedImpl());
+ this.impl.extensions.add(new GOMFeedImplTest.TestExtension());
+ StringWriter stW = new StringWriter();
+ GOMOutputWriter writer = new GOMStaxWriter(stW);
+ this.impl.writeRssOutput(writer);
+ String string = stW.toString();
+ assertTrue(string
+ .contains("xmlns:atom=\"http://www.w3.org/2005/Atom\""));
+ assertTrue(string.startsWith("<" + GOMEntry.LOCALNAME_RSS));
+ assertTrue(string.contains("<" + GOMId.LOCALNAME_RSS));
+ assertTrue(string.contains("<pubDate"));
+ assertTrue(string.contains("<atom:" + GOMUpdated.LOCALNAME));
+ assertTrue(string.contains("<" + GOMId.LOCALNAME_RSS));
+ assertTrue(string.contains("<language"));
+ assertTrue(string.contains("<category domain=\""));
+ assertTrue(string.contains("<title"));
+ assertTrue(string.contains("<atom:summary"));
+ assertTrue(string.contains("<description"));
+ // a link element
+ assertTrue(string.contains("<enclosure"));
+ assertTrue(string.contains("<author"));
+ assertTrue(string.contains("<atom:test"));
+ assertTrue(string.endsWith("</item>"));
+
+ }
+
+ /*
+ * Test method for
+ * 'org.apache.lucene.gdata.gom.core.GOMEntryImpl.getExtensions()'
+ */
+ public void testGetExtensions() {
+
+ {
+ List<GOMExtension> extensions = this.impl.getExtensions();
+ assertNotNull(extensions);
+ assertEquals(0, extensions.size());
+ }
+ QName name = new QName(TEST_LOCAL_NAME);
+ this.impl.setExtensionFactory(new TestExtendsionFactory());
+
+ AtomParser childParser = this.impl.getChildParser(name);
+ assertTrue(childParser instanceof TestExtension);
+ List<GOMExtension> extensions = this.impl.getExtensions();
+ assertNotNull(extensions);
+ assertEquals(1, extensions.size());
+ assertSame(childParser, extensions.get(0));
+ }
+
+ /*
+ * Test method for
+ * 'org.apache.lucene.gdata.gom.core.GOMEntryImpl.setExtensionFactory(GOMExtensionFactory)'
+ */
+ public void testSetExtensionFactory() {
+ QName name = new QName(TEST_LOCAL_NAME);
+ try {
+ this.impl.getChildParser(name);
+ fail("no child hander for this qname");
+ } catch (GDataParseException e) {
+ //
+ }
+
+ this.impl.setExtensionFactory(new TestExtendsionFactory());
+
+ AtomParser childParser = this.impl.getChildParser(name);
+ assertTrue(childParser instanceof TestExtension);
+
+ }
+
+}
diff --git a/contrib/gdata-server/src/gom/test/org/apache/lucene/gdata/gom/core/GOMFeedImplTest.java b/contrib/gdata-server/src/gom/test/org/apache/lucene/gdata/gom/core/GOMFeedImplTest.java
new file mode 100644
index 00000000000..a09d0cbe83d
--- /dev/null
+++ b/contrib/gdata-server/src/gom/test/org/apache/lucene/gdata/gom/core/GOMFeedImplTest.java
@@ -0,0 +1,688 @@
+package org.apache.lucene.gdata.gom.core;
+
+import java.io.StringWriter;
+import java.util.LinkedList;
+import java.util.List;
+
+import javax.xml.namespace.QName;
+import javax.xml.stream.FactoryConfigurationError;
+import javax.xml.stream.XMLStreamException;
+
+import org.apache.lucene.gdata.gom.GOMAuthor;
+import org.apache.lucene.gdata.gom.GOMCategory;
+import org.apache.lucene.gdata.gom.GOMContributor;
+import org.apache.lucene.gdata.gom.GOMElement;
+import org.apache.lucene.gdata.gom.GOMEntry;
+import org.apache.lucene.gdata.gom.GOMExtension;
+import org.apache.lucene.gdata.gom.GOMFeed;
+import org.apache.lucene.gdata.gom.GOMGenerator;
+import org.apache.lucene.gdata.gom.GOMIcon;
+import org.apache.lucene.gdata.gom.GOMId;
+import org.apache.lucene.gdata.gom.GOMLink;
+import org.apache.lucene.gdata.gom.GOMLogo;
+import org.apache.lucene.gdata.gom.GOMNamespace;
+import org.apache.lucene.gdata.gom.GOMRights;
+import org.apache.lucene.gdata.gom.GOMSubtitle;
+import org.apache.lucene.gdata.gom.GOMTitle;
+import org.apache.lucene.gdata.gom.GOMUpdated;
+import org.apache.lucene.gdata.gom.core.extension.GOMExtensionFactory;
+import org.apache.lucene.gdata.gom.writer.GOMStaxWriter;
+import org.apache.lucene.gdata.gom.writer.GOMOutputWriter;
+
+import junit.framework.TestCase;
+
+public class GOMFeedImplTest extends TestCase {
+ static final String TEST_LOCAL_NAME = "testelement";
+
+ GOMFeedImpl impl;
+
+ protected void setUp() throws Exception {
+ this.impl = new GOMFeedImpl();
+ }
+
+ public void testSetNamespace() {
+ assertEquals(0, this.impl.getNamespaces().size());
+ assertNotNull(this.impl.getDefaultNamespace());
+ this.impl.addNamespace(GOMNamespace.ATOM_NAMESPACE);
+ assertSame(GOMNamespace.ATOM_NAMESPACE, this.impl.getDefaultNamespace());
+ this.impl.addNamespace(GOMNamespace.OPENSEARCH_NAMESPACE);
+ assertEquals(1, this.impl.getNamespaces().size());
+ assertSame(GOMNamespace.OPENSEARCH_NAMESPACE, this.impl.getNamespaces()
+ .get(0));
+
+ // detect defaul ns
+ this.impl.addNamespace(new GOMNamespace(GOMNamespace.ATOM_NS_URI, ""));
+ assertEquals(1, this.impl.getNamespaces().size());
+ }
+
+ /*
+ * Test method for
+ * 'org.apache.lucene.gdata.gom.core.GOMFeedImpl.getChildParser(QName)'
+ */
+ public void testGetChildParser() {
+
+ {
+ // atomAuthor*
+ AtomParser parser = this.impl.getChildParser(new QName(
+ GOMNamespace.ATOM_NS_URI, "author"));
+ assertNotNull(parser);
+ assertTrue(parser instanceof GOMAuthor);
+ assertEquals(1, this.impl.getAuthors().size());
+ this.impl.getChildParser(new QName(GOMNamespace.ATOM_NS_URI,
+ "author"));
+ assertEquals(2, this.impl.getAuthors().size());
+ }
+
+ {
+ // atomCategory*
+ AtomParser parser = this.impl.getChildParser(new QName(
+ GOMNamespace.ATOM_NS_URI, "category"));
+ assertNotNull(parser);
+ assertTrue(parser instanceof GOMCategory);
+ assertEquals(1, this.impl.getCategories().size());
+ this.impl.getChildParser(new QName(GOMNamespace.ATOM_NS_URI,
+ "category"));
+ assertEquals(2, this.impl.getCategories().size());
+ }
+
+ {
+ // atomContributor*
+ AtomParser parser = this.impl.getChildParser(new QName(
+ GOMNamespace.ATOM_NS_URI, "contributor"));
+ assertNotNull(parser);
+ assertTrue(parser instanceof GOMContributor);
+ assertEquals(1, this.impl.getContributor().size());
+ this.impl.getChildParser(new QName(GOMNamespace.ATOM_NS_URI,
+ "contributor"));
+ assertEquals(2, this.impl.getContributor().size());
+ }
+ {
+ // atomGenerator?
+ AtomParser parser = this.impl.getChildParser(new QName(
+ GOMNamespace.ATOM_NS_URI, "generator"));
+ assertNotNull(parser);
+ assertTrue(parser instanceof GOMGenerator);
+ assertSame(parser, this.impl.getGenerator());
+ try {
+ this.impl.getChildParser(new QName(GOMNamespace.ATOM_NS_URI,
+ "generator"));
+ fail("one or zero");
+ } catch (GDataParseException e) {
+ //
+ }
+ }
+
+ {
+ // atomIcon?
+ AtomParser parser = this.impl.getChildParser(new QName(
+ GOMNamespace.ATOM_NS_URI, "icon"));
+ assertNotNull(parser);
+ assertTrue(parser instanceof GOMIcon);
+ assertSame(parser, this.impl.getIcon());
+ try {
+ this.impl.getChildParser(new QName(GOMNamespace.ATOM_NS_URI,
+ "icon"));
+ fail("one or zero");
+ } catch (GDataParseException e) {
+ //
+ }
+
+ }
+
+ {
+ // atomId
+ AtomParser parser = this.impl.getChildParser(new QName(
+ GOMNamespace.ATOM_NS_URI, "id"));
+ assertNotNull(parser);
+ assertTrue(parser instanceof GOMId);
+ assertSame(parser, this.impl.getId());
+ try {
+ this.impl.getChildParser(new QName(GOMNamespace.ATOM_NS_URI,
+ "id"));
+ fail("exactly one time ");
+ } catch (GDataParseException e) {
+ //
+ }
+
+ }
+
+ {
+ // atomLink*
+ AtomParser parser = this.impl.getChildParser(new QName(
+ GOMNamespace.ATOM_NS_URI, "link"));
+ assertNotNull(parser);
+ assertTrue(parser instanceof GOMLink);
+ assertEquals(1, this.impl.getLinks().size());
+ this.impl
+ .getChildParser(new QName(GOMNamespace.ATOM_NS_URI, "link"));
+ assertEquals(2, this.impl.getLinks().size());
+
+ }
+
+ {
+ // atomLogo?
+ AtomParser parser = this.impl.getChildParser(new QName(
+ GOMNamespace.ATOM_NS_URI, "logo"));
+ assertNotNull(parser);
+ assertTrue(parser instanceof GOMLogo);
+ assertSame(parser, this.impl.getLogo());
+ try {
+ this.impl.getChildParser(new QName(GOMNamespace.ATOM_NS_URI,
+ "logo"));
+ fail("zero or one");
+ } catch (GDataParseException e) {
+ //
+ }
+
+ }
+
+ {
+ // atomRights?
+ AtomParser parser = this.impl.getChildParser(new QName(
+ GOMNamespace.ATOM_NS_URI, "rights"));
+ assertNotNull(parser);
+ assertTrue(parser instanceof GOMRights);
+ assertSame(parser, this.impl.getRights());
+ try {
+ this.impl.getChildParser(new QName(GOMNamespace.ATOM_NS_URI,
+ "rights"));
+ fail("zero or one");
+ } catch (GDataParseException e) {
+ //
+ }
+
+ }
+
+ {
+ // atomSubtitle?
+ AtomParser parser = this.impl.getChildParser(new QName(
+ GOMNamespace.ATOM_NS_URI, "subtitle"));
+ assertNotNull(parser);
+ assertTrue(parser instanceof GOMSubtitle);
+ assertSame(parser, this.impl.getSubtitle());
+ try {
+ this.impl.getChildParser(new QName(GOMNamespace.ATOM_NS_URI,
+ "subtitle"));
+ fail("zero or one");
+ } catch (GDataParseException e) {
+ //
+ }
+
+ }
+
+ {
+ // atomTitle
+ AtomParser parser = this.impl.getChildParser(new QName(
+ GOMNamespace.ATOM_NS_URI, "title"));
+ assertNotNull(parser);
+ assertTrue(parser instanceof GOMTitle);
+ assertSame(parser, this.impl.getTitle());
+ try {
+ this.impl.getChildParser(new QName(GOMNamespace.ATOM_NS_URI,
+ "title"));
+ fail("exactly one time ");
+ } catch (GDataParseException e) {
+ //
+ }
+
+ }
+
+ {
+ // atomUpdated
+ AtomParser parser = this.impl.getChildParser(new QName(
+ GOMNamespace.ATOM_NS_URI, "updated"));
+ assertNotNull(parser);
+ assertTrue(parser instanceof GOMUpdated);
+ assertSame(parser, this.impl.getUpdated());
+ try {
+ this.impl.getChildParser(new QName(GOMNamespace.ATOM_NS_URI,
+ "updated"));
+ fail("exactly one time ");
+ } catch (GDataParseException e) {
+ //
+ }
+
+ }
+
+ {
+ // atomEntry*
+ AtomParser parser = this.impl.getChildParser(new QName(
+ GOMNamespace.ATOM_NS_URI, "entry"));
+ assertNotNull(parser);
+ assertTrue(parser instanceof GOMEntry);
+ assertEquals(1, this.impl.getEntries().size());
+ this.impl.getChildParser(new QName(GOMNamespace.ATOM_NS_URI,
+ "entry"));
+ assertEquals(2, this.impl.getEntries().size());
+
+ }
+
+ // openSearch
+ {
+ // startIndex
+ AtomParser parser = this.impl.getChildParser(new QName(
+ GOMNamespace.OPENSEARCH_NS_URI, "startIndex"));
+ assertNotNull(parser);
+
+ }
+ {
+ // startIndex
+ AtomParser parser = this.impl.getChildParser(new QName(
+ GOMNamespace.OPENSEARCH_NS_URI, "itemsPerPage"));
+ assertNotNull(parser);
+
+ }
+
+ }
+
+ /*
+ * Test method for
+ * 'org.apache.lucene.gdata.gom.core.GOMFeedImpl.processElementValue(String)'
+ */
+ public void testProcessElementValue() {
+ try {
+ this.impl.processElementValue("some");
+ fail("no element text");
+ } catch (GDataParseException e) {
+ //
+ }
+
+ }
+
+ /*
+ * Test method for
+ * 'org.apache.lucene.gdata.gom.core.GOMFeedImpl.processEndElement()'
+ *
+ * atomFeed = element atom:feed { atomCommonAttributes, (atomAuthor* &
+ * atomCategory* & atomContributor* & atomGenerator? & atomIcon? & atomId &
+ * atomLink* & atomLogo? & atomRights? & atomSubtitle? & atomTitle &
+ * atomUpdated & extensionElement*), atomEntry* }
+ */
+ public void testProcessEndElement() {
+ this.impl.addAuthor(new GOMAuthorImpl());
+ this.impl.setId(new GOMIdImpl());
+ this.impl.setUpdated(new GOMUpdatedImpl());
+ this.impl.setTitle(new GOMTitleImpl());
+
+ this.impl.processEndElement();
+ {
+ // author missing
+ this.impl.getAuthors().clear();
+ try {
+ this.impl.processEndElement();
+ fail("missing elements");
+ } catch (GDataParseException e) {
+ //
+ }
+ this.impl.addAuthor(new GOMAuthorImpl());
+ }
+
+ {
+ // id missing
+ this.impl.setId(null);
+ try {
+ this.impl.processEndElement();
+ fail("missing elements");
+ } catch (GDataParseException e) {
+ //
+ }
+ this.impl.setId(new GOMIdImpl());
+ }
+
+ {
+ // title missing
+ this.impl.setTitle(null);
+ try {
+ this.impl.processEndElement();
+ fail("missing elements");
+ } catch (GDataParseException e) {
+ //
+ }
+ this.impl.setTitle(new GOMTitleImpl());
+ }
+ {
+ // updated missing
+ this.impl.setUpdated(null);
+ try {
+ this.impl.processEndElement();
+ fail("missing elements");
+ } catch (GDataParseException e) {
+ //
+ }
+ this.impl.setUpdated(new GOMUpdatedImpl());
+ }
+
+ /*
+ * atom:feed elements MUST NOT contain more than one atom:link element
+ * with a rel attribute value of "alternate" that has the same
+ * combination of type and hreflang attribute values.
+ */
+
+ {
+ // two identical alternate links missing
+ GOMLink link = new GOMLinkImpl();
+ link.setRel("alternate");
+ link.setHrefLang("http://www.apache.org");
+ link.setType("text/html");
+ this.impl.addLink(link);
+ // one is allowed
+ this.impl.processEndElement();
+ // add a second link
+ link = new GOMLinkImpl();
+ this.impl.addLink(link);
+ link.setRel("next");
+ link.setHrefLang("http://www.apache.org");
+ link.setType("text/html");
+ // one is alternate the other is next
+ this.impl.processEndElement();
+
+ // a second "identical" alternate link
+ link = new GOMLinkImpl();
+ this.impl.addLink(link);
+ link.setRel("alternate");
+ link.setHrefLang("http://www.apache.org");
+ link.setType("text/html");
+ try {
+ this.impl.processEndElement();
+ fail("missing elements");
+ } catch (GDataParseException e) {
+ //
+ }
+ this.impl.setUpdated(new GOMUpdatedImpl());
+ }
+
+ }
+
+ /*
+ * Test method for
+ * 'org.apache.lucene.gdata.gom.core.GOMFeedImpl.GOMFeedImpl()'
+ */
+ public void testGOMFeedImpl() {
+ GOMFeedImpl impl2 = new GOMFeedImpl();
+ assertEquals(GOMFeed.LOCALNAME, impl2.getLocalName());
+ assertEquals(GOMFeed.LOCALNAME, impl2.getQname().getLocalPart());
+ assertEquals(GOMNamespace.ATOM_NS_URI, impl2.getQname()
+ .getNamespaceURI());
+ }
+
+ /*
+ * Test method for
+ * 'org.apache.lucene.gdata.gom.core.GOMFeedImpl.getStartIndex()' and
+ * 'org.apache.lucene.gdata.gom.core.GOMFeedImpl.setStartIndex(int)'
+ */
+ public void testGetSetStartIndex() {
+ assertEquals(GOMFeedImpl.DEFAULT_START_INDEX, this.impl.getStartIndex());
+ this.impl.setStartIndex(5);
+ assertEquals(5, this.impl.getStartIndex());
+ this.impl.setStartIndex(-5);
+ assertEquals(5, this.impl.getStartIndex());
+ }
+
+ /*
+ * Test method for
+ * 'org.apache.lucene.gdata.gom.core.GOMFeedImpl.setItemsPerPage(int)' and
+ * 'org.apache.lucene.gdata.gom.core.GOMFeedImpl.getNamespaces()'
+ */
+ public void testGetSetItemsPerPage() {
+ assertEquals(GOMFeedImpl.DEFAULT_ITEMS_PER_PAGE, this.impl
+ .getItemsPerPage());
+ this.impl.setItemsPerPage(5);
+ assertEquals(5, this.impl.getItemsPerPage());
+ this.impl.setItemsPerPage(-5);
+ assertEquals(5, this.impl.getItemsPerPage());
+
+ }
+
+ /*
+ * Test method for
+ * 'org.apache.lucene.gdata.gom.core.GOMFeedImpl.writeAtomOutput(GOMWriter)'
+ */
+ public void testWriteAtomOutput() throws XMLStreamException,
+ FactoryConfigurationError {
+ // write a whole feed and check if all elements are written
+ this.impl.addAuthor(new GOMAuthorImpl());
+ this.impl.addCategory(new GOMCategoryImpl());
+ this.impl.addContributor(new GOMContributorImpl());
+ this.impl.addLink(new GOMLinkImpl());
+ this.impl.addNamespace(GOMNamespace.OPENSEARCH_NAMESPACE);
+ this.impl.setGenerator(new GOMGeneratorImpl());
+ this.impl.setIcon(new GOMIconImpl());
+ this.impl.setId(new GOMIdImpl());
+ this.impl.setLogo(new GOMLogoImpl());
+ this.impl.setRights(new GOMRightsImpl());
+ this.impl.setSubtitle(new GOMSubtitleImpl());
+ this.impl.setTitle(new GOMTitleImpl());
+ this.impl.setUpdated(new GOMUpdatedImpl());
+ this.impl.extensions.add(new TestExtension());
+ this.impl.addNamespace(GOMNamespace.OPENSEARCH_NAMESPACE);
+ StringWriter stW = new StringWriter();
+ GOMOutputWriter writer = new GOMStaxWriter(stW);
+ this.impl.writeAtomOutput(writer);
+ String string = stW.toString();
+ assertTrue(string.contains("xmlns:openSearch"));
+ assertTrue(string.contains("xmlns=\"http://www.w3.org/2005/Atom\""));
+ assertTrue(string.contains("<" + GOMAuthor.LOCALNAME));
+ assertTrue(string.contains("<" + GOMCategory.LOCALNAME));
+ assertTrue(string.contains("<" + GOMContributor.LOCALNAME));
+ assertTrue(string.contains("<" + GOMLink.LOCALNAME));
+ assertTrue(string.contains("<" + GOMGenerator.LOCALNAME));
+ assertTrue(string.contains("<" + GOMIcon.LOCALNAME));
+ assertTrue(string.contains("<" + GOMId.LOCALNAME));
+ assertTrue(string.contains("<" + GOMLogo.LOCALNAME));
+ assertTrue(string.contains("<" + GOMRights.LOCALNAME));
+ assertTrue(string.contains("<" + GOMSubtitle.LOCALNAME));
+ assertTrue(string.contains("<" + GOMTitle.LOCALNAME));
+ assertTrue(string.contains("<" + GOMUpdated.LOCALNAME));
+ assertTrue(string.contains("<openSearch:itemsPerPage>"));
+ assertTrue(string.contains("<openSearch:startIndex>"));
+ assertTrue(string.contains("<test"));
+ }
+
+ /*
+ * Test method for
+ * 'org.apache.lucene.gdata.gom.core.GOMFeedImpl.writeRssOutput(GOMWriter)'
+ */
+ public void testWriteRssOutput() throws XMLStreamException,
+ FactoryConfigurationError {
+ // write a whole feed and check if all elements are written
+ this.impl.addAuthor(new GOMAuthorImpl());
+ this.impl.addCategory(new GOMCategoryImpl());
+ this.impl.addContributor(new GOMContributorImpl());
+ GOMLinkImpl impl2 = new GOMLinkImpl();
+ impl2.setHref("test");
+ impl2.setRel("alternate");
+ this.impl.addLink(impl2);
+ this.impl.addNamespace(GOMNamespace.OPENSEARCH_NAMESPACE);
+ this.impl.setGenerator(new GOMGeneratorImpl());
+ this.impl.setIcon(new GOMIconImpl());
+ this.impl.setId(new GOMIdImpl());
+ this.impl.setLogo(new GOMLogoImpl());
+ this.impl.setRights(new GOMRightsImpl());
+ this.impl.setSubtitle(new GOMSubtitleImpl());
+ this.impl.setTitle(new GOMTitleImpl());
+ this.impl.setUpdated(new GOMUpdatedImpl());
+ this.impl.addNamespace(GOMNamespace.ATOM_NAMESPACE);
+ this.impl.addNamespace(GOMNamespace.OPENSEARCH_NAMESPACE);
+ this.impl.extensions.add(new TestExtension());
+ StringWriter stW = new StringWriter();
+ GOMOutputWriter writer = new GOMStaxWriter(stW);
+ this.impl.writeRssOutput(writer);
+
+ String string = stW.toString();
+ assertTrue(string.contains("xmlns:openSearch"));
+ assertTrue(string.contains("xmlns:atom"));
+ // TODO
+ // assertTrue(string.contains("<language"));
+ assertTrue(string.contains("<" + GOMCategory.LOCALNAME));
+ // author
+ assertTrue(string.contains("<managingEditor"));
+ assertTrue(string.contains("<" + GOMLink.LOCALNAME));
+ assertTrue(string.contains("<" + GOMGenerator.LOCALNAME));
+ assertTrue(string.contains("<image><url"));
+ assertTrue(string.contains("<atom:" + GOMId.LOCALNAME));
+
+ assertTrue(string.contains("<copyright"));
+ assertTrue(string.contains("<" + GOMTitle.LOCALNAME));
+ assertTrue(string.contains("<lastBuildDate"));
+ assertTrue(string.contains("<openSearch:itemsPerPage>"));
+ assertTrue(string.contains("<openSearch:startIndex>"));
+ assertTrue(string.contains("<atom:test"));
+ }
+
+ /*
+ * Test method for
+ * 'org.apache.lucene.gdata.gom.core.GOMFeedImpl.getExtensions()'
+ */
+ public void testGetExtensions() {
+
+ {
+ List<GOMExtension> extensions = this.impl.getExtensions();
+ assertNotNull(extensions);
+ assertEquals(0, extensions.size());
+ }
+ QName name = new QName(TEST_LOCAL_NAME);
+ this.impl.setExtensionFactory(new TestExtendsionFactory());
+
+ AtomParser childParser = this.impl.getChildParser(name);
+ assertTrue(childParser instanceof TestExtension);
+ List<GOMExtension> extensions = this.impl.getExtensions();
+ assertNotNull(extensions);
+ assertEquals(1, extensions.size());
+ assertSame(childParser, extensions.get(0));
+ }
+
+ /*
+ * Test method for
+ * 'org.apache.lucene.gdata.gom.core.GOMFeedImpl.setExtensionFactory(GOMExtensionFactory)'
+ */
+ public void testSetExtensionFactory() {
+ QName name = new QName(TEST_LOCAL_NAME);
+ try {
+ this.impl.getChildParser(name);
+ fail("no child hander for this qname");
+ } catch (GDataParseException e) {
+ //
+ }
+
+ this.impl.setExtensionFactory(new TestExtendsionFactory());
+
+ AtomParser childParser = this.impl.getChildParser(name);
+ assertTrue(childParser instanceof TestExtension);
+
+ }
+
+ static class TestExtendsionFactory implements GOMExtensionFactory {
+
+ public GOMExtension canHandleExtensionElement(QName aName) {
+ if (aName.getLocalPart().equals(TEST_LOCAL_NAME))
+ return new TestExtension();
+ return null;
+ }
+
+ public List<GOMNamespace> getNamespaces() {
+ LinkedList<GOMNamespace> name = new LinkedList<GOMNamespace>();
+ name.add(GOMNamespace.ATOM_NAMESPACE);
+ return name;
+ }
+
+ }
+
+ static class TestExtension implements GOMExtension {
+
+ public QName getQname() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public void setNamespaceUri(String aString) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void setNamespacePrefix(String aString) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void setLocalName(String aLocalName) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public String getLocalName() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public String getTextValue() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public void setTextValue(String aTextValue) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void addChild(GOMElement aElement) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public GOMElement getParent() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public void writeAtomOutput(GOMOutputWriter aStreamWriter)
+ throws XMLStreamException {
+ aStreamWriter.writeSimpleXMLElement("test", null, "helloworld");
+
+ }
+
+ public void writeRssOutput(GOMOutputWriter aStreamWriter)
+ throws XMLStreamException {
+ aStreamWriter.writeSimpleXMLElement(new QName(
+ GOMNamespace.ATOM_NS_URI, "test",
+ GOMNamespace.ATOM_NS_PREFIX), null, "helloworld");
+
+ }
+
+ public void processElementValue(String aValue) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void processAttribute(QName aQName, String aValue) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void processEndElement() {
+ // TODO Auto-generated method stub
+
+ }
+
+ public AtomParser getChildParser(QName aName) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public void writeRssOutput(GOMOutputWriter aStreamWriter,
+ String aRssName) throws XMLStreamException {
+
+ }
+
+ public String getXmlBase() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public String getXmlLang() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ }
+
+}
diff --git a/contrib/gdata-server/src/gom/test/org/apache/lucene/gdata/gom/core/GOMGenereatorImplTest.java b/contrib/gdata-server/src/gom/test/org/apache/lucene/gdata/gom/core/GOMGenereatorImplTest.java
new file mode 100644
index 00000000000..98c365bf542
--- /dev/null
+++ b/contrib/gdata-server/src/gom/test/org/apache/lucene/gdata/gom/core/GOMGenereatorImplTest.java
@@ -0,0 +1,204 @@
+package org.apache.lucene.gdata.gom.core;
+
+import java.io.StringWriter;
+
+import javax.xml.namespace.QName;
+import javax.xml.stream.FactoryConfigurationError;
+import javax.xml.stream.XMLStreamException;
+
+import org.apache.lucene.gdata.gom.GOMGenerator;
+import org.apache.lucene.gdata.gom.GOMNamespace;
+import org.apache.lucene.gdata.gom.writer.GOMStaxWriter;
+import org.apache.lucene.gdata.gom.writer.GOMOutputWriter;
+
+import junit.framework.TestCase;
+
+public class GOMGenereatorImplTest extends TestCase {
+ private GOMGeneratorImpl impl;
+
+ protected void setUp() throws Exception {
+ this.impl = new GOMGeneratorImpl();
+ }
+
+ /*
+ * Test method for
+ * 'org.apache.lucene.gdata.gom.core.GOMGeneratorImpl.processAttribute(QName,
+ * String)'
+ */
+ public void testProcessAttribute() {
+ this.impl.processAttribute(new QName(GOMNamespace.ATOM_NS_URI, "uri"),
+ "test");
+ assertEquals("test", this.impl.getUri());
+ try {
+ this.impl.processAttribute(new QName(GOMNamespace.ATOM_NS_URI,
+ "uri"), "test");
+ fail("duplicated");
+ } catch (GDataParseException e) {
+
+ }
+ this.impl.processAttribute(new QName(GOMNamespace.ATOM_NS_URI,
+ "version"), "test");
+ assertEquals("test", this.impl.getGeneratorVersion());
+
+ try {
+ this.impl.processAttribute(new QName(GOMNamespace.ATOM_NS_URI,
+ "version"), "test");
+ fail("duplicated");
+ } catch (GDataParseException e) {
+
+ }
+
+ // check call to super.processAttribute
+ this.impl.processAttribute(new QName(GOMNamespace.XML_NS_URI, "base",
+ GOMNamespace.XML_NS_PREFIX), "test");
+ assertEquals("test", this.impl.xmlBase);
+
+ try {
+ this.impl.processAttribute(null, "test");
+ fail("qname is null");
+ } catch (IllegalArgumentException e) {
+ //
+ }
+ try {
+ this.impl.processAttribute(new QName(GOMNamespace.XML_NS_URI,
+ "base", GOMNamespace.XML_NS_PREFIX), null);
+ fail("value is null");
+ } catch (IllegalArgumentException e) {
+ //
+ }
+
+ }
+
+ /*
+ * Test method for
+ * 'org.apache.lucene.gdata.gom.core.GOMGeneratorImpl.processElementValue(String)'
+ */
+ public void testProcessElementValue() {
+ this.impl.processElementValue("myGenerator");
+ assertEquals("myGenerator", this.impl.getTextValue());
+
+ try {
+ this.impl.processElementValue("testme");
+ fail("duplicated");
+
+ } catch (GDataParseException e) {
+ //
+ }
+
+ }
+
+ /*
+ * Test method for
+ * 'org.apache.lucene.gdata.gom.core.GOMGeneratorImpl.processEndElement()'
+ */
+ public void testProcessEndElement() {
+ this.impl.processEndElement();
+ {
+ this.impl.setUri("some invalid uri");
+ try {
+ this.impl.processEndElement();
+ fail("must be an absolute uri");
+ } catch (GDataParseException e) {
+ //
+ }
+
+ }
+ {
+ this.impl.setUri("/uri");
+ try {
+ this.impl.processEndElement();
+ fail("must be an absolute uri or xml:base must be set");
+ } catch (GDataParseException e) {
+ //
+ }
+
+ }
+ this.impl.xmlBase = "http://apache.org";
+ this.impl.processEndElement();
+
+ this.impl.xmlBase = null;
+ this.impl.setUri("http://apache.org/uri");
+ this.impl.processEndElement();
+ }
+
+ /*
+ * Test method for
+ * 'org.apache.lucene.gdata.gom.core.GOMGeneratorImpl.GOMGeneratorImpl()'
+ */
+ public void testGOMGeneratorImpl() {
+ this.impl = new GOMGeneratorImpl();
+ assertEquals(GOMGenerator.LOCALNAME, this.impl.getLocalName());
+ assertEquals(GOMGenerator.LOCALNAME, this.impl.getQname()
+ .getLocalPart());
+ assertEquals(GOMNamespace.ATOM_NS_URI, this.impl.getQname()
+ .getNamespaceURI());
+ }
+
+ /*
+ * Test method for
+ * 'org.apache.lucene.gdata.gom.core.GOMGeneratorImpl.writeAtomOutput(GOMWriter)'
+ */
+ public void testWriteAtomOutput() throws XMLStreamException {
+ {
+ StringWriter stW = new StringWriter();
+ GOMOutputWriter writer = new GOMStaxWriter(stW);
+ this.impl.writeAtomOutput(writer);
+ assertEquals("<" + this.impl.getLocalName() + "/>", stW.toString());
+ }
+
+ {
+ StringWriter stW = new StringWriter();
+ GOMOutputWriter writer = new GOMStaxWriter(stW);
+ this.impl.setTextValue("Lucene");
+ this.impl.writeAtomOutput(writer);
+ assertEquals("<" + this.impl.getLocalName() + ">Lucene</"
+ + this.impl.getLocalName() + ">", stW.toString());
+ }
+ {
+ StringWriter stW = new StringWriter();
+ GOMOutputWriter writer = new GOMStaxWriter(stW);
+ this.impl.setUri("http://apache.org");
+ this.impl.writeAtomOutput(writer);
+ assertEquals("<" + this.impl.getLocalName()
+ + " uri=\"http://apache.org\">Lucene</"
+ + this.impl.getLocalName() + ">", stW.toString());
+ }
+
+ {
+ StringWriter stW = new StringWriter();
+ GOMOutputWriter writer = new GOMStaxWriter(stW);
+ this.impl.setGeneratorVersion("1");
+ this.impl.writeAtomOutput(writer);
+ assertEquals("<" + this.impl.getLocalName()
+ + " uri=\"http://apache.org\" version=\"1\">Lucene</"
+ + this.impl.getLocalName() + ">", stW.toString());
+ }
+ }
+
+ /*
+ * Test method for
+ * 'org.apache.lucene.gdata.gom.core.GOMGeneratorImpl.writeRssOutput(GOMWriter)'
+ */
+ public void testWriteRssOutput() throws XMLStreamException,
+ FactoryConfigurationError {
+ {
+ StringWriter stW = new StringWriter();
+ GOMOutputWriter writer = new GOMStaxWriter(stW);
+ this.impl.setTextValue("Lucene");
+ this.impl.writeRssOutput(writer);
+ assertEquals("<" + this.impl.getLocalName() + ">Lucene</"
+ + this.impl.getLocalName() + ">", stW.toString());
+ }
+
+ {
+ StringWriter stW = new StringWriter();
+ GOMOutputWriter writer = new GOMStaxWriter(stW);
+ this.impl.setUri("http://apache.org");
+ this.impl.setGeneratorVersion("1");
+ this.impl.writeRssOutput(writer);
+ assertEquals("<" + this.impl.getLocalName() + ">Lucene</"
+ + this.impl.getLocalName() + ">", stW.toString());
+ }
+ }
+
+}
diff --git a/contrib/gdata-server/src/gom/test/org/apache/lucene/gdata/gom/core/GOMIdImplTest.java b/contrib/gdata-server/src/gom/test/org/apache/lucene/gdata/gom/core/GOMIdImplTest.java
new file mode 100644
index 00000000000..365785ddb4b
--- /dev/null
+++ b/contrib/gdata-server/src/gom/test/org/apache/lucene/gdata/gom/core/GOMIdImplTest.java
@@ -0,0 +1,115 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.lucene.gdata.gom.core;
+
+import java.io.StringWriter;
+
+import javax.xml.stream.XMLStreamException;
+
+import org.apache.lucene.gdata.gom.writer.GOMOutputWriter;
+import org.apache.lucene.gdata.gom.writer.GOMStaxWriter;
+
+import junit.framework.TestCase;
+
+/**
+ * @author Simon Willnauer
+ *
+ */
+public class GOMIdImplTest extends TestCase {
+ GOMIdImpl impl;
+
+ protected void setUp() throws Exception {
+ this.impl = new GOMIdImpl();
+ }
+
+ /*
+ * Test method for
+ * 'org.apache.lucene.gdata.gom.core.GOMIdImpl.writeAtomOutput(GOMOutputWriter)'
+ */
+ public void testWriteAtomOutput() throws XMLStreamException {
+ {
+ StringWriter stW = new StringWriter();
+ GOMOutputWriter writer = new GOMStaxWriter(stW);
+ this.impl.writeAtomOutput(writer);
+
+ assertEquals("<id/>", stW.toString());
+ }
+
+ {
+ this.impl.setTextValue("testme");
+ StringWriter stW = new StringWriter();
+ GOMOutputWriter writer = new GOMStaxWriter(stW);
+ this.impl.writeAtomOutput(writer);
+
+ assertEquals("<id>testme</id>", stW.toString());
+
+ }
+
+ }
+
+ /*
+ * Test method for
+ * 'org.apache.lucene.gdata.gom.core.GOMIdImpl.writeRssOutput(GOMOutputWriter)'
+ */
+ public void testWriteRssOutputGOMOutputWriter() throws XMLStreamException {
+ {
+ StringWriter stW = new StringWriter();
+ GOMOutputWriter writer = new GOMStaxWriter(stW);
+ this.impl.writeRssOutput(writer);
+
+ assertEquals("<atom:id/>", stW.toString());
+ }
+
+ {
+ this.impl.setTextValue("testme");
+ StringWriter stW = new StringWriter();
+ GOMOutputWriter writer = new GOMStaxWriter(stW);
+ this.impl.writeRssOutput(writer);
+
+ assertEquals("<atom:id>testme</atom:id>", stW.toString());
+
+ }
+
+ {
+ this.impl.setTextValue("testme");
+ StringWriter stW = new StringWriter();
+ GOMOutputWriter writer = new GOMStaxWriter(stW);
+ this.impl.writeRssOutput(writer, "guid");
+
+ assertEquals("<guid>testme</guid>", stW.toString());
+
+ }
+
+ }
+
+ public void testProcessElementValue() {
+ this.impl.processElementValue("test");
+ assertEquals("test", this.impl.getTextValue());
+ }
+
+ public void testProcessEndElement() {
+ try {
+ this.impl.processEndElement();
+ fail("not set");
+ } catch (GDataParseException e) {
+ //
+ }
+ this.impl.setTextValue("testme");
+ this.impl.processEndElement();
+
+ }
+}
diff --git a/contrib/gdata-server/src/gom/test/org/apache/lucene/gdata/gom/core/GOMLinkImplTest.java b/contrib/gdata-server/src/gom/test/org/apache/lucene/gdata/gom/core/GOMLinkImplTest.java
new file mode 100644
index 00000000000..a37097e305c
--- /dev/null
+++ b/contrib/gdata-server/src/gom/test/org/apache/lucene/gdata/gom/core/GOMLinkImplTest.java
@@ -0,0 +1,239 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.lucene.gdata.gom.core;
+
+import java.io.StringWriter;
+
+import javax.xml.namespace.QName;
+import javax.xml.stream.XMLStreamException;
+
+import org.apache.lucene.gdata.gom.GOMLink;
+import org.apache.lucene.gdata.gom.writer.GOMStaxWriter;
+import org.apache.lucene.gdata.gom.writer.GOMOutputWriter;
+
+import junit.framework.TestCase;
+
+/**
+ * @author Simon Willnauer
+ *
+ */
+public class GOMLinkImplTest extends TestCase {
+
+ private GOMLinkImpl impl;
+
+ /**
+ * @see junit.framework.TestCase#setUp()
+ */
+ @Override
+ protected void setUp() throws Exception {
+ impl = new GOMLinkImpl();
+ }
+
+ public void testCommonFields() {
+ assertNotNull(this.impl.getQname());
+ QName qname = this.impl.getQname();
+ assertEquals(qname, new QName(GOMLink.LOCALNAME));
+ assertEquals(qname.getLocalPart(), this.impl.getLocalName());
+ }
+
+ /*
+ * Test method for
+ * 'org.apache.lucene.gdata.gom.core.GOMLinkImpl.processAttribute(QName,
+ * String)'
+ */
+ public void testProcessAttribute() {
+ // title
+ this.impl.processAttribute(new QName("title"), "title");
+ assertEquals("title", this.impl.getTitle());
+ try {
+ this.impl.processAttribute(new QName("title"), "title");
+ fail("duplicated attribute");
+ } catch (GDataParseException e) {
+ //
+ }
+
+ // hreflang
+ this.impl.processAttribute(new QName("hreflang"), "hreflang");
+ assertEquals("hreflang", this.impl.getHrefLang());
+ try {
+ this.impl.processAttribute(new QName("hreflang"), "hreflang");
+ fail("duplicated attribute");
+ } catch (GDataParseException e) {
+ //
+ }
+
+ // href
+ this.impl.processAttribute(new QName("href"), "href");
+ assertEquals("href", this.impl.getHref());
+ try {
+ this.impl.processAttribute(new QName("href"), "href");
+ fail("duplicated attribute");
+ } catch (GDataParseException e) {
+ //
+ }
+ // type
+ this.impl.processAttribute(new QName("type"), "type");
+ assertEquals("type", this.impl.getType());
+ try {
+ this.impl.processAttribute(new QName("type"), "type");
+ fail("duplicated attribute");
+ } catch (GDataParseException e) {
+ //
+ }
+
+ // lenght
+ try {
+ this.impl.processAttribute(new QName("length"), "noint");
+ fail("must be an integer");
+ } catch (GDataParseException e) {
+ //
+ }
+
+ this.impl.processAttribute(new QName("length"), "1");
+ assertEquals(new Integer(1), this.impl.getLength());
+ try {
+ this.impl.processAttribute(new QName("length"), "1");
+ fail("duplicated attribute");
+ } catch (GDataParseException e) {
+ //
+ }
+
+ //
+ // rel
+ this.impl.processAttribute(new QName("rel"), "relation");
+ assertEquals("relation", this.impl.getRel());
+ try {
+ this.impl.processAttribute(new QName("rel"), "relation");
+ fail("duplicated attribute");
+ } catch (GDataParseException e) {
+ //
+ }
+
+ }
+
+ /*
+ * Test method for
+ * 'org.apache.lucene.gdata.gom.core.GOMLinkImpl.processEndElement()'
+ */
+ public void testProcessEndElement() {
+ try {
+ this.impl.processEndElement();
+ fail("href is requiered but not set");
+ } catch (GDataParseException e) {
+ //
+ }
+
+ this.impl.setHref("/helloworld");
+ try {
+ this.impl.processEndElement();
+ fail("href is not an absolute url");
+ } catch (GDataParseException e) {
+ //
+ }
+ this.impl.xmlBase = "http://url";
+ this.impl.processEndElement();
+ this.impl.xmlBase = null;
+ this.impl.setHref("http://www.apache.org");
+ this.impl.processEndElement();
+
+ }
+
+ /*
+ * Test method for
+ * 'org.apache.lucene.gdata.gom.core.GOMLinkImpl.writeAtomOutput(GOMWriter)'
+ */
+ public void testWriteAtomOutput() throws XMLStreamException {
+ {
+ StringWriter strWriter = new StringWriter();
+ GOMOutputWriter writer = new GOMStaxWriter(strWriter);
+ this.impl.writeAtomOutput(writer);
+ assertEquals("<link href=\"\"/>", strWriter.toString());
+ }
+ {
+ StringWriter strWriter = new StringWriter();
+ GOMOutputWriter writer = new GOMStaxWriter(strWriter);
+ this.impl.setHref("test");
+ this.impl.setHrefLang("test1");
+ this.impl.setLength(2);
+ this.impl.setRel("NEXT");
+ this.impl.setTitle("myTitle");
+ this.impl.setType("myType");
+ this.impl.writeAtomOutput(writer);
+ assertTrue(strWriter.toString().contains("href=\"test\""));
+ assertTrue(strWriter.toString().contains("title=\"myTitle\""));
+ assertTrue(strWriter.toString().contains("hreflang=\"test1\""));
+ assertTrue(strWriter.toString().contains("type=\"myType\""));
+ assertTrue(strWriter.toString().contains("rel=\"NEXT\""));
+ assertTrue(strWriter.toString().contains("length=\"2\""));
+ }
+ }
+
+ /*
+ * Test method for
+ * 'org.apache.lucene.gdata.gom.core.GOMLinkImpl.writeRssOutput(GOMWriter)'
+ */
+ public void testWriteRssOutput() throws XMLStreamException {
+ {
+ StringWriter strWriter = new StringWriter();
+ GOMOutputWriter writer = new GOMStaxWriter(strWriter);
+ this.impl.writeRssOutput(writer);
+ assertEquals("", strWriter.toString());
+ }
+
+ {
+ this.impl.setHref("test");
+ this.impl.setType("testType");
+ this.impl.setRel("enclosure");
+ StringWriter strWriter = new StringWriter();
+ GOMOutputWriter writer = new GOMStaxWriter(strWriter);
+ this.impl.writeRssOutput(writer);
+ assertEquals("<enclosure type=\"testType\" href=\"test\"/>",
+ strWriter.toString());
+ }
+
+ {
+ this.impl.setRel("comments");
+ StringWriter strWriter = new StringWriter();
+ GOMOutputWriter writer = new GOMStaxWriter(strWriter);
+ this.impl.writeRssOutput(writer);
+ assertEquals("<comments>test</comments>", strWriter.toString());
+ }
+
+ {
+ this.impl.setRel("alternate");
+ StringWriter strWriter = new StringWriter();
+ GOMOutputWriter writer = new GOMStaxWriter(strWriter);
+ this.impl.writeRssOutput(writer);
+ assertEquals("<link>test</link>", strWriter.toString());
+ }
+
+ }
+
+ /*
+ * Test method for
+ * 'org.apache.lucene.gdata.gom.core.AbstractGOMElement.processElementValue(String)'
+ */
+ public void testProcessElementValue() {
+ try {
+ this.impl.processElementValue("hello world");
+ fail("no content");
+ } catch (GDataParseException e) {
+ // TODO: handle exception
+ }
+ }
+
+}
diff --git a/contrib/gdata-server/src/gom/test/org/apache/lucene/gdata/gom/core/GOMPersonImplTest.java b/contrib/gdata-server/src/gom/test/org/apache/lucene/gdata/gom/core/GOMPersonImplTest.java
new file mode 100644
index 00000000000..70235fabd1a
--- /dev/null
+++ b/contrib/gdata-server/src/gom/test/org/apache/lucene/gdata/gom/core/GOMPersonImplTest.java
@@ -0,0 +1,176 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.lucene.gdata.gom.core;
+
+import java.io.StringWriter;
+
+import javax.naming.NameParser;
+import javax.xml.namespace.QName;
+import javax.xml.stream.FactoryConfigurationError;
+import javax.xml.stream.XMLStreamException;
+
+import org.apache.lucene.gdata.gom.GOMNamespace;
+import org.apache.lucene.gdata.gom.writer.GOMStaxWriter;
+import org.apache.lucene.gdata.gom.writer.GOMOutputWriter;
+
+import junit.framework.TestCase;
+
+/**
+ * @author Simon Willnauer
+ *
+ */
+public class GOMPersonImplTest extends TestCase {
+
+ /**
+ * @see junit.framework.TestCase#setUp()
+ */
+ @Override
+ protected void setUp() throws Exception {
+ // TODO Auto-generated method stub
+ super.setUp();
+ }
+
+ /*
+ * Test method for
+ * 'org.apache.lucene.gdata.gom.core.GOMPersonImpl.writeAtomOutput(GOMWriter)'
+ */
+ public void testWriteAtomOutput() throws XMLStreamException,
+ FactoryConfigurationError {
+ StringWriter stW = new StringWriter();
+ GOMOutputWriter writer = new GOMStaxWriter(stW);
+ GOMPersonImpl impl = new GOMPersonImpl();
+ impl.writeRssOutput(writer);
+ writer.flush();
+ writer.close();
+
+ // test with name
+ stW = new StringWriter();
+ writer = new GOMStaxWriter(stW);
+ impl.setName("test");
+ impl.writeAtomOutput(writer);
+ writer.flush();
+ assertEquals("<person><name>test</name></person>", stW.toString());
+
+ writer.close();
+
+ // test with name
+ stW = new StringWriter();
+ writer = new GOMStaxWriter(stW);
+ impl.setEmail("[email protected]");
+ impl.setUri("http://www.apache.org");
+ impl.writeAtomOutput(writer);
+ writer.flush();
+ assertEquals(
+ "<person><name>test</name><email>[email protected]</email><uri>http://www.apache.org</uri></person>",
+ stW.toString());
+ try {
+ impl.writeAtomOutput(null);
+ fail("must not be null");
+
+ } catch (GDataParseException e) {
+ //
+ }
+ }
+
+ /*
+ * Test method for
+ * 'org.apache.lucene.gdata.gom.core.GOMPersonImpl.writeRssOutput(GOMWriter)'
+ */
+ public void testWriteRssOutput() throws XMLStreamException {
+ StringWriter stW = new StringWriter();
+ GOMOutputWriter writer = new GOMStaxWriter(stW);
+ GOMPersonImpl impl = new GOMPersonImpl();
+ impl.writeRssOutput(writer);
+ writer.flush();
+ assertEquals(0, stW.toString().length());
+ }
+
+ public void testParseAtom() {
+ GOMPersonImpl impl = new GOMPersonImpl();
+ QName name = new QName(GOMNamespace.ATOM_NS_URI, "name");
+ AtomParser childParser = impl.getChildParser(name);
+ String nameValue = "simonw";
+ {
+ assertTrue(childParser instanceof GOMPersonImpl.NameParser);
+
+ childParser.processElementValue(nameValue);
+ childParser.processEndElement();
+ assertEquals(impl.getName(), nameValue);
+ try {
+ childParser.processElementValue(nameValue);
+ childParser.processEndElement();
+ fail("duplicated element");
+
+ } catch (GDataParseException e) {
+ //
+
+ }
+ }
+ {
+ name = new QName(GOMNamespace.ATOM_NS_URI, "uri");
+ childParser = impl.getChildParser(name);
+ assertTrue(childParser instanceof GOMPersonImpl.UriParser);
+
+ childParser.processElementValue(nameValue);
+ childParser.processEndElement();
+ assertEquals(impl.getUri(), nameValue);
+
+ try {
+ childParser.processElementValue(nameValue);
+ childParser.processEndElement();
+ fail("duplicated element");
+
+ } catch (GDataParseException e) {
+ //
+
+ }
+
+ }
+ {
+ name = new QName(GOMNamespace.ATOM_NS_URI, "email");
+ childParser = impl.getChildParser(name);
+ assertTrue(childParser instanceof GOMPersonImpl.EmailParser);
+
+ childParser.processElementValue(nameValue);
+ childParser.processEndElement();
+ assertEquals(impl.getEmail(), nameValue);
+
+ try {
+ childParser.processElementValue(nameValue);
+ childParser.processEndElement();
+ fail("duplicated element");
+
+ } catch (GDataParseException e) {
+ //
+
+ }
+ }
+
+ }
+
+ public void testProcessEndElement() {
+ GOMPersonImpl impl = new GOMPersonImpl();
+ try {
+ impl.processEndElement();
+ fail("name must be set");
+ } catch (GDataParseException e) {
+ //
+ }
+
+ }
+
+}
diff --git a/contrib/gdata-server/src/gom/test/org/apache/lucene/gdata/gom/core/GOMSourceImplTest.java b/contrib/gdata-server/src/gom/test/org/apache/lucene/gdata/gom/core/GOMSourceImplTest.java
new file mode 100644
index 00000000000..bf07d663785
--- /dev/null
+++ b/contrib/gdata-server/src/gom/test/org/apache/lucene/gdata/gom/core/GOMSourceImplTest.java
@@ -0,0 +1,418 @@
+package org.apache.lucene.gdata.gom.core;
+
+import java.io.StringWriter;
+import java.util.List;
+
+import javax.xml.namespace.QName;
+import javax.xml.stream.FactoryConfigurationError;
+import javax.xml.stream.XMLStreamException;
+
+import org.apache.lucene.gdata.gom.GOMAuthor;
+import org.apache.lucene.gdata.gom.GOMCategory;
+import org.apache.lucene.gdata.gom.GOMContributor;
+import org.apache.lucene.gdata.gom.GOMElement;
+import org.apache.lucene.gdata.gom.GOMEntry;
+import org.apache.lucene.gdata.gom.GOMExtension;
+import org.apache.lucene.gdata.gom.GOMFeed;
+import org.apache.lucene.gdata.gom.GOMGenerator;
+import org.apache.lucene.gdata.gom.GOMIcon;
+import org.apache.lucene.gdata.gom.GOMId;
+import org.apache.lucene.gdata.gom.GOMLink;
+import org.apache.lucene.gdata.gom.GOMLogo;
+import org.apache.lucene.gdata.gom.GOMNamespace;
+import org.apache.lucene.gdata.gom.GOMRights;
+import org.apache.lucene.gdata.gom.GOMSource;
+import org.apache.lucene.gdata.gom.GOMSubtitle;
+import org.apache.lucene.gdata.gom.GOMTitle;
+import org.apache.lucene.gdata.gom.GOMUpdated;
+import org.apache.lucene.gdata.gom.core.GOMFeedImplTest.TestExtendsionFactory;
+import org.apache.lucene.gdata.gom.core.GOMFeedImplTest.TestExtension;
+import org.apache.lucene.gdata.gom.core.extension.GOMExtensionFactory;
+import org.apache.lucene.gdata.gom.writer.GOMOutputWriter;
+import org.apache.lucene.gdata.gom.writer.GOMStaxWriter;
+
+import junit.framework.TestCase;
+
+public class GOMSourceImplTest extends TestCase {
+
+ static final String TEST_LOCAL_NAME = "testelement";
+
+ GOMSourceImpl impl;
+
+ protected void setUp() throws Exception {
+ this.impl = new GOMSourceImpl();
+ }
+
+ /*
+ * Test method for
+ * 'org.apache.lucene.gdata.gom.core.GOMFeedImpl.getChildParser(QName)'
+ */
+ public void testGetChildParser() {
+
+ {
+ // atomAuthor*
+ AtomParser parser = this.impl.getChildParser(new QName(
+ GOMNamespace.ATOM_NS_URI, "author"));
+ assertNotNull(parser);
+ assertTrue(parser instanceof GOMAuthor);
+ assertEquals(1, this.impl.getAuthors().size());
+ this.impl.getChildParser(new QName(GOMNamespace.ATOM_NS_URI,
+ "author"));
+ assertEquals(2, this.impl.getAuthors().size());
+ }
+
+ {
+ // atomCategory*
+ AtomParser parser = this.impl.getChildParser(new QName(
+ GOMNamespace.ATOM_NS_URI, "category"));
+ assertNotNull(parser);
+ assertTrue(parser instanceof GOMCategory);
+ assertEquals(1, this.impl.getCategories().size());
+ this.impl.getChildParser(new QName(GOMNamespace.ATOM_NS_URI,
+ "category"));
+ assertEquals(2, this.impl.getCategories().size());
+ }
+
+ {
+ // atomContributor*
+ AtomParser parser = this.impl.getChildParser(new QName(
+ GOMNamespace.ATOM_NS_URI, "contributor"));
+ assertNotNull(parser);
+ assertTrue(parser instanceof GOMContributor);
+ assertEquals(1, this.impl.getContributor().size());
+ this.impl.getChildParser(new QName(GOMNamespace.ATOM_NS_URI,
+ "contributor"));
+ assertEquals(2, this.impl.getContributor().size());
+ }
+ {
+ // atomGenerator?
+ AtomParser parser = this.impl.getChildParser(new QName(
+ GOMNamespace.ATOM_NS_URI, "generator"));
+ assertNotNull(parser);
+ assertTrue(parser instanceof GOMGenerator);
+ assertSame(parser, this.impl.getGenerator());
+ try {
+ this.impl.getChildParser(new QName(GOMNamespace.ATOM_NS_URI,
+ "generator"));
+ fail("one or zero");
+ } catch (GDataParseException e) {
+ //
+ }
+ }
+
+ {
+ // atomIcon?
+ AtomParser parser = this.impl.getChildParser(new QName(
+ GOMNamespace.ATOM_NS_URI, "icon"));
+ assertNotNull(parser);
+ assertTrue(parser instanceof GOMIcon);
+ assertSame(parser, this.impl.getIcon());
+ try {
+ this.impl.getChildParser(new QName(GOMNamespace.ATOM_NS_URI,
+ "icon"));
+ fail("one or zero");
+ } catch (GDataParseException e) {
+ //
+ }
+
+ }
+
+ {
+ // atomId
+ AtomParser parser = this.impl.getChildParser(new QName(
+ GOMNamespace.ATOM_NS_URI, "id"));
+ assertNotNull(parser);
+ assertTrue(parser instanceof GOMId);
+ assertSame(parser, this.impl.getId());
+ try {
+ this.impl.getChildParser(new QName(GOMNamespace.ATOM_NS_URI,
+ "id"));
+ fail("exactly one time ");
+ } catch (GDataParseException e) {
+ //
+ }
+
+ }
+
+ {
+ // atomLink*
+ AtomParser parser = this.impl.getChildParser(new QName(
+ GOMNamespace.ATOM_NS_URI, "link"));
+ assertNotNull(parser);
+ assertTrue(parser instanceof GOMLink);
+ assertEquals(1, this.impl.getLinks().size());
+ this.impl
+ .getChildParser(new QName(GOMNamespace.ATOM_NS_URI, "link"));
+ assertEquals(2, this.impl.getLinks().size());
+
+ }
+
+ {
+ // atomLogo?
+ AtomParser parser = this.impl.getChildParser(new QName(
+ GOMNamespace.ATOM_NS_URI, "logo"));
+ assertNotNull(parser);
+ assertTrue(parser instanceof GOMLogo);
+ assertSame(parser, this.impl.getLogo());
+ try {
+ this.impl.getChildParser(new QName(GOMNamespace.ATOM_NS_URI,
+ "logo"));
+ fail("zero or one");
+ } catch (GDataParseException e) {
+ //
+ }
+
+ }
+
+ {
+ // atomRights?
+ AtomParser parser = this.impl.getChildParser(new QName(
+ GOMNamespace.ATOM_NS_URI, "rights"));
+ assertNotNull(parser);
+ assertTrue(parser instanceof GOMRights);
+ assertSame(parser, this.impl.getRights());
+ try {
+ this.impl.getChildParser(new QName(GOMNamespace.ATOM_NS_URI,
+ "rights"));
+ fail("zero or one");
+ } catch (GDataParseException e) {
+ //
+ }
+
+ }
+
+ {
+ // atomSubtitle?
+ AtomParser parser = this.impl.getChildParser(new QName(
+ GOMNamespace.ATOM_NS_URI, "subtitle"));
+ assertNotNull(parser);
+ assertTrue(parser instanceof GOMSubtitle);
+ assertSame(parser, this.impl.getSubtitle());
+ try {
+ this.impl.getChildParser(new QName(GOMNamespace.ATOM_NS_URI,
+ "subtitle"));
+ fail("zero or one");
+ } catch (GDataParseException e) {
+ //
+ }
+
+ }
+
+ {
+ // atomTitle
+ AtomParser parser = this.impl.getChildParser(new QName(
+ GOMNamespace.ATOM_NS_URI, "title"));
+ assertNotNull(parser);
+ assertTrue(parser instanceof GOMTitle);
+ assertSame(parser, this.impl.getTitle());
+ try {
+ this.impl.getChildParser(new QName(GOMNamespace.ATOM_NS_URI,
+ "title"));
+ fail("exactly one time ");
+ } catch (GDataParseException e) {
+ //
+ }
+
+ }
+
+ {
+ // atomUpdated
+ AtomParser parser = this.impl.getChildParser(new QName(
+ GOMNamespace.ATOM_NS_URI, "updated"));
+ assertNotNull(parser);
+ assertTrue(parser instanceof GOMUpdated);
+ assertSame(parser, this.impl.getUpdated());
+ try {
+ this.impl.getChildParser(new QName(GOMNamespace.ATOM_NS_URI,
+ "updated"));
+ fail("exactly one time ");
+ } catch (GDataParseException e) {
+ //
+ }
+
+ }
+
+ }
+
+ /*
+ * Test method for
+ * 'org.apache.lucene.gdata.gom.core.GOMFeedImpl.processElementValue(String)'
+ */
+ public void testProcessElementValue() {
+ try {
+ this.impl.processElementValue("some");
+ fail("no element text");
+ } catch (GDataParseException e) {
+ //
+ }
+
+ }
+
+ /*
+ * Test method for
+ * 'org.apache.lucene.gdata.gom.core.GOMFeedImpl.processEndElement()'
+ *
+ * atomFeed = element atom:feed { atomCommonAttributes, (atomAuthor* &
+ * atomCategory* & atomContributor* & atomGenerator? & atomIcon? & atomId &
+ * atomLink* & atomLogo? & atomRights? & atomSubtitle? & atomTitle &
+ * atomUpdated & extensionElement*), atomEntry* }
+ */
+ public void testProcessEndElement() {
+ this.impl.addAuthor(new GOMAuthorImpl());
+ this.impl.setId(new GOMIdImpl());
+ this.impl.setUpdated(new GOMUpdatedImpl());
+ this.impl.setTitle(new GOMTitleImpl());
+
+ this.impl.processEndElement();
+ {
+ // author missing
+ this.impl.getAuthors().clear();
+ try {
+ this.impl.processEndElement();
+ fail("missing elements");
+ } catch (GDataParseException e) {
+ //
+ }
+ this.impl.addAuthor(new GOMAuthorImpl());
+ }
+
+ {
+ // id missing
+ this.impl.setId(null);
+ try {
+ this.impl.processEndElement();
+ fail("missing elements");
+ } catch (GDataParseException e) {
+ //
+ }
+ this.impl.setId(new GOMIdImpl());
+ }
+
+ {
+ // title missing
+ this.impl.setTitle(null);
+ try {
+ this.impl.processEndElement();
+ fail("missing elements");
+ } catch (GDataParseException e) {
+ //
+ }
+ this.impl.setTitle(new GOMTitleImpl());
+ }
+ {
+ // updated missing
+ this.impl.setUpdated(null);
+ try {
+ this.impl.processEndElement();
+ fail("missing elements");
+ } catch (GDataParseException e) {
+ //
+ }
+ this.impl.setUpdated(new GOMUpdatedImpl());
+ }
+
+ /*
+ * atom:feed elements MUST NOT contain more than one atom:link element
+ * with a rel attribute value of "alternate" that has the same
+ * combination of type and hreflang attribute values.
+ */
+
+ {
+ // two identical alternate links missing
+ GOMLink link = new GOMLinkImpl();
+ link.setRel("alternate");
+ link.setHrefLang("http://www.apache.org");
+ link.setType("text/html");
+ this.impl.addLink(link);
+ // one is allowed
+ this.impl.processEndElement();
+ // add a second link
+ link = new GOMLinkImpl();
+ this.impl.addLink(link);
+ link.setRel("next");
+ link.setHrefLang("http://www.apache.org");
+ link.setType("text/html");
+ // one is alternate the other is next
+ this.impl.processEndElement();
+
+ // a second "identical" alternate link
+ link = new GOMLinkImpl();
+ this.impl.addLink(link);
+ link.setRel("alternate");
+ link.setHrefLang("http://www.apache.org");
+ link.setType("text/html");
+ try {
+ this.impl.processEndElement();
+ fail("missing elements");
+ } catch (GDataParseException e) {
+ //
+ }
+ this.impl.setUpdated(new GOMUpdatedImpl());
+ }
+
+ }
+
+ /*
+ * Test method for
+ * 'org.apache.lucene.gdata.gom.core.GOMFeedImpl.GOMFeedImpl()'
+ */
+ public void testGOMFeedImpl() {
+ GOMFeedImpl impl2 = new GOMFeedImpl();
+ assertEquals(GOMFeed.LOCALNAME, impl2.getLocalName());
+ assertEquals(GOMFeed.LOCALNAME, impl2.getQname().getLocalPart());
+ assertEquals(GOMNamespace.ATOM_NS_URI, impl2.getQname()
+ .getNamespaceURI());
+ }
+
+ /*
+ * Test method for
+ * 'org.apache.lucene.gdata.gom.core.GOMFeedImpl.writeAtomOutput(GOMWriter)'
+ */
+ public void testWriteAtomOutput() throws XMLStreamException,
+ FactoryConfigurationError {
+ // write a whole feed and check if all elements are written
+ this.impl.addAuthor(new GOMAuthorImpl());
+ this.impl.addCategory(new GOMCategoryImpl());
+ this.impl.addContributor(new GOMContributorImpl());
+ this.impl.addLink(new GOMLinkImpl());
+ this.impl.setGenerator(new GOMGeneratorImpl());
+ this.impl.setIcon(new GOMIconImpl());
+ this.impl.setId(new GOMIdImpl());
+ this.impl.setLogo(new GOMLogoImpl());
+ this.impl.setRights(new GOMRightsImpl());
+ this.impl.setSubtitle(new GOMSubtitleImpl());
+ this.impl.setTitle(new GOMTitleImpl());
+ this.impl.setUpdated(new GOMUpdatedImpl());
+ StringWriter stW = new StringWriter();
+ GOMOutputWriter writer = new GOMStaxWriter(stW);
+ this.impl.writeAtomOutput(writer);
+ String string = stW.toString();
+ assertTrue(string.startsWith("<" + GOMSource.LOCALNAME));
+ assertTrue(string.contains("<" + GOMAuthor.LOCALNAME));
+ assertTrue(string.contains("<" + GOMCategory.LOCALNAME));
+ assertTrue(string.contains("<" + GOMContributor.LOCALNAME));
+ assertTrue(string.contains("<" + GOMLink.LOCALNAME));
+ assertTrue(string.contains("<" + GOMGenerator.LOCALNAME));
+ assertTrue(string.contains("<" + GOMIcon.LOCALNAME));
+ assertTrue(string.contains("<" + GOMId.LOCALNAME));
+ assertTrue(string.contains("<" + GOMLogo.LOCALNAME));
+ assertTrue(string.contains("<" + GOMRights.LOCALNAME));
+ assertTrue(string.contains("<" + GOMSubtitle.LOCALNAME));
+ assertTrue(string.contains("<" + GOMTitle.LOCALNAME));
+ assertTrue(string.contains("<" + GOMUpdated.LOCALNAME));
+ }
+
+ /*
+ * Test method for
+ * 'org.apache.lucene.gdata.gom.core.GOMFeedImpl.writeRssOutput(GOMWriter)'
+ */
+ public void testWriteRssOutput() throws XMLStreamException,
+ FactoryConfigurationError {
+
+ StringWriter stW = new StringWriter();
+ GOMOutputWriter writer = new GOMStaxWriter(stW);
+ this.impl.writeRssOutput(writer);
+ assertEquals("", stW.toString());
+ }
+
+}
diff --git a/contrib/gdata-server/src/gom/test/org/apache/lucene/gdata/gom/core/GOMTextConstructImplTest.java b/contrib/gdata-server/src/gom/test/org/apache/lucene/gdata/gom/core/GOMTextConstructImplTest.java
new file mode 100644
index 00000000000..7ef47a37192
--- /dev/null
+++ b/contrib/gdata-server/src/gom/test/org/apache/lucene/gdata/gom/core/GOMTextConstructImplTest.java
@@ -0,0 +1,257 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.lucene.gdata.gom.core;
+
+import java.io.StringWriter;
+
+import javax.xml.namespace.QName;
+import javax.xml.stream.FactoryConfigurationError;
+import javax.xml.stream.XMLStreamException;
+
+import org.apache.lucene.gdata.gom.ContentType;
+import org.apache.lucene.gdata.gom.core.GOMTextContructImpl.XMLBlobContentParser;
+import org.apache.lucene.gdata.gom.writer.GOMStaxWriter;
+import org.apache.lucene.gdata.gom.writer.GOMOutputWriter;
+
+import junit.framework.TestCase;
+
+/**
+ * @author Simon Willnauer
+ *
+ */
+public class GOMTextConstructImplTest extends TestCase {
+ GOMTitleImpl titleImpl;
+
+ GOMSubtitleImpl subTitleImpl;
+
+ protected void setUp() throws Exception {
+ this.titleImpl = new GOMTitleImpl();
+ this.subTitleImpl = new GOMSubtitleImpl();
+ }
+
+ /*
+ * Test method for
+ * 'org.apache.lucene.gdata.gom.core.GOMTextContructImpl.getChildParser(QName)'
+ */
+ public void testGetChildParser() {
+ try {
+ this.titleImpl.getChildParser(null);
+ fail("qname must not be null");
+ } catch (GDataParseException e) {
+ //
+ }
+ try {
+ this.titleImpl.getChildParser(new QName("test"));
+ fail("no such child supported");
+ } catch (GDataParseException e) {
+ //
+ }
+
+ try {
+ this.titleImpl.getChildParser(new QName("div"));
+ fail("content type not set");
+ } catch (GDataParseException e) {
+ //
+ }
+ this.titleImpl.contentType = ContentType.XHTML;
+ AtomParser childParser = this.titleImpl
+ .getChildParser(new QName("div"));
+ assertNotNull(childParser);
+ assertTrue(childParser instanceof XMLBlobContentParser);
+ try {
+ this.titleImpl.getChildParser(new QName("div"));
+ fail("duplicated element");
+ } catch (GDataParseException e) {
+ //
+ }
+
+ }
+
+ /*
+ * Test method for
+ * 'org.apache.lucene.gdata.gom.core.GOMTextContructImpl.processAttribute(QName,
+ * String)' includes Test method for
+ * 'org.apache.lucene.gdata.gom.core.GOMTextContructImpl.getContentType()
+ */
+ public void testProcessAttribute() {
+ try {
+ this.titleImpl.processAttribute(null, "test");
+ fail("qname is null");
+ } catch (GDataParseException e) {
+ //
+ }
+ this.titleImpl.processAttribute(new QName("type"), "text");
+ assertEquals(ContentType.TEXT, this.titleImpl.getContentType());
+ this.titleImpl.contentType = null;
+ this.titleImpl.processAttribute(new QName("type"), "html");
+ assertEquals(ContentType.HTML, this.titleImpl.getContentType());
+ this.titleImpl.contentType = null;
+ this.titleImpl.processAttribute(new QName("type"), "xhtml");
+ assertEquals(ContentType.XHTML, this.titleImpl.getContentType());
+
+ }
+
+ /*
+ * Test method for
+ * 'org.apache.lucene.gdata.gom.core.GOMTextContructImpl.processElementValue(String)'
+ */
+ public void testProcessElementValue() {
+ this.titleImpl.processElementValue("test");
+ assertEquals("test", this.titleImpl.getTextValue());
+ assertNull(this.titleImpl.htmlBuilder);
+ this.titleImpl.processAttribute(new QName("type"), "html");
+ assertNotNull(this.titleImpl.htmlBuilder);
+
+ this.titleImpl.processElementValue("test");
+ assertEquals("test", this.titleImpl.getTextValue());
+ assertEquals("test", this.titleImpl.htmlBuilder.toString());
+
+ }
+
+ /*
+ * Test method for
+ * 'org.apache.lucene.gdata.gom.core.GOMTextContructImpl.processEndElement()'
+ */
+ public void testProcessEndElement() {
+ try {
+ this.titleImpl.processEndElement();
+ fail("no content type");
+ } catch (GDataParseException e) {
+ //
+ }
+ this.titleImpl.contentType = ContentType.TEXT;
+ this.titleImpl.processEndElement();
+ }
+
+ /*
+ * Test method for
+ * 'org.apache.lucene.gdata.gom.core.GOMTextContructImpl.writeAtomOutput(GOMWriter)'
+ */
+ public void testWriteAtomOutput() throws XMLStreamException,
+ FactoryConfigurationError {
+ {
+ this.titleImpl.contentType = ContentType.TEXT;
+ StringWriter strWriter = new StringWriter();
+ GOMOutputWriter writer = new GOMStaxWriter(strWriter);
+ this.titleImpl.writeAtomOutput(writer);
+ assertEquals("<title type=\"text\"/>", strWriter.toString());
+ }
+ {
+ this.titleImpl.setTextValue("><hello world");
+ StringWriter strWriter = new StringWriter();
+ GOMOutputWriter writer = new GOMStaxWriter(strWriter);
+ this.titleImpl.writeAtomOutput(writer);
+ assertEquals("<title type=\"text\">&gt;&lt;hello world</title>",
+ strWriter.toString());
+ }
+
+ {
+ this.titleImpl.contentType = ContentType.HTML;
+ StringWriter strWriter = new StringWriter();
+ GOMOutputWriter writer = new GOMStaxWriter(strWriter);
+ this.titleImpl.writeAtomOutput(writer);
+ assertEquals("<title type=\"html\">&gt;&lt;hello world</title>",
+ strWriter.toString());
+ }
+
+ {
+ this.titleImpl.contentType = ContentType.XHTML;
+ StringWriter strWriter = new StringWriter();
+ GOMOutputWriter writer = new GOMStaxWriter(strWriter);
+ this.titleImpl.writeAtomOutput(writer);
+ assertEquals("<title type=\"xhtml\">><hello world</title>",
+ strWriter.toString());
+ }
+
+ }
+
+ /*
+ * Test method for
+ * 'org.apache.lucene.gdata.gom.core.GOMTextContructImpl.writeRssOutput(GOMWriter)'
+ */
+ public void testWriteRssOutput() throws XMLStreamException {
+
+ {
+ this.titleImpl.contentType = ContentType.TEXT;
+ StringWriter strWriter = new StringWriter();
+ GOMOutputWriter writer = new GOMStaxWriter(strWriter);
+ this.titleImpl.writeRssOutput(writer);
+ assertEquals("<title/>", strWriter.toString());
+ }
+ {
+ this.titleImpl.setTextValue("><hello world");
+ StringWriter strWriter = new StringWriter();
+ GOMOutputWriter writer = new GOMStaxWriter(strWriter);
+ this.titleImpl.writeRssOutput(writer);
+ assertEquals("<title>&gt;&lt;hello world</title>", strWriter
+ .toString());
+ }
+
+ {
+ this.titleImpl.contentType = ContentType.HTML;
+ StringWriter strWriter = new StringWriter();
+ GOMOutputWriter writer = new GOMStaxWriter(strWriter);
+ this.titleImpl.writeRssOutput(writer);
+ assertEquals("<title>&gt;&lt;hello world</title>", strWriter
+ .toString());
+ }
+
+ {
+ this.titleImpl.contentType = ContentType.XHTML;
+ StringWriter strWriter = new StringWriter();
+ GOMOutputWriter writer = new GOMStaxWriter(strWriter);
+ this.titleImpl.writeRssOutput(writer);
+ // no markup in rss
+ assertEquals("<title>&gt;&lt;hello world</title>", strWriter
+ .toString());
+ }
+
+ {
+ this.titleImpl.contentType = ContentType.XHTML;
+ this.titleImpl.xmlBase = "http://www.apache.org";
+ this.titleImpl.xmlLang = "en";
+ StringWriter strWriter = new StringWriter();
+ GOMOutputWriter writer = new GOMStaxWriter(strWriter);
+ this.titleImpl.writeRssOutput(writer);
+ // no markup in rss
+ assertEquals(
+ "<title xml:base=\"http://www.apache.org\" xml:lang=\"en\">&gt;&lt;hello world</title>",
+ strWriter.toString());
+ }
+
+ {
+ this.subTitleImpl.contentType = ContentType.XHTML;
+ StringWriter strWriter = new StringWriter();
+ GOMOutputWriter writer = new GOMStaxWriter(strWriter);
+ this.subTitleImpl.writeRssOutput(writer);
+
+ assertEquals("<description/>", strWriter.toString());
+ }
+
+ {
+ this.subTitleImpl.contentType = ContentType.XHTML;
+ this.subTitleImpl.setTextValue("><hello world");
+ StringWriter strWriter = new StringWriter();
+ GOMOutputWriter writer = new GOMStaxWriter(strWriter);
+ this.subTitleImpl.writeRssOutput(writer);
+
+ assertEquals("<description>&gt;&lt;hello world</description>",
+ strWriter.toString());
+ }
+ }
+
+}
diff --git a/contrib/gdata-server/src/gom/test/org/apache/lucene/gdata/gom/core/SimpleGOMElementImplTest.java b/contrib/gdata-server/src/gom/test/org/apache/lucene/gdata/gom/core/SimpleGOMElementImplTest.java
new file mode 100644
index 00000000000..4dd1c9c2257
--- /dev/null
+++ b/contrib/gdata-server/src/gom/test/org/apache/lucene/gdata/gom/core/SimpleGOMElementImplTest.java
@@ -0,0 +1,136 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.lucene.gdata.gom.core;
+
+import java.io.StringWriter;
+
+import javax.xml.stream.FactoryConfigurationError;
+import javax.xml.stream.XMLStreamException;
+
+import org.apache.lucene.gdata.gom.GOMNamespace;
+import org.apache.lucene.gdata.gom.writer.GOMStaxWriter;
+import org.apache.lucene.gdata.gom.writer.GOMOutputWriter;
+
+import junit.framework.TestCase;
+
+/**
+ * @author Simon Willnauer
+ *
+ */
+public class SimpleGOMElementImplTest extends TestCase {
+ String localName = "test";
+
+ SimpleGOMElementImpl impl;
+
+ /**
+ * @see junit.framework.TestCase#setUp()
+ */
+ @Override
+ protected void setUp() throws Exception {
+ this.impl = new SimpleGOMElementImpl(localName,
+ GOMNamespace.ATOM_NAMESPACE);
+ }
+
+ /*
+ * Test method for
+ * 'org.apache.lucene.gdata.gom.core.SimpleGOMElementImpl.processElementValue(String)'
+ */
+ public void testProcessElementValue() {
+ this.impl.processElementValue("myValue");
+ assertEquals("myValue", this.impl.getTextValue());
+
+ try {
+ this.impl.processElementValue("myValue");
+ fail("duplicated");
+
+ } catch (GDataParseException e) {
+ //
+ }
+ }
+
+ /*
+ * Test method for
+ * 'org.apache.lucene.gdata.gom.core.SimpleGOMElementImpl.processEndElement()'
+ */
+ public void testProcessEndElement() {
+ // depends validator
+ this.impl.processEndElement();
+ this.impl
+ .setValidator(new GOMFeedImpl.PositiveIntegerValidator("test"));
+ try {
+ this.impl.processEndElement();
+ fail("value is null");
+ } catch (GDataParseException e) {
+ assertTrue(e.getMessage().indexOf("requires a element value") > 0);
+ }
+ this.impl.setTextValue("1");
+ this.impl.processEndElement();
+
+ }
+
+ /*
+ * Test method for
+ * 'org.apache.lucene.gdata.gom.core.SimpleGOMElementImpl.SimpleGOMElementImpl(String,
+ * GOMNamespace)'
+ */
+ public void testSimpleGOMElementImpl() {
+ try {
+ new SimpleGOMElementImpl(null, GOMNamespace.ATOM_NAMESPACE);
+ fail("localname is null");
+ } catch (IllegalArgumentException e) {
+ //
+ }
+ try {
+ new SimpleGOMElementImpl("test", null);
+ fail("namespace is null");
+ } catch (IllegalArgumentException e) {
+ //
+ }
+
+ SimpleGOMElementImpl impl2 = new SimpleGOMElementImpl(this.localName,
+ GOMNamespace.ATOM_NAMESPACE);
+ assertEquals(impl2.getQname().getNamespaceURI(),
+ GOMNamespace.ATOM_NS_URI);
+ assertEquals(impl2.getQname().getPrefix(), GOMNamespace.ATOM_NS_PREFIX);
+ assertEquals(impl2.getQname().getLocalPart(), this.localName);
+ assertEquals(impl2.getLocalName(), this.localName);
+
+ }
+
+ /*
+ * Test method for
+ * 'org.apache.lucene.gdata.gom.core.SimpleGOMElementImpl.writeAtomOutput(GOMWriter)'
+ */
+ public void testWriteAtomOutput() throws XMLStreamException,
+ FactoryConfigurationError {
+ {
+ StringWriter strWriter = new StringWriter();
+ GOMOutputWriter writer = new GOMStaxWriter(strWriter);
+ this.impl.writeAtomOutput(writer);
+ assertEquals("<atom:" + this.localName + "/>", strWriter.toString());
+ }
+ {
+ StringWriter strWriter = new StringWriter();
+ GOMOutputWriter writer = new GOMStaxWriter(strWriter);
+ this.impl.setTextValue("hello world");
+ this.impl.writeAtomOutput(writer);
+ assertEquals("<atom:" + this.localName + ">hello world</atom:"
+ + this.localName + ">", strWriter.toString());
+ }
+ }
+
+}