Author: fguillaume
Date: Thu Oct 15 17:12:24 2009
New Revision: 825570

URL: http://svn.apache.org/viewvc?rev=825570&view=rev
Log:
merge code changes from 0.62 branch

Added:
    
incubator/chemistry/trunk/chemistry/chemistry-ws/src/main/resources/wsdl/CMIS-RestAtom.xsd
      - copied unchanged from r825562, 
incubator/chemistry/branches/0.62/chemistry/chemistry-ws/src/main/resources/wsdl/CMIS-RestAtom.xsd
Modified:
    incubator/chemistry/trunk/   (props changed)
    
incubator/chemistry/trunk/chemistry/chemistry-atompub-server/src/main/java/org/apache/chemistry/atompub/server/CMISObjectsCollection.java
    
incubator/chemistry/trunk/chemistry/chemistry-atompub-server/src/main/java/org/apache/chemistry/atompub/server/CMISTypesCollection.java
    
incubator/chemistry/trunk/chemistry/chemistry-atompub/src/main/java/org/apache/chemistry/atompub/abdera/PropertiesElement.java
    
incubator/chemistry/trunk/chemistry/chemistry-commons/src/main/antlr3/org/apache/chemistry/cmissql/CmisSqlParser.g
    
incubator/chemistry/trunk/chemistry/chemistry-commons/src/main/antlr3/org/apache/chemistry/impl/simple/CmisSqlSimpleWalker.g
    
incubator/chemistry/trunk/chemistry/chemistry-commons/src/main/java/org/apache/chemistry/impl/simple/SimpleData.java
    
incubator/chemistry/trunk/chemistry/chemistry-commons/src/main/java/org/apache/chemistry/impl/simple/SimpleObjectEntry.java
    
incubator/chemistry/trunk/chemistry/chemistry-commons/src/test/gunit/org/apache/chemistry/cmissql/CmisSql.testsuite
    incubator/chemistry/trunk/chemistry/chemistry-parent/pom.xml
    incubator/chemistry/trunk/chemistry/chemistry-tck-atompub/pom.xml
    
incubator/chemistry/trunk/chemistry/chemistry-tck-atompub/src/test/java/org/apache/chemistry/tck/atompub/test/schema/CMISSchemaTest.java
    
incubator/chemistry/trunk/chemistry/chemistry-ws/src/main/resources/wsdl/APP.xsd
    
incubator/chemistry/trunk/chemistry/chemistry-ws/src/main/resources/wsdl/ATOM.xsd
    
incubator/chemistry/trunk/chemistry/chemistry-ws/src/main/resources/wsdl/CMIS-Core.xsd
    
incubator/chemistry/trunk/chemistry/chemistry-ws/src/main/resources/wsdl/CMIS-Messaging.xsd
    
incubator/chemistry/trunk/chemistry/chemistry-ws/src/main/resources/wsdl/CMISWS-Service.wsdl
   (contents, props changed)
    
incubator/chemistry/trunk/chemistry/chemistry-ws/src/main/resources/wsdl/xml.xsd
    incubator/chemistry/trunk/jcr-cmis/server/atompub/   (props changed)
    
incubator/chemistry/trunk/jcr-cmis/server/atompub/src/main/java/org/apache/jackrabbit/cmis/server/atompub/
   (props changed)
    
incubator/chemistry/trunk/jcr-cmis/server/atompub/src/test/java/org/apache/jackrabbit/cmis/server/atompub/JettyServer.java
   (props changed)
    
incubator/chemistry/trunk/jcr-cmis/server/atompub/src/test/java/org/apache/jackrabbit/cmis/server/atompub/RepositoryInfoTest.java
   (props changed)

Propchange: incubator/chemistry/trunk/
------------------------------------------------------------------------------
    svn:mergeinfo = /incubator/chemistry/branches/0.62:812496-825562

Modified: 
incubator/chemistry/trunk/chemistry/chemistry-atompub-server/src/main/java/org/apache/chemistry/atompub/server/CMISObjectsCollection.java
URL: 
http://svn.apache.org/viewvc/incubator/chemistry/trunk/chemistry/chemistry-atompub-server/src/main/java/org/apache/chemistry/atompub/server/CMISObjectsCollection.java?rev=825570&r1=825569&r2=825570&view=diff
==============================================================================
--- 
incubator/chemistry/trunk/chemistry/chemistry-atompub-server/src/main/java/org/apache/chemistry/atompub/server/CMISObjectsCollection.java
 (original)
+++ 
incubator/chemistry/trunk/chemistry/chemistry-atompub-server/src/main/java/org/apache/chemistry/atompub/server/CMISObjectsCollection.java
 Thu Oct 15 17:12:24 2009
@@ -367,7 +367,8 @@
     public boolean isMediaEntry(ObjectEntry object)
             throws ResponseContextException {
         SPI spi = repository.getSPI(); // TODO XXX connection leak
-        return spi.hasContentStream(object);
+        return getContentType(object) != null && getContentSize(object) != -1
+                && spi.hasContentStream(object);
     }
 
     @Override

