chemistry-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fguilla...@apache.org
Subject svn commit: r830511 [1/4] - in /incubator/chemistry/trunk/chemistry: chemistry-api/src/main/java/org/apache/chemistry/ chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/ chemistry-atompub-client/src/main/java/org/apache/chemist...
Date Wed, 28 Oct 2009 11:54:27 GMT
Author: fguillaume
Date: Wed Oct 28 11:54:22 2009
New Revision: 830511

URL: http://svn.apache.org/viewvc?rev=830511&view=rev
Log:
Update to CMIS 1.0 CD 4 (work in progress, did most of the list from CMIS-51)

Added:
    incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/test/java/org/apache/chemistry/atompub/client/ServiceDocumentReaderTest.java   (with props)
    incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/test/resources/entry.xml
      - copied, changed from r829752, incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/test/resources/feedentry.xml
    incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/test/resources/service-document.xml   (with props)
    incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/test/resources/types-feed.xml
      - copied, changed from r829752, incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/test/resources/feed-types.xml
Removed:
    incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/test/resources/feed-types.xml
    incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/test/resources/feedentry.xml
Modified:
    incubator/chemistry/trunk/chemistry/chemistry-api/src/main/java/org/apache/chemistry/AllowableAction.java
    incubator/chemistry/trunk/chemistry/chemistry-api/src/main/java/org/apache/chemistry/CMIS.java
    incubator/chemistry/trunk/chemistry/chemistry-api/src/main/java/org/apache/chemistry/Property.java
    incubator/chemistry/trunk/chemistry/chemistry-api/src/main/java/org/apache/chemistry/PropertyType.java
    incubator/chemistry/trunk/chemistry/chemistry-api/src/main/java/org/apache/chemistry/RepositoryCapabilities.java
    incubator/chemistry/trunk/chemistry/chemistry-api/src/main/java/org/apache/chemistry/RepositoryEntry.java
    incubator/chemistry/trunk/chemistry/chemistry-api/src/main/java/org/apache/chemistry/SPI.java
    incubator/chemistry/trunk/chemistry/chemistry-api/src/main/java/org/apache/chemistry/Updatability.java
    incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/APPConnection.java
    incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/APPRepository.java
    incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/APPRepositoryCapabilities.java
    incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/APPRepositoryInfo.java
    incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/APPType.java
    incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/TypeEntryReader.java
    incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/stax/PropertyIterator.java
    incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/stax/ServiceDocumentReader.java
    incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/test/java/org/apache/chemistry/atompub/client/TypeFeedReaderTest.java
    incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/test/java/org/apache/chemistry/atompub/client/stax/TestPropertyIterator.java
    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/CMISProvider.java
    incubator/chemistry/trunk/chemistry/chemistry-atompub-server/src/main/java/org/apache/chemistry/atompub/server/CMISServiceResponse.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/AtomPub.java
    incubator/chemistry/trunk/chemistry/chemistry-atompub/src/main/java/org/apache/chemistry/atompub/AtomPubCMIS.java
    incubator/chemistry/trunk/chemistry/chemistry-atompub/src/main/java/org/apache/chemistry/atompub/ValueAdapter.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/java/org/apache/chemistry/impl/base/BaseRepository.java
    incubator/chemistry/trunk/chemistry/chemistry-commons/src/main/java/org/apache/chemistry/impl/simple/SimpleConnection.java
    incubator/chemistry/trunk/chemistry/chemistry-commons/src/main/java/org/apache/chemistry/impl/simple/SimpleObject.java
    incubator/chemistry/trunk/chemistry/chemistry-commons/src/main/java/org/apache/chemistry/impl/simple/SimpleRepository.java
    incubator/chemistry/trunk/chemistry/chemistry-commons/src/main/java/org/apache/chemistry/impl/simple/SimpleTypeManager.java
    incubator/chemistry/trunk/chemistry/chemistry-commons/src/test/java/org/apache/chemistry/impl/simple/TestSimpleRepository.java
    incubator/chemistry/trunk/chemistry/chemistry-commons/src/test/java/org/apache/chemistry/xml/stax/TestXMLWriter.java
    incubator/chemistry/trunk/chemistry/chemistry-commons/src/test/resources/xmlwriter-output.xml
    incubator/chemistry/trunk/chemistry/chemistry-jcr/src/main/java/org/apache/chemistry/jcr/JcrConnection.java
    incubator/chemistry/trunk/chemistry/chemistry-jcr/src/main/java/org/apache/chemistry/jcr/JcrRepository.java
    incubator/chemistry/trunk/chemistry/chemistry-tests/src/main/java/org/apache/chemistry/test/BasicTestCase.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/CMIS-RestAtom.xsd
    incubator/chemistry/trunk/chemistry/chemistry-ws/src/main/resources/wsdl/CMISWS-Service.wsdl
    incubator/chemistry/trunk/chemistry/chemistry-ws/src/main/resources/wsdl/xml.xsd

Modified: incubator/chemistry/trunk/chemistry/chemistry-api/src/main/java/org/apache/chemistry/AllowableAction.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/chemistry/chemistry-api/src/main/java/org/apache/chemistry/AllowableAction.java?rev=830511&r1=830510&r2=830511&view=diff
==============================================================================
--- incubator/chemistry/trunk/chemistry/chemistry-api/src/main/java/org/apache/chemistry/AllowableAction.java (original)
+++ incubator/chemistry/trunk/chemistry/chemistry-api/src/main/java/org/apache/chemistry/AllowableAction.java Wed Oct 28 11:54:22 2009
@@ -39,7 +39,7 @@
 
     public static final QName CAN_GET_PROPERTIES = CMISName("canGetProperties");
 
-    public static final QName CAN_GET_RELATIONSHIPS = CMISName("canGetRelationships");
+    public static final QName CAN_GET_OBJECT_RELATIONSHIPS = CMISName("canGetRelationships");
 
     public static final QName CAN_GET_OBJECT_PARENTS = CMISName("canGetObjectParents");
 
@@ -47,6 +47,8 @@
 
     public static final QName CAN_GET_DESCENDANTS = CMISName("canGetDescendants");
 
+    public static final QName CAN_GET_FOLDER_TREE = CMISName("canGetFolderTree");
+
     public static final QName CAN_MOVE_OBJECT = CMISName("canMoveObject");
 
     public static final QName CAN_DELETE_CONTENT_STREAM = CMISName("canDeleteContentStream");
@@ -95,10 +97,11 @@
             CAN_DELETE_OBJECT, //
             CAN_UPDATE_PROPERTIES, //
             CAN_GET_PROPERTIES, //
-            CAN_GET_RELATIONSHIPS, //
+            CAN_GET_OBJECT_RELATIONSHIPS, //
             CAN_GET_OBJECT_PARENTS, //
             CAN_GET_FOLDER_PARENT, //
             CAN_GET_DESCENDANTS, //
+            CAN_GET_FOLDER_TREE, //
             CAN_MOVE_OBJECT, //
             CAN_DELETE_CONTENT_STREAM, //
             CAN_CHECK_OUT, //
@@ -177,11 +180,11 @@
 
     public static final String REMOVE_FROM_FOLDER_FOLDER = "canRemoveFromFolder.Folder";
 
-    public static final String CHECK_OUT_DOCUMENT = "canCheckout.Document"; // TODO-0.63
+    public static final String CHECK_OUT_DOCUMENT = "canCheckOut.Document";
 
-    public static final String CANCEL_CHECK_OUT_DOCUMENT = "canCancelCheckout.Document"; // TODO-0.63
+    public static final String CANCEL_CHECK_OUT_DOCUMENT = "canCancelCheckOut.Document";
 
-    public static final String CHECK_IN_DOCUMENT = "canCheckin.Document"; // TODO-0.63
+    public static final String CHECK_IN_DOCUMENT = "canCheckIn.Document";
 
     public static final String GET_ALL_VERSIONS_VERSIONSERIES = "canGetAllVersions.VersionSeries";
 

Modified: incubator/chemistry/trunk/chemistry/chemistry-api/src/main/java/org/apache/chemistry/CMIS.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/chemistry/chemistry-api/src/main/java/org/apache/chemistry/CMIS.java?rev=830511&r1=830510&r2=830511&view=diff
==============================================================================
--- incubator/chemistry/trunk/chemistry/chemistry-api/src/main/java/org/apache/chemistry/CMIS.java (original)
+++ incubator/chemistry/trunk/chemistry/chemistry-api/src/main/java/org/apache/chemistry/CMIS.java Wed Oct 28 11:54:22 2009
@@ -29,7 +29,7 @@
 
     public static final String CMIS_NS_BASE = "http://docs.oasis-open.org/ns/cmis/";
 
-    public static final String CMIS_NS = CMIS_NS_BASE + "core/200901";
+    public static final String CMIS_NS = CMIS_NS_BASE + "core/200908/";
 
     public static final String CMIS_PREFIX = "cmis";
 
@@ -41,8 +41,6 @@
 
     public static final QName REPOSITORY_NAME = CMISName("repositoryName");
 
-    public static final QName REPOSITORY_RELATIONSHIP = CMISName("repositoryRelationship");
-
     public static final QName REPOSITORY_DESCRIPTION = CMISName("repositoryDescription");
 
     public static final QName VENDOR_NAME = CMISName("vendorName");
@@ -53,7 +51,9 @@
 
     public static final QName ROOT_FOLDER_ID = CMISName("rootFolderId");
 
-    public static final QName LATEST_CHANGE_LOG_TOKEN = CMISName("latestChangeToken"); // TODO-0.63
+    public static final QName LATEST_CHANGE_LOG_TOKEN = CMISName("latestChangeLogToken");
+
+    public static final QName CHANGES_ON_TYPE = CMISName("changesOnType");
 
     public static final QName CAPABILITIES = CMISName("capabilities");
 
@@ -63,7 +63,7 @@
 
     public static final QName CAPABILITY_VERSION_SPECIFIC_FILING = CMISName("capabilityVersionSpecificFiling");
 
-    public static final QName CAPABILITY_PWC_UPDATEABLE = CMISName("capabilityPWCUpdateable");
+    public static final QName CAPABILITY_PWC_UPDATABLE = CMISName("capabilityPWCUpdatable");
 
     public static final QName CAPABILITY_PWC_SEARCHABLE = CMISName("capabilityPWCSearchable");
 
@@ -71,6 +71,8 @@
 
     public static final QName CAPABILITY_CAN_GET_DESCENDANTS = CMISName("capabilityGetDescendants");
 
