List of Figures

Chapter 1. Introducing CMIS

Figure 1.1. Before SQL standardization, developers wrote applications against specific databases.

Figure 1.2. CMIS standardizes the way applications work with rich content repositories in much the same way SQL did for relational databases.

Figure 1.3. Most companies store content in multiple ECM repositories. Content-centric applications either have to use multiple disparate APIs, or take advantage of CMIS’s ability to use each repository in a standard way.

Figure 1.4. Your local CMIS development setup includes two components: the CMIS Workbench and the OpenCMIS InMemory Repository. This is all you’ll need for the examples in part 1 of this book.

Figure 1.5. Apache Chemistry OpenCMIS InMemory Repository welcome page

Figure 1.6. An empty CMIS Workbench login dialog box

Figure 1.7. To connect to the repository, you must select a binding and specify the service URL.

Figure 1.8. Root folder of the OpenCMIS InMemory Repository

Figure 1.9. Groovy console after running code to retrieve the CMIS server name

Chapter 2. Exploring the CMIS domain model

Figure 2.1. CMIS high-level object types (all of which we’ll discuss in this chapter)

Figure 2.2. The CMIS service is an interface to all of the CMIS repositories and the objects that they contain.

Figure 2.3. Three bindings expose the same functionality for clients with different needs.

Figure 2.4. The repository is where all of the objects are stored.

Figure 2.5. Repository Info button in the Workbench

Figure 2.6. CMIS Repository Info display in CMIS Workbench

Figure 2.7. Groovy console output for the getRepositoryInfo code example

Figure 2.8. Folder shown with relationship to repository and document

Figure 2.9. Groovy console output—dumping the folder and document hierarchy

Figure 2.10. Documents can be contained in folders or unfiled children of a repository. Unfiled documents are retrieved from the repository’s “unfiled documents” collection.

Figure 2.11. CMIS object model view: these properties are common to all object types, but only document has a content stream.

Figure 2.12. Output from default data in the document property exercise

Figure 2.13. A content stream of 0 or 1 per document is accessible via CMIS.

Figure 2.14. Output of code for retrieving a document’s content stream

Chapter 3. Creating, updating, and deleting objects with CMIS

Figure 3.1. The new folder shows up after you run the createFolder code in the Groovy console.

Figure 3.2. The newly created document sitting in the folder you created earlier

Figure 3.3. After creating a document that has a content stream, you can click the content URL to open the file.

Figure 3.4. You renamed the sample-a.pdf document to sample-c.pdf, but it still contains the original file content.

Figure 3.5. The sample-c.pdf document now contains the content from the local file named sample-c.pdf.

Figure 3.6. Some repositories don’t always allow content stream updates, but the InMemory Repository allows them at any time.

Figure 3.7. CMIS repositories can keep track of versions so you don’t have to.

Figure 3.8. Checkouts create PWCs that are edited and then checked in to create new versions.

Figure 3.9. Major versions are whole numbers; minor versions are fractions. The latest version is the most recent version in the history.

Chapter 4. CMIS metadata: types and properties

Figure 4.1. The schema describes metadata, which describes data.

Figure 4.2. CMIS metadata types and property definitions describe objects and properties, respectively.

Figure 4.3. CMIS metadata base hierarchy for types and property definitions showing each one’s attributes

Figure 4.4. Types button (circled), which launches Workbench’s Types viewer window

Figure 4.5. The CMIS Types window in CMIS Workbench showing the attributes and associated property definitions for cmis:document

Figure 4.6. Output from the getTypeDescendants code (type walker)

Figure 4.7. Truncated output from getTypeDescendant with property definitions included (type walker v2)

Figure 4.8. Output showing type and property definition information retrieved directly from the instance object

Figure 4.9. Truncated output from listing 4.4, showing choice lists and default values

Figure 4.10. CMIS 1.1 repository information settings related to type mutability (partial)

Figure 4.11. CMIS Types screen showing off our newly minted my-document type

Figure 4.12. Type information for VersionedType showing the type mutability options available

Chapter 5. Query

Figure 5.1. Viewing a list of documents as a spreadsheet with columns as properties and rows as object instances

Figure 5.2. Examine the type attributes for cmis:audio using the CMIS Workbench Types view.

Figure 5.3. Simple query results executed in CMIS Workbench

Figure 5.4. Simple Query for cmisbook:note objects executed in CMIS Workbench

Figure 5.5. Simple Query for cmisbook:audio objects executed in CMIS Workbench

Figure 5.6. Output from the simple query example in listing 5.1

Figure 5.7. Examining the queryable attribute for cmis:name

Figure 5.8. Three Query scopes, A, B, and C, each with more properties

Figure 5.9. Query with aliases on the type and column

Chapter 6. Meet your new project: The Blend

Figure 6.1. High-level architecture of The Blend

Figure 6.2. Every page in the application will have one servlet and one JSP.

Figure 6.3. Default folder structure for The Blend

Figure 6.4. Types of content users will work with in The Blend

Figure 6.5. The basic content type hierarchy for The Blend

Figure 6.6. Click the link to load sample data into the OpenCMIS InMemory Repository.

Figure 6.7. The Blend’s dashboard

Figure 6.8. Viewing the children of the Blend root directory

Figure 6.9. The Blend supports tags on certain content types.

Figure 6.10. The Blend allows users to create new folders easily.

