chemistry-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From f...@apache.org
Subject svn commit: r1455603 - in /chemistry/opencmis/trunk: chemistry-opencmis-android/chemistry-opencmis-android-client/ chemistry-opencmis-android/chemistry-opencmis-android-client/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/atompub/ che...
Date Tue, 12 Mar 2013 16:28:59 GMT
Author: fmui
Date: Tue Mar 12 16:28:59 2013
New Revision: 1455603

URL: http://svn.apache.org/r1455603
Log:
clean up and fixes

Modified:
    chemistry/opencmis/trunk/chemistry-opencmis-android/chemistry-opencmis-android-client/pom.xml
    chemistry/opencmis/trunk/chemistry-opencmis-android/chemistry-opencmis-android-client/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/atompub/AtomEntryWriter.java
    chemistry/opencmis/trunk/chemistry-opencmis-android/chemistry-opencmis-android-client/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/atompub/AtomPubParser.java
    chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/atompub/AtomEntryWriter.java
    chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/atompub/AtomPubParser.java
    chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/atompub/ObjectServiceImpl.java
    chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/Constants.java
    chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/XMLConverter.java
    chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/XMLUtils.java
    chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/XMLWalker.java
    chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl/atompub/AtomEntry.java
    chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl/atompub/AtomFeed.java
    chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl/atompub/ServiceDocument.java
    chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl/atompub/XMLDocumentBase.java
    chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/types/InMemoryJaxbHelper.java
    chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/types/TypeDefinitions.java

