This wiki space contains archival documentation of Project Bamboo, April 2008 - March 2013.
This document describes the procedure to develop a repository-specific CMIS connector using the locator API.
A locator object provides a unified interface to load an item along with its children from a contributing content repository into the CMIS content hub.
An example is an electronic document in HATHI collection that contains hundreds of JPEG page images as its content.The primary task of developing a connector is to create a locator service. A locator service is responsible for finding and importing content from a contributing repository. To implement a locator service, one must implement the interface LocatorServiceAPI.
The following methods are defined by the locator API and implemented by different connectors:
createItem(String url, BambooRequest bambooRequest)
You should define the method createItem which creates a content object, or locator object. The parameter url is the repository URL as specified in the Zotero bookmark file, while the BambooRequest object encapsulates the CMIS object definition of the Zotero bookmark file.
loadObject(File objectFile, BambooRequest bambooRequest)
You should define the method loadObject which connects to the repository to load the content of the item. The parameter objectFile is the file to be loaded, and the bambooRequest object encapsulates the CMIS object definition.
Please refer to HathiLocatorService.scala for a concrete example of connector class that implements the locator service API.
After the class is written and tested, package the class into a jar file.
Make changes as necessary to the configuration file located at
Specially, the "repository.repository_name.connector_id.locator" property should be set to connector class that implements the locator service API, for example
repository.content.hathi.locator = edu.northwestern.art.connect2.server.HathiLocatorService
where repository_name is the name of the CMIS repository while connector_id the identifier of the connector.
The "repository.content.request" and "repository.content.response" properties are the path to the request and response directories (relative to the home directory of the CMIS repository), respectively.
repository.content.request = req
repository.content.response = res
Write a test class using the following as an example:
Change the parameters such as user name, password and URL of the ATOM pub:
SessionParameter.USER -> "test",
SessionParameter.PASSWORD -> "test",
SessionParameter.ATOMPUB_URL -> "http://localhost:8080/bamboo-connector-0.1.0/atom",
SessionParameter.BINDING_TYPE -> BindingType.ATOMPUB.value,
SessionParameter.REPOSITORY_ID -> "content"
and run the test:
This test will upload a Zotero file in the request directory and items will be loaded into the response directory as CMIS documents.