chemistry-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From f...@apache.org
Subject svn commit: r1083763 - in /chemistry/site/trunk/content/java: developing/dev-binding-differences.mdtext developing/dev-url.mdtext examples/example-create-session.mdtext examples/example-read-meta-content.mdtext examples/index.mdtext opencmis.mdtext
Date Mon, 21 Mar 2011 12:42:35 GMT
Author: fmui
Date: Mon Mar 21 12:42:34 2011
New Revision: 1083763

URL: http://svn.apache.org/viewvc?rev=1083763&view=rev
Log:
Example page consistency and typos

Modified:
    chemistry/site/trunk/content/java/developing/dev-binding-differences.mdtext
    chemistry/site/trunk/content/java/developing/dev-url.mdtext
    chemistry/site/trunk/content/java/examples/example-create-session.mdtext
    chemistry/site/trunk/content/java/examples/example-read-meta-content.mdtext
    chemistry/site/trunk/content/java/examples/index.mdtext
    chemistry/site/trunk/content/java/opencmis.mdtext

Modified: chemistry/site/trunk/content/java/developing/dev-binding-differences.mdtext
URL: http://svn.apache.org/viewvc/chemistry/site/trunk/content/java/developing/dev-binding-differences.mdtext?rev=1083763&r1=1083762&r2=1083763&view=diff
==============================================================================
--- chemistry/site/trunk/content/java/developing/dev-binding-differences.mdtext (original)
+++ chemistry/site/trunk/content/java/developing/dev-binding-differences.mdtext Mon Mar 21
12:42:34 2011
@@ -17,7 +17,7 @@ services:
 * AclService
 * DiscoveryService
 * ObjectService
-* MultifFlingService
+* MulitfilingService
 * NavigationService
 * PolicyService
 * RelationshipService

Modified: chemistry/site/trunk/content/java/developing/dev-url.mdtext
URL: http://svn.apache.org/viewvc/chemistry/site/trunk/content/java/developing/dev-url.mdtext?rev=1083763&r1=1083762&r2=1083763&view=diff
==============================================================================
--- chemistry/site/trunk/content/java/developing/dev-url.mdtext (original)
+++ chemistry/site/trunk/content/java/developing/dev-url.mdtext Mon Mar 21 12:42:34 2011
@@ -7,7 +7,7 @@ you want to debug sepcific requests.
 
 ##  Syntax
 	:::
-	URL ::= http://<HOST>:<PORT>/<SERVLET-PATH>/atom/<REPOSITORY-ID>/<RESOURCE>?<PARAM=VALUE>&<PARAM=VALUE>&....
+	URL ::= http://<HOST>:<PORT>/<SERVLET-PATH>/<REPOSITORY-ID>/<RESOURCE>?<PARAM=VALUE>&<PARAM=VALUE>&....
 
 	RESOURCE ::= RESOURCE_CHILDREN |
 		RESOURCE_CHILDREN |

Modified: chemistry/site/trunk/content/java/examples/example-create-session.mdtext
URL: http://svn.apache.org/viewvc/chemistry/site/trunk/content/java/examples/example-create-session.mdtext?rev=1083763&r1=1083762&r2=1083763&view=diff
==============================================================================
--- chemistry/site/trunk/content/java/examples/example-create-session.mdtext (original)
+++ chemistry/site/trunk/content/java/examples/example-create-session.mdtext Mon Mar 21 12:42:34
2011
@@ -1,15 +1,14 @@
-Title: Create a session
+Title: Creating a session
 
-# Create a session
+# Creating a session
 This example explains the first steps required in each client application: 
 How to create a session and connect to a repository.
 
-## Session Creation - AtomPub Binding
-<DIV class="codeHeader">Opening a Atom Pub Connection</DIV>
+## AtomPub binding
 
     :::java
     // default factory implementation of client runtime
-    SessionFactory f = SessionFactoryImpl.newInstance();
+    SessionFactory factory = SessionFactoryImpl.newInstance();
     Map<String, String> parameter = new HashMap<String, String>();
     
     // user credentials
@@ -22,16 +21,14 @@ How to create a session and connect to a
     parameter.put(SessionParameter.REPOSITORY_ID, "myRepository");
     
     // create session
-    Session s = f.createSession(parameter);
+    Session session = factory.createSession(parameter);
 
 
-<a name="OpenCMISClientAPI-SessionCreation-WebServicesBinding"></a>
-## Session Creation - Web Services Binding
-<DIV class="codeHeader">Opening a Web Services Connection</DIV>
+## Web Services binding
 
     ::java
     // default factory implementation of client runtime
-    SessionFactory f = SessionFactoryImpl.newInstance();
+    SessionFactory factory = SessionFactoryImpl.newInstance();
     Map<String, String> parameter = new HashMap<String, String>();
     
     // user credentials