Modified: 
incubator/chemistry/trunk/chemistry/chemistry-atompub-server/src/main/java/org/apache/chemistry/atompub/server/CMISTypesCollection.java
URL: 
http://svn.apache.org/viewvc/incubator/chemistry/trunk/chemistry/chemistry-atompub-server/src/main/java/org/apache/chemistry/atompub/server/CMISTypesCollection.java?rev=825570&r1=825569&r2=825570&view=diff
==============================================================================
--- 
incubator/chemistry/trunk/chemistry/chemistry-atompub-server/src/main/java/org/apache/chemistry/atompub/server/CMISTypesCollection.java
 (original)
+++ 
incubator/chemistry/trunk/chemistry/chemistry-atompub-server/src/main/java/org/apache/chemistry/atompub/server/CMISTypesCollection.java
 Thu Oct 15 17:12:24 2009
@@ -228,7 +228,7 @@
                 if (defaultValue != null) {
                     Element dv = factory.newElement(CMIS.DEFAULT_VALUE, def);
                     for (String s : PropertiesElement.getStringsForValue(
-                            defaultValue, pd)) {
+                            defaultValue, pd.getType(), pd.isMultiValued())) {
                         el = factory.newElement(CMIS.VALUE, dv);
                         el.setText(s);
                     }

Modified: 
incubator/chemistry/trunk/chemistry/chemistry-atompub/src/main/java/org/apache/chemistry/atompub/abdera/PropertiesElement.java
URL: 
http://svn.apache.org/viewvc/incubator/chemistry/trunk/chemistry/chemistry-atompub/src/main/java/org/apache/chemistry/atompub/abdera/PropertiesElement.java?rev=825570&r1=825569&r2=825570&view=diff
==============================================================================
--- 
incubator/chemistry/trunk/chemistry/chemistry-atompub/src/main/java/org/apache/chemistry/atompub/abdera/PropertiesElement.java
 (original)
+++ 
incubator/chemistry/trunk/chemistry/chemistry-atompub/src/main/java/org/apache/chemistry/atompub/abdera/PropertiesElement.java
 Thu Oct 15 17:12:24 2009
@@ -136,9 +136,20 @@
     }
 
     public void setProperties(Map<String, Serializable> values, Type type) {
-        for (PropertyDefinition propertyDefinition : 
type.getPropertyDefinitions()) {
-            setProperty(values.get(propertyDefinition.getId()),
-                    propertyDefinition);
+        if (type != null) {
+            for (PropertyDefinition propertyDefinition : 
type.getPropertyDefinitions()) {
+                setProperty(values.get(propertyDefinition.getId()),
+                        propertyDefinition);
+            }
+        } else {
+            // this is a simple record set from a query result, guess the types
+            // TODO should get an ObjectEntry here, which should type its 
values
+            for (Entry<String, Serializable> entry : values.entrySet()) {
+                String key = entry.getKey();
+                Serializable value = entry.getValue();
+                PropertyType propertyType = guessType(key, value);
+                setProperty(key, value, propertyType);
+            }
         }
     }
 
@@ -148,8 +159,10 @@
             // TODO assumes this isn't called several times
             return;
         }
-        QName qname = propertyQName(propertyDefinition);
-        List<String> values = getStringsForValue(value, propertyDefinition);
+        QName qname = propertyQName(propertyDefinition.getType());
+        List<String> values = getStringsForValue(value,
+                propertyDefinition.getType(),
+                propertyDefinition.isMultiValued());
         ExtensibleElement el = addExtension(qname);
         el.setAttributeValue(CMIS.PDID, propertyDefinition.getId());
         String localName = propertyDefinition.getLocalName();
@@ -167,6 +180,24 @@
         }
     }
 