Modified: chemistry/opencmis/trunk/chemistry-opencmis-android/chemistry-opencmis-android-client/pom.xml
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-android/chemistry-opencmis-android-client/pom.xml?rev=1455603&r1=1455602&r2=1455603&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-android/chemistry-opencmis-android-client/pom.xml (original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-android/chemistry-opencmis-android-client/pom.xml Tue Mar 12 16:28:59 2013
@@ -72,8 +72,8 @@
 										<include name="**/*.java" />
 										<exclude name="**/tube/**" />
 										<exclude name="**/jaxb/**" />
-										<exclude name="**/impl/JaxBHelper.*" />
 										<exclude name="**/impl/Converter.*" />
+										<exclude name="**/impl/XMLConverter.*" />										
 									</fileset>
 								</copy>
                                 

Modified: chemistry/opencmis/trunk/chemistry-opencmis-android/chemistry-opencmis-android-client/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/atompub/AtomEntryWriter.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-android/chemistry-opencmis-android-client/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/atompub/AtomEntryWriter.java?rev=1455603&r1=1455602&r2=1455603&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-android/chemistry-opencmis-android-client/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/atompub/AtomEntryWriter.java (original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-android/chemistry-opencmis-android-client/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/atompub/AtomEntryWriter.java Tue Mar 12 16:28:59 2013
@@ -58,6 +58,7 @@ import org.apache.chemistry.opencmis.com
 import org.apache.chemistry.opencmis.commons.exceptions.CmisInvalidArgumentException;
 import org.apache.chemistry.opencmis.commons.impl.Base64;
 import org.apache.chemistry.opencmis.commons.impl.Constants;
+import org.apache.chemistry.opencmis.commons.impl.XMLConstants;
 import org.xmlpull.v1.XmlSerializer;
 
 import android.util.Xml;
@@ -119,43 +120,43 @@ public class AtomEntryWriter {
 
         // start doc
         writer.startDocument(ENCODING, false);
-        writer.setPrefix(PREFIX_ATOM, Constants.NAMESPACE_ATOM);
-        writer.setPrefix(PREFIX_CMIS, Constants.NAMESPACE_CMIS);
-        writer.setPrefix(PREFIX_RESTATOM, Constants.NAMESPACE_RESTATOM);
+        writer.setPrefix(PREFIX_ATOM, XMLConstants.NAMESPACE_ATOM);
+        writer.setPrefix(PREFIX_CMIS, XMLConstants.NAMESPACE_CMIS);
+        writer.setPrefix(PREFIX_RESTATOM, XMLConstants.NAMESPACE_RESTATOM);
 
         // start entry
-        writer.startTag(Constants.NAMESPACE_ATOM, TAG_ENTRY);
-        writer.attribute("", PREFIX_ATOM, Constants.NAMESPACE_ATOM);
-        writer.attribute("", PREFIX_CMIS, Constants.NAMESPACE_CMIS);
-        writer.attribute("", PREFIX_RESTATOM, Constants.NAMESPACE_RESTATOM);
+        writer.startTag(XMLConstants.NAMESPACE_ATOM, TAG_ENTRY);
+        writer.attribute("", PREFIX_ATOM, XMLConstants.NAMESPACE_ATOM);
+        writer.attribute("", PREFIX_CMIS, XMLConstants.NAMESPACE_CMIS);
+        writer.attribute("", PREFIX_RESTATOM, XMLConstants.NAMESPACE_RESTATOM);
 
         // atom:id
-        writeTag(writer, Constants.NAMESPACE_ATOM, TAG_ATOM_ID, "urn:uuid:00000000-0000-0000-0000-00000000000");
+        writeTag(writer, XMLConstants.NAMESPACE_ATOM, TAG_ATOM_ID, "urn:uuid:00000000-0000-0000-0000-00000000000");
 
         // atom:title
-        writeTag(writer, Constants.NAMESPACE_ATOM, TAG_ATOM_TITLE, getTitle());
+        writeTag(writer, XMLConstants.NAMESPACE_ATOM, TAG_ATOM_TITLE, getTitle());
 
         // atom:updated
-        writeTag(writer, Constants.NAMESPACE_ATOM, TAG_ATOM_UPDATED, getUpdated());
+        writeTag(writer, XMLConstants.NAMESPACE_ATOM, TAG_ATOM_UPDATED, getUpdated());
 
         // content
         if (stream != null) {
-            writer.startTag(Constants.NAMESPACE_RESTATOM, TAG_CONTENT);
+            writer.startTag(XMLConstants.NAMESPACE_RESTATOM, TAG_CONTENT);
 
-            writeTag(writer, Constants.NAMESPACE_RESTATOM, TAG_CONTENT_MEDIATYPE, mediaType);
+            writeTag(writer, XMLConstants.NAMESPACE_RESTATOM, TAG_CONTENT_MEDIATYPE, mediaType);
 
-            writer.startTag(Constants.NAMESPACE_RESTATOM, TAG_CONTENT_BASE64);
+            writer.startTag(XMLConstants.NAMESPACE_RESTATOM, TAG_CONTENT_BASE64);
             writeContent(writer);
-            writer.endTag(Constants.NAMESPACE_RESTATOM, TAG_CONTENT_BASE64);
+            writer.endTag(XMLConstants.NAMESPACE_RESTATOM, TAG_CONTENT_BASE64);
 
-            writer.endTag(Constants.NAMESPACE_RESTATOM, TAG_CONTENT);
+            writer.endTag(XMLConstants.NAMESPACE_RESTATOM, TAG_CONTENT);
         }
 
         // object
         writeObject(writer, object);
 
         // end entry
-        writer.endTag(Constants.NAMESPACE_ATOM, TAG_ENTRY);
+        writer.endTag(XMLConstants.NAMESPACE_ATOM, TAG_ENTRY);
 
         // end document
         writer.endDocument();
@@ -166,46 +167,46 @@ public class AtomEntryWriter {
     public static void writeQuery(OutputStream out, Map<String, String> queryParams) throws Exception {
         XmlSerializer writer = Xml.newSerializer();
         writer.setOutput(out, ENCODING);
-        writer.setPrefix(PREFIX_CMIS, Constants.NAMESPACE_CMIS);
-        writer.startTag(Constants.NAMESPACE_CMIS, TAG_QUERY);
-        writer.attribute(null, PREFIX_CMIS, Constants.NAMESPACE_CMIS);
+        writer.setPrefix(PREFIX_CMIS, XMLConstants.NAMESPACE_CMIS);
+        writer.startTag(XMLConstants.NAMESPACE_CMIS, TAG_QUERY);
+        writer.attribute(null, PREFIX_CMIS, XMLConstants.NAMESPACE_CMIS);
 
-        writer.startTag(Constants.NAMESPACE_CMIS, TAG_QUERY_STATEMENT);
+        writer.startTag(XMLConstants.NAMESPACE_CMIS, TAG_QUERY_STATEMENT);
         writer.cdsect(queryParams.get(TAG_QUERY_STATEMENT));
-        writer.endTag(Constants.NAMESPACE_CMIS, TAG_QUERY_STATEMENT);
-        writeTagIfNotNull(writer, Constants.NAMESPACE_CMIS, Constants.PARAM_SEARCH_ALL_VERSIONS,
+        writer.endTag(XMLConstants.NAMESPACE_CMIS, TAG_QUERY_STATEMENT);
+        writeTagIfNotNull(writer, XMLConstants.NAMESPACE_CMIS, Constants.PARAM_SEARCH_ALL_VERSIONS,
                 queryParams.get(Constants.PARAM_SEARCH_ALL_VERSIONS));
-        writeTagIfNotNull(writer, Constants.NAMESPACE_CMIS, Constants.PARAM_ALLOWABLE_ACTIONS,
+        writeTagIfNotNull(writer, XMLConstants.NAMESPACE_CMIS, Constants.PARAM_ALLOWABLE_ACTIONS,
                 queryParams.get(Constants.PARAM_ALLOWABLE_ACTIONS));
-        writeTagIfNotNull(writer, Constants.NAMESPACE_CMIS, Constants.PARAM_RELATIONSHIPS,
+        writeTagIfNotNull(writer, XMLConstants.NAMESPACE_CMIS, Constants.PARAM_RELATIONSHIPS,
                 queryParams.get(Constants.PARAM_RELATIONSHIPS));
-        writeTagIfNotNull(writer, Constants.NAMESPACE_CMIS, Constants.PARAM_RENDITION_FILTER,
+        writeTagIfNotNull(writer, XMLConstants.NAMESPACE_CMIS, Constants.PARAM_RENDITION_FILTER,
                 queryParams.get(Constants.PARAM_RENDITION_FILTER));
-        writeTagIfNotNull(writer, Constants.NAMESPACE_CMIS, Constants.PARAM_MAX_ITEMS,
+        writeTagIfNotNull(writer, XMLConstants.NAMESPACE_CMIS, Constants.PARAM_MAX_ITEMS,
                 queryParams.get(Constants.PARAM_MAX_ITEMS));
-        writeTagIfNotNull(writer, Constants.NAMESPACE_CMIS, Constants.PARAM_SKIP_COUNT,
+        writeTagIfNotNull(writer, XMLConstants.NAMESPACE_CMIS, Constants.PARAM_SKIP_COUNT,
                 queryParams.get(Constants.PARAM_SKIP_COUNT));
 
-        writer.endTag(Constants.NAMESPACE_CMIS, TAG_QUERY);
+        writer.endTag(XMLConstants.NAMESPACE_CMIS, TAG_QUERY);
         writer.flush();
     }
 
     public static void writeACL(OutputStream out, Acl acl) throws Exception {
         XmlSerializer writer = Xml.newSerializer();
         writer.setOutput(out, ENCODING);
-        writer.setPrefix(PREFIX_CMIS, Constants.NAMESPACE_CMIS);
-        writer.startTag(Constants.NAMESPACE_CMIS, "acl");
-        writer.attribute(null, PREFIX_CMIS, Constants.NAMESPACE_CMIS);
+        writer.setPrefix(PREFIX_CMIS, XMLConstants.NAMESPACE_CMIS);
+        writer.startTag(XMLConstants.NAMESPACE_CMIS, "acl");
+        writer.attribute(null, PREFIX_CMIS, XMLConstants.NAMESPACE_CMIS);
 
-        writer.startTag(Constants.NAMESPACE_CMIS, "permission");
+        writer.startTag(XMLConstants.NAMESPACE_CMIS, "permission");
 
         // TODO Implements
         // writeTag(writer, Constants.NAMESPACE_CMIS, "direct",
         // acl.getAces().get(0).)
 
-        writer.endTag(Constants.NAMESPACE_CMIS, "permission");
+        writer.endTag(XMLConstants.NAMESPACE_CMIS, "permission");
 
-        writer.endTag(Constants.NAMESPACE_CMIS, "acl");
+        writer.endTag(XMLConstants.NAMESPACE_CMIS, "acl");
         writer.flush();
     }
 
@@ -249,9 +250,9 @@ public class AtomEntryWriter {
     }
 
     private static void writeObject(XmlSerializer writer, ObjectData object) throws Exception {
-        writer.startTag(Constants.NAMESPACE_RESTATOM, Constants.SELECTOR_OBJECT);
+        writer.startTag(XMLConstants.NAMESPACE_RESTATOM, Constants.SELECTOR_OBJECT);
         if (object.getProperties() != null) {
-            writer.startTag(Constants.NAMESPACE_CMIS, Constants.SELECTOR_PROPERTIES);
+            writer.startTag(XMLConstants.NAMESPACE_CMIS, Constants.SELECTOR_PROPERTIES);
             writeProperties(writer, object.getProperties().getPropertyList());
 
             if (object.getProperties().getExtensions() != null
@@ -259,9 +260,9 @@ public class AtomEntryWriter {
                 writeExtensions(writer, object.getProperties().getExtensions());
             }
 
-            writer.endTag(Constants.NAMESPACE_CMIS, Constants.SELECTOR_PROPERTIES);
+            writer.endTag(XMLConstants.NAMESPACE_CMIS, Constants.SELECTOR_PROPERTIES);
         }
-        writer.endTag(Constants.NAMESPACE_RESTATOM, Constants.SELECTOR_OBJECT);
+        writer.endTag(XMLConstants.NAMESPACE_RESTATOM, Constants.SELECTOR_OBJECT);
     }
 
     private static void writeTagIfNotNull(XmlSerializer writer, String tagNameSpace, String tagName, String text)
@@ -285,10 +286,10 @@ public class AtomEntryWriter {
     }
 
     private static void writeProperty(XmlSerializer writer, PropertyData<?> prop) throws Exception {
-        writer.startTag(Constants.NAMESPACE_CMIS, getPropertyTypeTag(prop));
+        writer.startTag(XMLConstants.NAMESPACE_CMIS, getPropertyTypeTag(prop));
         writer.attribute(null, ATTR_PROPERTY_DEFINITION_ID, prop.getId());
         writeValues(writer, prop.getValues());
-        writer.endTag(Constants.NAMESPACE_CMIS, getPropertyTypeTag(prop));
+        writer.endTag(XMLConstants.NAMESPACE_CMIS, getPropertyTypeTag(prop));
     }
 
     private static void writeExtensions(XmlSerializer writer, List<CmisExtensionElement> extensions) throws Exception {
@@ -312,7 +313,7 @@ public class AtomEntryWriter {
 
     private static void writeValues(XmlSerializer writer, List<?> values) throws Exception {
         for (Object value : values) {
-            writeTag(writer, Constants.NAMESPACE_CMIS, TAG_VALUE, convertPropertyValue(value));
+            writeTag(writer, XMLConstants.NAMESPACE_CMIS, TAG_VALUE, convertPropertyValue(value));
         }
     }
 

Modified: chemistry/opencmis/trunk/chemistry-opencmis-android/chemistry-opencmis-android-client/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/atompub/AtomPubParser.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-android/chemistry-opencmis-android-client/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/atompub/AtomPubParser.java?rev=1455603&r1=1455602&r2=1455603&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-android/chemistry-opencmis-android-client/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/atompub/AtomPubParser.java (original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-android/chemistry-opencmis-android-client/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/atompub/AtomPubParser.java Tue Mar 12 16:28:59 2013
@@ -108,6 +108,7 @@ import org.apache.chemistry.opencmis.com
 import org.apache.chemistry.opencmis.commons.exceptions.CmisRuntimeException;
 import org.apache.chemistry.opencmis.commons.impl.AtomPubConverter;
 import org.apache.chemistry.opencmis.commons.impl.Constants;
+import org.apache.chemistry.opencmis.commons.impl.XMLConstants;
 import org.apache.chemistry.opencmis.commons.impl.dataobjects.AccessControlEntryImpl;
 import org.apache.chemistry.opencmis.commons.impl.dataobjects.AccessControlListImpl;
 import org.apache.chemistry.opencmis.commons.impl.dataobjects.AccessControlPrincipalDataImpl;
@@ -153,7 +154,7 @@ public class AtomPubParser {
 				if (event == XmlPullParser.START_TAG) {
 					QName name = new QName(parser.getNamespace(), parser.getName());
 
-					if (Constants.NAMESPACE_ATOM.equals(name.getNamespaceURI())) {
+					if (XMLConstants.NAMESPACE_ATOM.equals(name.getNamespaceURI())) {
 						if (TAG_FEED.equals(name.getLocalPart())) {
 							parseResult = parseFeed(parser);
 							break;
@@ -161,7 +162,7 @@ public class AtomPubParser {
 							parseResult = parseEntry(parser);
 							break;
 						}
-					} else if (Constants.NAMESPACE_CMIS.equals(name.getNamespaceURI())) {
+					} else if (XMLConstants.NAMESPACE_CMIS.equals(name.getNamespaceURI())) {
 						if (TAG_ALLOWABLEACTIONS.equals(name.getLocalPart())) {
 							parseResult = new AtomAllowableActions(parseAllowableActions(parser));
 							break;
@@ -169,7 +170,7 @@ public class AtomPubParser {
 							parseResult = new AtomAcl(parseACL(parser));
 							break;
 						}
-					} else if (Constants.NAMESPACE_APP.equals(name.getNamespaceURI())) {
+					} else if (XMLConstants.NAMESPACE_APP.equals(name.getNamespaceURI())) {
 						if (TAG_SERVICE.equals(name.getLocalPart())) {
 							parseResult = parseServiceDoc(parser);
 							break;
@@ -218,7 +219,7 @@ public class AtomPubParser {
 			if (event == XmlPullParser.START_TAG) {
 				QName name = new QName(parser.getNamespace(), parser.getName());
 
-				if (Constants.NAMESPACE_APP.equals(name.getNamespaceURI())) {
+				if (XMLConstants.NAMESPACE_APP.equals(name.getNamespaceURI())) {
 					if (TAG_WORKSPACE.equals(name.getLocalPart())) {
 						result.addWorkspace(parseWorkspace(parser));
 					} else {
@@ -286,7 +287,7 @@ public class AtomPubParser {
 			if (event == XmlPullParser.START_TAG) {
 				QName name = new QName(parser.getNamespace(), parser.getName());
 
-				if (Constants.NAMESPACE_ATOM.equals(name.getNamespaceURI())) {
+				if (XMLConstants.NAMESPACE_ATOM.equals(name.getNamespaceURI())) {
 					if (TAG_LINK.equals(name.getLocalPart())) {
 						result.addElement(parseLink(parser));
 					} else if (TAG_ENTRY.equals(name.getLocalPart())) {
@@ -294,7 +295,7 @@ public class AtomPubParser {
 					} else {
 						skip(parser);
 					}
-				} else if (Constants.NAMESPACE_RESTATOM.equals(name.getNamespaceURI())) {
+				} else if (XMLConstants.NAMESPACE_RESTATOM.equals(name.getNamespaceURI())) {
 					if (TAG_NUM_ITEMS.equals(name.getLocalPart())) {
 						result.addElement(parseBigInteger(parser));
 					} else {
@@ -361,14 +362,14 @@ public class AtomPubParser {
 	private AtomElement parseElement(XmlPullParser parser) throws Exception {
 		QName name = new QName(parser.getNamespace(), parser.getName());
 
-		if (Constants.NAMESPACE_RESTATOM.equals(name.getNamespaceURI())) {
+		if (XMLConstants.NAMESPACE_RESTATOM.equals(name.getNamespaceURI())) {
 			if (TAG_OBJECT.equals(name.getLocalPart())) {
 				return new AtomElement(name, parseObject(parser));
 			} else if (TAG_PATH_SEGMENT.equals(name.getLocalPart()) || TAG_RELATIVE_PATH_SEGMENT.equals(name.getLocalPart())) {
 				return parseText(parser);
 			} else if (TAG_TYPE.equals(name.getLocalPart())) {
 				// workaround for old Chemistry code - ignore the type namespace
-				String typeAttr = parser.getAttributeValue(Constants.NAMESPACE_XSI, "type");
+				String typeAttr = parser.getAttributeValue(XMLConstants.NAMESPACE_XSI, "type");
 				if (typeAttr == null) {
 					return new AtomElement(name, parseTypeDefinition(parser, null));
 				} else if (typeAttr.endsWith(ATTR_DOCUMENT_TYPE)) {
@@ -384,7 +385,7 @@ public class AtomPubParser {
 			} else if (TAG_CHILDREN.equals(name.getLocalPart())) {
 				return parseChildren(parser);
 			}
-		} else if (Constants.NAMESPACE_ATOM.equals(name.getNamespaceURI())) {
+		} else if (XMLConstants.NAMESPACE_ATOM.equals(name.getNamespaceURI())) {
 			if (TAG_LINK.equals(name.getLocalPart())) {
 				return parseLink(parser);
 			} else if (TAG_CONTENT.equals(name.getLocalPart())) {
@@ -413,7 +414,7 @@ public class AtomPubParser {
 			if (event == XmlPullParser.START_TAG) {
 				QName name = new QName(parser.getNamespace(), parser.getName());
 
-				if (Constants.NAMESPACE_ATOM.equals(name.getNamespaceURI())) {
+				if (XMLConstants.NAMESPACE_ATOM.equals(name.getNamespaceURI())) {
 					if (TAG_FEED.equals(name.getLocalPart())) {
 						result = new AtomElement(childName, parseFeed(parser));
 					} else {
@@ -442,17 +443,17 @@ public class AtomPubParser {
 	private static AtomElement parseWorkspaceElement(XmlPullParser parser) throws Exception {
 		QName name = new QName(parser.getNamespace(), parser.getName());
 
-		if (Constants.NAMESPACE_RESTATOM.equals(name.getNamespaceURI())) {
+		if (XMLConstants.NAMESPACE_RESTATOM.equals(name.getNamespaceURI())) {
 			if (TAG_REPOSITORY_INFO.equals(name.getLocalPart())) {
 				return new AtomElement(name, parseRepositoryInfo(parser));
 			} else if (TAG_URI_TEMPLATE.equals(name.getLocalPart())) {
 				return parseTemplate(parser);
 			}
-		} else if (Constants.NAMESPACE_ATOM.equals(name.getNamespaceURI())) {
+		} else if (XMLConstants.NAMESPACE_ATOM.equals(name.getNamespaceURI())) {
 			if (TAG_LINK.equals(name.getLocalPart())) {
 				return parseLink(parser);
 			}
-		} else if (Constants.NAMESPACE_APP.equals(name.getNamespaceURI())) {
+		} else if (XMLConstants.NAMESPACE_APP.equals(name.getNamespaceURI())) {
 			if (TAG_COLLECTION.equals(name.getLocalPart())) {
 				return parseCollection(parser);
 			}
@@ -479,7 +480,7 @@ public class AtomPubParser {
 			int event = parser.getEventType();
 			if (event == XmlPullParser.START_TAG) {
 				QName tagName = new QName(parser.getNamespace(), parser.getName());
-				if (Constants.NAMESPACE_RESTATOM.equals(tagName.getNamespaceURI()) && TAG_COLLECTION_TYPE.equals(tagName.getLocalPart())) {
+				if (XMLConstants.NAMESPACE_RESTATOM.equals(tagName.getNamespaceURI()) && TAG_COLLECTION_TYPE.equals(tagName.getLocalPart())) {
 					result.put("collectionType", readText(parser));
 				} else {
 					skip(parser);
@@ -511,7 +512,7 @@ public class AtomPubParser {
 			int event = parser.getEventType();
 			if (event == XmlPullParser.START_TAG) {
 				QName tagName = new QName(parser.getNamespace(), parser.getName());
-				if (Constants.NAMESPACE_RESTATOM.equals(tagName.getNamespaceURI())) {
+				if (XMLConstants.NAMESPACE_RESTATOM.equals(tagName.getNamespaceURI())) {
 					if (TAG_TEMPLATE_TEMPLATE.equals(tagName.getLocalPart())) {
 						result.put("template", readText(parser));
 					} else if (TAG_TEMPLATE_TYPE.equals(tagName.getLocalPart())) {
@@ -705,7 +706,7 @@ public class AtomPubParser {
 				} else if (TAG_REPINFO_CHANGES_ON_TYPE.equals(name)) {
 					parser.next();
 					changesOnType.add(parser.getText());
-				} else if (Constants.NAMESPACE_CMIS.equals(namespace)) {
+				} else if (XMLConstants.NAMESPACE_CMIS.equals(namespace)) {
 					parser.next();
 					repositoryInfoRawValues.put(name, parser.getText());
 				}
@@ -738,7 +739,7 @@ public class AtomPubParser {
 			case XmlPullParser.START_TAG:
 				if (name.startsWith(TAG_PROPERTY)) {
 					propertyDefinitionList.add(parsePropertyDefinition(parser));
-				} else if (Constants.NAMESPACE_CMIS.equals(namespace)) {
+				} else if (XMLConstants.NAMESPACE_CMIS.equals(namespace)) {
 					parser.next();
 					definitionRawValues.put(name, parser.getText());
 				} else {
@@ -780,7 +781,7 @@ public class AtomPubParser {
 		while (!(eventType == XmlPullParser.END_TAG && id.equals(name))) {
 			switch (eventType) {
 			case XmlPullParser.START_TAG:
-				if (Constants.NAMESPACE_CMIS.equals(namespace)) {
+				if (XMLConstants.NAMESPACE_CMIS.equals(namespace)) {
 					parser.next();
 					propertyTypeRawValues.put(name, parser.getText());
 				} else {
@@ -889,7 +890,7 @@ public class AtomPubParser {
 			case XmlPullParser.START_TAG:
 
 				// Extension
-				if (!Constants.NAMESPACE_CMIS.equals(nameSpace)) {
+				if (!XMLConstants.NAMESPACE_CMIS.equals(nameSpace)) {
 					extensions.addAll(parseExtensions(parser));
 					eventType = parser.next();
 					if (XmlPullParser.TEXT == eventType) {
@@ -1069,7 +1070,7 @@ public class AtomPubParser {
 		while (!(eventType == XmlPullParser.END_TAG && TAG_RENDITION.equals(name))) {
 			switch (eventType) {
 			case XmlPullParser.START_TAG:
-				if (Constants.NAMESPACE_CMIS.equals(namespace)) {
+				if (XMLConstants.NAMESPACE_CMIS.equals(namespace)) {
 					parser.next();
 					rendition.put(name, parser.getText());
 				} else {
@@ -1105,7 +1106,7 @@ public class AtomPubParser {
 		while (!(eventType == XmlPullParser.END_TAG && Constants.SELECTOR_ALLOWABLEACTIONS.equals(name))) {
 			switch (eventType) {
 			case XmlPullParser.START_TAG:
-				if (Constants.NAMESPACE_CMIS.equals(namespace)) {
+				if (XMLConstants.NAMESPACE_CMIS.equals(namespace)) {
 					parser.next();
 					allowableActionsRawValues.put(name, parser.getText());
 				} else {
@@ -1144,17 +1145,17 @@ public class AtomPubParser {
 		while (!(eventType == XmlPullParser.END_TAG && TAG_REPINFO_ACL_CAPABILITY.equals(name))) {
 			switch (eventType) {
 			case XmlPullParser.START_TAG:
-				if (Constants.NAMESPACE_CMIS.equals(namespace) && TAG_ACLCAP_PERMISSIONS.equals(name)) {
+				if (XMLConstants.NAMESPACE_CMIS.equals(namespace) && TAG_ACLCAP_PERMISSIONS.equals(name)) {
 
 					String permission = null, description = null;
 					// Permissions
 					while (!(eventType == XmlPullParser.END_TAG && TAG_ACLCAP_PERMISSIONS.equals(name))) {
 						switch (eventType) {
 						case XmlPullParser.START_TAG:
-							if (Constants.NAMESPACE_CMIS.equals(namespace) && TAG_ACLCAP_PERMISSION_PERMISSION.equals(name)) {
+							if (XMLConstants.NAMESPACE_CMIS.equals(namespace) && TAG_ACLCAP_PERMISSION_PERMISSION.equals(name)) {
 								parser.next();
 								permission = parser.getText();
-							} else if (Constants.NAMESPACE_CMIS.equals(namespace) && TAG_ACLCAP_PERMISSION_DESCRIPTION.equals(name)) {
+							} else if (XMLConstants.NAMESPACE_CMIS.equals(namespace) && TAG_ACLCAP_PERMISSION_DESCRIPTION.equals(name)) {
 								parser.next();
 								description = parser.getText();
 							}
@@ -1172,7 +1173,7 @@ public class AtomPubParser {
 
 					permissionDefinitionList.add(permDef);
 
-				} else if (Constants.NAMESPACE_CMIS.equals(namespace) && TAG_ACLCAP_MAPPING.equals(name)) {
+				} else if (XMLConstants.NAMESPACE_CMIS.equals(namespace) && TAG_ACLCAP_MAPPING.equals(name)) {
 
 					String key = null;
 					List<String> permList = new ArrayList<String>();
@@ -1180,10 +1181,10 @@ public class AtomPubParser {
 					while (!(eventType == XmlPullParser.END_TAG && TAG_ACLCAP_MAPPING.equals(name))) {
 						switch (eventType) {
 						case XmlPullParser.START_TAG:
-							if (Constants.NAMESPACE_CMIS.equals(namespace) && TAG_ACLCAP_MAPPING_KEY.equals(name)) {
+							if (XMLConstants.NAMESPACE_CMIS.equals(namespace) && TAG_ACLCAP_MAPPING_KEY.equals(name)) {
 								parser.next();
 								key = parser.getText();
-							} else if (Constants.NAMESPACE_CMIS.equals(namespace) && TAG_ACLCAP_MAPPING_PERMISSION.equals(name)) {
+							} else if (XMLConstants.NAMESPACE_CMIS.equals(namespace) && TAG_ACLCAP_MAPPING_PERMISSION.equals(name)) {
 								parser.next();
 								permList.add(parser.getText());
 							}
@@ -1201,7 +1202,7 @@ public class AtomPubParser {
 
 					permMap.put(key, mapping);
 
-				} else if (Constants.NAMESPACE_CMIS.equals(namespace)) {
+				} else if (XMLConstants.NAMESPACE_CMIS.equals(namespace)) {
 					parser.next();
 					AclCapabilitiesRawValues.put(name, parser.getText());
 				}
@@ -1229,7 +1230,7 @@ public class AtomPubParser {
 		while (!(eventType == XmlPullParser.END_TAG && Constants.SELECTOR_ACL.equals(name))) {
 			switch (eventType) {
 			case XmlPullParser.START_TAG:
-				if (Constants.NAMESPACE_CMIS.equals(namespace) && TAG_ACLCAP_PERMISSION_PERMISSION.equals(name)) {
+				if (XMLConstants.NAMESPACE_CMIS.equals(namespace) && TAG_ACLCAP_PERMISSION_PERMISSION.equals(name)) {
 					if (isPermissionRootTag == false) {
 						isPermissionRootTag = true;
 						permissions = new ArrayList<String>();
@@ -1239,12 +1240,12 @@ public class AtomPubParser {
 						permissions.add(parser.getText());
 						parser.next();
 					}
-				} else if (Constants.NAMESPACE_CMIS.equals(namespace) && TAG_ACE_PRINCIPAL.equals(name)) {
+				} else if (XMLConstants.NAMESPACE_CMIS.equals(namespace) && TAG_ACE_PRINCIPAL.equals(name)) {
 					AccessControlPrincipalDataImpl principal = null;
 					while (!(eventType == XmlPullParser.END_TAG && TAG_ACE_PRINCIPAL.equals(name))) {
 						switch (eventType) {
 						case XmlPullParser.START_TAG:
-							if (Constants.NAMESPACE_CMIS.equals(namespace) && TAG_ACE_PRINCIPAL_ID.equals(name)) {
+							if (XMLConstants.NAMESPACE_CMIS.equals(namespace) && TAG_ACE_PRINCIPAL_ID.equals(name)) {
 								parser.next();
 								principal = new AccessControlPrincipalDataImpl();
 								principal.setPrincipalId(parser.getText());
@@ -1258,14 +1259,14 @@ public class AtomPubParser {
 					// convertExtension(jsonPrincipal, principal,
 					// PRINCIPAL_KEYS);
 					ace.setPrincipal(principal);
-				} else if (Constants.NAMESPACE_CMIS.equals(namespace) && TAG_ACE_DIRECT.equals(name)) {
+				} else if (XMLConstants.NAMESPACE_CMIS.equals(namespace) && TAG_ACE_DIRECT.equals(name)) {
 					parser.next();
 					Boolean isDirect = Boolean.parseBoolean(parser.getText());
 					ace.setDirect(isDirect != null ? isDirect.booleanValue() : true);
 				}
 				break;
 			case XmlPullParser.END_TAG:
-				if (Constants.NAMESPACE_CMIS.equals(namespace) && TAG_ACLCAP_PERMISSION_PERMISSION.equals(name)) {
+				if (XMLConstants.NAMESPACE_CMIS.equals(namespace) && TAG_ACLCAP_PERMISSION_PERMISSION.equals(name)) {
 					isPermissionRootTag = false;
 					ace.setPermissions(permissions);
 					aces.add(ace);

Modified: chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/atompub/AtomEntryWriter.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/atompub/AtomEntryWriter.java?rev=1455603&r1=1455602&r2=1455603&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/atompub/AtomEntryWriter.java (original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/atompub/AtomEntryWriter.java Tue Mar 12 16:28:59 2013
@@ -101,7 +101,16 @@ public class AtomEntryWriter {
     public void write(OutputStream out) throws Exception {
         XMLStreamWriter writer = XMLUtils.createWriter(out);
 
-        XMLUtils.startEntryDocument(writer, contentStream != null && contentStream.getFileName() != null);
+        XMLUtils.startXmlDocument(writer);
+
+        writer.writeStartElement(XMLConstants.PREFIX_ATOM, "entry", XMLConstants.NAMESPACE_ATOM);
+        
+        writer.writeNamespace(XMLConstants.PREFIX_ATOM, XMLConstants.NAMESPACE_ATOM);
+        writer.writeNamespace(XMLConstants.PREFIX_CMIS, XMLConstants.NAMESPACE_CMIS);
+        writer.writeNamespace(XMLConstants.PREFIX_RESTATOM, XMLConstants.NAMESPACE_RESTATOM);
+        if (contentStream != null && contentStream.getFileName() != null) {
+            writer.writeNamespace(XMLConstants.PREFIX_APACHE_CHEMISTY, XMLConstants.NAMESPACE_APACHE_CHEMISTRY);
+        }
 
         // atom:id
         XMLUtils.write(writer, XMLConstants.PREFIX_ATOM, XMLConstants.NAMESPACE_ATOM, TAG_ATOM_ID,

Modified: chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/atompub/AtomPubParser.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/atompub/AtomPubParser.java?rev=1455603&r1=1455602&r2=1455603&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/atompub/AtomPubParser.java (original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/atompub/AtomPubParser.java Tue Mar 12 16:28:59 2013
@@ -65,7 +65,7 @@ import org.apache.chemistry.opencmis.cli
 import org.apache.chemistry.opencmis.commons.data.ObjectData;
 import org.apache.chemistry.opencmis.commons.data.RepositoryInfo;
 import org.apache.chemistry.opencmis.commons.definitions.TypeDefinition;
-import org.apache.chemistry.opencmis.commons.impl.Constants;
+import org.apache.chemistry.opencmis.commons.impl.XMLConstants;
 import org.apache.chemistry.opencmis.commons.impl.XMLConstraints;
 import org.apache.chemistry.opencmis.commons.impl.XMLConverter;
 import org.apache.chemistry.opencmis.commons.impl.XMLUtils;
@@ -101,7 +101,7 @@ public class AtomPubParser {
                 if (event == XMLStreamReader.START_ELEMENT) {
                     QName name = parser.getName();
 
-                    if (Constants.NAMESPACE_ATOM.equals(name.getNamespaceURI())) {
+                    if (XMLConstants.NAMESPACE_ATOM.equals(name.getNamespaceURI())) {
                         if (TAG_FEED.equals(name.getLocalPart())) {
                             parseResult = parseFeed(parser);
                             break;
@@ -109,7 +109,7 @@ public class AtomPubParser {
                             parseResult = parseEntry(parser);
                             break;
                         }
-                    } else if (Constants.NAMESPACE_CMIS.equals(name.getNamespaceURI())) {
+                    } else if (XMLConstants.NAMESPACE_CMIS.equals(name.getNamespaceURI())) {
                         if (TAG_ALLOWABLEACTIONS.equals(name.getLocalPart())) {
                             parseResult = parseAllowableActions(parser);
                             break;
@@ -117,7 +117,7 @@ public class AtomPubParser {
                             parseResult = parseACL(parser);
                             break;
                         }
-                    } else if (Constants.NAMESPACE_APP.equals(name.getNamespaceURI())) {
+                    } else if (XMLConstants.NAMESPACE_APP.equals(name.getNamespaceURI())) {
                         if (TAG_SERVICE.equals(name.getLocalPart())) {
                             parseResult = parseServiceDoc(parser);
                             break;
@@ -170,7 +170,7 @@ public class AtomPubParser {
             if (event == XMLStreamReader.START_ELEMENT) {
                 QName name = parser.getName();
 
-                if (Constants.NAMESPACE_APP.equals(name.getNamespaceURI())) {
+                if (XMLConstants.NAMESPACE_APP.equals(name.getNamespaceURI())) {
                     if (TAG_WORKSPACE.equals(name.getLocalPart())) {
                         result.addWorkspace(parseWorkspace(parser));
                     } else {
@@ -238,7 +238,7 @@ public class AtomPubParser {
             if (event == XMLStreamReader.START_ELEMENT) {
                 QName name = parser.getName();
 
-                if (Constants.NAMESPACE_ATOM.equals(name.getNamespaceURI())) {
+                if (XMLConstants.NAMESPACE_ATOM.equals(name.getNamespaceURI())) {
                     if (TAG_LINK.equals(name.getLocalPart())) {
                         result.addElement(parseLink(parser));
                     } else if (TAG_ENTRY.equals(name.getLocalPart())) {
@@ -246,7 +246,7 @@ public class AtomPubParser {
                     } else {
                         XMLUtils.skip(parser);
                     }
-                } else if (Constants.NAMESPACE_RESTATOM.equals(name.getNamespaceURI())) {
+                } else if (XMLConstants.NAMESPACE_RESTATOM.equals(name.getNamespaceURI())) {
                     if (TAG_NUM_ITEMS.equals(name.getLocalPart())) {
                         result.addElement(parseBigInteger(parser));
                     } else {
@@ -327,7 +327,7 @@ public class AtomPubParser {
     private AtomElement parseElement(XMLStreamReader parser) throws Exception {
         QName name = parser.getName();
 
-        if (Constants.NAMESPACE_RESTATOM.equals(name.getNamespaceURI())) {
+        if (XMLConstants.NAMESPACE_RESTATOM.equals(name.getNamespaceURI())) {
             if (TAG_OBJECT.equals(name.getLocalPart())) {
                 return new AtomElement(name, XMLConverter.convertObject(parser));
             } else if (TAG_PATH_SEGMENT.equals(name.getLocalPart())
@@ -338,7 +338,7 @@ public class AtomPubParser {
             } else if (TAG_CHILDREN.equals(name.getLocalPart())) {
                 return parseChildren(parser);
             }
-        } else if (Constants.NAMESPACE_ATOM.equals(name.getNamespaceURI())) {
+        } else if (XMLConstants.NAMESPACE_ATOM.equals(name.getNamespaceURI())) {
             if (TAG_LINK.equals(name.getLocalPart())) {
                 return parseLink(parser);
             } else if (TAG_CONTENT.equals(name.getLocalPart())) {
@@ -367,7 +367,7 @@ public class AtomPubParser {
             if (event == XMLStreamReader.START_ELEMENT) {
                 QName name = parser.getName();
 
-                if (Constants.NAMESPACE_ATOM.equals(name.getNamespaceURI())) {
+                if (XMLConstants.NAMESPACE_ATOM.equals(name.getNamespaceURI())) {
                     if (TAG_FEED.equals(name.getLocalPart())) {
                         result = new AtomElement(childName, parseFeed(parser));
                     } else {
@@ -396,17 +396,17 @@ public class AtomPubParser {
     private static AtomElement parseWorkspaceElement(XMLStreamReader parser) throws Exception {
         QName name = parser.getName();
 
-        if (Constants.NAMESPACE_RESTATOM.equals(name.getNamespaceURI())) {
+        if (XMLConstants.NAMESPACE_RESTATOM.equals(name.getNamespaceURI())) {
             if (TAG_REPOSITORY_INFO.equals(name.getLocalPart())) {
                 return new AtomElement(name, XMLConverter.convertRepositoryInfo(parser));
             } else if (TAG_URI_TEMPLATE.equals(name.getLocalPart())) {
                 return parseTemplate(parser);
             }
-        } else if (Constants.NAMESPACE_ATOM.equals(name.getNamespaceURI())) {
+        } else if (XMLConstants.NAMESPACE_ATOM.equals(name.getNamespaceURI())) {
             if (TAG_LINK.equals(name.getLocalPart())) {
                 return parseLink(parser);
             }
-        } else if (Constants.NAMESPACE_APP.equals(name.getNamespaceURI())) {
+        } else if (XMLConstants.NAMESPACE_APP.equals(name.getNamespaceURI())) {
             if (TAG_COLLECTION.equals(name.getLocalPart())) {
                 return parseCollection(parser);
             }
@@ -433,7 +433,7 @@ public class AtomPubParser {
             int event = parser.getEventType();
             if (event == XMLStreamReader.START_ELEMENT) {
                 QName tagName = parser.getName();
-                if (Constants.NAMESPACE_RESTATOM.equals(tagName.getNamespaceURI())
+                if (XMLConstants.NAMESPACE_RESTATOM.equals(tagName.getNamespaceURI())
                         && TAG_COLLECTION_TYPE.equals(tagName.getLocalPart())) {
                     result.put("collectionType", XMLUtils.readText(parser, XMLConstraints.MAX_STRING_LENGTH));
                 } else {
@@ -466,7 +466,7 @@ public class AtomPubParser {
             int event = parser.getEventType();
             if (event == XMLStreamReader.START_ELEMENT) {
                 QName tagName = parser.getName();
-                if (Constants.NAMESPACE_RESTATOM.equals(tagName.getNamespaceURI())) {
+                if (XMLConstants.NAMESPACE_RESTATOM.equals(tagName.getNamespaceURI())) {
                     if (TAG_TEMPLATE_TEMPLATE.equals(tagName.getLocalPart())) {
                         result.put("template", XMLUtils.readText(parser, XMLConstraints.MAX_STRING_LENGTH));
                     } else if (TAG_TEMPLATE_TYPE.equals(tagName.getLocalPart())) {

Modified: chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/atompub/ObjectServiceImpl.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/atompub/ObjectServiceImpl.java?rev=1455603&r1=1455602&r2=1455603&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/atompub/ObjectServiceImpl.java (original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/atompub/ObjectServiceImpl.java Tue Mar 12 16:28:59 2013
@@ -45,6 +45,7 @@ import org.apache.chemistry.opencmis.com
 import org.apache.chemistry.opencmis.commons.data.Properties;
 import org.apache.chemistry.opencmis.commons.data.PropertyData;
 import org.apache.chemistry.opencmis.commons.data.PropertyId;
+import org.apache.chemistry.opencmis.commons.data.PropertyString;
 import org.apache.chemistry.opencmis.commons.data.RenditionData;
 import org.apache.chemistry.opencmis.commons.enums.IncludeRelationships;
 import org.apache.chemistry.opencmis.commons.enums.UnfileObject;
@@ -359,8 +360,8 @@ public class ObjectServiceImpl extends A
                         if (object.getProperties() != null) {
                             Object changeTokenStr = object.getProperties().getProperties()
                                     .get(PropertyIds.CHANGE_TOKEN);
-                            if (changeTokenStr instanceof String) {
-                                changeToken.setValue((String) changeTokenStr);
+                            if (changeTokenStr instanceof PropertyString) {
+                                changeToken.setValue(((PropertyString) changeTokenStr).getFirstValue());
                             }
                         }
                     }

Modified: chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/Constants.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/Constants.java?rev=1455603&r1=1455602&r2=1455603&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/Constants.java (original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/Constants.java Tue Mar 12 16:28:59 2013
@@ -29,14 +29,6 @@ public final class Constants {
     private Constants() {
     }
 
-    // namespaces
-    public static final String NAMESPACE_CMIS = "http://docs.oasis-open.org/ns/cmis/core/200908/";
-    public static final String NAMESPACE_ATOM = "http://www.w3.org/2005/Atom";
-    public static final String NAMESPACE_APP = "http://www.w3.org/2007/app";
-    public static final String NAMESPACE_RESTATOM = "http://docs.oasis-open.org/ns/cmis/restatom/200908/";
-    public static final String NAMESPACE_XSI = "http://www.w3.org/2001/XMLSchema-instance";
-    public static final String NAMESPACE_APACHE_CHEMISTRY = "http://chemistry.apache.org/";
-
     // media types
     public static final String MEDIATYPE_SERVICE = "application/atomsvc+xml";
     public static final String MEDIATYPE_FEED = "application/atom+xml;type=feed";

Modified: chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/XMLConverter.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/XMLConverter.java?rev=1455603&r1=1455602&r2=1455603&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/XMLConverter.java (original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/XMLConverter.java Tue Mar 12 16:28:59 2013
@@ -1853,7 +1853,7 @@ public class XMLConverter {
                     }
 
                     if (isTag(name, TAG_PROPERTY_TYPE_CHOICE)) {
-                        CHOICE_STRING_PARSER.addToChoiceList(parser, (PropertyStringDefinitionImpl) target);
+                        CHOICE_STRING_PARSER.addToChoiceList(parser, (PropertyIdDefinitionImpl) target);
                         return true;
                     }
                 } else if (target instanceof PropertyBooleanDefinitionImpl) {
@@ -1944,7 +1944,7 @@ public class XMLConverter {
                     }
 
                     if (isTag(name, TAG_PROPERTY_TYPE_CHOICE)) {
-                        CHOICE_STRING_PARSER.addToChoiceList(parser, (PropertyStringDefinitionImpl) target);
+                        CHOICE_STRING_PARSER.addToChoiceList(parser, (PropertyHtmlDefinitionImpl) target);
                         return true;
                     }
                 } else if (target instanceof PropertyUriDefinitionImpl) {
@@ -1955,7 +1955,7 @@ public class XMLConverter {
                     }
 
                     if (isTag(name, TAG_PROPERTY_TYPE_CHOICE)) {
-                        CHOICE_STRING_PARSER.addToChoiceList(parser, (PropertyStringDefinitionImpl) target);
+                        CHOICE_STRING_PARSER.addToChoiceList(parser, (PropertyUriDefinitionImpl) target);
                         return true;
                     }
                 }

Modified: chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/XMLUtils.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/XMLUtils.java?rev=1455603&r1=1455602&r2=1455603&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/XMLUtils.java (original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/XMLUtils.java Tue Mar 12 16:28:59 2013
@@ -78,34 +78,6 @@ public class XMLUtils {
     }
 
     /**
-     * Starts an AtomPub Entry document.
-     */
-    public static void startEntryDocument(XMLStreamWriter writer, boolean hasContent) throws XMLStreamException {
-        startXmlDocument(writer);
-
-        writer.writeStartElement(XMLConstants.PREFIX_ATOM, "entry", XMLConstants.NAMESPACE_ATOM);
-        writer.writeNamespace(XMLConstants.PREFIX_ATOM, XMLConstants.NAMESPACE_ATOM);
-        writer.writeNamespace(XMLConstants.PREFIX_CMIS, XMLConstants.NAMESPACE_CMIS);
-        writer.writeNamespace(XMLConstants.PREFIX_RESTATOM, XMLConstants.NAMESPACE_RESTATOM);
-        if (hasContent) {
-            writer.writeNamespace(XMLConstants.PREFIX_APACHE_CHEMISTY, XMLConstants.NAMESPACE_APACHE_CHEMISTRY);
-        }
-    }
-
-    /**
-     * Starts an AtomPub Feed document.
-     */
-    public static void startFeedDocument(XMLStreamWriter writer, String tag, boolean hasContent)
-            throws XMLStreamException {
-        startXmlDocument(writer);
-
-        writer.writeStartElement(XMLConstants.PREFIX_ATOM, "feed", XMLConstants.NAMESPACE_ATOM);
-        writer.writeNamespace(XMLConstants.PREFIX_ATOM, XMLConstants.NAMESPACE_ATOM);
-        writer.writeNamespace(XMLConstants.PREFIX_CMIS, XMLConstants.NAMESPACE_CMIS);
-        writer.writeNamespace(XMLConstants.PREFIX_RESTATOM, XMLConstants.NAMESPACE_RESTATOM);
-    }
-
-    /**
      * Ends a XML document.
      */
     public static void endXmlDocument(XMLStreamWriter writer) throws XMLStreamException {

Modified: chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/XMLWalker.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/XMLWalker.java?rev=1455603&r1=1455602&r2=1455603&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/XMLWalker.java (original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/XMLWalker.java Tue Mar 12 16:28:59 2013
@@ -68,13 +68,13 @@ public abstract class XMLWalker<T> {
     }
 
     protected boolean isCmisNamespace(QName name) {
-        return Constants.NAMESPACE_CMIS.hashCode() == name.getNamespaceURI().hashCode()
-                && Constants.NAMESPACE_CMIS.equals(name.getNamespaceURI());
+        return XMLConstants.NAMESPACE_CMIS.hashCode() == name.getNamespaceURI().hashCode()
+                && XMLConstants.NAMESPACE_CMIS.equals(name.getNamespaceURI());
     }
 
     protected boolean isAtomNamespace(QName name) {
-        return Constants.NAMESPACE_ATOM.hashCode() == name.getNamespaceURI().hashCode()
-                && Constants.NAMESPACE_ATOM.equals(name.getNamespaceURI());
+        return XMLConstants.NAMESPACE_ATOM.hashCode() == name.getNamespaceURI().hashCode()
+                && XMLConstants.NAMESPACE_ATOM.equals(name.getNamespaceURI());
     }
 
     protected boolean isTag(QName name, String tag) {

Modified: chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl/atompub/AtomEntry.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl/atompub/AtomEntry.java?rev=1455603&r1=1455602&r2=1455603&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl/atompub/AtomEntry.java (original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl/atompub/AtomEntry.java Tue Mar 12 16:28:59 2013
@@ -52,13 +52,16 @@ public class AtomEntry extends AtomDocum
      * Opens the entry tag.
      */
     public void startEntry(boolean isRoot) throws XMLStreamException {
-        getWriter().writeStartElement(XMLConstants.NAMESPACE_ATOM, "entry");
+        XMLStreamWriter xsw = getWriter();
+
+        xsw.writeStartElement(XMLConstants.PREFIX_ATOM, "entry", XMLConstants.NAMESPACE_ATOM);
 
         if (isRoot) {
-            writeNamespace(XMLConstants.NAMESPACE_ATOM);
-            writeNamespace(XMLConstants.NAMESPACE_CMIS);
-            writeNamespace(XMLConstants.NAMESPACE_RESTATOM);
-            writeNamespace(XMLConstants.NAMESPACE_APP);
+            xsw.writeNamespace(XMLConstants.PREFIX_ATOM, XMLConstants.NAMESPACE_ATOM);
+            xsw.writeNamespace(XMLConstants.PREFIX_CMIS, XMLConstants.NAMESPACE_CMIS);
+            xsw.writeNamespace(XMLConstants.PREFIX_RESTATOM, XMLConstants.NAMESPACE_RESTATOM);
+            xsw.writeNamespace(XMLConstants.PREFIX_APP, XMLConstants.NAMESPACE_APP);
+
             writeAllCustomNamespace();
         }
     }

Modified: chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl/atompub/AtomFeed.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl/atompub/AtomFeed.java?rev=1455603&r1=1455602&r2=1455603&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl/atompub/AtomFeed.java (original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl/atompub/AtomFeed.java Tue Mar 12 16:28:59 2013
@@ -31,9 +31,6 @@ import org.apache.chemistry.opencmis.com
 
 /**
  * Atom Feed class.
- * 
- * @author <a href="mailto:fmueller@opentext.com">Florian M&uuml;ller</a>
- * 
  */
 public class AtomFeed extends AtomDocumentBase {
 
@@ -56,13 +53,16 @@ public class AtomFeed extends AtomDocume
      * Opens the feed tag.
      */
     public void startFeed(boolean isRoot) throws XMLStreamException {
-        getWriter().writeStartElement(Constants.NAMESPACE_ATOM, "feed");
+        XMLStreamWriter xsw = getWriter();
+
+        xsw.writeStartElement(XMLConstants.PREFIX_ATOM, "feed", XMLConstants.NAMESPACE_ATOM);
 
         if (isRoot) {
-            writeNamespace(Constants.NAMESPACE_ATOM);
-            writeNamespace(Constants.NAMESPACE_CMIS);
-            writeNamespace(Constants.NAMESPACE_RESTATOM);
-            writeNamespace(Constants.NAMESPACE_APP);
+            xsw.writeNamespace(XMLConstants.PREFIX_ATOM, XMLConstants.NAMESPACE_ATOM);
+            xsw.writeNamespace(XMLConstants.PREFIX_CMIS, XMLConstants.NAMESPACE_CMIS);
+            xsw.writeNamespace(XMLConstants.PREFIX_RESTATOM, XMLConstants.NAMESPACE_RESTATOM);
+            xsw.writeNamespace(XMLConstants.PREFIX_APP, XMLConstants.NAMESPACE_APP);
+
             writeAllCustomNamespace();
         }
     }
@@ -72,7 +72,7 @@ public class AtomFeed extends AtomDocume
      */
     public void startChildren() throws XMLStreamException {
         XMLStreamWriter writer = getWriter();
-        writer.writeStartElement(Constants.NAMESPACE_RESTATOM, "children");
+        writer.writeStartElement(XMLConstants.PREFIX_RESTATOM, "children", XMLConstants.NAMESPACE_RESTATOM);
     }
 
     /**

Modified: chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl/atompub/ServiceDocument.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl/atompub/ServiceDocument.java?rev=1455603&r1=1455602&r2=1455603&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl/atompub/ServiceDocument.java (original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl/atompub/ServiceDocument.java Tue Mar 12 16:28:59 2013
@@ -37,11 +37,14 @@ public class ServiceDocument extends Ato
 
     public void startServiceDocument() throws XMLStreamException {
         XMLStreamWriter xsw = getWriter();
+        
         xsw.writeStartElement(XMLConstants.PREFIX_APP, "service", XMLConstants.NAMESPACE_APP);
-        writeNamespace(XMLConstants.NAMESPACE_APP);
-        writeNamespace(XMLConstants.NAMESPACE_ATOM);
-        writeNamespace(XMLConstants.NAMESPACE_CMIS);
-        writeNamespace(XMLConstants.NAMESPACE_RESTATOM);
+
+        xsw.writeNamespace(XMLConstants.PREFIX_ATOM, XMLConstants.NAMESPACE_ATOM);
+        xsw.writeNamespace(XMLConstants.PREFIX_CMIS, XMLConstants.NAMESPACE_CMIS);
+        xsw.writeNamespace(XMLConstants.PREFIX_RESTATOM, XMLConstants.NAMESPACE_RESTATOM);
+        xsw.writeNamespace(XMLConstants.PREFIX_APP, XMLConstants.NAMESPACE_APP);
+
         writeAllCustomNamespace();
     }
 

Modified: chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl/atompub/XMLDocumentBase.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl/atompub/XMLDocumentBase.java?rev=1455603&r1=1455602&r2=1455603&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl/atompub/XMLDocumentBase.java (original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl/atompub/XMLDocumentBase.java Tue Mar 12 16:28:59 2013
@@ -53,13 +53,6 @@ public abstract class XMLDocumentBase {
     }
 
     /**
-     * Writes the namespace declaration of the given URI to the current tag.
-     */
-    public void writeNamespace(String namespaceUri) throws XMLStreamException {
-        writer.writeNamespace(writer.getPrefix(namespaceUri), namespaceUri);
-    }
-
-    /**
      * Writes custom namespace declaration to the current tag.
      */
     public void writeAllCustomNamespace() throws XMLStreamException {

Modified: chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/types/InMemoryJaxbHelper.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/types/InMemoryJaxbHelper.java?rev=1455603&r1=1455602&r2=1455603&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/types/InMemoryJaxbHelper.java (original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/types/InMemoryJaxbHelper.java Tue Mar 12 16:28:59 2013
@@ -30,13 +30,13 @@ import javax.xml.bind.annotation.XmlRegi
 import javax.xml.namespace.QName;
 import javax.xml.stream.XMLStreamWriter;
 
-import org.apache.chemistry.opencmis.commons.impl.Constants;
+import org.apache.chemistry.opencmis.commons.impl.XMLConstants;
 import org.apache.chemistry.opencmis.commons.impl.jaxb.CmisTypeDefinitionType;
 import org.apache.chemistry.opencmis.commons.impl.jaxb.ObjectFactory;
 
 public class InMemoryJaxbHelper {
     private static final QName CMIS_TYPE_DEFINITIONS = new QName("http://chemistry.apache.org/schemas/TypeDefnitions", "typeDefinitions");
-    private static final QName CMIS_TYPE_DEFINITION = new QName(Constants.NAMESPACE_RESTATOM, "type");
+    private static final QName CMIS_TYPE_DEFINITION = new QName(XMLConstants.NAMESPACE_RESTATOM, "type");
 
     public static final ObjectFactory CMIS_OBJECT_FACTORY = new ObjectFactory();
     public static final CMISExtraObjectFactory CMIS_EXTRA_OBJECT_FACTORY = new CMISExtraObjectFactory();
@@ -58,7 +58,7 @@ public class InMemoryJaxbHelper {
             return new JAXBElement<TypeDefinitions>(CMIS_TYPE_DEFINITIONS, TypeDefinitions.class, value);
         }
 
-        @XmlElementDecl(namespace = Constants.NAMESPACE_RESTATOM, name = "type")
+        @XmlElementDecl(namespace = XMLConstants.NAMESPACE_RESTATOM, name = "type")
         public JAXBElement<CmisTypeDefinitionType> createTypeDefinition(CmisTypeDefinitionType value) {
             return new JAXBElement<CmisTypeDefinitionType>(CMIS_TYPE_DEFINITION, CmisTypeDefinitionType.class, value);
         }

Modified: chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/types/TypeDefinitions.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/types/TypeDefinitions.java?rev=1455603&r1=1455602&r2=1455603&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/types/TypeDefinitions.java (original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/types/TypeDefinitions.java Tue Mar 12 16:28:59 2013
@@ -22,10 +22,9 @@ import java.util.ArrayList;
 import java.util.List;
 
 import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlElementDecl;
 import javax.xml.bind.annotation.XmlRootElement;
 
-import org.apache.chemistry.opencmis.commons.impl.Constants;
+import org.apache.chemistry.opencmis.commons.impl.XMLConstants;
 import org.apache.chemistry.opencmis.commons.impl.jaxb.CmisTypeDefinitionType;
 
 @XmlRootElement
@@ -33,7 +32,7 @@ public class TypeDefinitions {
 
     protected List<CmisTypeDefinitionType> type;
 
-    @XmlElement(namespace = Constants.NAMESPACE_RESTATOM, name = "type")
+    @XmlElement(namespace = XMLConstants.NAMESPACE_RESTATOM, name = "type")
     public List<CmisTypeDefinitionType> getTypeDefinitions() {
         if (type == null) {
             type = new ArrayList<CmisTypeDefinitionType>();



Mime
View raw message