You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@chemistry.apache.org by jp...@apache.org on 2010/11/23 21:23:19 UTC

svn commit: r1038322 - in /incubator/chemistry/cmislib/trunk/src: cmislib/__init__.py cmislib/model.py doc/src/about.rst doc/src/code.rst doc/src/examples.rst doc/src/install.rst

Author: jpotts
Date: Tue Nov 23 20:23:19 2010
New Revision: 1038322

URL: http://svn.apache.org/viewvc?rev=1038322&view=rev
Log:
Applied patch CMIS-249, removed a reference to Committee Draft 04 in the docs

Modified:
    incubator/chemistry/cmislib/trunk/src/cmislib/__init__.py
    incubator/chemistry/cmislib/trunk/src/cmislib/model.py
    incubator/chemistry/cmislib/trunk/src/doc/src/about.rst
    incubator/chemistry/cmislib/trunk/src/doc/src/code.rst
    incubator/chemistry/cmislib/trunk/src/doc/src/examples.rst
    incubator/chemistry/cmislib/trunk/src/doc/src/install.rst

Modified: incubator/chemistry/cmislib/trunk/src/cmislib/__init__.py
URL: http://svn.apache.org/viewvc/incubator/chemistry/cmislib/trunk/src/cmislib/__init__.py?rev=1038322&r1=1038321&r2=1038322&view=diff
==============================================================================
--- incubator/chemistry/cmislib/trunk/src/cmislib/__init__.py (original)
+++ incubator/chemistry/cmislib/trunk/src/cmislib/__init__.py Tue Nov 23 20:23:19 2010
@@ -11,4 +11,27 @@
 #   See the License for the specific language governing permissions and
 #   limitations under the License.
 #
+#   Authors:
+#    Richard Esplin, Alfresco
+#
+"""
+Define package contents so that they are easy to import.
+"""
+
+from model import CmisClient, Repository, Folder
+
+__all__ = ["CmisClient", "Repository", "Folder"]
+#
+#   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.
+#
 

Modified: incubator/chemistry/cmislib/trunk/src/cmislib/model.py
URL: http://svn.apache.org/viewvc/incubator/chemistry/cmislib/trunk/src/cmislib/model.py?rev=1038322&r1=1038321&r2=1038322&view=diff
==============================================================================
--- incubator/chemistry/cmislib/trunk/src/cmislib/model.py (original)
+++ incubator/chemistry/cmislib/trunk/src/cmislib/model.py Tue Nov 23 20:23:19 2010
@@ -17,12 +17,13 @@
 """
 Module containing the domain objects used to work with a CMIS provider.
 """
-from cmislib.net import RESTService as Rest
-from cmislib.exceptions import CmisException, RuntimeException, \
+from net import RESTService as Rest
+from exceptions import CmisException, RuntimeException, \
     ObjectNotFoundException, InvalidArgumentException, \
     PermissionDeniedException, NotSupportedException, \
     UpdateConflictException
-from cmislib import messages
+import messages
+
 from urllib import quote_plus
 from urllib2 import HTTPError
 from urlparse import urlparse, urlunparse

Modified: incubator/chemistry/cmislib/trunk/src/doc/src/about.rst
URL: http://svn.apache.org/viewvc/incubator/chemistry/cmislib/trunk/src/doc/src/about.rst?rev=1038322&r1=1038321&r2=1038322&view=diff
==============================================================================
--- incubator/chemistry/cmislib/trunk/src/doc/src/about.rst (original)
+++ incubator/chemistry/cmislib/trunk/src/doc/src/about.rst Tue Nov 23 20:23:19 2010
@@ -25,7 +25,7 @@ The library is being developed with the 
 Quick Example
 -------------
 This should give you an idea of how easy and natural it is to work with the API:
-  >>> cmisClient = CmisClient('http://localhost:8080/alfresco/s/cmis', 'admin', 'admin')
+  >>> cmisClient = cmislib.CmisClient('http://localhost:8080/alfresco/s/cmis', 'admin', 'admin')
   >>> repo = cmisClient.defaultRepository
   >>> rootFolder = repo.rootFolder
   >>> children = rootFolder.getChildren()

Modified: incubator/chemistry/cmislib/trunk/src/doc/src/code.rst
URL: http://svn.apache.org/viewvc/incubator/chemistry/cmislib/trunk/src/doc/src/code.rst?rev=1038322&r1=1038321&r2=1038322&view=diff
==============================================================================
--- incubator/chemistry/cmislib/trunk/src/doc/src/code.rst (original)
+++ incubator/chemistry/cmislib/trunk/src/doc/src/code.rst Tue Nov 23 20:23:19 2010
@@ -17,9 +17,9 @@ Code
 The :mod:`cmislib.model` Module
 -------------------------------
 
