Generalisation of the controller involves extracting a significant amount of data from the specified mspacemodel. The ListInfo object was designed from the ground up to be receptive to generalisation, in that during the initial classical music-only phase, rather than hard coding column details in multiple areas the column information was provided by stub methods. The generalisation code simply required changing the stub methods to call the correct generalisation method. The queries and the information they are used to extract are discussed below:
Columns
It is impossible to extract all data on a column in a single query. This is due to the fact that few items are required to exist. For example, there is no requirement that every column have a predicate that defines how to get the label for items retrieved for that column, because there is a default in place (<rdfs:label>). If we attempted to match against multiple optional items, their lack of existence would cause optional items that do exist not to be returned. In future, RDQL will support an OPTIONAL keyword that will make this possible, but for now multiple queries are required.
The only required fields are column predicate, and column label. These are extracted using the query shown in Figure 56.
SELECT ?y, ?z, ?z1 WHERE (<modeluri>,
<http://mspace.ecs.soton.ac.uk/ontology/#has-column>, ?y), (?y, <http://www.w3.org/2000/01/rdf-schema#label>, ?z), (?y,
<http://mspace.ecs.soton.ac.uk/ontology/#populate-only-with-class>, ?z1) Figure 56:
Goal Column
This is a simple query. It simply asks for the model’s goal column. The query used is shown in Figure 57.
SELECT ?y WHERE (?x,
<http://mspace.ecs.soton.ac.uk/ontology/#has-goal-column>, ?y), (<”+modeluri+”>, <http://mspace.ecs.soton.ac.uk/ontology/#has-column>, ?y)
Figure 57: Default Layout
The mspacemodel requires the definition of a default column layout. This is the layout to present to the user if they arent loading one from a bookmark or link. The default layout is represented in RDF as a linked list of data, as this enables simple retrieval and ordering. It is possible to extract the entire layout with a single query, as shown in Figure 58.
SELECT ?x, ?y, ?z WHERE (?x,
<http://mspace.ecs.soton.ac.uk/ontology/#has-default-column>, ?z), (?z, <http://mspace.ecs.soton.ac.uk/ontology/#has-column>, ?y), (<modeluri>,
<http://mspace.ecs.soton.ac.uk/ontology/#has-column>, ?y) Figure 58:
In this query, x is the previous links URI, y is the URI of the column, and z is the current links URI. Figure 59 helps explain the method by which this works.
In one result of the query, x matches against the model URI, y matches against Column 1, and z matches against Default Link 1. In the other, x matches against Default Link 1, y matches against Column 2, and z matches against Default Link 2. This query structure allows the easiest formation of a linked list in RDF, and is efficient in that all default columns can be retrieved in a single query.
The order that the results are returned in is not guaranteed. For each result, y and z are hashed against x. Since we know that the first value of x will be the URI of the model, once all results are in the system reconstructs the linked list by getting the values hashed against the model URI, then the values hashed against the z value returned, and so on.
Figure 59: Default Column Layout Retrieval
Predicates
Predicate retrieval works in a similar manner to the default layout retrieval, in that predicates are stored in linked lists. The difference in this case is that there is a linked list starting from each column. The required query is shown in Figure 60.
SELECT ?x, ?y, ?z WHERE (?x,
<http://mspace.ecs.soton.ac.uk/ontology/#populate-using-predicate>, ?z), (?z, <http://mspace.ecs.soton.ac.uk/ontology/#has-predicate>, ?y)
Figure 60:
As with default columns, the results y and z are hashed against x. In this case, there are multiple start points, each one being the URI of a column. Reconstructing the lists involves a loop through each column and loop inside to reconstruct each list. Each list of predicates is then attached to the correct column object.
Item Labels
This is a simple query to get each columns label predicate (the predicate used to get the displayable text on screen for each item in the column). This is an optional field, and defaults to<rdfs:label>. The query to retrieve this can be seen in Figure 61.
SELECT ?x, ?y WHERE (?x,
<http://mspace.ecs.soton.ac.uk/ontology/#column-label>, ?y), (<modeluri>, <http://mspace.ecs.soton.ac.uk/ontology/#has-column>, ?x)
Figure 61: Allowed Right/Left of
This is another fairly simple query. It determines what columns are allowed right of each other, and thus what columns are allowed left of each other. Figure 62 shows the query.
SELECT ?x, ?y WHERE (?x,
<http://mspace.ecs.soton.ac.uk/ontology/#allowed-right-of>, ?y), (<modeluri>, <http://mspace.ecs.soton.ac.uk/ontology/#has-column>, ?x)
Figure 62:
This is the most complex process currently contained within the generalisation code. Each column can have multiple (ordered) sort predicates, and each of these sort predi- cates can be multi-hop. Figure 63 shows the full query.
SELECT ?x, ?y, ?z2, ?z WHERE (?x,
<http://mspace.ecs.soton.ac.uk/ontology/#sort-method>, ?z), (?z, <http://mspace.ecs.soton.ac.uk/ontology/#has-predicate-list>, ?y), (?z,
<http://mspace.ecs.soton.ac.uk/ontology/#sort-type>, ?z2) Figure 63:
Initially, all sort methods are reconstructed, as shown with other linked list examples. After this, a query is performed for each sort method to return the predicates to access the data to sort against. Note that in this case the data is relative to the item being sorted.
8
Other Implementation
8.1 SourceForge
SourceForge is a popular web site that provides free hosting and web-based collaborative development tools for open source licensed projects[18]. It was always the intention that we mSpace could be used by third parties and we shall be using the free services that SourceForce provide in order to do this. A web site that explains mSpace and how to use it has been created[9].
SourceForge allows users of the software to post bug reports and feature requests. These features of SourceForge have been enabled and we intend to support the project after the initial release in our own time as much as possible. The mailing list feature will allow us to notify users of new releases should they choose to subscribe to this service.