+    public static final QName CAPABILITY_CAN_GET_FOLDER_TREE = CMISName("capabilityGetFolderTree");
+
     public static final QName CAPABILITY_CONTENT_STREAM_UPDATABILITY = CMISName("capabilityContentStreamUpdatability");
 
     public static final QName CAPABILITY_QUERY = CMISName("capabilityQuery");
@@ -81,8 +83,6 @@
 
     public static final QName CAPABILITY_CHANGES = CMISName("capabilityChanges");
 
-    public static final QName CAPABILITY_CHANGES_ON_TYPE = CMISName("capabilityChangesOnType");
-
     public static final QName CAPABILITY_ACL = CMISName("capabilityACL");
 
     public static final QName CHANGES_INCOMPLETE = CMISName("changesIncomplete");
@@ -105,7 +105,7 @@
 
     public static final QName REPOSITORY_SPECIFIC_INFORMATION = CMISName("repositorySpecificInformation");
 
-    public static final QName BASE_TYPE_ID = CMISName("baseTypeId");
+    public static final QName BASE_ID = CMISName("baseId");
 
     public static final QName ID = CMISName("id");
 
@@ -131,7 +131,7 @@
 
     public static final QName CONTROLLABLE_ACL = CMISName("controllableACL");
 
-    public static final QName FULLTEXT_INDEXED = CMISName("fulltextindexed");
+    public static final QName FULLTEXT_INDEXED = CMISName("fulltextIndexed");
 
     public static final QName VERSIONABLE = CMISName("versionable");
 
@@ -153,12 +153,8 @@
 
     public static final QName PROPERTY_ID_DEFINITION = CMISName("propertyIdDefinition");
 
-    public static final QName PROPERTY_XML_DEFINITION = CMISName("propertyXmlDefinition");
-
     public static final QName PROPERTY_HTML_DEFINITION = CMISName("propertyHtmlDefinition");
 
-    public static final QName PROPERTY_XHTML_DEFINITION = CMISName("propertyXhtmlDefinition");
-
     public static final QName PROPERTY_TYPE = CMISName("propertyType");
 
     public static final QName CARDINALITY = CMISName("cardinality");
@@ -193,8 +189,6 @@
 
     public static final QName PROPERTY_HTML = CMISName("propertyHtml");
 
-    public static final QName PROPERTY_XHTML = CMISName("propertyXhtml");
-
     public static final QName VALUE = CMISName("value");
 
     public static final QName ALLOWABLE_ACTIONS = CMISName("allowableActions");
@@ -219,10 +213,10 @@
 
     // no namespace for attributes
 
-    public static final QName PDID = new QName("pdid");
+    public static final QName PDID = new QName("propertyDefinitionId");
 
-    public static final QName LOCALNAME = new QName("localname");
+    public static final QName LOCAL_NAME_NONS = new QName("localName");
 
-    public static final QName DISPLAYNAME = new QName("displayname");
+    public static final QName DISPLAY_NAME_NONS = new QName("displayName");
 
 }

Modified: incubator/chemistry/trunk/chemistry/chemistry-api/src/main/java/org/apache/chemistry/Property.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/chemistry/chemistry-api/src/main/java/org/apache/chemistry/Property.java?rev=830511&r1=830510&r2=830511&view=diff
==============================================================================
--- incubator/chemistry/trunk/chemistry/chemistry-api/src/main/java/org/apache/chemistry/Property.java (original)
+++ incubator/chemistry/trunk/chemistry/chemistry-api/src/main/java/org/apache/chemistry/Property.java Wed Oct 28 11:54:22 2009
@@ -27,79 +27,79 @@
      * ----- Object -----
      */
 
-    String ID = "cmis:ObjectId";
+    String ID = "cmis:objectId";
 
-    String TYPE_ID = "cmis:ObjectTypeId";
+    String TYPE_ID = "cmis:objectTypeId";
 
-    String BASE_TYPE_ID = "cmis:BaseTypeId";
+    String BASE_TYPE_ID = "cmis:baseTypeId";
 
-    String NAME = "cmis:Name";
+    String NAME = "cmis:name";
 
-    String CREATED_BY = "cmis:CreatedBy";
+    String CREATED_BY = "cmis:createdBy";
 
-    String CREATION_DATE = "cmis:CreationDate";
+    String CREATION_DATE = "cmis:creationDate";
 
-    String LAST_MODIFIED_BY = "cmis:LastModifiedBy";
+    String LAST_MODIFIED_BY = "cmis:lastModifiedBy";
 
-    String LAST_MODIFICATION_DATE = "cmis:LastModificationDate";
+    String LAST_MODIFICATION_DATE = "cmis:lastModificationDate";
 
-    String CHANGE_TOKEN = "cmis:ChangeToken";
+    String CHANGE_TOKEN = "cmis:changeToken";
 
     /*
      * ----- Document -----
      */
 
-    String IS_IMMUTABLE = "cmis:IsImmutable";
+    String IS_IMMUTABLE = "cmis:isImmutable";
 
-    String IS_LATEST_VERSION = "cmis:IsLatestVersion";
+    String IS_LATEST_VERSION = "cmis:isLatestVersion";
 
-    String IS_MAJOR_VERSION = "cmis:IsMajorVersion";
+    String IS_MAJOR_VERSION = "cmis:isMajorVersion";
 
-    String IS_LATEST_MAJOR_VERSION = "cmis:IsLatestMajorVersion";
+    String IS_LATEST_MAJOR_VERSION = "cmis:isLatestMajorVersion";
 
-    String VERSION_LABEL = "cmis:VersionLabel";
+    String VERSION_LABEL = "cmis:versionLabel";
 
-    String VERSION_SERIES_ID = "cmis:VersionSeriesId";
+    String VERSION_SERIES_ID = "cmis:versionSeriesId";
 
-    String IS_VERSION_SERIES_CHECKED_OUT = "cmis:IsVersionSeriesCheckedOut";
+    String IS_VERSION_SERIES_CHECKED_OUT = "cmis:isVersionSeriesCheckedOut";
 
-    String VERSION_SERIES_CHECKED_OUT_BY = "cmis:VersionSeriesCheckedOutBy";
+    String VERSION_SERIES_CHECKED_OUT_BY = "cmis:versionSeriesCheckedOutBy";
 
-    String VERSION_SERIES_CHECKED_OUT_ID = "cmis:VersionSeriesCheckedOutId";
+    String VERSION_SERIES_CHECKED_OUT_ID = "cmis:versionSeriesCheckedOutId";
 
-    String CHECK_IN_COMMENT = "cmis:CheckinComment"; // TODO-0.63
+    String CHECK_IN_COMMENT = "cmis:checkinComment";
 
-    String CONTENT_STREAM_LENGTH = "cmis:ContentStreamLength";
+    String CONTENT_STREAM_LENGTH = "cmis:contentStreamLength";
 
-    String CONTENT_STREAM_MIME_TYPE = "cmis:ContentStreamMimeType";
+    String CONTENT_STREAM_MIME_TYPE = "cmis:contentStreamMimeType";
 
-    String CONTENT_STREAM_FILE_NAME = "cmis:ContentStreamFileName";
+    String CONTENT_STREAM_FILE_NAME = "cmis:contentStreamFileName";
 
-    String CONTENT_STREAM_ID = "cmis:ContentStreamId";
+    String CONTENT_STREAM_ID = "cmis:contentStreamId";
 
     /*
      * ----- Folder -----
      */
 
-    String PARENT_ID = "cmis:ParentId";
+    String PARENT_ID = "cmis:parentId";
 
-    String PATH = "cmis:PathName"; // TODO-0.63
+    String PATH = "cmis:path";
 
-    String ALLOWED_CHILD_OBJECT_TYPE_IDS = "cmis:AllowedChildObjectTypeIds";
+    String ALLOWED_CHILD_OBJECT_TYPE_IDS = "cmis:allowedChildObjectTypeIds";
 
     /*
      * ----- Relationship -----
      */
 
-    String SOURCE_ID = "cmis:SourceId";
+    String SOURCE_ID = "cmis:sourceId";
 
-    String TARGET_ID = "cmis:TargetId";
+    String TARGET_ID = "cmis:targetId";
 
     /*
      * ----- Policy -----
      */
 
-    String POLICY_TEXT = "cmis:PolicyText";
+    String POLICY_TEXT = "cmis:policyText";
 
     /**
      * The property definition.

Modified: incubator/chemistry/trunk/chemistry/chemistry-api/src/main/java/org/apache/chemistry/PropertyType.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/chemistry/chemistry-api/src/main/java/org/apache/chemistry/PropertyType.java?rev=830511&r1=830510&r2=830511&view=diff
==============================================================================
--- incubator/chemistry/trunk/chemistry/chemistry-api/src/main/java/org/apache/chemistry/PropertyType.java (original)
+++ incubator/chemistry/trunk/chemistry/chemistry-api/src/main/java/org/apache/chemistry/PropertyType.java Wed Oct 28 11:54:22 2009
@@ -41,11 +41,7 @@
 
     public static final int ID_ORD = 7;
 
-    public static final int XML_ORD = 8;
-
-    public static final int HTML_ORD = 9;
-
-    public static final int XHTML_ORD = 10;
+    public static final int HTML_ORD = 8;
 
     private static final Map<String, PropertyType> all = new HashMap<String, PropertyType>();
 
@@ -92,23 +88,11 @@
             ID_ORD, String.class));
 
     /**
-     * An XML property, represented as a String.
-     */
-    public static final PropertyType XML = register(new PropertyType("xml",
-            XML_ORD, String.class));
-
-    /**
      * An HTML property, represented as a String.
      */
     public static final PropertyType HTML = register(new PropertyType("html",
             HTML_ORD, String.class));
 
-    /**
-     * An XHTML property, represented as a String.
-     */
-    public static final PropertyType XHTML = register(new PropertyType("xhtml",
-            XHTML_ORD, String.class));
-
     private final String name;
 
     private final int ordinal;

Modified: incubator/chemistry/trunk/chemistry/chemistry-api/src/main/java/org/apache/chemistry/RepositoryCapabilities.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/chemistry/chemistry-api/src/main/java/org/apache/chemistry/RepositoryCapabilities.java?rev=830511&r1=830510&r2=830511&view=diff
==============================================================================
--- incubator/chemistry/trunk/chemistry/chemistry-api/src/main/java/org/apache/chemistry/RepositoryCapabilities.java (original)
+++ incubator/chemistry/trunk/chemistry/chemistry-api/src/main/java/org/apache/chemistry/RepositoryCapabilities.java Wed Oct 28 11:54:22 2009
@@ -58,11 +58,16 @@
 
     /**
      * Ability to enumerate the descendants of a folder via
-     * {@link SPI#getDescendants} and {@link SPI#getFolderTree}.
+     * {@link SPI#getDescendants}.
      */
     boolean hasGetDescendants();
 
     /**
+     * Ability to retrieve the folder tree via {@link SPI#getFolderTree}.
+     */
+    boolean hasGetFolderTree();
+
+    /**
      * Ability to update the content stream anytime, or only on the PWC.
      */
     boolean isContentStreamUpdatableAnytime();