-The :mod:`cmislib.model` Module contains all the CMIS domain objects. When working with the repository, the first thing you need to do is grab an instance of :class:`cmislib.model.CmisClient`, passing it the repository endpoint URL, username, and password.
+The :mod:`cmislib.model` Module contains all the CMIS domain objects. The ones you will work with are listed as top level package elements. When working with the repository, the first thing you need to do is grab an instance of :class:`cmislib.CmisClient`, passing it the repository endpoint URL, username, and password.
 
->>> cmisClient = CmisClient('http://localhost:8080/alfresco/s/cmis', 'admin', 'admin')
+>>> cmisClient = cmislib.CmisClient('http://localhost:8080/alfresco/s/cmis', 'admin', 'admin')
 
 From there you can get the default repository...
 
@@ -29,7 +29,7 @@ or a specific repository if you know the
 
 >>> repo = cmisClient.getRepository('83beb297-a6fa-4ac5-844b-98c871c0eea9')
 
-Once you have that, you're off to the races. Use the :class:`cmislib.model.Repository` class to create new :class:`cmislib.model.Folder` and :class:`cmislib.model.Document` objects, perform searches, etc.
+Once you have that, you're off to the races. Use the :class:`cmislib.Repository` class to create new :class:`cmislib.Folder` and :class:`cmislib.Document` objects, perform searches, etc.
 
 .. automodule:: cmislib.model
    :members:

Modified: incubator/chemistry/cmislib/trunk/src/doc/src/examples.rst
URL: http://svn.apache.org/viewvc/incubator/chemistry/cmislib/trunk/src/doc/src/examples.rst?rev=1038322&r1=1038321&r2=1038322&view=diff
==============================================================================
--- incubator/chemistry/cmislib/trunk/src/doc/src/examples.rst (original)
+++ incubator/chemistry/cmislib/trunk/src/doc/src/examples.rst Tue Nov 23 20:23:19 2010
@@ -16,9 +16,9 @@
 ========
 Examples
 ========
-There's nothing in cmislib that is specific to any particular vendor. Once you give it your CMIS provider's service URL and some credentials, it figures out where to go from there. But I haven't tested with anything other than Alfresco yet, and this thing is still hot out of the oven. If you want to help test it against other CMIS 1.0cd06 repositories I'd love the help.
+There's nothing in cmislib that is specific to any particular vendor. Once you give it your CMIS provider's service URL and some credentials, it figures out where to go from there.
 
-Anyway, let's look at some examples using Alfresco's public CMIS repository.
+Let's look at some examples using Alfresco's public CMIS repository.
 
 -----------------------
 Get a Repository object
@@ -27,7 +27,7 @@ Get a Repository object
  #. From the command-line, start the Python shell by typing `python` then hit enter.
  #. Import the CmisClient:
 
-    >>> from cmislib.model import CmisClient
+    >>> from cmislib import CmisClient
 
  #. Point the CmisClient at the repository's service URL 
 

Modified: incubator/chemistry/cmislib/trunk/src/doc/src/install.rst
URL: http://svn.apache.org/viewvc/incubator/chemistry/cmislib/trunk/src/doc/src/install.rst?rev=1038322&r1=1038321&r2=1038322&view=diff
==============================================================================
--- incubator/chemistry/cmislib/trunk/src/doc/src/install.rst (original)
+++ incubator/chemistry/cmislib/trunk/src/doc/src/install.rst Tue Nov 23 20:23:19 2010
@@ -18,9 +18,7 @@ Requirements
 ------------
 These requirements must be met:
  - Python 2.6.x
- - CMIS provider compliant with CMIS 1.0 Committee Draft 04
- 
-   - Alfresco 3.2r2 (`Download <http://wiki.alfresco.com/wiki/Download_Alfresco_Community_Network>`_)
+ - CMIS provider compliant with CMIS 1.0
 
 Steps
 -----
@@ -31,6 +29,6 @@ Steps
 
 Once you do that, you should be able to fire up Python on the command-line and import cmislib successfully.
 
-  >>> from cmislib.model import CmisClient, Repository, Folder
+  >>> from cmislib import CmisClient, Repository, Folder
 
 To validate everything is working, run some :ref:`tests` or walk through some :ref:`examples`.