This documentation relates to an earlier CollectionSpace version.

This documentation is for version 2.0. The current version is 4.0.
View this page in the current documentation or visit the current documentation home.

Skip to end of metadata
Go to start of metadata

This page describes the directory structure for CollectionSpace services. At {source}/trunk level, the structure is as follows.

The {source}/trunk/services/3rdparty contains 3rd party libraries need to run a CollectionSpace instance. Note that usually, Maven will resolve and package 3rd party libraries related dependencies. However, this additional set of libraries are needed for some specific needs such as initializing OSGI container in Nuxeo client.

The {source}/trunk/services/services directory contains all the CollectionObject services.

Directory structure for a service

We follow the Maven-specified directory layout to organize the source code. Each service in {source}/trunk/services typically has the following sub-modules.

build.xml is the ant build file, you can check ant targets as follows.

Ant targets like clean, install, package and test call corresponding maven targets. pom.xml is the service project's Maven Project Object Model, or POM.

  1. 3rdparty contains 3rd party specific code for a service, for example, a Nuxeo document type definition.
  2. client contains the source code for the client/consumer-side Java library code and tests written using testng.
  3. jaxb contains the XML schema for the common entity schema object of the service. This could be relevant for an entity service only. The schemas are compiled using JAXB compiler as well as relevant Java bindings are generated.
  4. services contains the server side code of the service.

Typically, the src/main/java directory contains the service source code, the src/test/java directory contains the test code.

The 3rdparty module's structure would be as follows.

The client module's structure would be as follows.

The jaxb module's structure would be as follows.

The service module has the following structure. Let's use CollectionObject service as an example.