Modified: incubator/chemistry/trunk/chemistry/chemistry-api/src/main/java/org/apache/chemistry/RepositoryEntry.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/chemistry/chemistry-api/src/main/java/org/apache/chemistry/RepositoryEntry.java?rev=830511&r1=830510&r2=830511&view=diff
==============================================================================
--- incubator/chemistry/trunk/chemistry/chemistry-api/src/main/java/org/apache/chemistry/RepositoryEntry.java (original)
+++ incubator/chemistry/trunk/chemistry/chemistry-api/src/main/java/org/apache/chemistry/RepositoryEntry.java Wed Oct 28 11:54:22 2009
@@ -36,16 +36,6 @@
     String getName();
 
     /**
-     * The relationship name to another repository.
-     * <p>
-     * This returns a value only when this basic info was returned by
-     * {@link RepositoryInfo#getRelatedRepositories}.
-     *
-     * @return a relationship name, or {@code null}
-     */
-    String getRelationshipName();
-
-    /**
      * An optional repository-specific URI pointing to the repository's web
      * interface.
      *

Modified: incubator/chemistry/trunk/chemistry/chemistry-api/src/main/java/org/apache/chemistry/SPI.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/chemistry/chemistry-api/src/main/java/org/apache/chemistry/SPI.java?rev=830511&r1=830510&r2=830511&view=diff
==============================================================================
--- incubator/chemistry/trunk/chemistry/chemistry-api/src/main/java/org/apache/chemistry/SPI.java (original)
+++ incubator/chemistry/trunk/chemistry/chemistry-api/src/main/java/org/apache/chemistry/SPI.java Wed Oct 28 11:54:22 2009
@@ -609,7 +609,7 @@
      * <p>
      * The return value hasMoreItems is filled if {@code maxItems > 0}.
      * <p>
-     * The return value lastChangeLogToken contains the change token of the last
+     * The return value latestChangeLogToken contains the change token of the last
      * change event returned by the iterator.
      *
      * @param changeLogToken the change log token, or {@code null}
@@ -624,7 +624,7 @@
      */
     Iterator<ObjectEntry> getChangeLog(String changeLogToken,
             boolean includeProperties, int maxItems, boolean[] hasMoreItems,
-            String[] lastChangeLogToken);
+            String[] latestChangeLogToken);
 
     /*
      * ----- Versioning Services -----

Modified: incubator/chemistry/trunk/chemistry/chemistry-api/src/main/java/org/apache/chemistry/Updatability.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/chemistry/chemistry-api/src/main/java/org/apache/chemistry/Updatability.java?rev=830511&r1=830510&r2=830511&view=diff
==============================================================================
--- incubator/chemistry/trunk/chemistry/chemistry-api/src/main/java/org/apache/chemistry/Updatability.java (original)
+++ incubator/chemistry/trunk/chemistry/chemistry-api/src/main/java/org/apache/chemistry/Updatability.java Wed Oct 28 11:54:22 2009
@@ -56,7 +56,14 @@
      * either made on a Private Working Copy object or made using a "check in"
      * service
      */
-    WHEN_CHECKED_OUT("whencheckedout");
+    WHEN_CHECKED_OUT("whencheckedout"),
+
+    /**
+     * Property is updatable during create.
+     * <p>
+     * A "on create" property is only updateable during the create operation.
+     */
+    ON_CREATE("oncreate");
 
     private final String value;
 

Modified: incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/APPConnection.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/APPConnection.java?rev=830511&r1=830510&r2=830511&view=diff
==============================================================================
--- incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/APPConnection.java (original)
+++ incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/APPConnection.java Wed Oct 28 11:54:22 2009
@@ -341,7 +341,7 @@
             return ((APPObjectEntry) objectId);
         }
         String href;
-        URITemplate uriTemplate = repository.getURITemplate(AtomPubCMIS.URITMPL_ENTRY_BY_ID);
+        URITemplate uriTemplate = repository.getURITemplate(AtomPubCMIS.URITMPL_OBJECT_BY_ID);
         if (uriTemplate != null) {
             // use entry-by-id URI template
             href = uriTemplate.template;
@@ -436,7 +436,7 @@
             throw new IllegalArgumentException("Path must not end with / : "
                     + path);
         }
-        URITemplate uriTemplate = repository.getURITemplate(AtomPubCMIS.URITMPL_FOLDER_BY_PATH);
+        URITemplate uriTemplate = repository.getURITemplate(AtomPubCMIS.URITMPL_OBJECT_BY_PATH);
         if (uriTemplate == null) {
             throw new UnsupportedOperationException("Cannot get object by path");
         }
@@ -556,9 +556,9 @@
 
     public Iterator<ObjectEntry> getChangeLog(String changeLogToken,
             boolean includeProperties, int maxItems, boolean[] hasMoreItems,
-            String[] lastChangeLogToken) {
+            String[] latestChangeLogToken) {
         hasMoreItems[0] = false;
-        lastChangeLogToken[0] = null;
+        latestChangeLogToken[0] = null;
         return Collections.<ObjectEntry> emptyList().iterator();
     }
 

Modified: incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/APPRepository.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/APPRepository.java?rev=830511&r1=830510&r2=830511&view=diff
==============================================================================
--- incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/APPRepository.java (original)
+++ incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/APPRepository.java Wed Oct 28 11:54:22 2009
@@ -128,10 +128,6 @@
         return typeManager.getTypes(typeId, depth, returnPropertyDefinitions);
     }
 
-    public String getRelationshipName() {
-        return info.getRelationshipName();
-    }
-
     public String getCollectionHref(String type) {
         return collections.get(type);
     }

Modified: incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/APPRepositoryCapabilities.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/APPRepositoryCapabilities.java?rev=830511&r1=830510&r2=830511&view=diff
==============================================================================
--- incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/APPRepositoryCapabilities.java (original)
+++ incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/APPRepositoryCapabilities.java Wed Oct 28 11:54:22 2009
@@ -48,6 +48,8 @@
 
     protected boolean hasGetDescendants;
 
+    protected boolean hasGetFolderTree;
+
     protected boolean isContentStreamUpdatableAnytime;
 
     protected boolean isPWCSearchable;
@@ -94,6 +96,10 @@
         return hasGetDescendants;
     }
 
+    public boolean hasGetFolderTree() {
+        return hasGetFolderTree;
+    }
+
     public boolean isContentStreamUpdatableAnytime() {
         return isContentStreamUpdatableAnytime;
     }
@@ -114,6 +120,10 @@
         this.hasGetDescendants = hasGetDescendants;
     }
 
+    public void setHasGetFolderTree(boolean hasGetFolderTree) {
+        this.hasGetFolderTree = hasGetFolderTree;
+    }
+
     public void setContentStreamUpdatableAnytime(
             boolean isContentStreamUpdatableAnytime) {
         this.isContentStreamUpdatableAnytime = isContentStreamUpdatableAnytime;

Modified: incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/APPRepositoryInfo.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/APPRepositoryInfo.java?rev=830511&r1=830510&r2=830511&view=diff
==============================================================================
--- incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/APPRepositoryInfo.java (original)
+++ incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/APPRepositoryInfo.java Wed Oct 28 11:54:22 2009
@@ -73,10 +73,6 @@
         return getString(CMIS.REPOSITORY_NAME.getLocalPart());
     }
 
