wink-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From el...@apache.org
Subject svn commit: r812787 - in /incubator/wink/trunk: wink-common/src/main/java/org/apache/wink/common/internal/model/ wink-common/src/main/java/org/apache/wink/common/internal/providers/entity/app/ wink-common/src/main/java/org/apache/wink/common/internal/p...
Date Wed, 09 Sep 2009 07:02:49 GMT
Author: elman
Date: Wed Sep  9 07:02:47 2009
New Revision: 812787

URL: http://svn.apache.org/viewvc?rev=812787&view=rev
Log:
Move AtomJaxbUtils to internal. See [WINK-168]

Added:
    incubator/wink/trunk/wink-common/src/main/java/org/apache/wink/common/internal/model/AnyContentHandler.java
      - copied, changed from r812771, incubator/wink/trunk/wink-common/src/main/java/org/apache/wink/common/model/atom/AnyContentHandler.java
    incubator/wink/trunk/wink-common/src/main/java/org/apache/wink/common/internal/model/AtomXhtml.java
      - copied, changed from r812771, incubator/wink/trunk/wink-common/src/main/java/org/apache/wink/common/model/atom/AtomXhtml.java
    incubator/wink/trunk/wink-common/src/main/java/org/apache/wink/common/internal/model/ModelUtils.java
      - copied, changed from r812771, incubator/wink/trunk/wink-common/src/main/java/org/apache/wink/common/model/atom/AtomJAXBUtils.java
    incubator/wink/trunk/wink-common/src/main/java/org/apache/wink/common/internal/model/XmlWrapper.java
      - copied, changed from r812771, incubator/wink/trunk/wink-common/src/main/java/org/apache/wink/common/model/atom/XmlWrapper.java
Removed:
    incubator/wink/trunk/wink-common/src/main/java/org/apache/wink/common/model/atom/AnyContentHandler.java
    incubator/wink/trunk/wink-common/src/main/java/org/apache/wink/common/model/atom/AtomJAXBUtils.java
    incubator/wink/trunk/wink-common/src/main/java/org/apache/wink/common/model/atom/AtomXhtml.java
    incubator/wink/trunk/wink-common/src/main/java/org/apache/wink/common/model/atom/XmlWrapper.java
Modified:
    incubator/wink/trunk/wink-common/src/main/java/org/apache/wink/common/internal/providers/entity/app/AppCategoriesProvider.java
    incubator/wink/trunk/wink-common/src/main/java/org/apache/wink/common/internal/providers/entity/app/AppServiceProvider.java
    incubator/wink/trunk/wink-common/src/main/java/org/apache/wink/common/internal/providers/entity/atom/AbstractAtomEntryProvider.java
    incubator/wink/trunk/wink-common/src/main/java/org/apache/wink/common/internal/providers/entity/atom/AbstractAtomFeedProvider.java
    incubator/wink/trunk/wink-common/src/main/java/org/apache/wink/common/internal/providers/entity/json/AbstractJsonXmlProvider.java
    incubator/wink/trunk/wink-common/src/main/java/org/apache/wink/common/internal/providers/entity/opensearch/OpenSearchDescriptionProvider.java
    incubator/wink/trunk/wink-common/src/main/java/org/apache/wink/common/internal/providers/entity/xml/JAXBElementXmlProvider.java
    incubator/wink/trunk/wink-common/src/main/java/org/apache/wink/common/model/app/AppCategories.java
    incubator/wink/trunk/wink-common/src/main/java/org/apache/wink/common/model/app/AppService.java
    incubator/wink/trunk/wink-common/src/main/java/org/apache/wink/common/model/atom/AtomContent.java
    incubator/wink/trunk/wink-common/src/main/java/org/apache/wink/common/model/atom/AtomEntry.java
    incubator/wink/trunk/wink-common/src/main/java/org/apache/wink/common/model/atom/AtomFeed.java
    incubator/wink/trunk/wink-common/src/main/java/org/apache/wink/common/model/atom/AtomText.java
    incubator/wink/trunk/wink-common/src/main/java/org/apache/wink/common/model/atom/ObjectFactory.java
    incubator/wink/trunk/wink-common/src/main/java/org/apache/wink/common/model/synd/SyndSimpleContent.java
    incubator/wink/trunk/wink-common/src/test/java/org/apache/wink/common/model/app/AppTest.java
    incubator/wink/trunk/wink-common/src/test/java/org/apache/wink/common/model/atom/AtomTest.java
    incubator/wink/trunk/wink-common/src/test/java/org/apache/wink/common/model/opensearch/OpenSearchTest.java
    incubator/wink/trunk/wink-server/src/main/java/org/apache/wink/server/internal/providers/entity/html/HtmlSyndEntryAdapter.java

Copied: incubator/wink/trunk/wink-common/src/main/java/org/apache/wink/common/internal/model/AnyContentHandler.java (from r812771, incubator/wink/trunk/wink-common/src/main/java/org/apache/wink/common/model/atom/AnyContentHandler.java)
URL: http://svn.apache.org/viewvc/incubator/wink/trunk/wink-common/src/main/java/org/apache/wink/common/internal/model/AnyContentHandler.java?p2=incubator/wink/trunk/wink-common/src/main/java/org/apache/wink/common/internal/model/AnyContentHandler.java&p1=incubator/wink/trunk/wink-common/src/main/java/org/apache/wink/common/model/atom/AnyContentHandler.java&r1=812771&r2=812787&rev=812787&view=diff
==============================================================================
--- incubator/wink/trunk/wink-common/src/main/java/org/apache/wink/common/model/atom/AnyContentHandler.java (original)
+++ incubator/wink/trunk/wink-common/src/main/java/org/apache/wink/common/internal/model/AnyContentHandler.java Wed Sep  9 07:02:47 2009
@@ -16,7 +16,7 @@
  *     specific language governing permissions and limitations
  *     under the License.
  *******************************************************************************/
-package org.apache.wink.common.model.atom;
+package org.apache.wink.common.internal.model;
 
 import java.io.ByteArrayInputStream;
 import java.io.ByteArrayOutputStream;
@@ -44,7 +44,7 @@
 /**
  * Handles objects wrapped with XmlWrapper
  */
