2. Model

The core Java interfaces that constitute the data transfer objects (defined in the pinetree-model component) are illustrated in the figure below. The Thing interface can conceptually be traced to owl:Thing; an instance of Thing can constitute anything we might conceptualise, e.g a cat, a file, a hat etc. The interface specialisation Collection is conceptualised to contain a set of Things. For example, a backpack (collection) can contain parts such as apples, books or cats. Moreover, the pinetree-model component defines a ModelFactory interface for instance creation, and a Statement interface for RDF statements.

The pinetree-model constitute the core that most of the components higher up in the stack depends on. The rdf:type of model instances are defined in each respective implementation of pinetree-dao, which is why the mapping between Pinetree model instances and their RDF representation may vary between DAO implementations.

2.1 URI scheme

Implementations of the pinetree-dao component are advised to name model instances according to the Pinetree URI scheme (or at least provide mappings to and from that format). The reason for this is that the pinetree-dao-proxy component is, by default, configured after this URI scheme. It is however perfectly possible to go your own way if you wish to not employ a proxied solution. The URI scheme goes as follows:

pinetree:{type}:{id}:{representation}

The first segment of the URI declares the domain of the URI to be Pinetree. The middle segment declares the type, e.g. “part”, “collection” etc, while the third segment, labelled {id}, constitutes a local identifier. For example, the URI pinetree:part:joe tells us that the URI is a Pinetree URI, the type is a part in the Pinetree domain model, and that the resource we are looking for is uniquely identified with the string “joe”. The fourth and last segment can be used to target a specific representation of a resource; pinetree:part:joe:page would instruct Pinetree that we are talking about a HTML representation of the pinetree:part:joe resource.

Enhanced by Zemanta
[top]