1. Components

The figure below illustrates the components of the Pinetree project, in which a parent component has been excluded in order to make the diagram more clear. A logical division of the components have been made into three layers: Interface, Implementation and Assembly. The dashed arrows denote dependencies on other modules, and as can be seen in the figure the dependencies are never directed upwards in the layer stack.

 

1.1 Interface

The interface layer is comprised of components that define interfaces used in the implementation layer. It is comprised of the following three components:

  • The pinetree-model component contains the core model interfaces for representing the organisation of content in the repository, e.g. Collection and Content, as well as a simple string-based implementation of these interfaces.
  • The pinetree-dao component contains interfaces for various DAOs (Data Access Object) for models in the pinetree-model component.
  • The pinetree-dao-proxy component contains interfaces (and a simple implementation) for automatic mapping between URI and URL formatted resources.
  • The pinetree-file component contains interfaces for basic file operations, e.g. store and retrieve.

1.2 Implementation

The implementation layer is comprised of components that implements interfaces in the bottom layer, as well as web resource implementations. The bullet list below briefly explains the components in the implementation layer:

  • The pinetree-file-simple component is a simple file system based implementation of the pinetree-file component that  provides basic file persistence functionality.
  • The pinetree-linkeddata component contains a set of subclasses of RESTlet resources along with their respective Velocity templates for HTML output. This component depends on Spring for dependency injection and some post processing after the Spring application context has been set. Spring configuration details is provided in the assembly layer (see figure above), which is why component is not able to function on its own out of the box.
  • The pinetree-sesame provides an implementation of the pinetree-dao component by using the Sesame RDF framework. A packaged version of this component can be used to manage pinetree model instances in a Sesame sail repository.
  • The pinetree-forester component provides a client implementation to facilitate communication with a Pinetree instance via simple function calls.

The pinetree-sesame component above show that the current “out of the box” solution for data persistence in Pinetree is to use Sesame. However, other options such as Jena or Neo4J can be supported by implementing the pinetree-dao component with the persistence technology of choice. In other words, a pinetree-jena component would make it possible to completely change the data persistence solution.

1.3 Assembly

This is where the magic happens; the assembly layer assembles components in the layers below into a Pinetree application ready to use. This layer currently only provides one component to date:

  • The assembly-pinetree-vanilla constitute the original assembly form in Pinetree, which is bundles and configures the pinetree-sesame, pinetree-linkeddata and pinetree-file-simlpe components into a release. The vanilla release comes in two variants: one standalone and one WAR release with default Spring context and Logback configuration files. For the standalone assembly type, a main class is provided along with sample sh/bat scripts to fire the standalone Pinetree application up. These are not included in the WAR distribution, as the servlet life cycle is maintained by the servlet container of choice.

While the assembly component outlined above always will assemble a release comprised of pinetree-sesame, pinetree-linkeddata and pinetree-file-simple, a similar assembly component can be created for other assembly configurations, e.g. by creating an assembly-pinetree-jena component. As long as there are implementations available in the Pinetree class path, the system could not care less whether the pinetree-dao implementation is of type A or B.

[top]