-/* package */class AnyContentHandler implements DomHandler<XmlWrapper, StreamResult> {
+public class AnyContentHandler implements DomHandler<XmlWrapper, StreamResult> {
 
     private static final Logger logger = LoggerFactory.getLogger(AnyContentHandler.class);
 
@@ -91,9 +91,9 @@
             writer.writeTo(xmlWrapper.getValue(),
                            cls,
                            cls,
-                           AtomJAXBUtils.EMPTY_ARRAY,
+                           ModelUtils.EMPTY_ARRAY,
                            type,
-                           AtomJAXBUtils.EMPTY_OBJECT_MAP,
+                           ModelUtils.EMPTY_OBJECT_MAP,
                            os);
         } catch (IOException e) {
             throw new WebApplicationException(e);

Copied: incubator/wink/trunk/wink-common/src/main/java/org/apache/wink/common/internal/model/AtomXhtml.java (from r812771, incubator/wink/trunk/wink-common/src/main/java/org/apache/wink/common/model/atom/AtomXhtml.java)
URL: http://svn.apache.org/viewvc/incubator/wink/trunk/wink-common/src/main/java/org/apache/wink/common/internal/model/AtomXhtml.java?p2=incubator/wink/trunk/wink-common/src/main/java/org/apache/wink/common/internal/model/AtomXhtml.java&p1=incubator/wink/trunk/wink-common/src/main/java/org/apache/wink/common/model/atom/AtomXhtml.java&r1=812771&r2=812787&rev=812787&view=diff
==============================================================================
--- incubator/wink/trunk/wink-common/src/main/java/org/apache/wink/common/model/atom/AtomXhtml.java (original)
+++ incubator/wink/trunk/wink-common/src/main/java/org/apache/wink/common/internal/model/AtomXhtml.java Wed Sep  9 07:02:47 2009
@@ -16,7 +16,7 @@
  *     specific language governing permissions and limitations
  *     under the License.
  *******************************************************************************/
-package org.apache.wink.common.model.atom;
+package org.apache.wink.common.internal.model;
 
 import java.util.Arrays;
 import java.util.List;
@@ -33,7 +33,7 @@
  */
 @XmlType(name = "div", propOrder = {"any"})
 @XmlAccessorType(XmlAccessType.FIELD)
-/* package */class AtomXhtml {
+public class AtomXhtml {
 
     @XmlMixed
     @XmlAnyElement(value = AnyContentHandler.class)

Copied: incubator/wink/trunk/wink-common/src/main/java/org/apache/wink/common/internal/model/ModelUtils.java (from r812771, incubator/wink/trunk/wink-common/src/main/java/org/apache/wink/common/model/atom/AtomJAXBUtils.java)
URL: http://svn.apache.org/viewvc/incubator/wink/trunk/wink-common/src/main/java/org/apache/wink/common/internal/model/ModelUtils.java?p2=incubator/wink/trunk/wink-common/src/main/java/org/apache/wink/common/internal/model/ModelUtils.java&p1=incubator/wink/trunk/wink-common/src/main/java/org/apache/wink/common/model/atom/AtomJAXBUtils.java&r1=812771&r2=812787&rev=812787&view=diff
==============================================================================
--- incubator/wink/trunk/wink-common/src/main/java/org/apache/wink/common/model/atom/AtomJAXBUtils.java (original)
+++ incubator/wink/trunk/wink-common/src/main/java/org/apache/wink/common/internal/model/ModelUtils.java Wed Sep  9 07:02:47 2009
@@ -18,7 +18,7 @@
  *  
  *******************************************************************************/
 
-package org.apache.wink.common.model.atom;
+package org.apache.wink.common.internal.model;
 
 import java.io.ByteArrayInputStream;
 import java.io.IOException;
@@ -51,6 +51,9 @@
 import org.apache.wink.common.internal.MultivaluedMapImpl;
 import org.apache.wink.common.internal.runtime.RuntimeContextTLS;
 import org.apache.wink.common.internal.utils.UnmodifiableMultivaluedMap;
+import org.apache.wink.common.model.atom.AtomContent;
+import org.apache.wink.common.model.atom.AtomText;
+import org.apache.wink.common.model.atom.AtomTextType;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.xml.sax.ContentHandler;
@@ -59,7 +62,7 @@
 import org.xml.sax.XMLReader;
 import org.xml.sax.ext.LexicalHandler;
 
-public class AtomJAXBUtils {
+public class ModelUtils {
 
     public static final MultivaluedMap<String, Object> EMPTY_OBJECT_MAP =
                                                                             new UnmodifiableMultivaluedMap<String, Object>(
@@ -72,7 +75,7 @@
     private final static DatatypeFactory               datatypeFactory;
     private static final Logger                        logger           =
                                                                             LoggerFactory
-                                                                                .getLogger(AtomJAXBUtils.class);
+                                                                                .getLogger(ModelUtils.class);
 
     static {
         try {
@@ -110,7 +113,7 @@
         if (source instanceof AtomContent) {
             AtomContent content = (AtomContent)source;
             String type = content.getType();
-            if (AtomJAXBUtils.isTypeXml(type)) {
+            if (ModelUtils.isTypeXml(type)) {
                 return true;
             }
         } else if (source instanceof AtomText) {

Copied: incubator/wink/trunk/wink-common/src/main/java/org/apache/wink/common/internal/model/XmlWrapper.java (from r812771, incubator/wink/trunk/wink-common/src/main/java/org/apache/wink/common/model/atom/XmlWrapper.java)
URL: http://svn.apache.org/viewvc/incubator/wink/trunk/wink-common/src/main/java/org/apache/wink/common/internal/model/XmlWrapper.java?p2=incubator/wink/trunk/wink-common/src/main/java/org/apache/wink/common/internal/model/XmlWrapper.java&p1=incubator/wink/trunk/wink-common/src/main/java/org/apache/wink/common/model/atom/XmlWrapper.java&r1=812771&r2=812787&rev=812787&view=diff
==============================================================================
--- incubator/wink/trunk/wink-common/src/main/java/org/apache/wink/common/model/atom/XmlWrapper.java (original)
+++ incubator/wink/trunk/wink-common/src/main/java/org/apache/wink/common/internal/model/XmlWrapper.java Wed Sep  9 07:02:47 2009
@@ -16,7 +16,7 @@
  *     specific language governing permissions and limitations
  *     under the License.
  *******************************************************************************/
-package org.apache.wink.common.model.atom;
+package org.apache.wink.common.internal.model;
 
 import org.w3c.dom.Attr;
 import org.w3c.dom.DOMException;

Modified: incubator/wink/trunk/wink-common/src/main/java/org/apache/wink/common/internal/providers/entity/app/AppCategoriesProvider.java
URL: http://svn.apache.org/viewvc/incubator/wink/trunk/wink-common/src/main/java/org/apache/wink/common/internal/providers/entity/app/AppCategoriesProvider.java?rev=812787&r1=812786&r2=812787&view=diff
==============================================================================
--- incubator/wink/trunk/wink-common/src/main/java/org/apache/wink/common/internal/providers/entity/app/AppCategoriesProvider.java (original)
+++ incubator/wink/trunk/wink-common/src/main/java/org/apache/wink/common/internal/providers/entity/app/AppCategoriesProvider.java Wed Sep  9 07:02:47 2009
@@ -34,10 +34,10 @@
 import javax.xml.bind.Marshaller;
 import javax.xml.bind.PropertyException;
 
+import org.apache.wink.common.internal.model.ModelUtils;
 import org.apache.wink.common.internal.utils.MediaTypeUtils;
 import org.apache.wink.common.model.app.AppCategories;
 import org.apache.wink.common.model.app.ObjectFactory;
-import org.apache.wink.common.model.atom.AtomJAXBUtils;
 import org.apache.wink.common.utils.ProviderUtils;
 
 /**
@@ -75,7 +75,7 @@
             JAXBElement<AppCategories> feedElement = objectFactory.createCategories(t);
             Marshaller marshaller = AppCategories.getMarshaller();
             marshaller.setProperty(Marshaller.JAXB_ENCODING, ProviderUtils.getCharset(mediaType));
-            AtomJAXBUtils.marshal(marshaller, feedElement, entityStream);
+            ModelUtils.marshal(marshaller, feedElement, entityStream);
         } catch (PropertyException e) {
             throw new WebApplicationException(e);
         }

Modified: incubator/wink/trunk/wink-common/src/main/java/org/apache/wink/common/internal/providers/entity/app/AppServiceProvider.java
URL: http://svn.apache.org/viewvc/incubator/wink/trunk/wink-common/src/main/java/org/apache/wink/common/internal/providers/entity/app/AppServiceProvider.java?rev=812787&r1=812786&r2=812787&view=diff
==============================================================================
--- incubator/wink/trunk/wink-common/src/main/java/org/apache/wink/common/internal/providers/entity/app/AppServiceProvider.java (original)
+++ incubator/wink/trunk/wink-common/src/main/java/org/apache/wink/common/internal/providers/entity/app/AppServiceProvider.java Wed Sep  9 07:02:47 2009
@@ -34,10 +34,10 @@
 import javax.xml.bind.Marshaller;
 import javax.xml.bind.PropertyException;
 
+import org.apache.wink.common.internal.model.ModelUtils;
 import org.apache.wink.common.internal.utils.MediaTypeUtils;
 import org.apache.wink.common.model.app.AppService;
 import org.apache.wink.common.model.app.ObjectFactory;
-import org.apache.wink.common.model.atom.AtomJAXBUtils;
 import org.apache.wink.common.utils.ProviderUtils;
 
 /**
@@ -75,7 +75,7 @@
             JAXBElement<AppService> sd = objectFactory.createService(t);
             Marshaller marshaller = AppService.getMarshaller();
             marshaller.setProperty(Marshaller.JAXB_ENCODING, ProviderUtils.getCharset(mediaType));
-            AtomJAXBUtils.marshal(marshaller, sd, entityStream);
+            ModelUtils.marshal(marshaller, sd, entityStream);
         } catch (PropertyException e) {
             throw new WebApplicationException(e);
         }

Modified: incubator/wink/trunk/wink-common/src/main/java/org/apache/wink/common/internal/providers/entity/atom/AbstractAtomEntryProvider.java
URL: http://svn.apache.org/viewvc/incubator/wink/trunk/wink-common/src/main/java/org/apache/wink/common/internal/providers/entity/atom/AbstractAtomEntryProvider.java?rev=812787&r1=812786&r2=812787&view=diff
==============================================================================
--- incubator/wink/trunk/wink-common/src/main/java/org/apache/wink/common/internal/providers/entity/atom/AbstractAtomEntryProvider.java (original)
+++ incubator/wink/trunk/wink-common/src/main/java/org/apache/wink/common/internal/providers/entity/atom/AbstractAtomEntryProvider.java Wed Sep  9 07:02:47 2009
@@ -36,8 +36,8 @@
 import javax.xml.bind.Unmarshaller;
 
 import org.apache.wink.common.internal.i18n.Messages;
+import org.apache.wink.common.internal.model.ModelUtils;
 import org.apache.wink.common.model.atom.AtomEntry;
-import org.apache.wink.common.model.atom.AtomJAXBUtils;
 import org.apache.wink.common.model.atom.ObjectFactory;
 import org.apache.wink.common.utils.ProviderUtils;
 import org.slf4j.Logger;
@@ -76,7 +76,7 @@
             JAXBElement<AtomEntry> entryElement = atomObjectFactory.createEntry(entry);
             Marshaller marshaller = AtomEntry.getMarshaller();
             marshaller.setProperty(Marshaller.JAXB_ENCODING, ProviderUtils.getCharset(mediaType));
-            AtomJAXBUtils.marshal(marshaller, entryElement, entityStream);
+            ModelUtils.marshal(marshaller, entryElement, entityStream);
         } catch (PropertyException e) {
             throw new WebApplicationException(e);
         }
@@ -93,7 +93,7 @@
         Unmarshaller unmarshaller = AtomEntry.getUnmarshaller();
         InputStreamReader reader =
             new InputStreamReader(entityStream, ProviderUtils.getCharset(mediaType));
-        Object object = AtomJAXBUtils.unmarshal(unmarshaller, reader);
+        Object object = ModelUtils.unmarshal(unmarshaller, reader);
         AtomEntry entry = null;
         if (object instanceof AtomEntry) {
             entry = (AtomEntry)object;

Modified: incubator/wink/trunk/wink-common/src/main/java/org/apache/wink/common/internal/providers/entity/atom/AbstractAtomFeedProvider.java
URL: http://svn.apache.org/viewvc/incubator/wink/trunk/wink-common/src/main/java/org/apache/wink/common/internal/providers/entity/atom/AbstractAtomFeedProvider.java?rev=812787&r1=812786&r2=812787&view=diff
==============================================================================
--- incubator/wink/trunk/wink-common/src/main/java/org/apache/wink/common/internal/providers/entity/atom/AbstractAtomFeedProvider.java (original)
+++ incubator/wink/trunk/wink-common/src/main/java/org/apache/wink/common/internal/providers/entity/atom/AbstractAtomFeedProvider.java Wed Sep  9 07:02:47 2009
@@ -36,8 +36,8 @@
 import javax.xml.bind.Unmarshaller;
 
 import org.apache.wink.common.internal.i18n.Messages;
+import org.apache.wink.common.internal.model.ModelUtils;
 import org.apache.wink.common.model.atom.AtomFeed;
-import org.apache.wink.common.model.atom.AtomJAXBUtils;
 import org.apache.wink.common.model.atom.ObjectFactory;
 import org.apache.wink.common.utils.ProviderUtils;
 import org.slf4j.Logger;
@@ -75,7 +75,7 @@
             JAXBElement<AtomFeed> feedElement = atomObjectFactory.createFeed(feed);
             Marshaller marshaller = AtomFeed.getMarshaller();
             marshaller.setProperty(Marshaller.JAXB_ENCODING, ProviderUtils.getCharset(mediaType));
-            AtomJAXBUtils.marshal(marshaller, feedElement, entityStream);
+            ModelUtils.marshal(marshaller, feedElement, entityStream);
         } catch (PropertyException e) {
             throw new WebApplicationException(e);
         }
@@ -92,7 +92,7 @@
         Unmarshaller unmarshaller = AtomFeed.getUnmarshaller();
         InputStreamReader reader =
             new InputStreamReader(entityStream, ProviderUtils.getCharset(mediaType));
-        Object object = AtomJAXBUtils.unmarshal(unmarshaller, reader);
+        Object object = ModelUtils.unmarshal(unmarshaller, reader);
         AtomFeed feed = null;
         if (object instanceof AtomFeed) {
             feed = (AtomFeed)object;

Modified: incubator/wink/trunk/wink-common/src/main/java/org/apache/wink/common/internal/providers/entity/json/AbstractJsonXmlProvider.java
URL: http://svn.apache.org/viewvc/incubator/wink/trunk/wink-common/src/main/java/org/apache/wink/common/internal/providers/entity/json/AbstractJsonXmlProvider.java?rev=812787&r1=812786&r2=812787&view=diff
==============================================================================
--- incubator/wink/trunk/wink-common/src/main/java/org/apache/wink/common/internal/providers/entity/json/AbstractJsonXmlProvider.java (original)
+++ incubator/wink/trunk/wink-common/src/main/java/org/apache/wink/common/internal/providers/entity/json/AbstractJsonXmlProvider.java Wed Sep  9 07:02:47 2009
@@ -33,8 +33,8 @@
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.apache.wink.common.internal.i18n.Messages;
+import org.apache.wink.common.internal.model.ModelUtils;
 import org.apache.wink.common.internal.providers.entity.xml.AbstractJAXBProvider;
-import org.apache.wink.common.model.atom.AtomJAXBUtils;
 import org.xml.sax.Attributes;
 import org.xml.sax.ContentHandler;
 import org.xml.sax.Locator;
@@ -101,7 +101,7 @@
 
         @Override
         public void beforeMarshal(Object source) {
-            if (AtomJAXBUtils.isValueActuallyXml(source)) {
+            if (ModelUtils.isValueActuallyXml(source)) {
                 xmlStringToParse = new StringBuilder();
                 charactersAreXml = true;
             }
@@ -181,7 +181,7 @@
             if (charactersAreXml) {
                 charactersAreXml = false;
                 String xmlToParse = xmlStringToParse.toString();
-                AtomJAXBUtils.saxParse(new StringReader(xmlToParse),
+                ModelUtils.saxParse(new StringReader(xmlToParse),
                                        this,
                                        Messages.getMessage("jsonFailConvertXMLToJSON"));
             }

Modified: incubator/wink/trunk/wink-common/src/main/java/org/apache/wink/common/internal/providers/entity/opensearch/OpenSearchDescriptionProvider.java
URL: http://svn.apache.org/viewvc/incubator/wink/trunk/wink-common/src/main/java/org/apache/wink/common/internal/providers/entity/opensearch/OpenSearchDescriptionProvider.java?rev=812787&r1=812786&r2=812787&view=diff
==============================================================================
--- incubator/wink/trunk/wink-common/src/main/java/org/apache/wink/common/internal/providers/entity/opensearch/OpenSearchDescriptionProvider.java (original)
+++ incubator/wink/trunk/wink-common/src/main/java/org/apache/wink/common/internal/providers/entity/opensearch/OpenSearchDescriptionProvider.java Wed Sep  9 07:02:47 2009
@@ -35,10 +35,10 @@
 import javax.xml.bind.Marshaller;
 import javax.xml.bind.PropertyException;
 
+import org.apache.wink.common.internal.model.ModelUtils;
 import org.apache.wink.common.internal.utils.JAXBUtils;
 import org.apache.wink.common.internal.utils.MediaTypeUtils;
 import org.apache.wink.common.model.XmlFormattingOptions;
-import org.apache.wink.common.model.atom.AtomJAXBUtils;
 import org.apache.wink.common.model.opensearch.ObjectFactory;
 import org.apache.wink.common.model.opensearch.OpenSearchDescription;
 import org.apache.wink.common.utils.ProviderUtils;
@@ -78,7 +78,7 @@
             JAXBUtils.setXmlFormattingOptions(marshaller, XmlFormattingOptions
                 .getDefaultXmlFormattingOptions());
             marshaller.setProperty(Marshaller.JAXB_ENCODING, ProviderUtils.getCharset(mediaType));
-            AtomJAXBUtils.marshal(marshaller, openSearchDocumentWrapper, entityStream);
+            ModelUtils.marshal(marshaller, openSearchDocumentWrapper, entityStream);
         } catch (PropertyException e) {
             throw new WebApplicationException(e);
         }

Modified: incubator/wink/trunk/wink-common/src/main/java/org/apache/wink/common/internal/providers/entity/xml/JAXBElementXmlProvider.java
URL: http://svn.apache.org/viewvc/incubator/wink/trunk/wink-common/src/main/java/org/apache/wink/common/internal/providers/entity/xml/JAXBElementXmlProvider.java?rev=812787&r1=812786&r2=812787&view=diff
==============================================================================
--- incubator/wink/trunk/wink-common/src/main/java/org/apache/wink/common/internal/providers/entity/xml/JAXBElementXmlProvider.java (original)
+++ incubator/wink/trunk/wink-common/src/main/java/org/apache/wink/common/internal/providers/entity/xml/JAXBElementXmlProvider.java Wed Sep  9 07:02:47 2009
@@ -22,7 +22,6 @@
 import java.io.IOException;
 import java.io.InputStream;
 import java.io.OutputStream;
-import java.io.OutputStreamWriter;
 import java.lang.annotation.Annotation;
 import java.lang.reflect.ParameterizedType;
 import java.lang.reflect.Type;
@@ -42,10 +41,10 @@
 import javax.xml.bind.Unmarshaller;
 import javax.xml.transform.stream.StreamSource;
 
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 import org.apache.wink.common.internal.i18n.Messages;
 import org.apache.wink.common.utils.ProviderUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 @Provider
 @Consumes( {MediaType.TEXT_XML, MediaType.APPLICATION_XML, MediaType.WILDCARD})

Modified: incubator/wink/trunk/wink-common/src/main/java/org/apache/wink/common/model/app/AppCategories.java
URL: http://svn.apache.org/viewvc/incubator/wink/trunk/wink-common/src/main/java/org/apache/wink/common/model/app/AppCategories.java?rev=812787&r1=812786&r2=812787&view=diff
==============================================================================
--- incubator/wink/trunk/wink-common/src/main/java/org/apache/wink/common/model/app/AppCategories.java (original)
+++ incubator/wink/trunk/wink-common/src/main/java/org/apache/wink/common/model/app/AppCategories.java Wed Sep  9 07:02:47 2009
@@ -44,11 +44,11 @@
 
 import org.apache.wink.common.RestConstants;
 import org.apache.wink.common.RestException;
+import org.apache.wink.common.internal.model.ModelUtils;
 import org.apache.wink.common.internal.model.NamespacePrefixMapperProvider;
 import org.apache.wink.common.internal.utils.JAXBUtils;
 import org.apache.wink.common.model.JAXBNamespacePrefixMapper;
 import org.apache.wink.common.model.atom.AtomCategory;
-import org.apache.wink.common.model.atom.AtomJAXBUtils;
 
 /**
  * The "app:categories" Element Per RFC5023
@@ -153,7 +153,7 @@
      */
     public static AppCategories unmarshal(Reader reader) {
         try {
-            return (AppCategories)AtomJAXBUtils.unmarshal(AppCategories.getUnmarshaller(), reader);
+            return (AppCategories)ModelUtils.unmarshal(AppCategories.getUnmarshaller(), reader);
         } catch (IOException e) {
             throw new RestException(e);
         }

Modified: incubator/wink/trunk/wink-common/src/main/java/org/apache/wink/common/model/app/AppService.java
URL: http://svn.apache.org/viewvc/incubator/wink/trunk/wink-common/src/main/java/org/apache/wink/common/model/app/AppService.java?rev=812787&r1=812786&r2=812787&view=diff
==============================================================================
--- incubator/wink/trunk/wink-common/src/main/java/org/apache/wink/common/model/app/AppService.java (original)
+++ incubator/wink/trunk/wink-common/src/main/java/org/apache/wink/common/model/app/AppService.java Wed Sep  9 07:02:47 2009
@@ -46,11 +46,11 @@
 
 import org.apache.wink.common.RestConstants;
 import org.apache.wink.common.RestException;
+import org.apache.wink.common.internal.model.ModelUtils;
 import org.apache.wink.common.internal.model.NamespacePrefixMapperProvider;
 import org.apache.wink.common.internal.utils.JAXBUtils;
 import org.apache.wink.common.model.JAXBNamespacePrefixMapper;
 import org.apache.wink.common.model.atom.AtomCommonAttributes;
-import org.apache.wink.common.model.atom.AtomJAXBUtils;
 import org.w3c.dom.Element;
 
 /**
@@ -111,7 +111,7 @@
      */
     public static AppService unmarshal(Reader reader) {
         try {
-            return (AppService)AtomJAXBUtils.unmarshal(AppService.getUnmarshaller(), reader);
+            return (AppService)ModelUtils.unmarshal(AppService.getUnmarshaller(), reader);
         } catch (IOException e) {
             throw new RestException(e);
         }

Modified: incubator/wink/trunk/wink-common/src/main/java/org/apache/wink/common/model/atom/AtomContent.java
URL: http://svn.apache.org/viewvc/incubator/wink/trunk/wink-common/src/main/java/org/apache/wink/common/model/atom/AtomContent.java?rev=812787&r1=812786&r2=812787&view=diff
==============================================================================
--- incubator/wink/trunk/wink-common/src/main/java/org/apache/wink/common/model/atom/AtomContent.java (original)
+++ incubator/wink/trunk/wink-common/src/main/java/org/apache/wink/common/model/atom/AtomContent.java Wed Sep  9 07:02:47 2009
@@ -38,6 +38,8 @@
 import javax.xml.bind.annotation.XmlType;
 
 import org.apache.wink.common.RestException;
+import org.apache.wink.common.internal.model.AnyContentHandler;
+import org.apache.wink.common.internal.model.ModelUtils;
 import org.apache.wink.common.model.synd.SyndContent;
 
 /**
@@ -338,9 +340,9 @@
             return getValue(cls,
                             cls,
                             null,
-                            AtomJAXBUtils.EMPTY_ARRAY,
-                            AtomJAXBUtils.EMPTY_STRING_MAP,
-                            AtomJAXBUtils.determineMediaType(type));
+                            ModelUtils.EMPTY_ARRAY,
+                            ModelUtils.EMPTY_STRING_MAP,
+                            ModelUtils.determineMediaType(type));
         } catch (IOException e) {
             // should never happen
             throw new WebApplicationException(e);
@@ -361,7 +363,7 @@
                           Annotation[] annotations,
                           MultivaluedMap<String, String> httpHeaders,
                           MediaType mediaType) throws IOException {
-        return AtomJAXBUtils.readValue(getAny(),
+        return ModelUtils.readValue(getAny(),
                                        cls,
                                        providers,
                                        genericType,
@@ -373,7 +375,7 @@
     @XmlMixed
     @XmlAnyElement(lax = true, value = AnyContentHandler.class)
     List<Object> getAny() {
-        AtomJAXBUtils.fixAnyContent(any, type);
+        ModelUtils.fixAnyContent(any, type);
         return any;
     }
 

Modified: incubator/wink/trunk/wink-common/src/main/java/org/apache/wink/common/model/atom/AtomEntry.java
URL: http://svn.apache.org/viewvc/incubator/wink/trunk/wink-common/src/main/java/org/apache/wink/common/model/atom/AtomEntry.java?rev=812787&r1=812786&r2=812787&view=diff
==============================================================================
--- incubator/wink/trunk/wink-common/src/main/java/org/apache/wink/common/model/atom/AtomEntry.java (original)
+++ incubator/wink/trunk/wink-common/src/main/java/org/apache/wink/common/model/atom/AtomEntry.java Wed Sep  9 07:02:47 2009
@@ -50,6 +50,7 @@
 
 import org.apache.wink.common.RestConstants;
 import org.apache.wink.common.RestException;
+import org.apache.wink.common.internal.model.ModelUtils;
 import org.apache.wink.common.internal.model.NamespacePrefixMapperProvider;
 import org.apache.wink.common.internal.utils.JAXBUtils;
 import org.apache.wink.common.model.JAXBNamespacePrefixMapper;
@@ -185,13 +186,13 @@
      * @return AtomEntry instance from the input
      */
     public static AtomEntry unmarshal(Reader reader) throws IOException {
-        return (AtomEntry)AtomJAXBUtils.unmarshal(AtomEntry.getUnmarshaller(), reader);
+        return (AtomEntry)ModelUtils.unmarshal(AtomEntry.getUnmarshaller(), reader);
     }
 
     public static void marshal(AtomEntry entry, OutputStream os) throws IOException {
         JAXBElement<AtomEntry> entryElement = new ObjectFactory().createEntry(entry);
         Marshaller marshaller = AtomEntry.getMarshaller();
-        AtomJAXBUtils.marshal(marshaller, entryElement, os);
+        ModelUtils.marshal(marshaller, entryElement, os);
     }
 
     public JAXBNamespacePrefixMapper getNamespacePrefixMapper() {
@@ -314,7 +315,7 @@
      * @return the updated value, or -1 if it is not set
      */
     public long getUpdatedAsTime() {
-        return AtomJAXBUtils.xmlGregorianCalendarToTime(updated);
+        return ModelUtils.xmlGregorianCalendarToTime(updated);
     }
 
     /**
@@ -339,7 +340,7 @@
      * Sets the value of updated.
      */
     public void setUpdated(long value) {
-        setUpdated(AtomJAXBUtils.timeToXmlGregorianCalendar(value));
+        setUpdated(ModelUtils.timeToXmlGregorianCalendar(value));
     }
 
     /**
@@ -387,7 +388,7 @@
      * @return the published value, or -1 if it is not set
      */
     public long getPublishedAsTime() {
-        return AtomJAXBUtils.xmlGregorianCalendarToTime(published);
+        return ModelUtils.xmlGregorianCalendarToTime(published);
     }
 
     /**
@@ -412,7 +413,7 @@
      * Sets the value of published.
      */
     public void setPublished(long value) {
-        setPublished(AtomJAXBUtils.timeToXmlGregorianCalendar(value));
+        setPublished(ModelUtils.timeToXmlGregorianCalendar(value));
     }
 
     /**

Modified: incubator/wink/trunk/wink-common/src/main/java/org/apache/wink/common/model/atom/AtomFeed.java
URL: http://svn.apache.org/viewvc/incubator/wink/trunk/wink-common/src/main/java/org/apache/wink/common/model/atom/AtomFeed.java?rev=812787&r1=812786&r2=812787&view=diff
==============================================================================
--- incubator/wink/trunk/wink-common/src/main/java/org/apache/wink/common/model/atom/AtomFeed.java (original)
+++ incubator/wink/trunk/wink-common/src/main/java/org/apache/wink/common/model/atom/AtomFeed.java Wed Sep  9 07:02:47 2009
@@ -45,12 +45,14 @@
 import javax.xml.bind.annotation.XmlAccessorType;
 import javax.xml.bind.annotation.XmlAnyElement;
 import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlSeeAlso;
 import javax.xml.bind.annotation.XmlTransient;
 import javax.xml.bind.annotation.XmlType;
 import javax.xml.datatype.XMLGregorianCalendar;
 
 import org.apache.wink.common.RestConstants;
 import org.apache.wink.common.RestException;
+import org.apache.wink.common.internal.model.ModelUtils;
 import org.apache.wink.common.internal.model.NamespacePrefixMapperProvider;
 import org.apache.wink.common.internal.utils.JAXBUtils;
 import org.apache.wink.common.model.JAXBNamespacePrefixMapper;
@@ -143,6 +145,7 @@
                                          "startIndex", "totalResults", "opensearchQuery", "link",
                                          "author", "contributor", "category", "generator", "icon",
                                          "logo", "rights", "any", "entry"})
+@XmlSeeAlso(value = {OpenSearchQuery.class})
 public class AtomFeed extends AtomCommonAttributes implements NamespacePrefixMapperProvider {
 
     @XmlElement(required = true)
@@ -253,13 +256,13 @@
      * @return AtomFeed instance from the input
      */
     public static AtomFeed unmarshal(Reader reader) throws IOException {
-        return (AtomFeed)AtomJAXBUtils.unmarshal(AtomFeed.getUnmarshaller(), reader);
+        return (AtomFeed)ModelUtils.unmarshal(AtomFeed.getUnmarshaller(), reader);
     }
 
     public static void marshal(AtomFeed feed, OutputStream os) throws IOException {
         JAXBElement<AtomFeed> feedElement = new ObjectFactory().createFeed(feed);
         Marshaller marshaller = AtomFeed.getMarshaller();
-        AtomJAXBUtils.marshal(marshaller, feedElement,  os);
+        ModelUtils.marshal(marshaller, feedElement, os);
     }
 
     public JAXBNamespacePrefixMapper getNamespacePrefixMapper() {
@@ -384,7 +387,7 @@
      * @return the updated value, or -1 if it is not set
      */
     public long getUpdatedAsTime() {
-        return AtomJAXBUtils.xmlGregorianCalendarToTime(updated);
+        return ModelUtils.xmlGregorianCalendarToTime(updated);
     }
 
     /**
@@ -409,7 +412,7 @@
      * Sets the value of updated.
      */
     public void setUpdated(long value) {
-        setUpdated(AtomJAXBUtils.timeToXmlGregorianCalendar(value));
+        setUpdated(ModelUtils.timeToXmlGregorianCalendar(value));
     }
 
     /**

Modified: incubator/wink/trunk/wink-common/src/main/java/org/apache/wink/common/model/atom/AtomText.java
URL: http://svn.apache.org/viewvc/incubator/wink/trunk/wink-common/src/main/java/org/apache/wink/common/model/atom/AtomText.java?rev=812787&r1=812786&r2=812787&view=diff
==============================================================================
--- incubator/wink/trunk/wink-common/src/main/java/org/apache/wink/common/model/atom/AtomText.java (original)
+++ incubator/wink/trunk/wink-common/src/main/java/org/apache/wink/common/model/atom/AtomText.java Wed Sep  9 07:02:47 2009
@@ -44,6 +44,8 @@
 import javax.xml.bind.annotation.XmlTransient;
 import javax.xml.bind.annotation.XmlType;
 
+import org.apache.wink.common.internal.model.AnyContentHandler;
+import org.apache.wink.common.internal.model.ModelUtils;
 import org.apache.wink.common.model.synd.SyndText;
 import org.apache.wink.common.model.synd.SyndTextType;
 
@@ -142,7 +144,7 @@
     @XmlMixed
     @XmlAnyElement(lax = true, value = AnyContentHandler.class)
     List<Object> getAny() {
-        AtomJAXBUtils.fixAnyContent(any, type == null ? null : type.name());
+        ModelUtils.fixAnyContent(any, type == null ? null : type.name());
         return any;
     }
 
@@ -235,9 +237,9 @@
             return getValue(cls,
                             cls,
                             null,
-                            AtomJAXBUtils.EMPTY_ARRAY,
-                            AtomJAXBUtils.EMPTY_STRING_MAP,
-                            AtomJAXBUtils.determineMediaType(type == null ? null : type.name()));
+                            ModelUtils.EMPTY_ARRAY,
+                            ModelUtils.EMPTY_STRING_MAP,
+                            ModelUtils.determineMediaType(type == null ? null : type.name()));
         } catch (IOException e) {
             // should never happen
             throw new WebApplicationException(e);
@@ -259,7 +261,7 @@
                           Annotation[] annotations,
                           MultivaluedMap<String, String> httpHeaders,
                           MediaType mediaType) throws IOException {
-        return AtomJAXBUtils.readValue(getAny(),
+        return ModelUtils.readValue(getAny(),
                                        cls,
                                        providers,
                                        genericType,

Modified: incubator/wink/trunk/wink-common/src/main/java/org/apache/wink/common/model/atom/ObjectFactory.java
URL: http://svn.apache.org/viewvc/incubator/wink/trunk/wink-common/src/main/java/org/apache/wink/common/model/atom/ObjectFactory.java?rev=812787&r1=812786&r2=812787&view=diff
==============================================================================
--- incubator/wink/trunk/wink-common/src/main/java/org/apache/wink/common/model/atom/ObjectFactory.java (original)
+++ incubator/wink/trunk/wink-common/src/main/java/org/apache/wink/common/model/atom/ObjectFactory.java Wed Sep  9 07:02:47 2009
@@ -32,6 +32,7 @@
 import javax.xml.namespace.QName;
 
 import org.apache.wink.common.RestConstants;
+import org.apache.wink.common.internal.model.AtomXhtml;
 
 /**
  * This object contains factory methods for each Java content interface and Java

Modified: incubator/wink/trunk/wink-common/src/main/java/org/apache/wink/common/model/synd/SyndSimpleContent.java
URL: http://svn.apache.org/viewvc/incubator/wink/trunk/wink-common/src/main/java/org/apache/wink/common/model/synd/SyndSimpleContent.java?rev=812787&r1=812786&r2=812787&view=diff
==============================================================================
--- incubator/wink/trunk/wink-common/src/main/java/org/apache/wink/common/model/synd/SyndSimpleContent.java (original)
+++ incubator/wink/trunk/wink-common/src/main/java/org/apache/wink/common/model/synd/SyndSimpleContent.java Wed Sep  9 07:02:47 2009
@@ -30,7 +30,7 @@
 import javax.ws.rs.core.MultivaluedMap;
 import javax.ws.rs.ext.Providers;
 
-import org.apache.wink.common.model.atom.AtomJAXBUtils;
+import org.apache.wink.common.internal.model.ModelUtils;
 
 public abstract class SyndSimpleContent extends SyndCommonAttributes {
 
@@ -64,9 +64,9 @@
             return getValue(cls,
                             cls,
                             null,
-                            AtomJAXBUtils.EMPTY_ARRAY,
-                            AtomJAXBUtils.EMPTY_STRING_MAP,
-                            AtomJAXBUtils.determineMediaType(type));
+                            ModelUtils.EMPTY_ARRAY,
+                            ModelUtils.EMPTY_STRING_MAP,
+                            ModelUtils.determineMediaType(type));
         } catch (IOException e) {
             // should never happen
             throw new WebApplicationException(e);
@@ -80,7 +80,7 @@
                           MultivaluedMap<String, String> httpHeaders,
                           MediaType mediaType) throws IOException {
 
-        return AtomJAXBUtils.readValue(Arrays.asList(value),
+        return ModelUtils.readValue(Arrays.asList(value),
                                        cls,
                                        providers,
                                        genericType,

Modified: incubator/wink/trunk/wink-common/src/test/java/org/apache/wink/common/model/app/AppTest.java
URL: http://svn.apache.org/viewvc/incubator/wink/trunk/wink-common/src/test/java/org/apache/wink/common/model/app/AppTest.java?rev=812787&r1=812786&r2=812787&view=diff
==============================================================================
--- incubator/wink/trunk/wink-common/src/test/java/org/apache/wink/common/model/app/AppTest.java (original)
+++ incubator/wink/trunk/wink-common/src/test/java/org/apache/wink/common/model/app/AppTest.java Wed Sep  9 07:02:47 2009
@@ -33,8 +33,8 @@
 import junit.framework.TestCase;
 
 import org.apache.wink.common.RestException;
+import org.apache.wink.common.internal.model.ModelUtils;
 import org.apache.wink.common.model.atom.AtomCategory;
-import org.apache.wink.common.model.atom.AtomJAXBUtils;
 import org.apache.wink.common.model.atom.AtomText;
 import org.apache.wink.test.mock.TestUtils;
 
@@ -107,7 +107,7 @@
         AppService service = getService();
         JAXBElement<AppService> element = (new ObjectFactory()).createService(service);
         ByteArrayOutputStream os = new ByteArrayOutputStream();
-        AtomJAXBUtils.marshal(m, element, os);
+        ModelUtils.marshal(m, element, os);
         String msg = TestUtils.diffIgnoreUpdateWithAttributeQualifier(SERVICE_DOCUMENT, os.toString());
         assertNull(msg, msg);
     }
@@ -115,7 +115,7 @@
     public void testAppUnmarshal() throws IOException {
         // Unmarshaller u = AtomJAXBUtils.createUnmarshaller(ctx);
         Unmarshaller u = AppService.getUnmarshaller();
-        Object element = AtomJAXBUtils.unmarshal(u, new StringReader(SERVICE_DOCUMENT));
+        Object element = ModelUtils.unmarshal(u, new StringReader(SERVICE_DOCUMENT));
         assertNotNull(element);
         assertTrue(element instanceof AppService);
 
@@ -132,10 +132,10 @@
         // Unmarshaller u = AtomJAXBUtils.createUnmarshaller(ctx);
         Unmarshaller u = AppService.getUnmarshaller();
 
-        Object service = AtomJAXBUtils.unmarshal(u, new StringReader(SERVICE_DOCUMENT));
+        Object service = ModelUtils.unmarshal(u, new StringReader(SERVICE_DOCUMENT));
         JAXBElement<AppService> element = (new ObjectFactory()).createService((AppService)service);
         ByteArrayOutputStream os = new ByteArrayOutputStream();
-        AtomJAXBUtils.marshal(m, element, os);
+        ModelUtils.marshal(m, element, os);
         String msg = TestUtils.diffIgnoreUpdateWithAttributeQualifier(SERVICE_DOCUMENT, os.toString());
         assertNull(msg, msg);
     }

Modified: incubator/wink/trunk/wink-common/src/test/java/org/apache/wink/common/model/atom/AtomTest.java
URL: http://svn.apache.org/viewvc/incubator/wink/trunk/wink-common/src/test/java/org/apache/wink/common/model/atom/AtomTest.java?rev=812787&r1=812786&r2=812787&view=diff
==============================================================================
--- incubator/wink/trunk/wink-common/src/test/java/org/apache/wink/common/model/atom/AtomTest.java (original)
+++ incubator/wink/trunk/wink-common/src/test/java/org/apache/wink/common/model/atom/AtomTest.java Wed Sep  9 07:02:47 2009
@@ -54,6 +54,7 @@
 import org.apache.wink.common.internal.contexts.ProvidersImpl;
 import org.apache.wink.common.internal.lifecycle.LifecycleManagersRegistry;
 import org.apache.wink.common.internal.lifecycle.ScopeLifecycleManager;
+import org.apache.wink.common.internal.model.ModelUtils;
 import org.apache.wink.common.internal.registry.ProvidersRegistry;
 import org.apache.wink.common.internal.registry.metadata.ProviderMetadataCollector;
 import org.apache.wink.common.internal.runtime.AbstractRuntimeContext;
@@ -338,7 +339,7 @@
         text.setValue("title");
         JAXBElement<AtomText> element = (new ObjectFactory()).createTitle(text);
         ByteArrayOutputStream os = new ByteArrayOutputStream();
-        AtomJAXBUtils.marshal(m, element, os);
+        ModelUtils.marshal(m, element, os);
 
         String msg =
             TestUtils.diffIgnoreUpdateWithAttributeQualifier(ATOM_TEXT_TEXT, os.toString());
@@ -349,7 +350,7 @@
         text.setValue("<h1>title</h1>");
         element = (new ObjectFactory()).createTitle(text);
         os = new ByteArrayOutputStream();
-        AtomJAXBUtils.marshal(m, element, os);
+        ModelUtils.marshal(m, element, os);
         msg = TestUtils.diffIgnoreUpdateWithAttributeQualifier(ATOM_TEXT_HTML, os.toString());
         assertNull(msg, msg);
 
@@ -358,14 +359,14 @@
         text.setValue("<h1>title</h1>");
         element = (new ObjectFactory()).createTitle(text);
         os = new ByteArrayOutputStream();
-        AtomJAXBUtils.marshal(m, element, os);
+        ModelUtils.marshal(m, element, os);
         msg = TestUtils.diffIgnoreUpdateWithAttributeQualifier(ATOM_TEXT_XHTML, os.toString());
         assertNull(msg, msg);
     }
 
     public void testAtomTextUnmarshal() throws Exception {
         Unmarshaller u = JAXBUtils.createUnmarshaller(ctx);
-        Object element = AtomJAXBUtils.unmarshal(u, new StringReader(ATOM_TEXT_TEXT));
+        Object element = ModelUtils.unmarshal(u, new StringReader(ATOM_TEXT_TEXT));
         assertNotNull(element);
         assertTrue(element instanceof AtomText);
         AtomText text = (AtomText)element;
@@ -375,7 +376,7 @@
         assertEquals("title", text.getValue());
         assertEquals(AtomTextType.text, text.getType());
 
-        element = AtomJAXBUtils.unmarshal(u, new StringReader(ATOM_TEXT_HTML));
+        element = ModelUtils.unmarshal(u, new StringReader(ATOM_TEXT_HTML));
         assertNotNull(element);
         assertTrue(element instanceof AtomText);
         text = (AtomText)element;
@@ -385,7 +386,7 @@
         assertEquals("<h1>title</h1>", text.getValue());
         assertEquals(AtomTextType.html, text.getType());
 
-        element = AtomJAXBUtils.unmarshal(u, new StringReader(ATOM_TEXT_XHTML));
+        element = ModelUtils.unmarshal(u, new StringReader(ATOM_TEXT_XHTML));
         assertNotNull(element);
         assertTrue(element instanceof AtomText);
         text = (AtomText)element;
@@ -399,7 +400,7 @@
         assertNull(msg, msg);
         assertEquals(AtomTextType.xhtml, text.getType());
 
-        element = AtomJAXBUtils.unmarshal(u, new StringReader(ATOM_TEXT_XHTML_WITH_TEXT));
+        element = ModelUtils.unmarshal(u, new StringReader(ATOM_TEXT_XHTML_WITH_TEXT));
         assertNotNull(element);
         assertTrue(element instanceof AtomText);
         text = (AtomText)element;
@@ -413,7 +414,7 @@
     public void testAtomTextUnmarshalXhtml() throws Exception {
         Unmarshaller u = JAXBUtils.createUnmarshaller(ctx);
 
-        Object element = AtomJAXBUtils.unmarshal(u, new StringReader(ATOM_TEXT_XHTML_WITH_DIV));
+        Object element = ModelUtils.unmarshal(u, new StringReader(ATOM_TEXT_XHTML_WITH_DIV));
         assertNotNull(element);
         assertTrue(element instanceof AtomText);
         AtomText text = (AtomText)element;
@@ -446,7 +447,7 @@
         content.setValue("title");
         JAXBElement<AtomContent> element = (new ObjectFactory()).createContent(content);
         ByteArrayOutputStream os = new ByteArrayOutputStream();
-        AtomJAXBUtils.marshal(m, element, os);
+        ModelUtils.marshal(m, element, os);
         String msg =
             TestUtils.diffIgnoreUpdateWithAttributeQualifier(ATOM_CONTENT_TEXT, os.toString());
         assertNull(msg, msg);
@@ -455,7 +456,7 @@
         content.setValue("<h1>title</h1>");
         element = (new ObjectFactory()).createContent(content);
         os = new ByteArrayOutputStream();
-        AtomJAXBUtils.marshal(m, element, os);
+        ModelUtils.marshal(m, element, os);
         msg = TestUtils.diffIgnoreUpdateWithAttributeQualifier(ATOM_CONTENT_HTML, os.toString());
         assertNull(msg, msg);
 
@@ -463,7 +464,7 @@
         content.setValue("<h1>title</h1>");
         element = (new ObjectFactory()).createContent(content);
         os = new ByteArrayOutputStream();
-        AtomJAXBUtils.marshal(m, element, os);
+        ModelUtils.marshal(m, element, os);
         msg = TestUtils.diffIgnoreUpdateWithAttributeQualifier(ATOM_CONTENT_XHTML, os.toString());
         assertNull(msg, msg);
 
@@ -473,14 +474,14 @@
         content.setValue(x);
         element = (new ObjectFactory()).createContent(content);
         os = new ByteArrayOutputStream();
-        AtomJAXBUtils.marshal(m, element, os);
+        ModelUtils.marshal(m, element, os);
         msg = TestUtils.diffIgnoreUpdateWithAttributeQualifier(ATOM_CONTENT_XML, os.toString());
         assertNull(msg, msg);
         
         content.setValue("<x xmlns=\"http://x/\">title</x>");
         element = (new ObjectFactory()).createContent(content);
         os = new ByteArrayOutputStream();
-        AtomJAXBUtils.marshal(m, element, os);
+        ModelUtils.marshal(m, element, os);
         msg = TestUtils.diffIgnoreUpdateWithAttributeQualifier(ATOM_CONTENT_XML, os.toString());
         assertNull(msg, msg);
     }
@@ -501,7 +502,7 @@
 
     public void testAtomContentUnmarshal() throws Exception {
         Unmarshaller u = JAXBUtils.createUnmarshaller(ctx);
-        Object element = AtomJAXBUtils.unmarshal(u, new StringReader(ATOM_CONTENT_TEXT));
+        Object element = ModelUtils.unmarshal(u, new StringReader(ATOM_CONTENT_TEXT));
         assertNotNull(element);
         assertTrue(element instanceof AtomContent);
         AtomContent content = (AtomContent)element;
@@ -511,7 +512,7 @@
         assertEquals("title", content.getValue());
         assertEquals("text", content.getType());
 
-        element = AtomJAXBUtils.unmarshal(u, new StringReader(ATOM_CONTENT_HTML));
+        element = ModelUtils.unmarshal(u, new StringReader(ATOM_CONTENT_HTML));
         assertNotNull(element);
         assertTrue(element instanceof AtomContent);
         content = (AtomContent)element;
@@ -521,7 +522,7 @@
         assertEquals("<h1>title</h1>", content.getValue());
         assertEquals("html", content.getType());
 
-        element = AtomJAXBUtils.unmarshal(u, new StringReader(ATOM_CONTENT_XHTML));
+        element = ModelUtils.unmarshal(u, new StringReader(ATOM_CONTENT_XHTML));
         assertNotNull(element);
         assertTrue(element instanceof AtomContent);
         content = (AtomContent)element;
@@ -536,7 +537,7 @@
         assertNull(msg, msg);
         assertEquals("xhtml", content.getType());
 
-        element = AtomJAXBUtils.unmarshal(u, new StringReader(ATOM_CONTENT_XHTML_WITH_TEXT));
+        element = ModelUtils.unmarshal(u, new StringReader(ATOM_CONTENT_XHTML_WITH_TEXT));
         assertNotNull(element);
         assertTrue(element instanceof AtomContent);
         content = (AtomContent)element;
@@ -546,7 +547,7 @@
         assertEquals("title", content.getValue().trim());
         assertEquals("xhtml", content.getType());
 
-        element = AtomJAXBUtils.unmarshal(u, new StringReader(ATOM_CONTENT_XML));
+        element = ModelUtils.unmarshal(u, new StringReader(ATOM_CONTENT_XML));
         assertNotNull(element);
         assertTrue(element instanceof AtomContent);
         content = (AtomContent)element;
@@ -566,14 +567,14 @@
         AtomEntry entry = getEntryWithoutContent("1");
         JAXBElement<AtomEntry> element = (new ObjectFactory()).createEntry(entry);
         ByteArrayOutputStream os = new ByteArrayOutputStream();
-        AtomJAXBUtils.marshal(m, element, os);
+        ModelUtils.marshal(m, element, os);
         String msg = TestUtils.diffIgnoreUpdateWithAttributeQualifier(ATOM_ENTRY_1, os.toString());
         assertNull(msg, msg);
 
         entry = getEntryWithPlainTextContent("2");
         element = (new ObjectFactory()).createEntry(entry);
         os = new ByteArrayOutputStream();
-        AtomJAXBUtils.marshal(m, element, os);
+        ModelUtils.marshal(m, element, os);
         msg =
             TestUtils.diffIgnoreUpdateWithAttributeQualifier(ATOM_ENTRY_2.getBytes("UTF-8"), os
                 .toByteArray());
@@ -582,7 +583,7 @@
         entry = getEntryWithXmlContent("3");
         element = (new ObjectFactory()).createEntry(entry);
         os = new ByteArrayOutputStream();
-        AtomJAXBUtils.marshal(m, element, os);
+        ModelUtils.marshal(m, element, os);
         msg =
             TestUtils.diffIgnoreUpdateWithAttributeQualifier(ATOM_ENTRY_3.getBytes("UTF-8"), os
                 .toByteArray());
@@ -591,7 +592,7 @@
 
     public void testAtomEntryUnmarshal() throws Exception {
         Unmarshaller u = AtomEntry.getUnmarshaller();
-        Object element = AtomJAXBUtils.unmarshal(u, new StringReader(ATOM_ENTRY_1));
+        Object element = ModelUtils.unmarshal(u, new StringReader(ATOM_ENTRY_1));
         assertNotNull(element);
         assertTrue(element instanceof AtomEntry);
 
@@ -620,7 +621,7 @@
         assertEquals("scheme", entry.getCategories().get(0).getScheme());
         assertEquals("term", entry.getCategories().get(0).getTerm());
 
-        element = AtomJAXBUtils.unmarshal(u, new StringReader(ATOM_ENTRY_2));
+        element = ModelUtils.unmarshal(u, new StringReader(ATOM_ENTRY_2));
         assertNotNull(element);
         assertTrue(element instanceof AtomEntry);
         entry = (AtomEntry)element;
@@ -630,7 +631,7 @@
         assertEquals("text/plain", entry.getContent().getType());
         assertEquals("Gustaf's Knäckebröd", entry.getContent().getValue());
 
-        element = AtomJAXBUtils.unmarshal(u, new StringReader(ATOM_ENTRY_3));
+        element = ModelUtils.unmarshal(u, new StringReader(ATOM_ENTRY_3));
         assertNotNull(element);
         assertTrue(element instanceof AtomEntry);
         entry = (AtomEntry)element;
@@ -648,7 +649,7 @@
         AtomFeed feed = getFeed();
         JAXBElement<AtomFeed> element = (new ObjectFactory()).createFeed(feed);
         ByteArrayOutputStream os = new ByteArrayOutputStream();
-        AtomJAXBUtils.marshal(m, element, os);
+        ModelUtils.marshal(m, element, os);
         String msg =
             TestUtils.diffIgnoreUpdateWithAttributeQualifier(ATOM_FEED_1.getBytes("UTF-8"), os
                 .toByteArray());
@@ -657,7 +658,7 @@
 
     public void testAtomFeedUnmarshal() throws Exception {
         Unmarshaller u = AtomFeed.getUnmarshaller();
-        Object element = AtomJAXBUtils.unmarshal(u, new StringReader(ATOM_FEED_1));
+        Object element = ModelUtils.unmarshal(u, new StringReader(ATOM_FEED_1));
         assertNotNull(element);
         assertTrue(element instanceof AtomFeed);
 
@@ -700,10 +701,10 @@
     public void testAtomFeedMarshalUnmarshal() throws Exception {
         Marshaller m = AtomFeed.getMarshaller();
         Unmarshaller u = AtomFeed.getUnmarshaller();
-        AtomFeed feed = (AtomFeed)AtomJAXBUtils.unmarshal(u, new StringReader(ATOM_FEED_1));
+        AtomFeed feed = (AtomFeed)ModelUtils.unmarshal(u, new StringReader(ATOM_FEED_1));
         JAXBElement<AtomFeed> element = (new ObjectFactory()).createFeed(feed);
         ByteArrayOutputStream os = new ByteArrayOutputStream();
-        AtomJAXBUtils.marshal(m, element, os);
+        ModelUtils.marshal(m, element, os);
         String msg =
             TestUtils.diffIgnoreUpdateWithAttributeQualifier(ATOM_FEED_1.getBytes("UTF-8"), os.toByteArray());
         assertNull(msg, msg);
@@ -712,14 +713,14 @@
     public void testAtomFeedMarshalUnmarshalWithoutOpenSearch() throws Exception {
         Marshaller m = AtomFeed.getMarshaller();
         Unmarshaller u = AtomFeed.getUnmarshaller();
-        AtomFeed feed = (AtomFeed)AtomJAXBUtils.unmarshal(u, new StringReader(ATOM_FEED_2));
+        AtomFeed feed = (AtomFeed)ModelUtils.unmarshal(u, new StringReader(ATOM_FEED_2));
         assertEquals(-1, feed.getItemsPerPage());
         assertEquals(-1, feed.getStartIndex());
         assertEquals(-1, feed.getTotalResults());
         assertEquals(0, feed.getOpenSearchQueries().size());
         JAXBElement<AtomFeed> element = (new ObjectFactory()).createFeed(feed);
         ByteArrayOutputStream os = new ByteArrayOutputStream();
-        AtomJAXBUtils.marshal(m, element, os);
+        ModelUtils.marshal(m, element, os);
         String msg =
             TestUtils.diffIgnoreUpdateWithAttributeQualifier(ATOM_FEED_2.getBytes("UTF-8"), os.toByteArray());
         assertNull(msg, msg);
@@ -956,7 +957,7 @@
         JAXBElement<AtomEntry> element = (new ObjectFactory()).createEntry(atomEntry);
         Marshaller marshaller = AtomEntry.getMarshaller();
         ByteArrayOutputStream os = new ByteArrayOutputStream();
-        AtomJAXBUtils.marshal(marshaller, element, os);
+        ModelUtils.marshal(marshaller, element, os);
         String defaultContent = new String(os.toByteArray(), "UTF-8");
 
         String[] encodings = {"US-ASCII", "UTF-8", "UTF-16"};
@@ -965,7 +966,7 @@
             marshaller = AtomEntry.getMarshaller();
             marshaller.setProperty(Marshaller.JAXB_ENCODING, enc);
             os = new ByteArrayOutputStream();
-            AtomJAXBUtils.marshal(marshaller, element, os);
+            ModelUtils.marshal(marshaller, element, os);
             String msg =
                 TestUtils.diffIgnoreUpdateWithAttributeQualifier(defaultContent, new String(os.toByteArray(), enc));
             assertNull(msg, msg);

Modified: incubator/wink/trunk/wink-common/src/test/java/org/apache/wink/common/model/opensearch/OpenSearchTest.java
URL: http://svn.apache.org/viewvc/incubator/wink/trunk/wink-common/src/test/java/org/apache/wink/common/model/opensearch/OpenSearchTest.java?rev=812787&r1=812786&r2=812787&view=diff
==============================================================================
--- incubator/wink/trunk/wink-common/src/test/java/org/apache/wink/common/model/opensearch/OpenSearchTest.java (original)
+++ incubator/wink/trunk/wink-common/src/test/java/org/apache/wink/common/model/opensearch/OpenSearchTest.java Wed Sep  9 07:02:47 2009
@@ -32,7 +32,7 @@
 
 import junit.framework.TestCase;
 
-import org.apache.wink.common.model.atom.AtomJAXBUtils;
+import org.apache.wink.common.internal.model.ModelUtils;
 import org.apache.wink.test.mock.TestUtils;
 
 public class OpenSearchTest extends TestCase {
@@ -84,7 +84,7 @@
         JAXBElement<OpenSearchDescription> element =
             (new ObjectFactory()).createOpenSearchDescription(osd);
         ByteArrayOutputStream os = new ByteArrayOutputStream();
-        AtomJAXBUtils.marshal(m, element, os);
+        ModelUtils.marshal(m, element, os);
         String msg = TestUtils.diffIgnoreUpdateWithAttributeQualifier(OPENSEARCH, os.toString());
         assertNull(msg, msg);
     }
@@ -92,7 +92,7 @@
     public void testOpenSearchUnmarshal() throws IOException {
         // Unmarshaller u = AtomJAXBUtils.createUnmarshaller(ctx);
         Unmarshaller u = OpenSearchDescription.getUnmarshaller();
-        Object element = AtomJAXBUtils.unmarshal(u, new StringReader(OPENSEARCH));
+        Object element = ModelUtils.unmarshal(u, new StringReader(OPENSEARCH));
         assertNotNull(element);
         assertTrue(element instanceof OpenSearchDescription);
 
@@ -109,11 +109,11 @@
         // Unmarshaller u = AtomJAXBUtils.createUnmarshaller(ctx);
         Unmarshaller u = OpenSearchDescription.getUnmarshaller();
 
-        Object service = AtomJAXBUtils.unmarshal(u, new StringReader(OPENSEARCH));
+        Object service = ModelUtils.unmarshal(u, new StringReader(OPENSEARCH));
         JAXBElement<OpenSearchDescription> element =
             (new ObjectFactory()).createOpenSearchDescription((OpenSearchDescription)service);
         ByteArrayOutputStream os = new ByteArrayOutputStream();
-        AtomJAXBUtils.marshal(m, element, os);
+        ModelUtils.marshal(m, element, os);
         String msg = TestUtils.diffIgnoreUpdateWithAttributeQualifier(OPENSEARCH, os.toString());
         assertNull(msg, msg);
     }

Modified: incubator/wink/trunk/wink-server/src/main/java/org/apache/wink/server/internal/providers/entity/html/HtmlSyndEntryAdapter.java
URL: http://svn.apache.org/viewvc/incubator/wink/trunk/wink-server/src/main/java/org/apache/wink/server/internal/providers/entity/html/HtmlSyndEntryAdapter.java?rev=812787&r1=812786&r2=812787&view=diff
==============================================================================
--- incubator/wink/trunk/wink-server/src/main/java/org/apache/wink/server/internal/providers/entity/html/HtmlSyndEntryAdapter.java (original)
+++ incubator/wink/trunk/wink-server/src/main/java/org/apache/wink/server/internal/providers/entity/html/HtmlSyndEntryAdapter.java Wed Sep  9 07:02:47 2009
@@ -25,7 +25,7 @@
 import java.util.List;
 
 import org.apache.commons.lang.StringEscapeUtils;
-import org.apache.wink.common.model.atom.AtomJAXBUtils;
+import org.apache.wink.common.internal.model.ModelUtils;
 import org.apache.wink.common.model.synd.SyndCategory;
 import org.apache.wink.common.model.synd.SyndContent;
 import org.apache.wink.common.model.synd.SyndEntry;
@@ -171,7 +171,7 @@
             // TODO: get content using type?
             String value = String.valueOf(content.getValue());
             value = value != null ? value : "";
-            if (type != null && (SyndTextType.xhtml.name().equals(type) || AtomJAXBUtils
+            if (type != null && (SyndTextType.xhtml.name().equals(type) || ModelUtils
                 .isTypeXml(type))) {
                 return StringEscapeUtils.escapeXml(value);
             }



Mime
View raw message