@@ -40,7 +37,6 @@ How to create a session and connect to a
     
     // connection settings
     parameter.put(SessionParameter.BINDING_TYPE, BindingType.WEBSERVICES.value());
-    parameter.put(SessionParameter.REPOSITORY_ID, "myRepository");
     parameter.put(SessionParameter.WEBSERVICES_ACL_SERVICE, "http://<host>:<port>/cmis/services/ACLService?wsdl");
     parameter.put(SessionParameter.WEBSERVICES_DISCOVERY_SERVICE, "http://<host>:<port>/cmis/services/DiscoveryService?wsdl");
     parameter.put(SessionParameter.WEBSERVICES_MULTIFILING_SERVICE, "http://<host>:<port>/cmis/services/MultiFilingService?wsdl");
@@ -50,6 +46,28 @@ How to create a session and connect to a
     parameter.put(SessionParameter.WEBSERVICES_RELATIONSHIP_SERVICE, "http://<host>:<port>/cmis/services/RelationshipService?wsdl");
     parameter.put(SessionParameter.WEBSERVICES_REPOSITORY_SERVICE, "http://<host>:<port>/cmis/services/RepositoryService?wsdl");
     parameter.put(SessionParameter.WEBSERVICES_VERSIONING_SERVICE, "http://<host>:<port>/cmis/services/VersioningService?wsdl");
+    parameter.put(SessionParameter.REPOSITORY_ID, "myRepository");
+
+    // create session
+    Session session = f.createSession(parameter);
+
+
+## Local binding
+
+    ::java
+    // default factory implementation of client runtime
+    SessionFactory factory = SessionFactoryImpl.newInstance();
+    Map<String, String> parameter = new HashMap<String, String>();
     
+    // user credentials
+    parameter.put(SessionParameter.USER, "Otto");
+    parameter.put(SessionParameter.PASSWORD, "****");
+
+    // connection settings
+    parameter.put(SessionParameter.BINDING_TYPE, BindingType.LOCAL.value());
+    parameter.put(SessionParameter.LOCAL_FACTORY, "my.local.factory");
+    parameter.put(SessionParameter.REPOSITORY_ID, "myRepository");
+
     // create session
-    Session s = f.createSession(parameter);
+    Session session = factory.createSession(parameter);
+

Modified: chemistry/site/trunk/content/java/examples/example-read-meta-content.mdtext
URL: http://svn.apache.org/viewvc/chemistry/site/trunk/content/java/examples/example-read-meta-content.mdtext?rev=1083763&r1=1083762&r2=1083763&view=diff
==============================================================================
--- chemistry/site/trunk/content/java/examples/example-read-meta-content.mdtext (original)
+++ chemistry/site/trunk/content/java/examples/example-read-meta-content.mdtext Mon Mar 21
12:42:34 2011
@@ -1,5 +1,45 @@
-Title: Reading metadata and content from a CMIS repository
+Title: Reading metadata and content
 
-# Reading metadata and content from a CMIS repository
+# Reading metadata and content
 