Figure 6.11. It’s easy to upload files into The Blend. Once a document is created, you can add tags by specifying the tag and clicking the plus icon.

Figure 6.12. The Blend allows users to search the repository for content.

Figure 6.13. The Blend allows users to search the repository for documents with a particular tag.

Figure 6.14. The detail page features an embedded media player, which can play songs that reside in the repository.

Figure 6.15. The Blend leverages an open source project called Apache Tika to extract metadata from certain file types and set that metadata as properties on the document.

Figure 6.16. Songs can have artwork associated with them if you know the object ID for the image you want to set as the artwork.

Figure 6.17. Results of telling Maven to clean, install, and Eclipsify the project

Figure 6.18. Import the project into your Eclipse workspace.

Figure 6.19. Run the project using Eclipse’s built-in Tomcat integration.

Figure 6.20. The Blend running in the browser built into Eclipse

Figure 6.21. The my-blend project structure after it’s first created

Figure 6.22. The index page of the first iteration of The Blend

Figure 6.23. If all goes well, this iteration of The Blend should echo back some repository information.

Chapter 7. The Blend: read and query functionality

Figure 7.1. The Blend’s browse page showing the root folder

Figure 7.2. Your first simple browse page

Figure 7.3. The Blend document (song) object details page

Figure 7.4. Multifiled document example

Figure 7.5. The document page

Chapter 9. Using other client libraries

Figure 9.1. Other client libraries give non-Java developers access to any CMIS-compliant repository.

Figure 9.2. DotCMIS methods

Figure 9.3. CMIS Browser web part as it appears after working through this section

Figure 9.4. Adding an additional assembly to your package

Figure 9.5. SharePoint site settings

Figure 9.6. Handing out last-minute assignments—like a boss. Luckily, Python and cmislib can automate repetitive tasks like bulk content loading.

Figure 9.7. Python scripts can automate repetitive tasks, like organizing files in a CMIS repository based on metadata stored in the file itself.

Figure 9.8. The CMIS domain model

Figure 9.9. The Python interactive shell patiently waiting to do your bidding

Figure 9.10. No news is good news: once the client successfully imports, it’s easy to connect to the repository.

Figure 9.11. Using dir(root) to find the createFolder method

Figure 9.12. Using the built-in help() function to determine the syntax of createFolder

Figure 9.13. PHP Client architecture

Figure 9.14. The Blend as a Drupal module

Figure 9.15. Adding a tag to a taggable object

Figure 9.16. Querying for taggable objects with a specific tag

Chapter 10. Building mobile apps with CMIS

Figure 10.1. Android SDK Manager

Figure 10.2. The Create New AVD dialog box

Figure 10.3. Android project structure for The Blend

Figure 10.4. A simple Android application that iterates over a folder’s children

Figure 10.5. Mockups of The Blend for Android

Figure 10.6. The Blend after importing the source code into Eclipse

Figure 10.7. ObjectiveCMIS object model

Figure 10.8. Adding the library to the Xcode project

Figure 10.9. Verifying that the static library is available

Figure 10.10. Setting the Other Linker Flags in build settings

Figure 10.11. ObjectiveCMIS added to a workspace

Figure 10.12. Summary view showing ObjectiveCMIS as a linked library

Figure 10.13. Setting User Header Search Paths

Figure 10.14. Setting Other Linker Flags

Figure 10.15. Browsing ObjectiveCMIS documentation in Xcode

Figure 10.16. Blend Capture workspace and project

Figure 10.17. Blend Capture application running in the iOS simulator

Figure 10.18. Updated view showing The Blend upload button

Figure 10.19. The two .aac files shown here were captured and uploaded by the Blend Capture iOS application.

Chapter 12. Security and control

Figure 12.1. Activity diagram of the secure login sequence for the Browser binding

Figure 12.2. CMIS Workbench displaying the ACLs for a document

Chapter 13. Performance

Figure 13.1. Built-in OpenCMIS session caches at a glance

Figure 13.2. An OpenCMIS session is bound to a user. Each user has its own cache because a repository can return user-specific data. Here, three different users retrieved the same type definitions, and the repository returned localized display names.

Figure 13.3. Routing getObject and getObjectByPath calls through the object and path cache. If the requested object isn’t in the cache, the request is forwarded to the repository.

Figure 13.4. Performance differences of the three CMIS bindings. The Browser binding is the fastest.

Chapter 14. Building a CMIS server

Figure 14.1. The OpenCMIS Server Framework in a servlet engine

Figure 14.2. Servlets that are parts of the framework and their associated protocols

Figure 14.3. The CMIS server start page

Figure 14.4. Dialog for TCK run options

Figure 14.5. TCK results dialog box after a test run, showing first few results

Appendix A. Apache Chemistry OpenCMIS components

Figure A.1. OpenCMIS components

Appendix D. Building web applications with JavaScript

Figure D.1. The Chemistry Workbench supports the Browser binding today.

Figure D.2. JSON data response for the getRepositories call

Figure D.3. First signs of JavaScript output on your new page

Figure D.4. Repository info displayed after you work around the sameorigin issue

Figure D.5. Get Children of Folder page showing child folders and documents

Figure D.6. Using a JavaScript player component to listen to music from your repository

Figure D.7. Creating a document by posting an HTML form

Figure D.8. Query results rendered in the browser

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset