]> git.aero2k.de Git - tmp/jakarta-migration.git/commitdiff
Adding Nuxeo related CMIS libraries and updating test CMIS JOIN queries.
authorRichard Millet <remillet@berkeley.edu>
Tue, 1 May 2012 16:35:47 +0000 (09:35 -0700)
committerRichard Millet <remillet@berkeley.edu>
Tue, 1 May 2012 16:35:47 +0000 (09:35 -0700)
3rdparty/nuxeo/nuxeo-server/5.5/bundles/nuxeo-opencmis-bindings-5.5.jar [new file with mode: 0644]
3rdparty/nuxeo/nuxeo-server/5.5/bundles/nuxeo-opencmis-impl-5.5.jar [new file with mode: 0644]
3rdparty/nuxeo/nuxeo-server/5.5/lib/chemistry-opencmis-client-api-0.6.0.jar [new file with mode: 0644]
3rdparty/nuxeo/nuxeo-server/5.5/lib/chemistry-opencmis-client-bindings-0.6.0.jar [new file with mode: 0644]
3rdparty/nuxeo/nuxeo-server/5.5/lib/chemistry-opencmis-client-impl-0.6.0.jar [new file with mode: 0644]
3rdparty/nuxeo/nuxeo-server/5.5/lib/chemistry-opencmis-commons-api-0.6.0.jar [new file with mode: 0644]
3rdparty/nuxeo/nuxeo-server/5.5/lib/chemistry-opencmis-commons-impl-0.6.0.jar [new file with mode: 0644]
3rdparty/nuxeo/nuxeo-server/5.5/lib/chemistry-opencmis-server-bindings-0.6.0-classes.jar [new file with mode: 0644]
3rdparty/nuxeo/nuxeo-server/5.5/lib/chemistry-opencmis-server-support-0.6.0.jar [new file with mode: 0644]
services/common/src/main/java/org/collectionspace/services/nuxeo/client/java/RepositoryJavaClientImpl.java

diff --git a/3rdparty/nuxeo/nuxeo-server/5.5/bundles/nuxeo-opencmis-bindings-5.5.jar b/3rdparty/nuxeo/nuxeo-server/5.5/bundles/nuxeo-opencmis-bindings-5.5.jar
new file mode 100644 (file)
index 0000000..3e313f9
Binary files /dev/null and b/3rdparty/nuxeo/nuxeo-server/5.5/bundles/nuxeo-opencmis-bindings-5.5.jar differ
diff --git a/3rdparty/nuxeo/nuxeo-server/5.5/bundles/nuxeo-opencmis-impl-5.5.jar b/3rdparty/nuxeo/nuxeo-server/5.5/bundles/nuxeo-opencmis-impl-5.5.jar
new file mode 100644 (file)
index 0000000..e1b6757
Binary files /dev/null and b/3rdparty/nuxeo/nuxeo-server/5.5/bundles/nuxeo-opencmis-impl-5.5.jar differ
diff --git a/3rdparty/nuxeo/nuxeo-server/5.5/lib/chemistry-opencmis-client-api-0.6.0.jar b/3rdparty/nuxeo/nuxeo-server/5.5/lib/chemistry-opencmis-client-api-0.6.0.jar
new file mode 100644 (file)
index 0000000..34bf057
Binary files /dev/null and b/3rdparty/nuxeo/nuxeo-server/5.5/lib/chemistry-opencmis-client-api-0.6.0.jar differ
diff --git a/3rdparty/nuxeo/nuxeo-server/5.5/lib/chemistry-opencmis-client-bindings-0.6.0.jar b/3rdparty/nuxeo/nuxeo-server/5.5/lib/chemistry-opencmis-client-bindings-0.6.0.jar
new file mode 100644 (file)
index 0000000..2f5359a
Binary files /dev/null and b/3rdparty/nuxeo/nuxeo-server/5.5/lib/chemistry-opencmis-client-bindings-0.6.0.jar differ
diff --git a/3rdparty/nuxeo/nuxeo-server/5.5/lib/chemistry-opencmis-client-impl-0.6.0.jar b/3rdparty/nuxeo/nuxeo-server/5.5/lib/chemistry-opencmis-client-impl-0.6.0.jar
new file mode 100644 (file)
index 0000000..c5c7d65
Binary files /dev/null and b/3rdparty/nuxeo/nuxeo-server/5.5/lib/chemistry-opencmis-client-impl-0.6.0.jar differ
diff --git a/3rdparty/nuxeo/nuxeo-server/5.5/lib/chemistry-opencmis-commons-api-0.6.0.jar b/3rdparty/nuxeo/nuxeo-server/5.5/lib/chemistry-opencmis-commons-api-0.6.0.jar
new file mode 100644 (file)
index 0000000..ec01d8b
Binary files /dev/null and b/3rdparty/nuxeo/nuxeo-server/5.5/lib/chemistry-opencmis-commons-api-0.6.0.jar differ
diff --git a/3rdparty/nuxeo/nuxeo-server/5.5/lib/chemistry-opencmis-commons-impl-0.6.0.jar b/3rdparty/nuxeo/nuxeo-server/5.5/lib/chemistry-opencmis-commons-impl-0.6.0.jar
new file mode 100644 (file)
index 0000000..06f7745
Binary files /dev/null and b/3rdparty/nuxeo/nuxeo-server/5.5/lib/chemistry-opencmis-commons-impl-0.6.0.jar differ
diff --git a/3rdparty/nuxeo/nuxeo-server/5.5/lib/chemistry-opencmis-server-bindings-0.6.0-classes.jar b/3rdparty/nuxeo/nuxeo-server/5.5/lib/chemistry-opencmis-server-bindings-0.6.0-classes.jar
new file mode 100644 (file)
index 0000000..4b2ee5a
Binary files /dev/null and b/3rdparty/nuxeo/nuxeo-server/5.5/lib/chemistry-opencmis-server-bindings-0.6.0-classes.jar differ
diff --git a/3rdparty/nuxeo/nuxeo-server/5.5/lib/chemistry-opencmis-server-support-0.6.0.jar b/3rdparty/nuxeo/nuxeo-server/5.5/lib/chemistry-opencmis-server-support-0.6.0.jar
new file mode 100644 (file)
index 0000000..beea2d6
Binary files /dev/null and b/3rdparty/nuxeo/nuxeo-server/5.5/lib/chemistry-opencmis-server-support-0.6.0.jar differ
index 99e8e84c68a0227358c9cd63b1d5337156edd7e0..de843e1bda5b18f78583a02ec058a2473959ed40 100644 (file)
@@ -699,7 +699,7 @@ public class RepositoryJavaClientImpl implements RepositoryClient<PoxPayloadIn,
     /*
      * See CSPACE-5036 - How to make CMISQL queries from Nuxeo
      */
-    private void makeCMISQLQuery(RepositoryInstance repoSession) {
+    private void makeCMISQLQuery(RepositoryInstance repoSession, String query) {
        // the NuxeoRepository should be constructed only once, then cached
         // (its construction is expensive)
         try {
@@ -712,17 +712,13 @@ public class RepositoryJavaClientImpl implements RepositoryClient<PoxPayloadIn,
                                        callContext.put(CallContext.USERNAME, repoSession.getPrincipal().getName());
                                        NuxeoCmisService cmisService = new NuxeoCmisService(repo, callContext, repoSession);
 
-                                       // do a query
-//                                     String query = "SELECT cmis:objectId, dc:title FROM cmis:document WHERE dc:title = 'REMBlobs'"; // try eaee111c-a8d8-48c7-95cb
-                                       String query = "SELECT cmis:objectId, cmis:name, dc:title, nuxeo:lifecycleState FROM Dimension WHERE dc:title = 'REMBlobs'"; // try eaee111c-a8d8-48c7-95cb
-//                                     String query = "SELECT * from Dimension D JOIN Relation R ON D.cmis:name = R.relations_common:objectcsid";
-//                                     String query = "SELECT * FROM cmis:document WHERE dc:title = 'REMBlobs'"; // try eaee111c-a8d8-48c7-95cb
                                        IterableQueryResult result = repoSession.queryAndFetch(query, "CMISQL", cmisService);
                                        for (Map<String, Serializable> row : result) {
-                                               logger.debug("dc:title is: " + (String)row.get("dc:title")
-                                                               + " Hierarchy Table ID is:" + row.get("cmis:objectId")
+                                               logger.debug(
+//                                                             "dc:title is: " + (String)row.get("dc:title")
+                                                               "" + " Hierarchy Table ID is:" + row.get("cmis:objectId")
                                                                + " cmis:name is: " + row.get("cmis:name")
-                                                               + " nuxeo:lifecycleState is: " + row.get("nuxeo:lifecycleState")
+//                                                             + " nuxeo:lifecycleState is: " + row.get("nuxeo:lifecycleState")
                                                                ); 
                                        }                       
                } catch (ClientException e) {
@@ -757,7 +753,32 @@ public class RepositoryJavaClientImpl implements RepositoryClient<PoxPayloadIn,
             //
             // CSPACE-5036 - How to make CMISQL queries from Nuxeo
             //
-            makeCMISQLQuery(repoSession);
+            
+                       // do a query
+                       String query1 = "SELECT A.intakes_common:entryReason FROM Intake A"; // try eaee111c-a8d8-48c7-95cb
+            makeCMISQLQuery(repoSession, query1);
+
+                       String query2 = "SELECT * FROM Intake A where A.intakes_common:entryReason <> 'foo'"; // try eaee111c-a8d8-48c7-95cb
+            makeCMISQLQuery(repoSession, query2);
+
+            String query3 = "SELECT A.cmis:objectId, A.dc:title FROM Intake A where A.intakes_common:entryReason <> 'foo'"; // try eaee111c-a8d8-48c7-95cb
+            makeCMISQLQuery(repoSession, query3);
+
+            String query4 = "SELECT A.cmis:objectId, A.dc:title FROM Intake A where A.intakes_common:entryReason = '38ed4b32-e38f-4f82-adaa'";
+            makeCMISQLQuery(repoSession, query4);
+
+                       String query5 = "SELECT A.cmis:name, A.dc:title, B.intakes_common:entryReason FROM Dimension A JOIN Intake B ON A.cmis:name = B.intakes_common:entryReason"; // try eaee111c-a8d8-48c7-95cb
+            makeCMISQLQuery(repoSession, query5);
+            
+                       String query6 = "SELECT A.cmis:name, A.dc:title, B.intakes_common:entryReason FROM Dimension A JOIN Intake B ON A.dc:title = B.intakes_common:entryReason"; // try eaee111c-a8d8-48c7-95cb
+            makeCMISQLQuery(repoSession, query6);
+            
+            query6 = "SELECT A.cmis:name, A.dc:title, B.intakes_common:entryReason FROM Dimension A JOIN Intake B ON B.intakes_common:entryReason = A.dc:title"; // try eaee111c-a8d8-48c7-95cb
+            makeCMISQLQuery(repoSession, query6);
+            
+            String query7 = "SELECT B.intakes_common:entryReason FROM Intake B"; // try eaee111c-a8d8-48c7-95cb
+            makeCMISQLQuery(repoSession, query7);
+            
             
             DocumentModelList docList = null;
             String query = NuxeoUtils.buildNXQLQuery(ctx, queryContext);