-TODO
\ No newline at end of file
+## Reading metadata
+
+### Reading Properties - Single Property
+
+    :::java
+    ObjectId id = this.session.createObjectId("4711");
+    Document document = (Document) this.session.getObject(id);
+    Property<String> p = document.getProperty(PropertyIds.OBJECT_ID);
+    
+    String s = p.getValue();
+
+
+### Reading Properties - All Properties
+
+    :::java
+    ObjectId id = this.session.createObjectId("4711");
+    Document document = (Document) this.session.getObject(id);
+    List<Property<?>> l = document.getProperties();
+    Iterator<Property<?>> i = l.iterator();
+    while (i.hasNext()) {
+      Property<?> p = i.next();
+      Object value = p.getValue();
+      PropertyType t = p.getType();
+    
+      switch (t) {
+        case INTEGER:
+          Integer n = (Integer) value;
+          System.out.println(p.getName() + " = " + n);
+          break;
+        case STRING:
+     [...]
+    }
+
+
+## Retrieving content
+    
+    :::java
+    CmisObject object = getSession().getObject(session.createObjectId(fileId));
+    Document document = (Document)object;
+    String filename = document.getName();
+    InputStream stream = document.getContentStream().getStream();
\ No newline at end of file

Modified: chemistry/site/trunk/content/java/examples/index.mdtext
URL: http://svn.apache.org/viewvc/chemistry/site/trunk/content/java/examples/index.mdtext?rev=1083763&r1=1083762&r2=1083763&view=diff
==============================================================================
--- chemistry/site/trunk/content/java/examples/index.mdtext (original)
+++ chemistry/site/trunk/content/java/examples/index.mdtext Mon Mar 21 12:42:34 2011
@@ -1,18 +1,21 @@
-Title: Debugging OpenCMIS
+Title: Example code for OpenCMIS clients
 
-# Examples for OpenCMIS Clients
+# Example code for OpenCMIS clients
 
-Example code and code fragments for the OpenCMIS client API
+Example code and code fragments for the OpenCMIS client API.
+
+## Basics
 
-* [Connecting from .Net](example-connect-dotnet.html)
 * [Creating a session](example-create-session.html)
-* [Create and update a document](example-create-update.html)
-* [Get extension](example-get-extension.html)
+* [Creating and updating a document](example-create-update.html)
 * [Listing a folder](example-list-folder.html)
 * [Processing a query](example-process-query-results.html)
-* [Reading a file](example-read-file.html)
 * [Reading metadata and content](example-read-meta-content.html)
-* [Reading properties](example-read-props.html)
 * [Reading the root folder](example-read-root.html)
 * [Retrieving the id from path](example-get-id-from-path.html)
+
+## Advanced 
+
+* [Connecting from .Net](example-connect-dotnet.html)
+* [Getting extensions](example-get-extension.html)
 * [Using OSGI bundles](example-osgi.html)

Modified: chemistry/site/trunk/content/java/opencmis.mdtext
URL: http://svn.apache.org/viewvc/chemistry/site/trunk/content/java/opencmis.mdtext?rev=1083763&r1=1083762&r2=1083763&view=diff
==============================================================================
--- chemistry/site/trunk/content/java/opencmis.mdtext (original)
+++ chemistry/site/trunk/content/java/opencmis.mdtext Mon Mar 21 12:42:34 2011
@@ -1,54 +1,54 @@
-Title: OpenCMIS Overview
-
-# Welcome to OpenCMIS
-OpenCMIS is a collection of Java libraries, frameworks and tools around the 
-[CMIS (Content Management Interoperability Services)](http://docs.oasis-open.org/cmis/CMIS/v1.0/cmis-spec-v1.0.html)
-specification.
-
-The goal of OpenCMIS is to make CMIS simple for Java client and server
-developers. It hides the binding details and provides APIs and SPIs on
-different abstraction levels. It also includes test tools for content
-repository developers and client application developers.
-
-# Table of Contents for the documentation
-
-The OpenCMIS documentation is structured in the following sections:
-
-* [Developing with OpenCMIs](developing/index.html)
-* [Downloads](download.html)
-* [Example Code](examples/index.html)
-* [OpenCMIS HowTos](how-to/index.html)
-
-# Getting OpenCMIS
-You can get opencmis from the [Download-Page](download.html)
-
-# Releases
-
-Currently the following opencmis releases exist:
-
-Release Version  | Date | Release Notes | Changelog
----------------- | ---- | ------------- | ---------
-Release 0.3.0 (planned)  | coming soon | coming soon | coming soon
-Incubation Release 0.2.0 | Jan/21/2011 | [0.2.0](https://issues.apache.org/jira/secure/ReleaseNote.jspa?projectId=12310936&version=12315134)
| [0.2.0](https://issues.apache.org/jira/secure/IssueNavigator.jspa?reset=true&mode=hide&jqlQuery=project+%3D+CMIS+AND+fixVersion+%3D+%220.2.0-incubating%22)
-Incubation Release 0.1.0 | Sep/17/2010 | [0.1.0](https://issues.apache.org/jira/secure/ReleaseNote.jspa?projectId=12310936&version=12315133)
| [0.1.0](https://issues.apache.org/jira/secure/IssueNavigator.jspa?reset=true&mode=hide&jqlQuery=project+%3D+CMIS+AND+fixVersion+%3D+%220.1.0-incubating%22)
-
-# Projects using OpenCMIS
-## Client API
-<a name="ProjectsusingOpenCMIS-ProjectsusingOpenCMISClientAPI"></a>
-
-* **Spring Surf CMIS Application Browser** - [Howto](http://blogs.alfresco.com/wp/cmis/2010/06/14/spring-surf-and-opencmis-integration-part-2/)
- [Source Code](https://anonsvn.springframework.org/svn/se-surf/branches/DEV_CMIS_2/)
-* **Confluence CMIS Plugin** - [Project Site](http://code.google.com/p/confluence-cmis-plugin/)
-* **CMIS Explorer w/Adobe AIR** - [Project Site](http://code.google.com/p/cmis-explorer/)
-* **CMIS connectivity for SAP Applications** on future SAP Netweaver release
-* **Struts2CmisExplorer** - [Project Site](http://code.google.com/p/struts2cmisexplorer/)
-* **CMIS Workbench** - [Project Site](developing/tools/dev-tools-workbench.html)
-* **Alfresco Web Quick Start** - [Developer Guide](http://wiki.alfresco.com/wiki/Web_Quick_Start_Developer_Guide)
-* **Nuxeo CMIS Shell**
-
-<a name="ProjectsusingOpenCMIS-ProjectsusingOpenCMISServerFramework"></a>
-## Server Framework
-
-* **Open Text Enterprise Library CMIS Connector** (AtomPub binding)
-* **OpenWGA CMIS Connectivity Plugin** - [About](http://www.openwga.com/blog/openwga/archives/2010-10/cmis_the_new_content_interoperability_kid_on_the_block.int.html)
-* **Alfresco CMIS Preview** - [Project Site](http://cmis.alfresco.com/preview)
-* **Nuxeo EP 5.4 CMIS Connector** - [Project Site](http://doc.nuxeo.com/display/NXDOC/CMIS+for+Nuxeo)
- [Source Code](http://hg.nuxeo.org/addons/nuxeo-chemistry)
+Title: OpenCMIS Overview
+
+# Welcome to OpenCMIS
+OpenCMIS is a collection of Java libraries, frameworks and tools around the 
+[CMIS (Content Management Interoperability Services)](http://docs.oasis-open.org/cmis/CMIS/v1.0/cmis-spec-v1.0.html)
+specification.
+
+The goal of OpenCMIS is to make CMIS simple for Java client and server
+developers. It hides the binding details and provides APIs and SPIs on
+different abstraction levels. It also includes test tools for content
+repository developers and client application developers.
+
+# Table of Contents for the documentation
+
+The OpenCMIS documentation is structured in the following sections:
+
+* [Developing with OpenCMIS](developing/index.html)
+* [Downloads](download.html)
+* [Example Code](examples/index.html)
+* [OpenCMIS HowTos](how-to/index.html)
+
+# Getting OpenCMIS
+You can get OpenCMIS from the [Download page](download.html).
+
+# Releases
+
+Currently the following opencmis releases exist:
+
+Release Version  | Date | Release Notes | Changelog
+---------------- | ---- | ------------- | ---------
+Release 0.3.0 (planned)  | coming soon | coming soon | coming soon
+Incubation Release 0.2.0 | 2011-01-21 | [0.2.0](https://issues.apache.org/jira/secure/ReleaseNote.jspa?projectId=12310936&version=12315134)
| [0.2.0](https://issues.apache.org/jira/secure/IssueNavigator.jspa?reset=true&mode=hide&jqlQuery=project+%3D+CMIS+AND+fixVersion+%3D+%220.2.0-incubating%22)
+Incubation Release 0.1.0 | 2010-09-17 | [0.1.0](https://issues.apache.org/jira/secure/ReleaseNote.jspa?projectId=12310936&version=12315133)
| [0.1.0](https://issues.apache.org/jira/secure/IssueNavigator.jspa?reset=true&mode=hide&jqlQuery=project+%3D+CMIS+AND+fixVersion+%3D+%220.1.0-incubating%22)
+
+# Projects using OpenCMIS
+## Client API
+<a name="ProjectsusingOpenCMIS-ProjectsusingOpenCMISClientAPI"></a>
+
+* **Spring Surf CMIS Application Browser** - [Howto](http://blogs.alfresco.com/wp/cmis/2010/06/14/spring-surf-and-opencmis-integration-part-2/)
- [Source Code](https://anonsvn.springframework.org/svn/se-surf/branches/DEV_CMIS_2/)
+* **Confluence CMIS Plugin** - [Project Site](http://code.google.com/p/confluence-cmis-plugin/)
+* **CMIS Explorer w/Adobe AIR** - [Project Site](http://code.google.com/p/cmis-explorer/)
+* **CMIS connectivity for SAP Applications** on future SAP Netweaver release
+* **Struts2CmisExplorer** - [Project Site](http://code.google.com/p/struts2cmisexplorer/)
+* **CMIS Workbench** - [Project Site](developing/tools/dev-tools-workbench.html)
+* **Alfresco Web Quick Start** - [Developer Guide](http://wiki.alfresco.com/wiki/Web_Quick_Start_Developer_Guide)
+* **Nuxeo CMIS Shell**
+
+<a name="ProjectsusingOpenCMIS-ProjectsusingOpenCMISServerFramework"></a>
+## Server Framework
+
+* **Open Text Enterprise Library CMIS Connector** (AtomPub binding)
+* **OpenWGA CMIS Connectivity Plugin** - [About](http://www.openwga.com/blog/openwga/archives/2010-10/cmis_the_new_content_interoperability_kid_on_the_block.int.html)
+* **Alfresco CMIS Preview** - [Project Site](http://cmis.alfresco.com/preview)
+* **Nuxeo EP 5.4 CMIS Connector** - [Project Site](http://doc.nuxeo.com/display/NXDOC/CMIS+for+Nuxeo)
- [Source Code](http://hg.nuxeo.org/addons/nuxeo-chemistry)



Mime
View raw message