-    public String getRelationshipName() {
-        return getString(CMIS.REPOSITORY_RELATIONSHIP.getLocalPart());
-    }
-
     public URI getThinClientURI() {
         String uri = getString(CMIS.THIN_CLIENT_URI.getLocalPart());
         try {

Modified: incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/APPType.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/APPType.java?rev=830511&r1=830510&r2=830511&view=diff
==============================================================================
--- incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/APPType.java (original)
+++ incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/APPType.java Wed Oct 28 11:54:22 2009
@@ -81,7 +81,7 @@
     @Override
     public BaseType getBaseType() {
         if (baseType == null) {
-            baseType = BaseType.get(map.get(CMIS.BASE_TYPE_ID.getLocalPart()));
+            baseType = BaseType.get(map.get(CMIS.BASE_ID.getLocalPart()));
         }
         return baseType;
     }

Modified: incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/TypeEntryReader.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/TypeEntryReader.java?rev=830511&r1=830510&r2=830511&view=diff
==============================================================================
--- incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/TypeEntryReader.java (original)
+++ incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/TypeEntryReader.java Wed Oct 28 11:54:22 2009
@@ -101,7 +101,7 @@
                     CMIS.LOCAL_NAME, //
                     CMIS.QUERY_NAME, //
                     CMIS.DISPLAY_NAME, //
-                    CMIS.BASE_TYPE_ID, //
+                    CMIS.BASE_ID, //
                     CMIS.PARENT_ID, //
                     CMIS.DESCRIPTION, //
                     CMIS.CREATABLE, //

Modified: incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/stax/PropertyIterator.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/stax/PropertyIterator.java?rev=830511&r1=830510&r2=830511&view=diff
==============================================================================
--- incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/stax/PropertyIterator.java (original)
+++ incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/stax/PropertyIterator.java Wed Oct 28 11:54:22 2009
@@ -57,7 +57,7 @@
             throw new XMLStreamException(
                     "Parse error. Invalid CMIS property at line: "
                             + reader.getLocation().getLineNumber()
-                            + ". No id specified");
+                            + ". No propertyDefinitionId specified");
         }
         ValueIterator vi = new ValueIterator(reader);
         if (!vi.hasNext()) {

Modified: incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/stax/ServiceDocumentReader.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/stax/ServiceDocumentReader.java?rev=830511&r1=830510&r2=830511&view=diff
==============================================================================
--- incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/stax/ServiceDocumentReader.java (original)
+++ incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/stax/ServiceDocumentReader.java Wed Oct 28 11:54:22 2009
@@ -75,7 +75,14 @@
                     QName name = reader.getName();
                     if (name.equals(AtomPub.APP_COLLECTION)) {
                         String href = reader.getAttributeValue("href");
-                        String type = reader.getAttributeValue(AtomPubCMIS.COLLECTION_TYPE.getLocalPart());
+                        String type = "";
+                        ChildrenNavigator nav = reader.getChildren();
+                        while (nav.next()) {
+                            QName n = reader.getName();
+                            if (n.equals(AtomPubCMIS.COLLECTION_TYPE)) {
+                                type = reader.getElementText();
+                            }
+                        }
                         addCollection(repo, href, type);
                     } else if (name.equals(AtomPubCMIS.REPOSITORY_INFO)) {
                         RepositoryInfo info = readRepositoryInfo(context,
@@ -114,13 +121,15 @@
                         caps.setAllVersionsSearchable(Boolean.parseBoolean(reader.getElementText()));
                     } else if (localName.equals(CMIS.CAPABILITY_CAN_GET_DESCENDANTS.getLocalPart())) {
                         caps.setHasGetDescendants(Boolean.parseBoolean(reader.getElementText()));
+                    } else if (localName.equals(CMIS.CAPABILITY_CAN_GET_FOLDER_TREE.getLocalPart())) {
+                        caps.setHasGetFolderTree(Boolean.parseBoolean(reader.getElementText()));
                     } else if (localName.equals(CMIS.CAPABILITY_CONTENT_STREAM_UPDATABILITY.getLocalPart())) {
                         caps.setContentStreamUpdatableAnytime("anytime".equals(reader.getElementText()));
                     } else if (localName.equals(CMIS.CAPABILITY_MULTIFILING.getLocalPart())) {
                         caps.setHasMultifiling(Boolean.parseBoolean(reader.getElementText()));
                     } else if (localName.equals(CMIS.CAPABILITY_PWC_SEARCHABLE.getLocalPart())) {
                         caps.setPWCSearchable(Boolean.parseBoolean(reader.getElementText()));
-                    } else if (localName.equals(CMIS.CAPABILITY_PWC_UPDATEABLE.getLocalPart())) {
+                    } else if (localName.equals(CMIS.CAPABILITY_PWC_UPDATABLE.getLocalPart())) {
                         caps.setPWCUpdatable(Boolean.parseBoolean(reader.getElementText()));
                     } else if (localName.equals(CMIS.CAPABILITY_UNFILING.getLocalPart())) {
                         caps.setHasUnfiling(Boolean.parseBoolean(reader.getElementText()));
@@ -139,8 +148,6 @@
                     } else if (localName.equals(CMIS.CAPABILITY_CHANGES.getLocalPart())) {
                         caps.setChangeCapability(CapabilityChange.get(
                                 reader.getElementText(), CapabilityChange.NONE));
-                    } else if (localName.equals(CMIS.CAPABILITY_CHANGES_ON_TYPE.getLocalPart())) {
-                        changeLogBaseTypes.add(BaseType.get(reader.getElementText()));
                     } else if (localName.equals(CMIS.CAPABILITY_ACL.getLocalPart())) {
                         caps.setACLCapability(CapabilityACL.get(
                                 reader.getElementText(), CapabilityACL.NONE));
@@ -148,6 +155,8 @@
                 }
             } else if (localName.equals(CMIS.REPOSITORY_SPECIFIC_INFORMATION.getLocalPart())) {
                 readRepositorySpecificInformation(context, reader);
+            } else if (localName.equals(CMIS.CHANGES_ON_TYPE.getLocalPart())) {
+                changeLogBaseTypes.add(BaseType.get(reader.getElementText()));
             } else {
                 map.put(localName, reader.getElementText());
             }

Added: incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/test/java/org/apache/chemistry/atompub/client/ServiceDocumentReaderTest.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/test/java/org/apache/chemistry/atompub/client/ServiceDocumentReaderTest.java?rev=830511&view=auto
==============================================================================
--- incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/test/java/org/apache/chemistry/atompub/client/ServiceDocumentReaderTest.java (added)
+++ incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/test/java/org/apache/chemistry/atompub/client/ServiceDocumentReaderTest.java Wed Oct 28 11:54:22 2009
@@ -0,0 +1,79 @@
+/*
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Authors:
+ *     Florent Guillaume, Nuxeo
+ */
+package org.apache.chemistry.atompub.client;
+
+import java.io.InputStream;
+import java.util.Arrays;
+import java.util.HashSet;
+import java.util.Set;
+
+import junit.framework.TestCase;
+
+import org.apache.chemistry.BaseType;
+import org.apache.chemistry.CapabilityACL;
+import org.apache.chemistry.CapabilityChange;
+import org.apache.chemistry.CapabilityJoin;
+import org.apache.chemistry.CapabilityQuery;
+import org.apache.chemistry.CapabilityRendition;
+import org.apache.chemistry.Repository;
+import org.apache.chemistry.RepositoryCapabilities;
+import org.apache.chemistry.RepositoryInfo;
+import org.apache.chemistry.atompub.client.stax.ReadContext;
+import org.apache.chemistry.atompub.client.stax.ServiceDocumentReader;
+import org.apache.chemistry.impl.simple.SimpleObjectId;
+
+public class ServiceDocumentReaderTest extends TestCase {
+
+    public void testReadServiceDocument() throws Exception {
+        InputStream is = getClass().getResourceAsStream("/service-document.xml");
+        ServiceDocumentReader<APPRepository> reader = new APPServiceDocumentReader();
+        Repository[] repos = reader.read(new ReadContext((Repository) null), is);
+        assertEquals(1, repos.length);
+        Repository repo = repos[0];
+        assertEquals("test", repo.getId());
+        assertEquals("testname", repo.getName());
+        RepositoryInfo info = repo.getInfo();
+        assertEquals("Repository test", info.getDescription());
+        assertEquals("Apache Test", info.getVendorName());
+        assertEquals("Chemistry Test", info.getProductName());
+        assertEquals("1.0-test", info.getProductVersion());
+        assertEquals(new SimpleObjectId("1234567890"), info.getRootFolderId());
+        assertEquals("20091027-test", info.getLatestChangeLogToken());
+        assertEquals("1.0-test", info.getVersionSupported());
+        assertFalse(info.isChangeLogIncomplete());
+        Set<BaseType> clbt = info.getChangeLogBaseTypes();
+        Set<BaseType> clbtExpected = new HashSet<BaseType>(Arrays.asList(
+                BaseType.FOLDER, BaseType.DOCUMENT));
+        assertEquals(clbtExpected, clbt);
+        RepositoryCapabilities cap = info.getCapabilities();
+        assertEquals(CapabilityACL.MANAGE, cap.getACLCapability());
+        assertFalse(cap.isAllVersionsSearchable());
+        assertEquals(CapabilityChange.OBJECT_IDS_ONLY, cap.getChangeCapability());
+        assertTrue(cap.isContentStreamUpdatableAnytime());
+        assertTrue(cap.hasGetDescendants());
+        assertTrue(cap.hasGetFolderTree());
+        assertFalse(cap.hasMultifiling());
+        assertFalse(cap.isPWCSearchable());
+        assertTrue(cap.isPWCUpdatable());
+        assertEquals(CapabilityQuery.BOTH_COMBINED, cap.getQueryCapability());
+        assertEquals(CapabilityRendition.READ, cap.getRenditionCapability());
+        assertFalse(cap.hasUnfiling());
+        assertFalse(cap.hasVersionSpecificFiling());
+        assertEquals(CapabilityJoin.INNER_AND_OUTER, cap.getJoinCapability());
+    }
+
+}

Propchange: incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/test/java/org/apache/chemistry/atompub/client/ServiceDocumentReaderTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/test/java/org/apache/chemistry/atompub/client/ServiceDocumentReaderTest.java
------------------------------------------------------------------------------
    svn:keywords = Id

Modified: incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/test/java/org/apache/chemistry/atompub/client/TypeFeedReaderTest.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/test/java/org/apache/chemistry/atompub/client/TypeFeedReaderTest.java?rev=830511&r1=830510&r2=830511&view=diff
==============================================================================
--- incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/test/java/org/apache/chemistry/atompub/client/TypeFeedReaderTest.java (original)
+++ incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/test/java/org/apache/chemistry/atompub/client/TypeFeedReaderTest.java Wed Oct 28 11:54:22 2009
@@ -28,7 +28,7 @@
 public class TypeFeedReaderTest extends TestCase {
 
     public void testReadTypesFeed() throws Exception {
-        InputStream is = getClass().getResourceAsStream("/feed-types.xml");
+        InputStream is = getClass().getResourceAsStream("/types-feed.xml");
         TypeManager typeManager = TypeFeedReader.INSTANCE.read(new ReadContext(
                 (Repository) null), is);
         assertEquals(5, typeManager.getTypes(null).size());

Modified: incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/test/java/org/apache/chemistry/atompub/client/stax/TestPropertyIterator.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/test/java/org/apache/chemistry/atompub/client/stax/TestPropertyIterator.java?rev=830511&r1=830510&r2=830511&view=diff
==============================================================================
--- incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/test/java/org/apache/chemistry/atompub/client/stax/TestPropertyIterator.java (original)
+++ incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/test/java/org/apache/chemistry/atompub/client/stax/TestPropertyIterator.java Wed Oct 28 11:54:22 2009
@@ -33,7 +33,7 @@
 public class TestPropertyIterator extends TestCase {
 
     public void testPropertyIterator() throws Exception {
-        URL url = this.getClass().getClassLoader().getResource("feedentry.xml");
+        URL url = this.getClass().getClassLoader().getResource("entry.xml");
         StaxReader sr = StaxReader.newReader(url.openStream());
         sr.getFirstTag(CMIS.PROPERTIES);
         PropertyIterator pi = new PropertyIterator(sr);

Copied: incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/test/resources/entry.xml (from r829752, incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/test/resources/feedentry.xml)
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/test/resources/entry.xml?p2=incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/test/resources/entry.xml&p1=incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/test/resources/feedentry.xml&r1=829752&r2=830511&rev=830511&view=diff
==============================================================================
--- incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/test/resources/feedentry.xml (original)
+++ incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/test/resources/entry.xml Wed Oct 28 11:54:22 2009
@@ -1,20 +1,20 @@
 <?xml version="1.0"?>
-<entry xmlns="http://www.w3.org/2005/Atom" xmlns:cmis="http://docs.oasis-open.org/ns/cmis/core/200901">
+<entry xmlns="http://www.w3.org/2005/Atom" xmlns:cmis="http://docs.oasis-open.org/ns/cmis/core/200908/">
   <cmis:object>
     <cmis:properties>
-      <cmis:propertyString pdid="string_null" />
-      <cmis:propertyString pdid="string">
+      <cmis:propertyString propertyDefinitionId="string_null" />
+      <cmis:propertyString propertyDefinitionId="string">
         <cmis:value>string1</cmis:value>
       </cmis:propertyString>
-      <cmis:propertyDateTime pdid="date">
+      <cmis:propertyDateTime propertyDefinitionId="date">
         <cmis:value>2009-03-17T17:55:08+01:00
         </cmis:value>
       </cmis:propertyDateTime>
-      <cmis:propertyString pdid="string_array">
+      <cmis:propertyString propertyDefinitionId="string_array">
         <cmis:value>string1</cmis:value>
         <cmis:value>string2</cmis:value>
       </cmis:propertyString>
-      <cmis:propertyDateTime pdid="date_array">
+      <cmis:propertyDateTime propertyDefinitionId="date_array">
         <cmis:value>2009-03-17T17:55:08+01:00
         </cmis:value>
         <cmis:value>2009-03-18T17:55:08+01:00

Added: incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/test/resources/service-document.xml
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/test/resources/service-document.xml?rev=830511&view=auto
==============================================================================
--- incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/test/resources/service-document.xml (added)
+++ incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/test/resources/service-document.xml Wed Oct 28 11:54:22 2009
@@ -0,0 +1,77 @@
+<?xml version="1.0" encoding="utf8"?>
+<service xmlns="http://www.w3.org/2007/app"
+  xmlns:cmis="http://docs.oasis-open.org/ns/cmis/core/200908/"
+  xmlns:cmisra="http://docs.oasis-open.org/ns/cmis/restatom/200908/">
+  <workspace>
+    <title xmlns="http://www.w3.org/2005/Atom" type="text">test</title>
+    <cmisra:repositoryInfo>
+      <cmis:repositoryId>test</cmis:repositoryId>
+      <cmis:repositoryName>testname</cmis:repositoryName>
+      <cmis:repositoryDescription>Repository test</cmis:repositoryDescription>
+      <cmis:vendorName>Apache Test</cmis:vendorName>
+      <cmis:productName>Chemistry Test</cmis:productName>
+      <cmis:productVersion>1.0-test</cmis:productVersion>
+      <cmis:rootFolderId>1234567890</cmis:rootFolderId>
+      <cmis:latestChangeLogToken>20091027-test</cmis:latestChangeLogToken>
+      <cmis:capabilities>
+        <cmis:capabilityACL>manage</cmis:capabilityACL>
+        <cmis:capabilityAllVersionsSearchable>false</cmis:capabilityAllVersionsSearchable>
+        <cmis:capabilityChanges>objectidsonly</cmis:capabilityChanges>
+        <cmis:capabilityContentStreamUpdatability>anytime</cmis:capabilityContentStreamUpdatability>
+        <cmis:capabilityGetDescendants>true</cmis:capabilityGetDescendants>
+        <cmis:capabilityGetFolderTree>true</cmis:capabilityGetFolderTree>
+        <cmis:capabilityMultifiling>false</cmis:capabilityMultifiling>
+        <cmis:capabilityPWCSearchable>false</cmis:capabilityPWCSearchable>
+        <cmis:capabilityPWCUpdatable>true</cmis:capabilityPWCUpdatable>
+        <cmis:capabilityQuery>bothcombined</cmis:capabilityQuery>
+        <cmis:capabilityRenditions>read</cmis:capabilityRenditions>
+        <cmis:capabilityUnfiling>false</cmis:capabilityUnfiling>
+        <cmis:capabilityVersionSpecificFiling>false</cmis:capabilityVersionSpecificFiling>
+        <cmis:capabilityJoin>innerandouter</cmis:capabilityJoin>
+      </cmis:capabilities>
+      <cmis:cmisVersionSupported>1.0-test</cmis:cmisVersionSupported>
+      <cmis:changesIncomplete>false</cmis:changesIncomplete>
+      <cmis:changesOnType>cmis:folder</cmis:changesOnType>
+      <cmis:changesOnType>cmis:document</cmis:changesOnType>
+    </cmisra:repositoryInfo>
+    <collection href="http://0.0.0.0:8285/cmis/checkedout">
+      <title xmlns="http://www.w3.org/2005/Atom" type="text">the checkedout</title>
+      <cmisra:collectionType>checkedout</cmisra:collectionType>
+    </collection>
+    <collection href="http://0.0.0.0:8285/cmis/unfiled">
+      <title xmlns="http://www.w3.org/2005/Atom" type="text">the unfiled</title>
+      <cmisra:collectionType>unfiled</cmisra:collectionType>
+    </collection>
+    <collection href="http://0.0.0.0:8285/cmis/types">
+      <title xmlns="http://www.w3.org/2005/Atom" type="text">Types</title>
+      <cmisra:collectionType>types</cmisra:collectionType>
+    </collection>
+    <collection href="http://0.0.0.0:8285/cmis/types">
+      <title xmlns="http://www.w3.org/2005/Atom" type="text">Types</title>
+      <cmisra:collectionType>typesdescendants</cmisra:collectionType>
+    </collection>
+    <collection href="http://0.0.0.0:8285/cmis/descendants/cb301806-259a-4a8e-9784-b64f04bbbaca">
+      <title xmlns="http://www.w3.org/2005/Atom" type="text">the descendants</title>
+      <cmisra:collectionType>rootdescendants</cmisra:collectionType>
+    </collection>
+    <collection href="http://0.0.0.0:8285/cmis/children/cb301806-259a-4a8e-9784-b64f04bbbaca">
+      <title xmlns="http://www.w3.org/2005/Atom" type="text">children collection</title>
+      <cmisra:collectionType>root</cmisra:collectionType>
+    </collection>
+    <collection href="http://0.0.0.0:8285/cmis/query">
+      <title xmlns="http://www.w3.org/2005/Atom" type="text">query collection</title>
+      <cmisra:collectionType>query</cmisra:collectionType>
+    </collection>
+    <link xmlns="http://www.w3.org/2005/Atom" type="application/cmistree+xml" rel="http://docs.oasis-open.org/ns/cmis/link/200908/typesdescendants" href="http://0.0.0.0:8285/cmis/typesdescendants" />
+    <cmisra:uritemplate>
+      <cmisra:type>objectbyid</cmisra:type>
+      <cmisra:mediatype>application/atom+xml;type=entry</cmisra:mediatype>
+      <cmisra:template>http://0.0.0.0:8285/cmis/object/{id}</cmisra:template>
+    </cmisra:uritemplate>
+    <cmisra:uritemplate>
+      <cmisra:type>objectbypath</cmisra:type>
+      <cmisra:mediatype>application/atom+xml;type=entry</cmisra:mediatype>
+      <cmisra:template>http://0.0.0.0:8285/cmis/path{path}</cmisra:template>
+    </cmisra:uritemplate>
+  </workspace>
+</service>

Propchange: incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/test/resources/service-document.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/test/resources/service-document.xml
------------------------------------------------------------------------------
    svn:keywords = Id

Copied: incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/test/resources/types-feed.xml (from r829752, incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/test/resources/feed-types.xml)
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/test/resources/types-feed.xml?p2=incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/test/resources/types-feed.xml&p1=incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/test/resources/feed-types.xml&r1=829752&r2=830511&rev=830511&view=diff
==============================================================================
--- incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/test/resources/feed-types.xml (original)
+++ incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/test/resources/types-feed.xml Wed Oct 28 11:54:22 2009
@@ -1,6 +1,6 @@
 <?xml version='1.0' encoding='utf-8'?>
-<feed xmlns="http://www.w3.org/2005/Atom" xmlns:cmis="http://docs.oasis-open.org/ns/cmis/core/200901"
-  xmlns:cmisra="http://docs.oasis-open.org/ns/cmis/restatom/200901">
+<feed xmlns="http://www.w3.org/2005/Atom" xmlns:cmis="http://docs.oasis-open.org/ns/cmis/core/200908/"
+  xmlns:cmisra="http://docs.oasis-open.org/ns/cmis/restatom/200908/">
   <id>urn:x-id:types</id>
   <title type="text">Types</title>
   <author>
@@ -15,12 +15,12 @@
     <link href="http://127.0.0.1:8080/cmis/type/document" rel="edit" />
     <link href="http://127.0.0.1:8080/cmis/type/document" rel="alternate" />
     <link href="http://127.0.0.1:8080/cmis/repository" rel="repository" />
-    <cmisra:type>
+    <cmisra:type cmisra:id="document">
       <cmis:id>cmis:document</cmis:id>
       <cmis:localName>cmis:document</cmis:localName>
       <cmis:queryName>Document</cmis:queryName>
       <cmis:displayName>Document Type</cmis:displayName>
-      <cmis:baseTypeId>cmis:document</cmis:baseTypeId>
+      <cmis:baseId>cmis:document</cmis:baseId>
       <cmis:parentId />
       <cmis:description></cmis:description>
       <cmis:creatable>true</cmis:creatable>
@@ -29,7 +29,7 @@
       <cmis:versionable>true</cmis:versionable>
       <cmis:controllablePolicy>true</cmis:controllablePolicy>
       <cmis:controllableACL>true</cmis:controllableACL>
-      <cmis:fulltextindexed>true</cmis:fulltextindexed>
+      <cmis:fulltextIndexed>true</cmis:fulltextIndexed>
       <cmis:includedInSupertypeQuery>true
       </cmis:includedInSupertypeQuery>
     </cmisra:type>
@@ -42,12 +42,12 @@
     <link href="http://127.0.0.1:8080/cmis/type/folder" rel="edit" />
     <link href="http://127.0.0.1:8080/cmis/type/folder" rel="alternate" />
     <link href="http://127.0.0.1:8080/cmis/repository" rel="repository" />
-    <cmisra:type>
+    <cmisra:type cmisra:id="folder">
       <cmis:id>cmis:folder</cmis:id>
       <cmis:localName>cmis:folder</cmis:localName>
       <cmis:queryName>Folder</cmis:queryName>
       <cmis:displayName>Folder Type</cmis:displayName>
-      <cmis:baseTypeId>cmis:folder</cmis:baseTypeId>
+      <cmis:baseId>cmis:folder</cmis:baseId>
       <cmis:parentId />
       <cmis:description></cmis:description>
       <cmis:creatable>true</cmis:creatable>
@@ -56,7 +56,7 @@
       <cmis:versionable>false</cmis:versionable>
       <cmis:controllablePolicy>true</cmis:controllablePolicy>
       <cmis:controllableACL>true</cmis:controllableACL>
-      <cmis:fulltextindexed>true</cmis:fulltextindexed>
+      <cmis:fulltextIndexed>true</cmis:fulltextIndexed>
       <cmis:includedInSupertypeQuery>true
       </cmis:includedInSupertypeQuery>
     </cmisra:type>
@@ -69,12 +69,12 @@
     <link href="http://127.0.0.1:8080/cmis/type/relationship" rel="edit" />
     <link href="http://127.0.0.1:8080/cmis/type/relationship" rel="alternate" />
     <link href="http://127.0.0.1:8080/cmis/repository" rel="repository" />
-    <cmisra:type>
+    <cmisra:type cmisra:id="relationship">
       <cmis:id>cmis:relationship</cmis:id>
       <cmis:localName>cmis:relationship</cmis:localName>
       <cmis:queryName>Relationship</cmis:queryName>
       <cmis:displayName>Relationship Type</cmis:displayName>
-      <cmis:baseTypeId>cmis:relationship</cmis:baseTypeId>
+      <cmis:baseId>cmis:relationship</cmis:baseId>
       <cmis:parentId />
       <cmis:description></cmis:description>
       <cmis:creatable>true</cmis:creatable>
@@ -83,7 +83,7 @@
       <cmis:versionable>false</cmis:versionable>
       <cmis:controllablePolicy>false</cmis:controllablePolicy>
       <cmis:controllableACL>false</cmis:controllableACL>
-      <cmis:fulltextindexed>false</cmis:fulltextindexed>
+      <cmis:fulltextIndexed>false</cmis:fulltextIndexed>
       <cmis:includedInSupertypeQuery>true
       </cmis:includedInSupertypeQuery>
     </cmisra:type>
@@ -96,12 +96,12 @@
     <link href="http://127.0.0.1:8080/cmis/type/policy" rel="edit" />
     <link href="http://127.0.0.1:8080/cmis/type/policy" rel="alternate" />
     <link href="http://127.0.0.1:8080/cmis/repository" rel="repository" />
-    <cmisra:type>
+    <cmisra:type cmisra:id="policy">
       <cmis:id>cmis:policy</cmis:id>
       <cmis:localName>cmis:policy</cmis:localName>
       <cmis:queryName>Policy</cmis:queryName>
       <cmis:displayName>Policy Type</cmis:displayName>
-      <cmis:baseTypeId>cmis:policy</cmis:baseTypeId>
+      <cmis:baseId>cmis:policy</cmis:baseId>
       <cmis:parentId />
       <cmis:description></cmis:description>
       <cmis:creatable>true</cmis:creatable>
@@ -110,7 +110,7 @@
       <cmis:versionable>false</cmis:versionable>
       <cmis:controllablePolicy>false</cmis:controllablePolicy>
       <cmis:controllableACL>false</cmis:controllableACL>
-      <cmis:fulltextindexed>false</cmis:fulltextindexed>
+      <cmis:fulltextIndexed>false</cmis:fulltextIndexed>
       <cmis:includedInSupertypeQuery>true
       </cmis:includedInSupertypeQuery>
     </cmisra:type>
@@ -123,12 +123,12 @@
     <link href="http://127.0.0.1:8080/cmis/type/Root" rel="edit" />
     <link href="http://127.0.0.1:8080/cmis/type/Root" rel="alternate" />
     <link href="http://127.0.0.1:8080/cmis/repository" rel="repository" />
-    <cmisra:type>
+    <cmisra:type cmisra:id="root">
       <cmis:id>Root</cmis:id>
       <cmis:localName>Root</cmis:localName>
       <cmis:queryName>Root</cmis:queryName>
       <cmis:displayName>Root Folder Type</cmis:displayName>
-      <cmis:baseTypeId>cmis:folder</cmis:baseTypeId>
+      <cmis:baseId>cmis:folder</cmis:baseId>
       <cmis:parentId>cmis:folder</cmis:parentId>
       <cmis:description></cmis:description>
       <cmis:creatable>false</cmis:creatable>
@@ -137,7 +137,7 @@
       <cmis:versionable>false</cmis:versionable>
       <cmis:controllablePolicy>false</cmis:controllablePolicy>
       <cmis:controllableACL>false</cmis:controllableACL>
-      <cmis:fulltextindexed>false</cmis:fulltextindexed>
+      <cmis:fulltextIndexed>false</cmis:fulltextIndexed>
       <cmis:includedInSupertypeQuery>false
       </cmis:includedInSupertypeQuery>
     </cmisra:type>

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=830511&r1=830510&r2=830511&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 Wed Oct 28 11:54:22 2009
@@ -401,7 +401,11 @@
 
     @Override
     public String getContentType(ObjectEntry object) {
-        return (String) object.getValue(Property.CONTENT_STREAM_MIME_TYPE);
+        try {
+            return (String) object.getValue(Property.CONTENT_STREAM_MIME_TYPE);
+        } catch (Exception e) {
+            return null;
+        }
     }
 
     @Override

Modified: incubator/chemistry/trunk/chemistry/chemistry-atompub-server/src/main/java/org/apache/chemistry/atompub/server/CMISProvider.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/chemistry/chemistry-atompub-server/src/main/java/org/apache/chemistry/atompub/server/CMISProvider.java?rev=830511&r1=830510&r2=830511&view=diff
==============================================================================
--- incubator/chemistry/trunk/chemistry/chemistry-atompub-server/src/main/java/org/apache/chemistry/atompub/server/CMISProvider.java (original)
+++ incubator/chemistry/trunk/chemistry/chemistry-atompub-server/src/main/java/org/apache/chemistry/atompub/server/CMISProvider.java Wed Oct 28 11:54:22 2009
@@ -151,12 +151,15 @@
             base += '/';
         }
         List<URITemplate> list = new ArrayList<URITemplate>(3);
-        list.add(new URITemplate(AtomPubCMIS.URITMPL_ENTRY_BY_ID, //
+        list.add(new URITemplate(AtomPubCMIS.URITMPL_OBJECT_BY_ID, //
                 AtomPub.MEDIA_TYPE_ATOM_ENTRY, //
                 base + "object/{id}"));
-        list.add(new URITemplate(AtomPubCMIS.URITMPL_FOLDER_BY_PATH, //
+        list.add(new URITemplate(AtomPubCMIS.URITMPL_OBJECT_BY_PATH, //
                 AtomPub.MEDIA_TYPE_ATOM_ENTRY, //
                 base + "path{path}"));
+        list.add(new URITemplate(AtomPubCMIS.URITMPL_TYPE_BY_ID, //
+                AtomPub.MEDIA_TYPE_ATOM_FEED, //
+                base + "type/{id}"));
         if (false) { // TODO
             list.add(new URITemplate(AtomPubCMIS.URITMPL_QUERY, //
                     AtomPub.MEDIA_TYPE_ATOM_FEED, //

Modified: incubator/chemistry/trunk/chemistry/chemistry-atompub-server/src/main/java/org/apache/chemistry/atompub/server/CMISServiceResponse.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/chemistry/chemistry-atompub-server/src/main/java/org/apache/chemistry/atompub/server/CMISServiceResponse.java?rev=830511&r1=830510&r2=830511&view=diff
==============================================================================
--- incubator/chemistry/trunk/chemistry/chemistry-atompub-server/src/main/java/org/apache/chemistry/atompub/server/CMISServiceResponse.java (original)
+++ incubator/chemistry/trunk/chemistry/chemistry-atompub-server/src/main/java/org/apache/chemistry/atompub/server/CMISServiceResponse.java Wed Oct 28 11:54:22 2009
@@ -43,7 +43,7 @@
  */
 public class CMISServiceResponse extends StreamWriterResponseContext {
 
-    public static final String ATOMPUB_VERSION_SUPPORTED = "0.62";
+    public static final String ATOMPUB_VERSION_SUPPORTED = "1.0";
 
     protected final CMISProvider provider;
 
@@ -59,8 +59,7 @@
     protected void writeTo(StreamWriter sw) throws IOException {
         sw.startDocument();
         sw.startService();
-        ((StaxStreamWriter) sw).writeNamespace(CMIS.CMIS_PREFIX,
-                CMIS.CMIS_NS);
+        ((StaxStreamWriter) sw).writeNamespace(CMIS.CMIS_PREFIX, CMIS.CMIS_NS);
         ((StaxStreamWriter) sw).writeNamespace(AtomPubCMIS.CMISRA_PREFIX,
                 AtomPubCMIS.CMISRA_NS);
         for (WorkspaceInfo wi : provider.getWorkspaceManager(request).getWorkspaces(
@@ -72,10 +71,11 @@
             // collections
             for (CollectionInfo ci : wi.getCollections(request)) {
                 sw.startCollection(ci.getHref(request));
-                sw.writeAttribute(AtomPubCMIS.COLLECTION_TYPE,
-                        ((CMISCollection<?>) ci).getType());
                 sw.writeTitle(ci.getTitle(request));
                 sw.writeAccepts(ci.getAccepts(request));
+                sw.startElement(AtomPubCMIS.COLLECTION_TYPE);
+                sw.writeElementText(((CMISCollection<?>) ci).getType());
+                sw.endElement();
                 // no AtomPub categories
                 sw.endCollection();
             }
@@ -132,32 +132,26 @@
             sw.startElement(AtomPubCMIS.REPOSITORY_INFO);
             write(CMIS.REPOSITORY_ID, repository.getId());
             write(CMIS.REPOSITORY_NAME, repository.getName());
-            write(CMIS.REPOSITORY_RELATIONSHIP, "self");
             write(CMIS.REPOSITORY_DESCRIPTION, info.getDescription());
             write(CMIS.VENDOR_NAME, info.getVendorName());
             write(CMIS.PRODUCT_NAME, info.getProductName());
             write(CMIS.PRODUCT_VERSION, info.getProductVersion());
             write(CMIS.ROOT_FOLDER_ID, info.getRootFolderId().getId());
-            write(CMIS.LATEST_CHANGE_LOG_TOKEN,
-                    info.getLatestChangeLogToken());
+            write(CMIS.LATEST_CHANGE_LOG_TOKEN, info.getLatestChangeLogToken());
 
             sw.startElement(CMIS.CAPABILITIES);
             write(CMIS.CAPABILITY_ACL, cap.getACLCapability().toString());
             write(CMIS.CAPABILITY_ALL_VERSIONS_SEARCHABLE,
                     cap.isAllVersionsSearchable());
-            write(CMIS.CAPABILITY_CHANGES,
-                    cap.getJoinCapability().toString());
-            for (BaseType t : info.getChangeLogBaseTypes()) {
-                write(CMIS.CAPABILITY_CHANGES_ON_TYPE, t.toString());
-            }
+            write(CMIS.CAPABILITY_CHANGES, cap.getJoinCapability().toString());
             write(CMIS.CAPABILITY_CONTENT_STREAM_UPDATABILITY,
                     cap.isContentStreamUpdatableAnytime() ? "anytime"
                             : "pwconly");
-            write(CMIS.CAPABILITY_CAN_GET_DESCENDANTS,
-                    cap.hasGetDescendants());
+            write(CMIS.CAPABILITY_CAN_GET_DESCENDANTS, cap.hasGetDescendants());
+            write(CMIS.CAPABILITY_CAN_GET_FOLDER_TREE, cap.hasGetFolderTree());
             write(CMIS.CAPABILITY_MULTIFILING, cap.hasMultifiling());
             write(CMIS.CAPABILITY_PWC_SEARCHABLE, cap.isPWCSearchable());
-            write(CMIS.CAPABILITY_PWC_UPDATEABLE, cap.isPWCUpdatable());
+            write(CMIS.CAPABILITY_PWC_UPDATABLE, cap.isPWCUpdatable());
             write(CMIS.CAPABILITY_QUERY, cap.getQueryCapability().toString());
             write(CMIS.CAPABILITY_RENDITIONS,
                     cap.getRenditionCapability().toString());
@@ -170,6 +164,9 @@
             write(CMIS.VERSION_SUPPORTED, ATOMPUB_VERSION_SUPPORTED);
             // write(CMISXML.THIN_CLIENT_URI, "TODO");
             write(CMIS.CHANGES_INCOMPLETE, info.isChangeLogIncomplete());
+            for (BaseType t : info.getChangeLogBaseTypes()) {
+                write(CMIS.CHANGES_ON_TYPE, t.toString());
+            }
             write(CMIS.REPOSITORY_SPECIFIC_INFORMATION,
                     info.getRepositorySpecificInformation());
             sw.endElement();

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=830511&r1=830510&r2=830511&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 Wed Oct 28 11:54:22 2009
@@ -113,6 +113,7 @@
 
         // CMIS-specific
         Element te = factory.newElement(AtomPubCMIS.TYPE, entry);
+        te.setAttributeValue(AtomPubCMIS.ID, type.getId());
         Element el;
         // note: setText is called in a separate statement as JDK 5 has problems
         // compiling when it's on one line (compiler generics bug)
@@ -129,7 +130,7 @@
         el.setText(type.getQueryName());
         el = factory.newElement(CMIS.DISPLAY_NAME, te);
         el.setText(type.getDisplayName());
-        el = factory.newElement(CMIS.BASE_TYPE_ID, te);
+        el = factory.newElement(CMIS.BASE_ID, te);
         el.setText(type.getBaseType().getId());
         el = factory.newElement(CMIS.PARENT_ID, te);
         el.setText(type.getParentId());
@@ -179,15 +180,9 @@
                 case PropertyType.ID_ORD:
                     qname = CMIS.PROPERTY_ID_DEFINITION;
                     break;
-                case PropertyType.XML_ORD:
-                    qname = CMIS.PROPERTY_XML_DEFINITION;
-                    break;
                 case PropertyType.HTML_ORD:
                     qname = CMIS.PROPERTY_HTML_DEFINITION;
                     break;
-                case PropertyType.XHTML_ORD:
-                    qname = CMIS.PROPERTY_XHTML_DEFINITION;
-                    break;
                 default:
                     throw new AssertionError(pd.getType().name());
                 }
@@ -252,9 +247,6 @@
                     break;
                 case PropertyType.ID_ORD:
                     break;
-                case PropertyType.XML_ORD:
-                    // TODO schemaURI
-                    break;
                 case PropertyType.HTML_ORD:
                     break;
                 default:

Modified: incubator/chemistry/trunk/chemistry/chemistry-atompub/src/main/java/org/apache/chemistry/atompub/AtomPub.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/chemistry/chemistry-atompub/src/main/java/org/apache/chemistry/atompub/AtomPub.java?rev=830511&r1=830510&r2=830511&view=diff
==============================================================================
--- incubator/chemistry/trunk/chemistry/chemistry-atompub/src/main/java/org/apache/chemistry/atompub/AtomPub.java (original)
+++ incubator/chemistry/trunk/chemistry/chemistry-atompub/src/main/java/org/apache/chemistry/atompub/AtomPub.java Wed Oct 28 11:54:22 2009
@@ -98,14 +98,13 @@
     public static final String LINK_DOWN = "down";
 
     /*
-     * TODO-0.63 update to use properly
      * http://www.ietf.org/id/draft-brown-versioning-link-relations-01.txt
      */
 
-    public static final String LINK_VERSION_HISTORY = "allversions"; // TODO-0.63
+    public static final String LINK_VERSION_HISTORY = "version-history";
 
-    public static final String LINK_LATEST_VERSION = "latestversion"; // TODO-0.63
+    public static final String LINK_CURRENT_VERSION = "current-version";
 
-    public static final String LINK_WORKING_COPY = "pwc"; // TODO-0.63
+    public static final String LINK_WORKING_COPY = "working-copy";
 
 }

Modified: incubator/chemistry/trunk/chemistry/chemistry-atompub/src/main/java/org/apache/chemistry/atompub/AtomPubCMIS.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/chemistry/chemistry-atompub/src/main/java/org/apache/chemistry/atompub/AtomPubCMIS.java?rev=830511&r1=830510&r2=830511&view=diff
==============================================================================
--- incubator/chemistry/trunk/chemistry/chemistry-atompub/src/main/java/org/apache/chemistry/atompub/AtomPubCMIS.java (original)
+++ incubator/chemistry/trunk/chemistry/chemistry-atompub/src/main/java/org/apache/chemistry/atompub/AtomPubCMIS.java Wed Oct 28 11:54:22 2009
@@ -34,7 +34,7 @@
      */
 
     public static final String CMISRA_NS = CMIS.CMIS_NS_BASE
-            + "restatom/200901";
+            + "restatom/200908/";
 
     public static final String CMISRA_PREFIX = "cmisra";
 
@@ -56,6 +56,8 @@
 
     public static final QName TYPE = CMISRAName("type");
 
+    public static final QName ID = CMISRAName("id");
+
     public static final QName MEDIA_TYPE = CMISRAName("mediatype");
 
     public static final QName OBJECT = CMISRAName("object");
@@ -85,7 +87,7 @@
      */
 
     public static final String CMIS_LINK_NS_BASE = CMIS.CMIS_NS_BASE
-            + "link/200901/";
+            + "link/200908/";
 
     public static final String LINK_SOURCE = CMIS_LINK_NS_BASE + "source";
 
@@ -116,12 +118,14 @@
      * ----- URI Template Types -----
      */
 
-    public static final String URITMPL_ENTRY_BY_ID = "entrybyid";
+    public static final String URITMPL_OBJECT_BY_ID = "objectbyid";
 
-    public static final String URITMPL_FOLDER_BY_PATH = "folderbypath"; // TODO-0.63
+    public static final String URITMPL_OBJECT_BY_PATH = "objectbypath";
 
     public static final String URITMPL_QUERY = "query";
 
+    public static final String URITMPL_TYPE_BY_ID = "typebyid";
+
     /*
      * ----- Media Types -----
      */

Modified: incubator/chemistry/trunk/chemistry/chemistry-atompub/src/main/java/org/apache/chemistry/atompub/ValueAdapter.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/chemistry/chemistry-atompub/src/main/java/org/apache/chemistry/atompub/ValueAdapter.java?rev=830511&r1=830510&r2=830511&view=diff
==============================================================================
--- incubator/chemistry/trunk/chemistry/chemistry-atompub/src/main/java/org/apache/chemistry/atompub/ValueAdapter.java (original)
+++ incubator/chemistry/trunk/chemistry/chemistry-atompub/src/main/java/org/apache/chemistry/atompub/ValueAdapter.java Wed Oct 28 11:54:22 2009
@@ -242,33 +242,6 @@
         }
     }
 
-    protected static final class XmlValueAdapter extends ValueAdapter {
-        @Override
-        public Serializable readValue(String xml) {
-            return xml;
-        }
-
-        @Override
-        public String writeValue(Serializable val) {
-            return val.toString();
-        }
-
-        @Override
-        public Serializable[] createArray(int size) {
-            return new String[size];
-        }
-
-        @Override
-        public QName getPropertyQName() {
-            return CMIS.PROPERTY_XML;
-        }
-
-        @Override
-        public PropertyType getPropertyType() {
-            return PropertyType.XML;
-        }
-    }
-
     protected static final class HtmlValueAdapter extends ValueAdapter {
         @Override
         public Serializable readValue(String xml) {
@@ -296,33 +269,6 @@
         }
     }
 
-    protected static final class XhtmlValueAdapter extends ValueAdapter {
-        @Override
-        public Serializable readValue(String xml) {
-            return xml;
-        }
-
-        @Override
-        public String writeValue(Serializable val) {
-            return val.toString();
-        }
-
-        @Override
-        public Serializable[] createArray(int size) {
-            return new String[size];
-        }
-
-        @Override
-        public QName getPropertyQName() {
-            return CMIS.PROPERTY_XHTML;
-        }
-
-        @Override
-        public PropertyType getPropertyType() {
-            return PropertyType.XHTML;
-        }
-    }
-
     public static final ValueAdapter STRING = new StringValueAdapter();
 
     public static final ValueAdapter DECIMAL = new DecimalValueAdapter();
@@ -337,12 +283,8 @@
 
     public static final ValueAdapter ID = new IdValueAdapter();
 
-    public static final ValueAdapter XML = new XmlValueAdapter();
-
     public static final ValueAdapter HTML = new HtmlValueAdapter();
 
-    public static final ValueAdapter XHTML = new XhtmlValueAdapter();
-
     protected static final Map<PropertyType, ValueAdapter> byPropertyType = new HashMap<PropertyType, ValueAdapter>();
 
     protected static final Map<QName, ValueAdapter> byQName = new HashMap<QName, ValueAdapter>();
@@ -356,9 +298,7 @@
                 DATETIME, //
                 URI, //
                 ID, //
-                XML, //
-                HTML, //
-                XHTML //
+                HTML //
         )) {
             byPropertyType.put(va.getPropertyType(), va);
             byQName.put(va.getPropertyQName(), va);

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=830511&r1=830510&r2=830511&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 Wed Oct 28 11:54:22 2009
@@ -167,11 +167,11 @@
         el.setAttributeValue(CMIS.PDID, propertyDefinition.getId());
         String localName = propertyDefinition.getLocalName();
         if (localName != null) {
-            el.setAttributeValue(CMIS.LOCALNAME, localName);
+            el.setAttributeValue(CMIS.LOCAL_NAME_NONS, localName);
         }
         String displayName = propertyDefinition.getDisplayName();
         if (displayName != null) {
-            el.setAttributeValue(CMIS.DISPLAYNAME, displayName);
+            el.setAttributeValue(CMIS.DISPLAY_NAME_NONS, displayName);
         }
         for (String s : values) {
             Element val = el.addExtension(CMIS.VALUE);
@@ -181,7 +181,8 @@
     }
 
     // sets a property without all the type information, used for result sets
-    public void setProperty(String key, Serializable value, PropertyType propertyType) {
+    public void setProperty(String key, Serializable value,
+            PropertyType propertyType) {
         if (value == null) {
             // TODO assumes this isn't called several times
             return;
@@ -206,7 +207,7 @@
      * @return the list of serialized strings
      */
     // TODO move this to a helper somewhere else
-    @SuppressWarnings( { "null", "unchecked" })
+    @SuppressWarnings( { "unchecked" })
     public static List<String> getStringsForValue(Serializable value,
             PropertyType propertyType, boolean multi) {
         List<String> values = null;
@@ -269,12 +270,8 @@
             break;
         case PropertyType.URI_ORD:
             throw new UnsupportedOperationException(propertyType.toString());
-        case PropertyType.XML_ORD:
-            throw new UnsupportedOperationException(propertyType.toString());
         case PropertyType.HTML_ORD:
             throw new UnsupportedOperationException(propertyType.toString());
-        case PropertyType.XHTML_ORD:
-            throw new UnsupportedOperationException(propertyType.toString());
         default:
             throw new UnsupportedOperationException(propertyType.toString());
         }
@@ -297,12 +294,8 @@
             return CMIS.PROPERTY_ID;
         case PropertyType.URI_ORD:
             return CMIS.PROPERTY_URI;
-        case PropertyType.XML_ORD:
-            return CMIS.PROPERTY_XML;
         case PropertyType.HTML_ORD:
             return CMIS.PROPERTY_HTML;
-        case PropertyType.XHTML_ORD:
-            return CMIS.PROPERTY_XHTML;
         default:
             throw new UnsupportedOperationException(propertyType.toString());
         }

Modified: incubator/chemistry/trunk/chemistry/chemistry-commons/src/main/java/org/apache/chemistry/impl/base/BaseRepository.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/chemistry/chemistry-commons/src/main/java/org/apache/chemistry/impl/base/BaseRepository.java?rev=830511&r1=830510&r2=830511&view=diff
==============================================================================
--- incubator/chemistry/trunk/chemistry/chemistry-commons/src/main/java/org/apache/chemistry/impl/base/BaseRepository.java (original)
+++ incubator/chemistry/trunk/chemistry/chemistry-commons/src/main/java/org/apache/chemistry/impl/base/BaseRepository.java Wed Oct 28 11:54:22 2009
@@ -128,11 +128,11 @@
 
     public String getProductVersion() {
         // TODO update this when releasing
-        return "0.1-SNAPSHOT";
+        return "1.0-SNAPSHOT";
     }
 
     public String getVersionSupported() {
-        return "0.62";
+        return "1.0";
     }
 
     public org.w3c.dom.Document getRepositorySpecificInformation() {

Modified: incubator/chemistry/trunk/chemistry/chemistry-commons/src/main/java/org/apache/chemistry/impl/simple/SimpleConnection.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/chemistry/chemistry-commons/src/main/java/org/apache/chemistry/impl/simple/SimpleConnection.java?rev=830511&r1=830510&r2=830511&view=diff
==============================================================================
--- incubator/chemistry/trunk/chemistry/chemistry-commons/src/main/java/org/apache/chemistry/impl/simple/SimpleConnection.java (original)
+++ incubator/chemistry/trunk/chemistry/chemistry-commons/src/main/java/org/apache/chemistry/impl/simple/SimpleConnection.java Wed Oct 28 11:54:22 2009
@@ -745,9 +745,9 @@
 
     public Iterator<ObjectEntry> getChangeLog(String changeLogToken,
             boolean includeProperties, int maxItems, boolean[] hasMoreItems,
-            String[] lastChangeLogToken) {
+            String[] latestChangeLogToken) {
         hasMoreItems[0] = false;
-        lastChangeLogToken[0] = null;
+        latestChangeLogToken[0] = null;
         return Collections.<ObjectEntry> emptyList().iterator();
     }
 

Modified: incubator/chemistry/trunk/chemistry/chemistry-commons/src/main/java/org/apache/chemistry/impl/simple/SimpleObject.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/chemistry/chemistry-commons/src/main/java/org/apache/chemistry/impl/simple/SimpleObject.java?rev=830511&r1=830510&r2=830511&view=diff
==============================================================================
--- incubator/chemistry/trunk/chemistry/chemistry-commons/src/main/java/org/apache/chemistry/impl/simple/SimpleObject.java (original)
+++ incubator/chemistry/trunk/chemistry/chemistry-commons/src/main/java/org/apache/chemistry/impl/simple/SimpleObject.java Wed Oct 28 11:54:22 2009
@@ -30,7 +30,6 @@
 import org.apache.chemistry.PropertyDefinition;
 import org.apache.chemistry.Relationship;
 import org.apache.chemistry.RelationshipDirection;
-import org.apache.chemistry.Repository;
 import org.apache.chemistry.Type;
 import org.apache.chemistry.impl.base.BaseObject;
 

Modified: incubator/chemistry/trunk/chemistry/chemistry-commons/src/main/java/org/apache/chemistry/impl/simple/SimpleRepository.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/chemistry/chemistry-commons/src/main/java/org/apache/chemistry/impl/simple/SimpleRepository.java?rev=830511&r1=830510&r2=830511&view=diff
==============================================================================
--- incubator/chemistry/trunk/chemistry/chemistry-commons/src/main/java/org/apache/chemistry/impl/simple/SimpleRepository.java (original)
+++ incubator/chemistry/trunk/chemistry/chemistry-commons/src/main/java/org/apache/chemistry/impl/simple/SimpleRepository.java Wed Oct 28 11:54:22 2009
@@ -98,10 +98,6 @@
      * ----- RepositoryEntry -----
      */
 
-    public String getRelationshipName() {
-        return null;
-    }
-
     public URI getThinClientURI() {
         return null;
     }
@@ -196,6 +192,10 @@
         return true;
     }
 
+    public boolean hasGetFolderTree() {
+        return false;
+    }
+
     public boolean isContentStreamUpdatableAnytime() {
         return true;
     }

Modified: incubator/chemistry/trunk/chemistry/chemistry-commons/src/main/java/org/apache/chemistry/impl/simple/SimpleTypeManager.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/chemistry/chemistry-commons/src/main/java/org/apache/chemistry/impl/simple/SimpleTypeManager.java?rev=830511&r1=830510&r2=830511&view=diff
==============================================================================
--- incubator/chemistry/trunk/chemistry/chemistry-commons/src/main/java/org/apache/chemistry/impl/simple/SimpleTypeManager.java (original)
+++ incubator/chemistry/trunk/chemistry/chemistry-commons/src/main/java/org/apache/chemistry/impl/simple/SimpleTypeManager.java Wed Oct 28 11:54:22 2009
@@ -84,6 +84,9 @@
      */
     public Collection<Type> getTypes(String typeId, int depth,
             boolean returnPropertyDefinitions) {
+        if (depth == 0) {
+            throw new IllegalArgumentException("Depth 0 invalid");
+        }
         List<Type> list = new LinkedList<Type>();
         Set<String> done = new HashSet<String>();
         if (typeId == null) {

Modified: incubator/chemistry/trunk/chemistry/chemistry-commons/src/test/java/org/apache/chemistry/impl/simple/TestSimpleRepository.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/chemistry/chemistry-commons/src/test/java/org/apache/chemistry/impl/simple/TestSimpleRepository.java?rev=830511&r1=830510&r2=830511&view=diff
==============================================================================
--- incubator/chemistry/trunk/chemistry/chemistry-commons/src/test/java/org/apache/chemistry/impl/simple/TestSimpleRepository.java (original)
+++ incubator/chemistry/trunk/chemistry/chemistry-commons/src/test/java/org/apache/chemistry/impl/simple/TestSimpleRepository.java Wed Oct 28 11:54:22 2009
@@ -86,8 +86,8 @@
         assertNotNull(info.getRootFolderId());
         assertEquals("Apache", info.getVendorName());
         assertEquals("Chemistry Simple Repository", info.getProductName());
-        assertEquals("0.1-SNAPSHOT", info.getProductVersion());
-        assertEquals("0.62", info.getVersionSupported());
+        assertEquals("1.0-SNAPSHOT", info.getProductVersion());
+        assertEquals("1.0", info.getVersionSupported());
         assertNull(info.getRepositorySpecificInformation());
 
         RepositoryCapabilities capabilities = info.getCapabilities();
@@ -111,8 +111,6 @@
         assertNull(repo.getType("no-such-type"));
         assertEquals(3,
                 repo.getTypes(BaseType.DOCUMENT.getId(), -1, false).size());
-        assertEquals(0, // TODO spec unclear on depth 0
-                repo.getTypes(BaseType.DOCUMENT.getId(), 0, false).size());
         assertEquals(1,
                 repo.getTypes(BaseType.DOCUMENT.getId(), 1, false).size());
         assertEquals(2,
@@ -120,7 +118,6 @@
         assertEquals(2,
                 repo.getTypes(BaseType.DOCUMENT.getId(), 3, false).size());
         assertEquals(2, repo.getTypes("doc", -1, false).size());
-        assertEquals(0, repo.getTypes("doc", 0, false).size());
         assertEquals(1, repo.getTypes("doc", 1, false).size());
         assertEquals(1, repo.getTypes("doc", 2, false).size());
         assertEquals(1, repo.getTypes("doc", 3, false).size());
@@ -253,13 +250,13 @@
         res = conn.query("SELECT * FROM doc", false);
         assertEquals(1, res.size());
         res = conn.query(
-                "SELECT * FROM cmis:folder WHERE cmis:Name = ''",
+                "SELECT * FROM cmis:folder WHERE cmis:name = ''",
                 false);
         assertEquals(1, res.size());
-        res = conn.query("SELECT * FROM doc WHERE cmis:ObjectId = 'nosuchid'",
+        res = conn.query("SELECT * FROM doc WHERE cmis:objectId = 'nosuchid'",
                 false);
         assertEquals(0, res.size());
-        res = conn.query("SELECT * FROM doc WHERE cmis:ObjectId <> '123'",
+        res = conn.query("SELECT * FROM doc WHERE cmis:objectId <> '123'",
                 false);
         assertEquals(1, res.size());
     }



Mime
View raw message