HughP / simal

Automatically exported from code.google.com/p/simal
0 stars 0 forks source link

Categories are used incorrectly in PIMS import #283

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
The way categories are currently used is inconsistent and sometimes wrong.

doap:category is a Property and is used as such when a DOAP file is 
imported.
Because we don't define a Class for our categories, although we do add 
properties such as simal:categoryId, there will be a collection of 
properties for the URL designating the category. In RDF/XML representation 
these will be collated as follows: 

    <doap:category> 
      <rdf:Description 
rdf:about="http://projects.apache.org/category/database"> 
        <simal:categoryId>772c0511-58d1-49a1-b099-b3825ad1eb6f-
per18726</simal:categoryId> 
        <rdfs:label>Database</rdfs:label> 
      </rdf:Description> 
    </doap:category> 

But the PIMS import creates classes of type doap:category and this is just 
wrong. In the RDF/XML it will look like: 

    <doap:category> 
      <doap:category rdf:about="http://jisc.ac.uk/programme#120"> 
        <simal:categoryId>per10372</simal:categoryId> 
        <simal:categoryId>772c0511-58d1-49a1-b099-b3825ad1eb6f-
per10372</simal:categoryId> 
        <rdfs:label>Virtual Research Environment (VRE) 3</rdfs:label> 
      </doap:category> 
    </doap:category> 

And this query should not give results, but it does: 
PREFIX  doap: <http://usefulinc.com/ns/doap#> 
SELECT DISTINCT ?x 
WHERE {
  ?x a doap:category .
}

I think the best solution is to define a simal:Category

Original issue reported on code.google.com by sander.v...@oucs.ox.ac.uk on 28 Mar 2010 at 3:41

GoogleCodeExporter commented 9 years ago
I agree with your proposal. doap:category is defined as "A URI denoting a 
category 
assigned to the project". in your proposal the URI would refer to a 
simal:Category.

Original comment by ross.gardler on 28 Mar 2010 at 10:42

GoogleCodeExporter commented 9 years ago
Just came across this issue again. All categories are currently wrongly defined 
by the property doap:category. So after the regular 'deploy data' scripts have 
run you end up with all defined categories being of the form:

(1)  <x> doap:category <y>

where 

(2)  <x> rdf:type doap:Project

and

(3)  <y> rdf:type doap:category

but (3) is syntactically incorrect.

Rather than defining our own simal:Category I think it makes more sense to use 
an existing ontology, eg. a skos:Concept (which would be a new ontology for 
Simal, so one from an ontology we are already using would be better).

SourceForge has defined sf:Trove and uses that for categories. Although I think 
the Trove system is something to keep in mind when designing this, the 
definition of sf:Trove is [1]:

    <!-- Begin Trove -->
    <rdf:Class rdf:ID="Trove">
        <rdfs:comment xml:lang="en">SourceForge Trove</rdfs:comment>
        <rdfs:domain rdf:resource="http://usefulinc.com/ns/doap#category"/>
    </rdf:Class>    

Which does not seem correct to me, because rdfs:domain only applies to Classes, 
ie. the rdfs:range of rdfs:domain is Classes [2] and in this example it is 
referring to doap:category which is a Property. It's confusing since rdfs is 
used to define itself so please double check this statement ;)

[1] http://sourceforge.net/api/sfelements.rdf#
[2] http://www.w3.org/TR/rdf-schema/#ch_domain

Original comment by sander.v...@oucs.ox.ac.uk on 21 Jul 2010 at 2:57