chemistry-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fguilla...@apache.org
Subject svn commit: r799350 - in /incubator/chemistry/trunk/chemistry: chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/ chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/stax/ chemistry-atompub-server/src/mai...
Date Thu, 30 Jul 2009 16:19:48 GMT
Author: fguillaume
Date: Thu Jul 30 16:19:48 2009
New Revision: 799350

URL: http://svn.apache.org/viewvc?rev=799350&view=rev
Log:
CMIS-44: basic URI template (object-by-id), for AtomPub client and server

Added:
    incubator/chemistry/trunk/chemistry/chemistry-atompub/src/main/java/org/apache/chemistry/atompub/URITemplate.java
  (with props)
Modified:
    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/APPServiceDocumentReader.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-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/CMISWorkspaceManager.java
    incubator/chemistry/trunk/chemistry/chemistry-atompub/src/main/java/org/apache/chemistry/atompub/CMIS.java

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=799350&r1=799349&r2=799350&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
Thu Jul 30 16:19:48 2009
@@ -48,6 +48,7 @@
 import org.apache.chemistry.VersioningState;
 import org.apache.chemistry.atompub.Atom;
 import org.apache.chemistry.atompub.CMIS;
+import org.apache.chemistry.atompub.URITemplate;
 import org.apache.chemistry.atompub.client.connector.Connector;
 import org.apache.chemistry.atompub.client.connector.Request;
 import org.apache.chemistry.atompub.client.connector.Response;
