openRDF.org Welcome Guest   | Login   
  Search  
  Index  | Recent Threads  | Who's Online  | User List  | Search  | Help  | RSS feeds

Forum has been closed down
This forum has been closed down due to extensive spamming activities. Please use the mailing list instead.


Quick Go »
Thread Status: Normal
Total posts in this thread: 11
Posts: 11   Pages: 2   [ 1 2 | Next Page ]
[Add To My Favorites] [Watch this Thread]
Author
Previous Thread This topic has been viewed 2636 times and has 10 replies Next Thread
Feb 26, 2008 4:17:11 PM

jtheuer
Sesame Addict



Joined: Feb 11, 2008
Posts: 70
Status: Offline

compiling SKOS: Unknown datatype: http://www.w3.org/1999/02/22-rdf-syntax-ns#Resource

Hi,
In addition to my other problem, I try to complie SKOS: http://www.w3.org/2004/02/skos/core.rdf.

The compilation fails with:
SEVERE: Error processing http://www.w3.org/2004/02/skos/core#Collection
Exception in thread "main" org.openrdf.elmo.exceptions.ElmoConversionException: Unknown datatype: http://www.w3.org/1999/02/22-rdf-syntax-ns#Resource

But that datatype should somewhere in elmo because rdf-syntax (http://www.w3.org/1999/02/22-rdf-syntax-ns) and rdf-schema (http://www.w3.org/2000/01/rdf-schema) both reference each other (wired design, anyway...)

Am I wrong?

Jan
Show Printable Version of Post        http://www.pace-project.org [Link] Report threatening or abusive post: please login first  Go to top 
Feb 26, 2008 7:59:09 PM

james
OpenRDF.org Consultant
Member's Avatar

Canada
Joined: Jul 21, 2005
Posts: 650
Status: Offline
Re: compiling SKOS: Unknown datatype: http://www.w3.org/1999/02/22-rdf-syntax-ns#Resource

 
Exception in thread "main" org.openrdf.elmo.exceptions.ElmoConversionException: Unknown datatype: http://www.w3.org/1999/02/22-rdf-syntax-ns#Resource


rdf:Resource is unknown, but rdfs:Resource is known.

The schema should be using
<http://www.w3.org/2000/01/rdf-schema#Resource>
----------------------------------------
Sesame Consultant
http://leighnet.ca
http://jamesrdf.blogspot.com
Show Printable Version of Post        Hidden to Guest    http://leighnet.ca [Link] Report threatening or abusive post: please login first  Go to top 
Feb 26, 2008 9:12:37 PM

jtheuer
Sesame Addict



Joined: Feb 11, 2008
Posts: 70
Status: Offline

Re: compiling SKOS: Unknown datatype: http://www.w3.org/1999/02/22-rdf-syntax-ns#Resource

I assume, you know SKOS, so do you think the version of skos is wrong, then?

You offered me to upload a new version of elmo-concept containing the SKOS ontologies. I'd really appreciate that. At the moment I do not really understand WHY the compilation fails. rdf:resource is references multiply times and even rdf-schema recerences rdf:Resource. So It should exist.

Maybe you can tell me which #Resource has the wrong namespace?
  <rdfs:Class rdf:ID="Collection">
<rdfs:label xml:lang="en">Collection</rdfs:label>
<skos:definition xml:lang="en">A meaningful collection of concepts.</skos:definition>
<rdfs:comment xml:lang="en">Labelled collections can be used with collectable semantic relation properties e.g. skos:narrower, where you would like a set of concepts to be displayed under a 'node label' in the hierarchy.</rdfs:comment>
<skos:example rdf:resource="http://www.w3.org/2004/02/skos/core/examples/Collection.rdf.xml"/>
<rdfs:isDefinedBy rdf:resource="http://www.w3.org/2004/02/skos/core"/>
<dct:issued>2004-10-20</dct:issued>
<dct:modified>2005-09-29</dct:modified>
<skos:changeNote rdf:parseType="Resource">
<rdf:value>The statement about this resource, involving the skos:subjectIndicator predicate, was removed.</rdf:value>
<dc:date>2005-09-29</dc:date>
<dc:creator>Alistair Miles</dc:creator>
<rdfs:seeAlso rdf:resource="http://www.w3.org/2004/02/skos/core/review-2#subjectIndicatorUse-1"/>
</skos:changeNote>
<skos:changeNote rdf:parseType="Resource">
<rdf:value>The word 'meaningful' added to the definition. Small change to the comment to make it clearer.</rdf:value>
<dc:date>2004-12-17</dc:date>
<dc:creator>Alistair Miles</dc:creator>
</skos:changeNote>
<vs:term_status>unstable</vs:term_status>
</rdfs:Class>


Thanks, Jan
Show Printable Version of Post        http://www.pace-project.org [Link] Report threatening or abusive post: please login first  Go to top 
Feb 27, 2008 2:44:42 AM

james
OpenRDF.org Consultant
Member's Avatar

Canada
Joined: Jul 21, 2005
Posts: 650
Status: Offline
Re: compiling SKOS: Unknown datatype: http://www.w3.org/1999/02/22-rdf-syntax-ns#Resource

If using skos with beta2 use the following concepts jar.

http://downloads.sourceforge.net/sesame/openrdf-elmo-1.0-beta2-concepts.jar

I have updated the skos schema, which has the rdf/rdfs:Resources corrected. Note that this dose _not_ include the skos concepts - they still need to be created in another jar.

You will also need to use the classpath argument from an earlier thread to include a skos-core.jar.
----------------------------------------
Sesame Consultant
http://leighnet.ca
http://jamesrdf.blogspot.com
Show Printable Version of Post        Hidden to Guest    http://leighnet.ca [Link] Report threatening or abusive post: please login first  Go to top 
Feb 27, 2008 5:24:48 PM

jtheuer
Sesame Addict



Joined: Feb 11, 2008
Posts: 70
Status: Offline

Re: compiling SKOS: Unknown datatype: http://www.w3.org/1999/02/22-rdf-syntax-ns#Resource

Thanks James,

It seems to be fixed now. SKOS has been compiled.
But I'm not able to build everything, if could please have a look at the generated sioc classes:
/** A set of User accounts whose owners have a common purpose or interest. Can be used for access control purposes. */
@rdf("http://rdfs.org/sioc/ns#Usergroup")
@disjointWith({Container.class, Item.class, Role.class, Space.class, User.class})
public interface Usergroup {

There should be an extends rdf:Resource or owl:Class, or?

I cannot build SCOT anymore, because it complains:
SEVERE: Error processing http://scot-project.org/scot/ns#Tagcloud
Exception in thread "main" org.openrdf.elmo.exceptions.ElmoConversionException: Unknown datatype: http://rdfs.org/sioc/ns#Usergroup

But now it IS in the classpath (It seems to be the same error as in my earlier post, but I'm shure I set the classpath correct).

Jan
Show Printable Version of Post        http://www.pace-project.org [Link] Report threatening or abusive post: please login first  Go to top 
Feb 27, 2008 6:08:57 PM

james
OpenRDF.org Consultant
Member's Avatar

Canada
Joined: Jul 21, 2005
Posts: 650
Status: Offline
Re: compiling SKOS: Unknown datatype: http://www.w3.org/1999/02/22-rdf-syntax-ns#Resource

Usergroup concept is correct. It is an owl:Class, but not a subclass of owl:Class. Making it a subclass of rdfs:Resource is only done if it is explicitly in the ontology (most do). However, in this case that statement is commented out (as can be seen in the snippet below).

 
<rdfs:Class rdf:about="http://rdfs.org/sioc/ns#Usergroup">
<rdfs:label xml:lang="en">Usergroup</rdfs:label>

<rdf:type rdf:resource="http://www.w3.org/2002/07/owl#Class"/>
<rdfs:comment xml:lang="en">A set of User accounts whose owners have a common purpose or interest. Can be used for access control purposes.</rdfs:comment>
<!-- <rdfs:subClassOf rdf:resource="http://www.w3.org/2000/01/rdf-schema#Resource"/> -->
<rdfs:isDefinedBy rdf:resource="http://rdfs.org/sioc/ns#"/>
<owl:disjointWith rdf:resource="http://rdfs.org/sioc/ns#Container"/>
<owl:disjointWith rdf:resource="http://rdfs.org/sioc/ns#Item"/>
<owl:disjointWith rdf:resource="http://rdfs.org/sioc/ns#Role"/>
<owl:disjointWith rdf:resource="http://rdfs.org/sioc/ns#Space"/>

<owl:disjointWith rdf:resource="http://rdfs.org/sioc/ns#User"/>
</rdfs:Class>


Post the command you are using and I'll give it a try.
----------------------------------------
Sesame Consultant
http://leighnet.ca
http://jamesrdf.blogspot.com
Show Printable Version of Post        Hidden to Guest    http://leighnet.ca [Link] Report threatening or abusive post: please login first  Go to top 
Feb 28, 2008 12:39:20 PM

jtheuer
Sesame Addict



Joined: Feb 11, 2008
Posts: 70
Status: Offline

Re: compiling SKOS: Unknown datatype: http://www.w3.org/1999/02/22-rdf-syntax-ns#Resource

Here is the code (shell script)
skos works, sioc seems to work but scot fails:
I used the beta2 zip from sourceforge and the concepts.jar you posted yesterday

Why doesn't Usergroup extend Resource or Entity? I thought all elmo concepts have one super interface? I'd need that for type-safety.

#!/bin/sh
export CLASSPATH="dist/openrdf-elmo-1.0-beta2-concepts.jar"

CMD="java -jar dist/openrdf-elmo-1.0-beta2-codegen.jar "
PREFIX="$HOME/daten/repositories/thesis_heuer/svn/concepts/"

echo "compiling $COMPILE"
$CMD -b "org.w3c.skos.concepts=http://www.w3.org/2004/02/skos/core" \
-j skos.jar \
$PREFIX/skos-concept/skos.rdf

echo "compile sioc"
export CLASSPATH="$CLASSPATH:./skos.jar"
$CMD -b "org.rdfs.sioc.concepts=http://rdfs.org/sioc/ns#" \
-j sioc.jar \
$PREFIX/sioc-concept/sioc.rdf

echo "compile scot"
export CLASSPATH="$CLASSPATH:./sioc.jar"
$CMD -b "org.scotproject.concepts=http://scot-project.org/scot/ns#" -j scot.jar $PREFIX/scotproject-concept/scot.rdf

Show Printable Version of Post        http://www.pace-project.org [Link] Report threatening or abusive post: please login first  Go to top 
Feb 28, 2008 1:03:16 PM

james
OpenRDF.org Consultant
Member's Avatar

Canada
Joined: Jul 21, 2005
Posts: 650
Status: Offline
Re: compiling SKOS: Unknown datatype: http://www.w3.org/1999/02/22-rdf-syntax-ns#Resource

 
Here is the code (shell script)
skos works, sioc seems to work but scot fails:
I used the beta2 zip from sourceforge and the concepts.jar you posted yesterday

Why doesn't Usergroup extend Resource or Entity? I thought all elmo concepts have one super interface? I'd need that for type-safety.

A common super class is not enforced, but can be added with an '-e org.openrdf.concepts.rdfs.Resource' argument.
 
#!/bin/sh
export CLASSPATH="dist/openrdf-elmo-1.0-beta2-concepts.jar"

CMD="java -jar dist/openrdf-elmo-1.0-beta2-codegen.jar "
PREFIX="$HOME/daten/repositories/thesis_heuer/svn/concepts/"

When you use the -jar option the CLASSPATH variable is ignored, you will have to include the codegen.jar in the classpath and call its main class.

See your previous post:
http://www.openrdf.org/forum/mvnforum/viewthread?thread=1594
----------------------------------------
Sesame Consultant
http://leighnet.ca
http://jamesrdf.blogspot.com
Show Printable Version of Post        Hidden to Guest    http://leighnet.ca [Link] Report threatening or abusive post: please login first  Go to top 
Feb 28, 2008 7:09:29 PM

jtheuer
Sesame Addict



Joined: Feb 11, 2008
Posts: 70
Status: Offline

Re: compiling SKOS: Unknown datatype: http://www.w3.org/1999/02/22-rdf-syntax-ns#Resource

stupid. I remember...

 
common super class is not enforced, but can be added with an '-e org.openrdf.concepts.rdfs.Resource' argument.


I'd like to see it enforced in a final release, because it would be easier to maintain third-party concepts.

Thanks again,


Jan
Show Printable Version of Post        http://www.pace-project.org [Link] Report threatening or abusive post: please login first  Go to top 
Feb 28, 2008 7:17:38 PM

jtheuer
Sesame Addict



Joined: Feb 11, 2008
Posts: 70
Status: Offline

Re: compiling SKOS: Unknown datatype: http://www.w3.org/1999/02/22-rdf-syntax-ns#Resource

sorry, Entity is what I want as interface. Enforcing Resource doesn't make sence.

But there is an issue when the using -e and the concept already extends the given class:

/tmp/FileSourceCodeHandler34677/org/w3c/skos/concepts/SkosResource.java:11: repeated interface
public interface SkosResource extends Resource, Resource {


Jan
Show Printable Version of Post        http://www.pace-project.org [Link] Report threatening or abusive post: please login first  Go to top 
Posts: 11   Pages: 2   [ 1 2 | Next Page ]
[Show Printable Version of Thread]