This is the bundle that contains all the core interfaces, services, vocabularies and utility classes. It doesn't contain any implementations. If you'd like to extend aperture, write your own crawler, accessor or extractor - this is the bundle you will have to depend on. Also every client application will only need this single dependency. Simple and convenient.
Activating this bundle in an osgi environment makes following services available:
These registries will listen for appropriate factories appearing in the environment and will automatically include them.
This bundle contains all implementations. Every implementation depends on core. The activator of this bundle registers services under appropriate names, so that registries can detect them. Every factory is treated as a separate service. It is registered under the name of the generic interface it implements (e.g. a FileSystemCrawlerFactory is registered under the name of a CrawlerFactory). This enables automatic detection.
This bundle contains a quick example how Aperture can be used in OSGI environment. It can be used as a test to determine if you set up your environment correctly. When you start this bundle, it will begin crawling your home directory and extracting all information it can. It won't dig into subdirectories so it shouldn't last too long. After the crawler has finished, you should see the RDF information printed on your screen.
This part of this document is a bit technical. You may skip it if you only want to use Aperture. Nevertheless, It may be of some interest to all that need to include aperture in their own projects and would like to influence the packaging.
The OSGi packaging had to be as unobtrusive as possible. It has been decided that the structure of the source tree must not be altered, and that the former packaging method (as a plain jar) must remain available.
Classes that should fall within a bundle are chosen one-by-one. A sophisticated system of selectors has been introduced in the ant build script. Those selectors have been extracted into the selectors.xml file. Aperture has been conceptually divided into ca. 40 'elementary' bundles. In this division the vocabulary and utility classes are in separate bundles. Every Registry service and every implementation has it's own bundle. Every 'elementary' bundle has:
In order for this to work - every selector is applied to five directories:
Additional measures have been taken to prevent non-java resources from being copied twice (from the source and from the classes directory.
The activators have been kept separate from the 'normal' source code. They are stored in the src/activators subdirectory. Every 'elementary' bundle has it's own Activator. There are basically two kinds of activators: registry activators and implementation activators.
The registry activators are responsible for running the the registries. They are also equipped with osgi ServiceTrackers that listen for implementations appearing and disappearing. There were two reasons why this approach has been chosen.
The coarsegrained bundles are built out of 'elementary' bundles. Every coarsegrained bundle (that is core and impl) has an activator that simply calls the activators of all 'elementary' bundles.