@@ -299,24 +300,36 @@
 
     /*
      * TODO hardcoded Chemistry URL pattern here...
-     *
-     * Will use URI templates (or, failing that, search) in future versions.
      */
     protected APPObjectEntry getObjectEntry(ObjectId objectId) {
         if (objectId instanceof APPObjectEntry) {
             return ((APPObjectEntry) objectId);
         }
-        String href = repository.getCollectionHref(CMIS.COL_ROOT_CHILDREN);
-        if (href.matches(".*/children/[0-9a-f-]{36}")) {
-            href = href.substring(0, href.length() - "/children/".length() - 36);
+        String href;
+        URITemplate uriTemplate = repository.getURITemplate(CMIS.URITMPL_ENTRY_BY_ID);
+        if (uriTemplate != null) {
+            // use entry-by-id URI template
+            href = uriTemplate.template;
+            // TODO proper URI template syntax
+            href = href.replace("{id}", objectId.getId());
         } else {
-            if (href.matches(".*/children$")) {
-                href = href.substring(0, href.length() - "/children".length());
+            // TODO do a search (maybe 4 searches as base type unknown)
+
+            // XXX hardcoded Chemistry URL pattern
+            href = repository.getCollectionHref(CMIS.COL_ROOT_CHILDREN);
+            if (href.matches(".*/children/[0-9a-f-]{36}")) {
+                href = href.substring(0, href.length() - "/children/".length()
+                        - 36);
             } else {
-                throw new AssertionError(href);
+                if (href.matches(".*/children$")) {
+                    href = href.substring(0, href.length()
+                            - "/children".length());
+                } else {
+                    throw new AssertionError(href);
+                }
             }
+            href += "/object/" + objectId.getId();
         }
-        href += "/object/" + objectId.getId();
         Response resp = connector.get(new Request(href));
         if (!resp.isOk()) {
             throw new ContentManagerException(

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=799350&r1=799349&r2=799350&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
Thu Jul 30 16:19:48 2009
@@ -22,16 +22,16 @@
 import java.net.URI;
 import java.util.Collection;
 import java.util.HashMap;
-import java.util.Hashtable;
 import java.util.Map;
 
-import org.apache.chemistry.TypeManager;
 import org.apache.chemistry.Connection;
 import org.apache.chemistry.Repository;
 import org.apache.chemistry.RepositoryInfo;
 import org.apache.chemistry.SPI;
 import org.apache.chemistry.Type;
+import org.apache.chemistry.TypeManager;
 import org.apache.chemistry.atompub.CMIS;
+import org.apache.chemistry.atompub.URITemplate;
 import org.apache.chemistry.atompub.client.connector.APPContentManager;
 import org.apache.chemistry.atompub.client.connector.Request;
 import org.apache.chemistry.atompub.client.connector.Response;
@@ -52,7 +52,7 @@
 
     protected Map<String, String> collections = new HashMap<String, String>();
 
-    protected Map<Class<?>, Object> singletons = new Hashtable<Class<?>,
Object>();
+    protected Map<String, URITemplate> uriTemplates = new HashMap<String, URITemplate>();
 
     public APPRepository(APPContentManager cm) {
         this(cm, null);
@@ -100,6 +100,10 @@
         collections.put(type, href);
     }
 
+    public void addURITemplate(URITemplate uriTemplate) {
+        uriTemplates.put(uriTemplate.type, uriTemplate);
+    }
+
     public RepositoryInfo getInfo() {
         return info;
     }
@@ -131,6 +135,10 @@
         return collections.get(type);
     }
 
+    public URITemplate getURITemplate(String type) {
+        return uriTemplates.get(type);
+    }
+
     /** type API */
 
     public void addType(APPType type) {

Modified: incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/APPServiceDocumentReader.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/APPServiceDocumentReader.java?rev=799350&r1=799349&r2=799350&view=diff
==============================================================================
--- incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/APPServiceDocumentReader.java
(original)
+++ incubator/chemistry/trunk/chemistry/chemistry-atompub-client/src/main/java/org/apache/chemistry/atompub/client/APPServiceDocumentReader.java
Thu Jul 30 16:19:48 2009
@@ -17,6 +17,7 @@
 package org.apache.chemistry.atompub.client;
 
 import org.apache.chemistry.RepositoryInfo;
+import org.apache.chemistry.atompub.URITemplate;
 import org.apache.chemistry.atompub.client.connector.APPContentManager;
 import org.apache.chemistry.atompub.client.stax.ReadContext;
 import org.apache.chemistry.atompub.client.stax.ServiceDocumentReader;
@@ -33,6 +34,11 @@
     }
 
     @Override
+    protected void addURITemplate(APPRepository repo, URITemplate uriTemplate) {
+        repo.addURITemplate(uriTemplate);
+    }
+
+    @Override
     protected APPRepository createRepository(ReadContext ctx) {
         return new APPRepository((APPContentManager) ctx.getContentManager());
     }

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=799350&r1=799349&r2=799350&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
Thu Jul 30 16:19:48 2009
@@ -26,14 +26,13 @@
 import javax.xml.namespace.QName;
 import javax.xml.stream.XMLStreamException;
 
-import org.apache.abdera.model.Element;
-import org.apache.abdera.model.Workspace;
 import org.apache.chemistry.JoinCapability;
 import org.apache.chemistry.QueryCapability;
 import org.apache.chemistry.Repository;
 import org.apache.chemistry.RepositoryInfo;
 import org.apache.chemistry.atompub.Atom;
 import org.apache.chemistry.atompub.CMIS;
+import org.apache.chemistry.atompub.URITemplate;
 import org.apache.chemistry.atompub.client.APPRepository;
 import org.apache.chemistry.atompub.client.APPRepositoryCapabilities;
 import org.apache.chemistry.atompub.client.APPRepositoryInfo;
@@ -49,6 +48,8 @@
 
     protected abstract void addCollection(T repo, String href, String type);
 
+    protected abstract void addURITemplate(T repo, URITemplate uriTemplate);
+
     protected abstract void setInfo(T repo, RepositoryInfo info);
 
     @SuppressWarnings("unchecked")
@@ -67,12 +68,16 @@
                     QName name = reader.getName();
                     if (name.equals(Atom.APP_COLLECTION)) {
                         String href = reader.getAttributeValue("href");
-                        String type = reader.getAttributeValue("collectionType");
+                        String type = reader.getAttributeValue("collectionType"); // XXX
                         addCollection(repo, href, type);
                     } else if (name.equals(CMIS.REPOSITORY_INFO)) {
                         RepositoryInfo info = readRepositoryInfo(context,
                                 reader);
                         setInfo(repo, info);
+                    } else if (name.equals(CMIS.RESTATOM_URI_TEMPLATE)) {
+                        URITemplate uriTemplate = readURITemplate(context,
+                                reader);
+                        addURITemplate(repo, uriTemplate);
                     }
                 }
                 repos.add(repo);
@@ -126,43 +131,23 @@
         return new APPRepositoryInfo(caps, map);
     }
 
-    protected RepositoryInfo getRepositoryInfo(Workspace ws) {
-        Element repoInfo = ws.getFirstChild(CMIS.REPOSITORY_INFO);
-        APPRepositoryCapabilities caps = null;
-        Map<String, Object> map = new HashMap<String, Object>();
-        for (Element el : repoInfo.getElements()) {
-            String localName = el.getQName().getLocalPart();
-            if (localName.equals(CMIS.CAPABILITIES.getLocalPart())) {
-                caps = new APPRepositoryCapabilities();
-                for (Element el2 : el.getElements()) {
-                    localName = el2.getQName().getLocalPart();
-                    if (localName.equals(CMIS.CAPABILITY_ALL_VERSIONS_SEARCHABLE.getLocalPart()))
{
-                        caps.setAllVersionsSearchable(Boolean.parseBoolean(el2.getText()));
-                    } else if (localName.equals(CMIS.CAPABILITY_MULTIFILING.getLocalPart()))
{
-                        caps.setHasMultifiling(Boolean.parseBoolean(el2.getText()));
-                    } else if (localName.equals(CMIS.CAPABILITY_PWC_SEARCHABLE.getLocalPart()))
{
-                        caps.setPWCSearchable(Boolean.parseBoolean(el2.getText()));
-                    } else if (localName.equals(CMIS.CAPABILITY_PWC_UPDATEABLE.getLocalPart()))
{
-                        caps.setPWCUpdatable(Boolean.parseBoolean(el2.getText()));
-                    } else if (localName.equals(CMIS.CAPABILITY_UNFILING.getLocalPart()))
{
-                        caps.setHasUnfiling(Boolean.parseBoolean(el2.getText()));
-                    } else if (localName.equals(CMIS.CAPABILITY_VERSION_SPECIFIC_FILING.getLocalPart()))
{
-                        caps.setHasVersionSpecificFiling(Boolean.parseBoolean(el2.getText()));
-                    } else if (localName.equals(CMIS.CAPABILITY_QUERY.getLocalPart())) {
-                        caps.setQueryCapability(QueryCapability.get(
-                                el2.getText(), QueryCapability.NONE));
-                    } else if (localName.equals(CMIS.CAPABILITY_JOIN.getLocalPart())) {
-                        caps.setJoinCapability(JoinCapability.get(
-                                el2.getText(), JoinCapability.NONE));
-                    }
-                }
-            } else if (localName.equals("repositorySpecificInformation")) {
-                // TODO
-            } else {
-                map.put(localName, el.getText());
+    protected URITemplate readURITemplate(ReadContext context, StaxReader reader)
+            throws XMLStreamException {
+        String type = null;
+        String mediaType = null;
+        String template = null;
+        ChildrenNavigator nav = reader.getChildren();
+        while (nav.next()) {
+            String localName = reader.getLocalName();
+            if (localName.equals(CMIS.RESTATOM_TYPE.getLocalPart())) {
+                type = reader.getElementText();
+            } else if (localName.equals(CMIS.RESTATOM_MEDIA_TYPE.getLocalPart())) {
+                mediaType = reader.getElementText();
+            } else if (localName.equals(CMIS.RESTATOM_TEMPLATE.getLocalPart())) {
+                template = reader.getElementText();
             }
         }
-        return new APPRepositoryInfo(caps, map);
+        return new URITemplate(type, mediaType, template);
     }
 
     protected void readRepositorySpecificInformation(ReadContext context,

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=799350&r1=799349&r2=799350&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
Thu Jul 30 16:19:48 2009
@@ -16,8 +16,10 @@
  */
 package org.apache.chemistry.atompub.server;
 
+import java.util.ArrayList;
+import java.util.List;
+
 import org.apache.abdera.protocol.Resolver;
-import org.apache.abdera.protocol.server.CollectionInfo;
 import org.apache.abdera.protocol.server.RequestContext;
 import org.apache.abdera.protocol.server.ResponseContext;
 import org.apache.abdera.protocol.server.Target;
@@ -31,7 +33,9 @@
 import org.apache.abdera.protocol.server.impl.TemplateTargetBuilder;
 import org.apache.abdera.util.Constants;
 import org.apache.chemistry.Repository;
+import org.apache.chemistry.atompub.Atom;
 import org.apache.chemistry.atompub.CMIS;
+import org.apache.chemistry.atompub.URITemplate;
 
 /**
  * Abdera provider for the CMIS bindings used by Chemistry.
@@ -120,12 +124,11 @@
         workspaceInfo.addCollection(new CMISCollectionForOther(
                 CMIS.COL_CHECKED_OUT, "checkedout", null, repository));
 
-        CollectionInfo ci;
-        ci = new CMISTypesCollection(CMIS.COL_TYPES_CHILDREN, repository);
-        workspaceInfo.addCollection(ci);
+        workspaceInfo.addCollection(new CMISTypesCollection(
+                CMIS.COL_TYPES_CHILDREN, repository));
 
-        ci = new CMISTypesCollection(CMIS.COL_TYPES_DESCENDANTS, repository);
-        workspaceInfo.addCollection(ci);
+        workspaceInfo.addCollection(new CMISTypesCollection(
+                CMIS.COL_TYPES_DESCENDANTS, repository));
 
         workspaceInfo.addCollection(new CMISQueryFeed(repository));
 
@@ -137,6 +140,26 @@
         return repository;
     }
 
+    public List<URITemplate> getURITemplates(RequestContext request) {
+        String base = request.getBaseUri().toString();
+        if (!base.endsWith("/")) {
+            base += '/';
+        }
+        List<URITemplate> list = new ArrayList<URITemplate>(3);
+        list.add(new URITemplate(CMIS.URITMPL_ENTRY_BY_ID, //
+                Atom.MEDIA_TYPE_ATOM_ENTRY, //
+                base + "object/{id}"));
+        if (false) { // TODO
+            list.add(new URITemplate(CMIS.URITMPL_FOLDER_BY_PATH, //
+                    Atom.MEDIA_TYPE_ATOM_ENTRY, //
+                    base + "objectpath/{path}"));
+            list.add(new URITemplate(CMIS.URITMPL_QUERY, //
+                    Atom.MEDIA_TYPE_ATOM_FEED, //
+                    base + "query?q={q}"));
+        }
+        return list;
+    }
+
     @Override
     protected TargetBuilder getTargetBuilder(RequestContext request) {
         return targetBuilder;

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=799350&r1=799349&r2=799350&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
Thu Jul 30 16:19:48 2009
@@ -30,6 +30,7 @@
 import org.apache.chemistry.RepositoryCapabilities;
 import org.apache.chemistry.RepositoryInfo;
 import org.apache.chemistry.atompub.CMIS;
+import org.apache.chemistry.atompub.URITemplate;
 import org.w3c.dom.Document;
 
 /**
@@ -55,6 +56,8 @@
         sw.startDocument();
         sw.startService();
         ((StaxStreamWriter) sw).writeNamespace(CMIS.CMIS_PREFIX, CMIS.CMIS_NS);
+        ((StaxStreamWriter) sw).writeNamespace(CMIS.CMIS_RESTATOM_PREFIX,
+                CMIS.CMIS_RESTATOM_NS);
         for (WorkspaceInfo wi : provider.getWorkspaceManager(request).getWorkspaces(
                 request)) {
             sw.startWorkspace();
@@ -69,6 +72,20 @@
                 // no AtomPub categories
                 sw.endCollection();
             }
+            // URI templates
+            for (URITemplate info : provider.getURITemplates(request)) {
+                sw.startElement(CMIS.RESTATOM_URI_TEMPLATE);
+                sw.startElement(CMIS.RESTATOM_TYPE);
+                sw.writeElementText(info.type);
+                sw.endElement();
+                sw.startElement(CMIS.RESTATOM_MEDIA_TYPE);
+                sw.writeElementText(info.mediaType);
+                sw.endElement();
+                sw.startElement(CMIS.RESTATOM_TEMPLATE);
+                sw.writeElementText(info.template);
+                sw.endElement();
+                sw.endElement();
+            }
             sw.endWorkspace();
         }
         sw.endService();

Modified: incubator/chemistry/trunk/chemistry/chemistry-atompub-server/src/main/java/org/apache/chemistry/atompub/server/CMISWorkspaceManager.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/chemistry/chemistry-atompub-server/src/main/java/org/apache/chemistry/atompub/server/CMISWorkspaceManager.java?rev=799350&r1=799349&r2=799350&view=diff
==============================================================================
--- incubator/chemistry/trunk/chemistry/chemistry-atompub-server/src/main/java/org/apache/chemistry/atompub/server/CMISWorkspaceManager.java
(original)
+++ incubator/chemistry/trunk/chemistry/chemistry-atompub-server/src/main/java/org/apache/chemistry/atompub/server/CMISWorkspaceManager.java
Thu Jul 30 16:19:48 2009
@@ -60,7 +60,7 @@
         if (paths.startsWith("/unfiled/")) {
             return new CMISCollectionForOther(null, "unfiled", null, repository);
         }
-        if (paths.startsWith("/query/")) {
+        if (paths.startsWith("/query/") || paths.startsWith("/query?")) {
             return new CMISQueryFeed(repository);
         }
         return null;

Modified: incubator/chemistry/trunk/chemistry/chemistry-atompub/src/main/java/org/apache/chemistry/atompub/CMIS.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/chemistry/chemistry-atompub/src/main/java/org/apache/chemistry/atompub/CMIS.java?rev=799350&r1=799349&r2=799350&view=diff
==============================================================================
--- incubator/chemistry/trunk/chemistry/chemistry-atompub/src/main/java/org/apache/chemistry/atompub/CMIS.java
(original)
+++ incubator/chemistry/trunk/chemistry/chemistry-atompub/src/main/java/org/apache/chemistry/atompub/CMIS.java
Thu Jul 30 16:19:48 2009
@@ -31,10 +31,18 @@
 
     public static final String CMIS_PREFIX = "cmis";
 
+    public static final String CMIS_RESTATOM_NS = "http://docs.oasis-open.org/ns/cmis/restatom/200901";
+
+    public static final String CMIS_RESTATOM_PREFIX = "cmisra";
+
     public static QName CMISName(String localPart) {
         return new QName(CMIS_NS, localPart, CMIS_PREFIX);
     }
 
+    public static QName CMISRAName(String localPart) {
+        return new QName(CMIS_RESTATOM_NS, localPart, CMIS_RESTATOM_PREFIX);
+    }
+
     /*
      * ----- XML Qualified Names -----
      */
@@ -200,6 +208,18 @@
     public static final QName INCLUDE_ALLOWABLE_ACTIONS = CMISName("includeAllowableActions");
 
     /*
+     * ----- CMIS REST Atom Qualified Names-----
+     */
+
+    public static final QName RESTATOM_URI_TEMPLATE = CMISRAName("uritemplate");
+
+    public static final QName RESTATOM_TEMPLATE = CMISRAName("template");
+
+    public static final QName RESTATOM_TYPE = CMISRAName("type");
+
+    public static final QName RESTATOM_MEDIA_TYPE = CMISRAName("mediatype");
+
+    /*
      * ----- CMIS Collection Types -----
      */
 
@@ -239,4 +259,14 @@
 
     public static final String LINK_ROOT_DESCENDANTS = "rootdescendants";
 
+    /*
+     * ----- CMIS URI Template Types -----
+     */
+
+    public static final String URITMPL_ENTRY_BY_ID = "entrybyid";
+
+    public static final String URITMPL_FOLDER_BY_PATH = "folderbypath";
+
+    public static final String URITMPL_QUERY = "query";
+
 }

Added: incubator/chemistry/trunk/chemistry/chemistry-atompub/src/main/java/org/apache/chemistry/atompub/URITemplate.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/chemistry/chemistry-atompub/src/main/java/org/apache/chemistry/atompub/URITemplate.java?rev=799350&view=auto
==============================================================================
--- incubator/chemistry/trunk/chemistry/chemistry-atompub/src/main/java/org/apache/chemistry/atompub/URITemplate.java
(added)
+++ incubator/chemistry/trunk/chemistry/chemistry-atompub/src/main/java/org/apache/chemistry/atompub/URITemplate.java
Thu Jul 30 16:19:48 2009
@@ -0,0 +1,36 @@
+/*
+ * 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;
+
+/**
+ * Information about a URI template used by CMIS.
+ */
+public class URITemplate {
+
+    public String type;
+
+    public String mediaType;
+
+    public String template;
+
+    public URITemplate(String type, String mediaType, String template) {
+        this.type = type;
+        this.mediaType = mediaType;
+        this.template = template;
+    }
+
+}

Propchange: incubator/chemistry/trunk/chemistry/chemistry-atompub/src/main/java/org/apache/chemistry/atompub/URITemplate.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/chemistry/trunk/chemistry/chemistry-atompub/src/main/java/org/apache/chemistry/atompub/URITemplate.java
------------------------------------------------------------------------------
    svn:keywords = Id

Propchange: incubator/chemistry/trunk/chemistry/chemistry-atompub/src/main/java/org/apache/chemistry/atompub/URITemplate.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain



Mime
View raw message