+    // sets a property without all the type information, used for result sets
+    public void setProperty(String key, Serializable value, PropertyType 
propertyType) {
+        if (value == null) {
+            // TODO assumes this isn't called several times
+            return;
+        }
+        QName qname = propertyQName(propertyType);
+        boolean multi = false;
+        List<String> values = getStringsForValue(value, propertyType, multi);
+        ExtensibleElement el = addExtension(qname);
+        el.setAttributeValue(CMIS.PDID, key);
+        for (String s : values) {
+            Element val = el.addExtension(CMIS.VALUE);
+            // don't merge these two lines as JDK 5 has problems compiling it
+            val.setText(s);
+        }
+    }
+
     /**
      * Finds the list of Strings that are the XML form for the value.
      *
@@ -177,8 +208,7 @@
     // TODO move this to a helper somewhere else
     @SuppressWarnings( { "null", "unchecked" })
     public static List<String> getStringsForValue(Serializable value,
-            PropertyDefinition propertyDefinition) {
-        boolean multi = propertyDefinition.isMultiValued();
+            PropertyType propertyType, boolean multi) {
         List<String> values = null;
         if (multi) {
             if (value.getClass().isArray()) {
@@ -192,8 +222,7 @@
                 return null;
             }
         }
-        PropertyType type = propertyDefinition.getType();
-        switch (type.ordinal()) {
+        switch (propertyType.ordinal()) {
         case PropertyType.STRING_ORD:
         case PropertyType.ID_ORD:
             if (multi) {
@@ -239,21 +268,21 @@
             }
             break;
         case PropertyType.URI_ORD:
-            throw new UnsupportedOperationException(type.toString());
+            throw new UnsupportedOperationException(propertyType.toString());
         case PropertyType.XML_ORD:
-            throw new UnsupportedOperationException(type.toString());
+            throw new UnsupportedOperationException(propertyType.toString());
         case PropertyType.HTML_ORD:
-            throw new UnsupportedOperationException(type.toString());
+            throw new UnsupportedOperationException(propertyType.toString());
         case PropertyType.XHTML_ORD:
-            throw new UnsupportedOperationException(type.toString());
+            throw new UnsupportedOperationException(propertyType.toString());
         default:
-            throw new UnsupportedOperationException(type.toString());
+            throw new UnsupportedOperationException(propertyType.toString());
         }
         return values;
     }
 
-    protected static QName propertyQName(PropertyDefinition def) {
-        switch (def.getType().ordinal()) {
+    protected static QName propertyQName(PropertyType propertyType) {
+        switch (propertyType.ordinal()) {
         case PropertyType.STRING_ORD:
             return CMIS.PROPERTY_STRING;
         case PropertyType.DECIMAL_ORD:
@@ -275,8 +304,41 @@
         case PropertyType.XHTML_ORD:
             return CMIS.PROPERTY_XHTML;
         default:
-            throw new UnsupportedOperationException(def.getType().toString());
+            throw new UnsupportedOperationException(propertyType.toString());
+        }
+    }
+
+    // TODO XXX we shouldn't guess, values should be typed in ObjectEntry
+    protected static PropertyType guessType(String key, Serializable value) {
+        for (String n : Arrays.asList( //
+                Property.ID, //
+                Property.TYPE_ID, //
+                Property.BASE_TYPE_ID, //
+                Property.VERSION_SERIES_ID, //
+                Property.VERSION_SERIES_CHECKED_OUT_ID, //
+                Property.PARENT_ID, //
+                Property.SOURCE_ID, //
+                Property.TARGET_ID)) {
+            if (key.toUpperCase().endsWith(n.toUpperCase())) {
+                return PropertyType.ID;
+            }
+        }
+        if (value instanceof String) {
+            return PropertyType.STRING;
+        }
+        if (value instanceof BigDecimal) {
+            return PropertyType.DECIMAL;
+        }
+        if (value instanceof Number) {
+            return PropertyType.INTEGER;
+        }
+        if (value instanceof Boolean) {
+            return PropertyType.BOOLEAN;
+        }
+        if (value instanceof Calendar) {
+            return PropertyType.DATETIME;
         }
+        return PropertyType.STRING;
     }
 
     @SuppressWarnings("boxing")

Modified: 
incubator/chemistry/trunk/chemistry/chemistry-commons/src/main/antlr3/org/apache/chemistry/cmissql/CmisSqlParser.g
URL: 
http://svn.apache.org/viewvc/incubator/chemistry/trunk/chemistry/chemistry-commons/src/main/antlr3/org/apache/chemistry/cmissql/CmisSqlParser.g?rev=825570&r1=825569&r2=825570&view=diff
==============================================================================
--- 
incubator/chemistry/trunk/chemistry/chemistry-commons/src/main/antlr3/org/apache/chemistry/cmissql/CmisSqlParser.g
 (original)
+++ 
incubator/chemistry/trunk/chemistry/chemistry-commons/src/main/antlr3/org/apache/chemistry/cmissql/CmisSqlParser.g
 Thu Oct 15 17:12:24 2009
@@ -225,8 +225,8 @@
     ;
 
 sort_specification:
-      column_name -> column_name ASC
-    | column_name ( ASC | DESC )
+      column_reference -> column_reference ASC
+    | column_reference ( ASC | DESC )
     ;
 
 correlation_name:

Modified: 
incubator/chemistry/trunk/chemistry/chemistry-commons/src/main/antlr3/org/apache/chemistry/impl/simple/CmisSqlSimpleWalker.g
URL: 
http://svn.apache.org/viewvc/incubator/chemistry/trunk/chemistry/chemistry-commons/src/main/antlr3/org/apache/chemistry/impl/simple/CmisSqlSimpleWalker.g?rev=825570&r1=825569&r2=825570&view=diff
==============================================================================
--- 
incubator/chemistry/trunk/chemistry/chemistry-commons/src/main/antlr3/org/apache/chemistry/impl/simple/CmisSqlSimpleWalker.g
 (original)
+++ 
incubator/chemistry/trunk/chemistry/chemistry-commons/src/main/antlr3/org/apache/chemistry/impl/simple/CmisSqlSimpleWalker.g
 Thu Oct 15 17:12:24 2009
@@ -271,7 +271,7 @@
     ;
 
 sort_specification:
-    column_name ( ASC | DESC )
+    column_reference ( ASC | DESC )
     ;
 
 correlation_name:

Modified: 
incubator/chemistry/trunk/chemistry/chemistry-commons/src/main/java/org/apache/chemistry/impl/simple/SimpleData.java
URL: 
http://svn.apache.org/viewvc/incubator/chemistry/trunk/chemistry/chemistry-commons/src/main/java/org/apache/chemistry/impl/simple/SimpleData.java?rev=825570&r1=825569&r2=825570&view=diff
==============================================================================
--- 
incubator/chemistry/trunk/chemistry/chemistry-commons/src/main/java/org/apache/chemistry/impl/simple/SimpleData.java
 (original)
+++ 
incubator/chemistry/trunk/chemistry/chemistry-commons/src/main/java/org/apache/chemistry/impl/simple/SimpleData.java
 Thu Oct 15 17:12:24 2009
@@ -33,8 +33,12 @@
     private static final long serialVersionUID = 1L;
 
     public SimpleData(String typeId, BaseType baseType) {
-        put(Property.TYPE_ID, typeId);
-        put(Property.BASE_TYPE_ID, baseType.getId());
+        if (typeId != null) {
+            put(Property.TYPE_ID, typeId);
+        }
+        if (baseType != null) {
+            put(Property.BASE_TYPE_ID, baseType.getId());
+        }
     }
 
 }

Modified: 
incubator/chemistry/trunk/chemistry/chemistry-commons/src/main/java/org/apache/chemistry/impl/simple/SimpleObjectEntry.java
URL: 
http://svn.apache.org/viewvc/incubator/chemistry/trunk/chemistry/chemistry-commons/src/main/java/org/apache/chemistry/impl/simple/SimpleObjectEntry.java?rev=825570&r1=825569&r2=825570&view=diff
==============================================================================
--- 
incubator/chemistry/trunk/chemistry/chemistry-commons/src/main/java/org/apache/chemistry/impl/simple/SimpleObjectEntry.java
 (original)
+++ 
incubator/chemistry/trunk/chemistry/chemistry-commons/src/main/java/org/apache/chemistry/impl/simple/SimpleObjectEntry.java
 Thu Oct 15 17:12:24 2009
@@ -56,7 +56,8 @@
     }
 
     public BaseType getBaseType() {
-        return BaseType.get((String) data.get(Property.BASE_TYPE_ID));
+        String baseTypeId = (String) data.get(Property.BASE_TYPE_ID);
+        return baseTypeId == null ? null : BaseType.get(baseTypeId);
     }
 
     public ChangeInfo getChangeInfo() {

Modified: 
incubator/chemistry/trunk/chemistry/chemistry-commons/src/test/gunit/org/apache/chemistry/cmissql/CmisSql.testsuite
URL: 
http://svn.apache.org/viewvc/incubator/chemistry/trunk/chemistry/chemistry-commons/src/test/gunit/org/apache/chemistry/cmissql/CmisSql.testsuite?rev=825570&r1=825569&r2=825570&view=diff
==============================================================================
--- 
incubator/chemistry/trunk/chemistry/chemistry-commons/src/test/gunit/org/apache/chemistry/cmissql/CmisSql.testsuite
 (original)
+++ 
incubator/chemistry/trunk/chemistry/chemistry-commons/src/test/gunit/org/apache/chemistry/cmissql/CmisSql.testsuite
 Thu Oct 15 17:12:24 2009
@@ -64,10 +64,10 @@
 "'abc'" OK
 
 order_by_clause:
-"ORDER BY foo" -> (ORDER_BY foo ASC)
-"ORDER BY foo ASC" -> (ORDER_BY foo ASC)
-"ORDER BY foo DESC" -> (ORDER_BY foo DESC)
-"ORDER BY foo, bar DESC" -> (ORDER_BY foo ASC bar DESC)
+"ORDER BY foo" -> (ORDER_BY (COL foo) ASC)
+"ORDER BY foo ASC" -> (ORDER_BY (COL foo) ASC)
+"ORDER BY foo DESC" -> (ORDER_BY (COL foo) DESC)
+"ORDER BY t.foo, bar DESC" -> (ORDER_BY (COL t foo) ASC (COL bar) DESC)
 
 column_reference:
 "foo" -> (COL foo)
@@ -123,7 +123,7 @@
 query:
 "SELECT * FROM Document" -> (SELECT * (FROM (TABLE Document)))
 "SELECT a, b, c FROM Document" -> (SELECT (LIST (COL a) (COL b) (COL c)) (FROM 
(TABLE Document)))
-"SELECT a, b FROM Document ORDER BY a, b" -> (SELECT (LIST (COL a) (COL b)) 
(FROM (TABLE Document)) (ORDER_BY a ASC b ASC))
+"SELECT a, b FROM Document ORDER BY a, b" -> (SELECT (LIST (COL a) (COL b)) 
(FROM (TABLE Document)) (ORDER_BY (COL a) ASC (COL b) ASC))
 
 
 // Examples from the specs.

Modified: incubator/chemistry/trunk/chemistry/chemistry-parent/pom.xml
URL: 
http://svn.apache.org/viewvc/incubator/chemistry/trunk/chemistry/chemistry-parent/pom.xml?rev=825570&r1=825569&r2=825570&view=diff
==============================================================================
--- incubator/chemistry/trunk/chemistry/chemistry-parent/pom.xml (original)
+++ incubator/chemistry/trunk/chemistry/chemistry-parent/pom.xml Thu Oct 15 
17:12:24 2009
@@ -237,4 +237,13 @@
     </repository>
   </repositories>
 
+  <distributionManagement>
+    <!-- dummy repository, needed by Hudson so that it can override it -->
+    <snapshotRepository>
+      <id>apache.incubator.snapshots</id>
+      <name>Apache Incubator Snapshots Repository</name>
+      
<url>scp://people.apache.org/www/people.apache.org/repo/m2-incubating-repository</url>
+    </snapshotRepository>
+  </distributionManagement>
+
 </project>

Modified: incubator/chemistry/trunk/chemistry/chemistry-tck-atompub/pom.xml
URL: 
http://svn.apache.org/viewvc/incubator/chemistry/trunk/chemistry/chemistry-tck-atompub/pom.xml?rev=825570&r1=825569&r2=825570&view=diff
==============================================================================
--- incubator/chemistry/trunk/chemistry/chemistry-tck-atompub/pom.xml (original)
+++ incubator/chemistry/trunk/chemistry/chemistry-tck-atompub/pom.xml Thu Oct 
15 17:12:24 2009
@@ -9,17 +9,21 @@
 
 <project xmlns="http://maven.apache.org/POM/4.0.0"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/maven-v4_0_0.xsd";>
   <modelVersion>4.0.0</modelVersion>
-  <groupId>org.apache.chemistry</groupId>
+
+  <parent>
+    <groupId>org.apache.chemistry</groupId>
+    <artifactId>chemistry-parent</artifactId>
+    <version>0.1-SNAPSHOT</version>
+  </parent>
   <artifactId>chemistry-tck-atompub</artifactId>
   <name>Chemistry TCK AtomPub</name>
-  <packaging>jar</packaging>
-  <version>1.0.0-SNAPSHOT</version>
-  <url>http://maven.apache.org</url>
+
   <dependencies>
     <dependency>
       <groupId>junit</groupId>
       <artifactId>junit</artifactId>
       <version>4.6</version>
+      <scope>compile</scope> <!-- override from parent -->
     </dependency>
     <dependency>
       <!-- NOTE: use recent xerces for validating CMIS schema -->
@@ -31,12 +35,10 @@
     <dependency>
       <groupId>log4j</groupId>
       <artifactId>log4j</artifactId>
-      <version>1.2.12</version>
     </dependency>
     <dependency>
       <groupId>commons-httpclient</groupId>
       <artifactId>commons-httpclient</artifactId>
-      <version>3.1</version>
     </dependency>
     <dependency>
       <artifactId>abdera-core</artifactId>

Modified: 
incubator/chemistry/trunk/chemistry/chemistry-tck-atompub/src/test/java/org/apache/chemistry/tck/atompub/test/schema/CMISSchemaTest.java
URL: 
http://svn.apache.org/viewvc/incubator/chemistry/trunk/chemistry/chemistry-tck-atompub/src/test/java/org/apache/chemistry/tck/atompub/test/schema/CMISSchemaTest.java?rev=825570&r1=825569&r2=825570&view=diff
==============================================================================
--- 
incubator/chemistry/trunk/chemistry/chemistry-tck-atompub/src/test/java/org/apache/chemistry/tck/atompub/test/schema/CMISSchemaTest.java
 (original)
+++ 
incubator/chemistry/trunk/chemistry/chemistry-tck-atompub/src/test/java/org/apache/chemistry/tck/atompub/test/schema/CMISSchemaTest.java
 Thu Oct 15 17:12:24 2009
@@ -131,7 +131,7 @@
     }
 
     public void testTypeFolderWithOut() throws Exception {
-        String xml = examples.load("TypeFolderWithOut.xml");
+        String xml = examples.load("TypeFolderWithout.xml");
         assertValidXML(xml, cmisValidator.getCMISAtomValidator());
     }
 
@@ -157,7 +157,7 @@
 
     /**
      * Assert XML is valid according to specified validator
-     * 
+     *
      * @param xml
      *            document to test
      * @param validator

Modified: 
incubator/chemistry/trunk/chemistry/chemistry-ws/src/main/resources/wsdl/APP.xsd
URL: 
http://svn.apache.org/viewvc/incubator/chemistry/trunk/chemistry/chemistry-ws/src/main/resources/wsdl/APP.xsd?rev=825570&r1=825569&r2=825570&view=diff
==============================================================================
--- 
incubator/chemistry/trunk/chemistry/chemistry-ws/src/main/resources/wsdl/APP.xsd
 (original)
+++ 
incubator/chemistry/trunk/chemistry/chemistry-ws/src/main/resources/wsdl/APP.xsd
 Thu Oct 15 17:12:24 2009
@@ -6,12 +6,16 @@
 <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema";
        elementFormDefault="qualified" 
targetNamespace="http://www.w3.org/2007/app";
        xmlns:atom="http://www.w3.org/2005/Atom"; 
xmlns:app="http://www.w3.org/2007/app";
-       xmlns:cmis="http://docs.oasis-open.org/ns/cmis/core/200901";
-       version="0.61">
+       xmlns:cmisc="http://docs.oasis-open.org/ns/cmis/core/200901";
+       xmlns:cmisra="http://docs.oasis-open.org/ns/cmis/restatom/200901";
+       version="0.62d">
        <xs:import namespace="http://www.w3.org/2005/Atom";
                schemaLocation="ATOM.xsd" />
        <xs:import namespace="http://docs.oasis-open.org/ns/cmis/core/200901";
                schemaLocation="CMIS-Core.xsd" />
+       <xs:import 
namespace="http://docs.oasis-open.org/ns/cmis/restatom/200901";
+               schemaLocation="CMIS-RestAtom.xsd" />
+
        <xs:element name="service" type="app:appServiceType"></xs:element>
        <xs:complexType name="appServiceType">
                <xs:sequence>
@@ -25,12 +29,11 @@
        <xs:complexType name="appWorkspaceType">
                <xs:sequence>
                        <xs:element ref="atom:title"></xs:element>
-                       <xs:element ref="cmis:repositoryInfo" minOccurs="0"
-                               maxOccurs="1"></xs:element>
                        <xs:element ref="app:collection" minOccurs="0" 
maxOccurs="unbounded"></xs:element>
+                       <xs:any minOccurs="0" maxOccurs="unbounded" 
processContents="lax"
+                               namespace="##other" />
                </xs:sequence>
-               <xs:attribute ref="cmis:id"></xs:attribute>
-               <xs:attribute ref="cmis:repositoryRelationship" 
use="optional"></xs:attribute>
+               <xs:attributeGroup 
ref="atom:undefinedAttribute"></xs:attributeGroup>
        </xs:complexType>
        <xs:element name="collection" type="app:appCollectionType"></xs:element>
        <xs:complexType name="appCollectionType">
@@ -43,8 +46,8 @@
                        <xs:any minOccurs="0" maxOccurs="unbounded" 
processContents="lax"
                                namespace="##other" />
                </xs:sequence>
-               <xs:attribute ref="cmis:collectionType"></xs:attribute>
                <xs:attribute name="href" type="xs:anyURI"></xs:attribute>
+               <xs:attributeGroup 
ref="atom:undefinedAttribute"></xs:attributeGroup>
        </xs:complexType>
        <xs:complexType name="appCategoriesType">
                <xs:sequence>
@@ -60,5 +63,25 @@
                <xs:attribute name="term" type="xs:string" />
                <xs:attribute name="label" type="xs:string" />
        </xs:complexType>
+
+       <!--  -->
+       <xs:element name="edited" type="atom:atomDateConstruct" />
+       <xs:complexType name="appControlType">
+               <xs:sequence>
+                       <xs:element name="draft" type="app:enumYesNo" 
minOccurs="0"
+                               maxOccurs="1" />
+                       <xs:any minOccurs="0" maxOccurs="unbounded" 
processContents="lax"
+                               namespace="##other" />
+               </xs:sequence>
+       </xs:complexType>
+       <xs:element name="control" type="app:appControlType" />
+
+       <!-- rfc5023 13.1.1 -->
+       <xs:simpleType name="enumYesNo">
+               <xs:restriction base="xs:string">
+                       <xs:enumeration value="yes" />
+                       <xs:enumeration value="no" />
+               </xs:restriction>
+       </xs:simpleType>
 </xs:schema>
-<!-- EOF -->
+       <!-- EOF -->

Modified: 
incubator/chemistry/trunk/chemistry/chemistry-ws/src/main/resources/wsdl/ATOM.xsd
URL: 
http://svn.apache.org/viewvc/incubator/chemistry/trunk/chemistry/chemistry-ws/src/main/resources/wsdl/ATOM.xsd?rev=825570&r1=825569&r2=825570&view=diff
==============================================================================
--- 
incubator/chemistry/trunk/chemistry/chemistry-ws/src/main/resources/wsdl/ATOM.xsd
 (original)
+++ 
incubator/chemistry/trunk/chemistry/chemistry-ws/src/main/resources/wsdl/ATOM.xsd
 Thu Oct 15 17:12:24 2009
@@ -8,11 +8,15 @@
        xmlns:atom="http://www.w3.org/2005/Atom"; 
xmlns:xhtml="http://www.w3.org/1999/xhtml";
        xmlns:cmis="http://docs.oasis-open.org/ns/cmis/core/200901"; 
xmlns:xml="http://www.w3.org/XML/1998/namespace";
        xmlns:jaxb="http://java.sun.com/xml/ns/jaxb"; 
xmlns:xjc="http://java.sun.com/xml/ns/jaxb/xjc";
-       jaxb:extensionBindingPrefixes="xjc" jaxb:version="2.1" version="0.61">
+       xmlns:cmisra="http://docs.oasis-open.org/ns/cmis/restatom/200901";
+       jaxb:extensionBindingPrefixes="xjc" jaxb:version="2.1" version="0.62d">
+
        <xs:import namespace="http://www.w3.org/XML/1998/namespace";
                schemaLocation="xml.xsd" />
        <xs:import namespace="http://docs.oasis-open.org/ns/cmis/core/200901";
                schemaLocation="CMIS-Core.xsd" />
+       <xs:import 
namespace="http://docs.oasis-open.org/ns/cmis/restatom/200901";
+               schemaLocation="CMIS-RestAtom.xsd" />
 
        <!-- Common attributes -->
        <xs:attributeGroup name="atomCommonAttributes">
@@ -86,27 +90,30 @@
        <xs:element name="feed" type="atom:feedType"></xs:element>
        <xs:complexType name="feedType">
                <xs:sequence>
-                       <xs:element ref="atom:author" minOccurs="0" 
maxOccurs="unbounded" />
-                       <xs:element ref="atom:category" minOccurs="0" 
maxOccurs="unbounded" />
-                       <xs:element ref="atom:contributor" minOccurs="0"
-                               maxOccurs="1" />
-                       <xs:element ref="atom:generator" minOccurs="0" 
maxOccurs="unbounded" />
-                       <xs:element ref="atom:icon" minOccurs="0" 
maxOccurs="unbounded" />
-                       <xs:element ref="atom:id" minOccurs="1" maxOccurs="1" />
-                       <xs:element ref="atom:link" minOccurs="0" 
maxOccurs="unbounded" />
-                       <xs:element ref="atom:logo" minOccurs="0" maxOccurs="1" 
/>
-                       <xs:element ref="atom:rights" minOccurs="0" 
maxOccurs="1" />
-                       <xs:element ref="atom:subtitle" minOccurs="0" 
maxOccurs="1" />
-                       <xs:element ref="atom:title" minOccurs="1" 
maxOccurs="1" />
-                       <xs:element ref="atom:updated" minOccurs="1" 
maxOccurs="1" />
-                       <xs:element minOccurs="0" maxOccurs="unbounded" 
ref="atom:entry" />
+                       <xs:choice maxOccurs="unbounded">
+                               <xs:annotation>
+                                       <xs:appinfo>
+                                               <jaxb:property name="items" />
+                                       </xs:appinfo>
+                               </xs:annotation>
+                               <xs:element ref="atom:author" />
+                               <xs:element ref="atom:category" />
+                               <xs:element ref="atom:contributor" />
+                               <xs:element ref="atom:generator" />
+                               <xs:element ref="atom:icon" />
+                               <xs:element ref="atom:id" />
+                               <xs:element ref="atom:link" />
+                               <xs:element ref="atom:logo" />
+                               <xs:element ref="atom:rights" />
+                               <xs:element ref="atom:subtitle" />
+                               <xs:element ref="atom:title" />
+                               <xs:element ref="atom:updated" />
+                       </xs:choice>
 
-                       <!-- Start Atom's extension here -->
-                       <xs:element ref="cmis:hasMoreItems" minOccurs="1"
-                               maxOccurs="1" />
-                               
                        <!--  original atom extension element -->
                        <xs:group ref="atom:extensionElement" />
+
+                       <xs:element minOccurs="0" maxOccurs="unbounded" 
ref="atom:entry" />
                </xs:sequence>
                <xs:attributeGroup ref="atom:atomCommonAttributes" />
        </xs:complexType>
@@ -115,51 +122,28 @@
        </xs:element>
        <xs:complexType name="entryType">
                <xs:sequence>
-                       <xs:sequence>
-                               <xs:element ref="atom:author" minOccurs="0" 
maxOccurs="unbounded" />
-                               <xs:element ref="atom:category" minOccurs="0" 
maxOccurs="unbounded" />
-                               <xs:element ref="atom:content" minOccurs="0" 
maxOccurs="1" />
-                               <xs:element ref="atom:contributor" minOccurs="0"
-                                       maxOccurs="1" />
-                               <xs:element ref="atom:id" minOccurs="1" 
maxOccurs="1" />
-                               <xs:element ref="atom:link" minOccurs="0" 
maxOccurs="unbounded" />
-                               <xs:element ref="atom:published" minOccurs="0" 
maxOccurs="1" />
-                               <xs:element ref="atom:rights" minOccurs="0" 
maxOccurs="1" />
-                               <xs:element ref="atom:source" minOccurs="0" 
maxOccurs="1" />
-                               <xs:element ref="atom:summary" minOccurs="0" 
maxOccurs="1" />
-                               <xs:element ref="atom:title" minOccurs="1" 
maxOccurs="1" />
-                               <xs:element ref="atom:updated" minOccurs="1" 
maxOccurs="1" />
-                                       
-                                       
-                                <!-- CMIS type, optional if not CMIS  -->
-                               <xs:choice minOccurs="0" maxOccurs="1">
-                                       <xs:choice minOccurs="0" maxOccurs="1">
-                                               <xs:annotation>
-                                                       <xs:appinfo>
-                                                               <jaxb:property 
name="type" />
-                                                       </xs:appinfo>
-                                               </xs:annotation>
-                                               <xs:element 
ref="cmis:documentType" />
-                                               <xs:element 
ref="cmis:folderType" />
-                                               <xs:element 
ref="cmis:policyType" />
-                                               <xs:element 
ref="cmis:relationshipType" />
-                                       </xs:choice>
+                       <xs:choice maxOccurs="unbounded">
+                               <xs:annotation>
+                                       <xs:appinfo>
+                                               <jaxb:property name="items" />
+                                       </xs:appinfo>
+                               </xs:annotation>
+                               <xs:element ref="atom:author" />
+                               <xs:element ref="atom:category" />
+                               <xs:element ref="atom:content" />
+                               <xs:element ref="atom:contributor" />
+                               <xs:element ref="atom:id" />
+                               <xs:element ref="atom:link" />
+                               <xs:element ref="atom:published" />
+                               <xs:element ref="atom:rights" />
+                               <xs:element ref="atom:source" />
+                               <xs:element ref="atom:summary" />
+                               <xs:element ref="atom:title" />
+                               <xs:element ref="atom:updated" />
+                       </xs:choice>
 
-                                       <!-- CMIS object, optional if not CMIS  
-->
-                                       <xs:element ref="cmis:object" 
minOccurs="0" maxOccurs="1" />
-                               </xs:choice>                            
-                               
-                               <!-- This is necessary for nested entries such 
as descendants -->
-                               <xs:element ref="atom:entry" minOccurs="0" 
maxOccurs="unbounded" />
-                               
-                               <!-- syntactic sugar -->
-                               <xs:element ref="cmis:terminator" minOccurs="1"
-                                       maxOccurs="1" />
-                               
-                               
-                               <!-- Normal ATOM extension element -->
-                               <xs:group ref="atom:extensionElement" />
-                       </xs:sequence>
+                       <!-- Normal ATOM extension element -->
+                       <xs:group ref="atom:extensionElement" />
                </xs:sequence>
                <xs:attributeGroup ref="atom:atomCommonAttributes" />
        </xs:complexType>
@@ -277,11 +261,12 @@
                        <xs:documentation>
                                The "atom:link" element defines a reference 
from an
                                entry or feed to a Web resource. This 
specification
-                               assigns no meaning to the content (if any) of 
this
+                               assigns no
+                               meaning to the content (if any) of this
                                element.
                        </xs:documentation>
                </xs:annotation>
-               
+
                <xs:complexType>
                        <xs:complexContent>
                                <xs:extension base="atom:undefinedContent">
@@ -292,7 +277,6 @@
                                        <xs:attribute name="hreflang" 
type="atom:atomLanguageTag" />
                                        <xs:attribute name="title" />
                                        <xs:attribute name="length" />
-                                       <xs:attribute ref="cmis:id" 
use="optional" />
                                </xs:extension>
                        </xs:complexContent>
                </xs:complexType>
@@ -305,7 +289,8 @@
        <xs:element name="source">
                <xs:annotation>
                        <xs:documentation>
-                               atom:source is used to preserve metadata of a 
feed when
+                               atom:source is used to preserve metadata of a 
feed
+                               when
                                an entry is copied from a feed to another feed.
                        </xs:documentation>
                </xs:annotation>
@@ -338,7 +323,8 @@
                        <xs:documentation>
                                The "atom:title" element is a Text construct 
that
                                conveys a human- readable title for an entry or 
feed.
-                               atomTitle = element atom:title { 
atomTextConstruct }.
+                               atomTitle =
+                               element atom:title { atomTextConstruct }.
                        </xs:documentation>
                </xs:annotation>
        </xs:element>
@@ -348,11 +334,14 @@
                        <xs:documentation>
                                The "atom:updated" element is a Date construct
                                indicating the most recent instant in time when 
an entry
-                               or feed was modified in a way the publisher 
considers
-                               significant. Therefore, not all modifications
+                               or feed was
+                               modified in a way the publisher considers
+                               significant. Therefore, not
+                               all modifications
                                necessarily result in a changed atom:updated 
value.
                                atomUpdated = element atom:updated { 
atomDateConstruct
-                               }. Publishers MAY change the value of this 
element over
+                               }. Publishers
+                               MAY change the value of this element over
                                time.
                        </xs:documentation>
                </xs:annotation>
@@ -386,6 +375,7 @@
                        <xs:pattern value="....@.+" />
                </xs:restriction>
        </xs:simpleType>
+
        <!-- Simple Extension -->
        <xs:group name="extensionElement">
                <xs:sequence>
@@ -410,8 +400,30 @@
        <xs:attributeGroup name="undefinedAttribute">
                <xs:anyAttribute namespace="##other" processContents="lax" />
        </xs:attributeGroup>
-       <xs:complexType name="undefinedContent" mixed="true">
-               <xs:group minOccurs="0" maxOccurs="unbounded" 
ref="atom:anyForeignElement" />
+       <xs:complexType name="undefinedContent">
+               <xs:sequence>
+                       <xs:any namespace="##other" processContents="lax" 
minOccurs="0"
+                               maxOccurs="unbounded">
+                               <xs:annotation>
+                                       <xs:appinfo>
+                                               <jaxb:property name='anyOther' 
/>
+                                       </xs:appinfo>
+                               </xs:annotation>
+                       </xs:any>
+                       <xs:any namespace="##local" processContents="lax" 
minOccurs="0"
+                               maxOccurs="unbounded">
+                               <xs:annotation>
+                                       <xs:appinfo>
+                                               <jaxb:property name='anyLocal' 
/>
+                                       </xs:appinfo>
+                               </xs:annotation>
+                       </xs:any>
+               </xs:sequence>
+
+               <!--
+                       <xs:group minOccurs="0" maxOccurs="unbounded"
+                       ref="atom:anyForeignElement" />
+               -->
        </xs:complexType>
        <xs:group name="anyElement">
                <xs:sequence>
@@ -419,10 +431,10 @@
                </xs:sequence>
        </xs:group>
        <xs:group name="anyForeignElement">
-               <xs:choice>
+               <xs:sequence>
                        <xs:any namespace="##other" processContents="lax" />
                        <xs:any namespace="##local" processContents="lax" />
-               </xs:choice>
+               </xs:sequence>
        </xs:group>
        <!-- XHTML -->
        <xs:group name="anyXHTML">
@@ -432,4 +444,4 @@
                </xs:sequence>
        </xs:group>
 </xs:schema>
-<!-- EOF -->
\ No newline at end of file
+       <!-- EOF -->


Reply via email to