From Florian.Mittag at gmx.de Thu Jan 24 15:33:10 2008
From: Florian.Mittag at gmx.de (Florian Mittag)
Date: Thu, 24 Jan 2008 15:33:10 +0100
Subject: [Rdf2go-devel] Feature Request: Namespace handling
Message-ID: <20080124143310.257590@gmx.net>
Hi everyone!
I just joined this list, because lately Leo and Gunnar always redirect me to it. Seems like I annoyed them too much ;-)
Anyway, I decided to use rdf2go on my project and I miss the feature to set namespaces on models. When I print out my model, it always has lines like:
.........
I saw that there already is a issue for this (http://octopus13.fzi.de:8080/browse/RTGO-20), but it seems to be deserted.
Leo told me, that there will be a new release and I should mentions this feature request, so it hopefully will make it into it.
Thanks
Florian
--
Psssst! Schon vom neuen GMX MultiMessenger geh?rt?
Der kann`s mit allen: http://www.gmx.net/de/go/multimessenger
From list at incunabulum.de Thu Jan 24 21:16:54 2008
From: list at incunabulum.de (Michael Zimmermann)
Date: Thu, 24 Jan 2008 21:16:54 +0100
Subject: [Rdf2go-devel] prefix:Thing leads to incorrect code (rdfReactor)
Message-ID: <4798F236.40308@incunabulum.de>
Hi there,
while evaluating rdfReactor as tool to generate java-owl-bindings the
following problem showed up:
In one of my test ontologies we have a hierarchy as follows:
owl:Thing
-> myPrefix:Thing
--> myPrefix:SomeObject
Running the generator I end up with a base class defined as:
class Thing extends Thing ...
Afaik, the bug is in the ModelGenerator code, see below. You add
OWL:Thing (or RDFS:Thing) as root to your model (hence this name is
taken) but do not update the usedClassnames construct accordingly.
ModelGenerator, line 54:
JClass localRoot = new JClass(jp, "Thing", RDFS.Class);
ModelGenerator, line 79
// get all classes and assign to package
Set usedClassnames = new HashSet();
Set rdfsClasses = new HashSet();
usedClassnames.add("Thing");
Adding the last line fixes this problem. Well, it might be necessary to
also add all the other builtin names to the set of usedClassnames before
triggering the process. I do not know the system well enough yet :-)
Well, this still leaves me with a bunch of errors as follows:
- Cannot convert from ClosableIterator to
ClosableIterator
- The return type is incompatible with Class.getAllInstances(Model)
- cannot convert from Node to Float
- Implicit super constructor Class() is undefined for default
constructor. Must define an explicit constructor
This is from the current trunk. Also I haven't checked in detail what
might be the issues here. Tomorrow will tell :-)
From voelkel at fzi.de Thu Jan 24 22:19:26 2008
From: voelkel at fzi.de (Max Voelkel)
Date: Thu, 24 Jan 2008 22:19:26 +0100
Subject: [Rdf2go-devel] prefix:Thing leads to incorrect code (rdfReactor)
In-Reply-To: <4798F236.40308@incunabulum.de>
References: <4798F236.40308@incunabulum.de>
Message-ID: <1708489290.20080124221927@fzi.de>
Hi Michael,
MZ> Afaik, the bug is in the ModelGenerator code, see below. You add
MZ> OWL:Thing (or RDFS:Thing) as root to your model (hence this name is
MZ> taken) but do not update the usedClassnames construct accordingly.
MZ>
MZ> ModelGenerator, line 54:
MZ> JClass localRoot = new JClass(jp, "Thing", RDFS.Class);
MZ> ModelGenerator, line 79
MZ> // get all classes and assign to package
MZ> Set usedClassnames = new HashSet();
MZ> Set rdfsClasses = new HashSet();
MZ> usedClassnames.add("Thing");
MZ>
MZ> Adding the last line fixes this problem. Well, it might be necessary to
MZ> also add all the other builtin names to the set of usedClassnames before
MZ> triggering the process. I do not know the system well enough yet :-)
Wow! Right. You seem to be a quite clever developer, I guess you really found
exactly the right spot. I'll fix this one.
MZ> Well, this still leaves me with a bunch of errors as follows:
MZ> - Cannot convert from ClosableIterator to
MZ> ClosableIterator
MZ> - The return type is incompatible with Class.getAllInstances(Model)
MZ> - cannot convert from Node to Float
MZ> - Implicit super constructor Class() is undefined for default
MZ> constructor. Must define an explicit constructor
MZ> This is from the current trunk. Also I haven't checked in detail what
MZ> might be the issues here. Tomorrow will tell :-)
The current trunk is quite broken - I am rewriting the code-generation
templates to have both static and dynamic access methods.
The current OWL support of RDFReactor is quite bad. In reality, it does RDFS
reasoning (subclass, superclass) extended with hacks to take inverse properties
and cardinality restrictions into account.
Help is always welcome - especially as I am myself not a frequent OWL user, I
don't know what would be a good conversion from OWL to Java. Or more
specifically, from OWL to RDFReactors JModel.
Kind Regards,
Max
--
Max V?lkel
voelkel at fzi.de | www.Xam.de
office +49 721 96 54-854
mobile +49 171 83 59 678
--
FZI Forschungszentrum Informatik an der Universit?t Karlsruhe
Haid-und-Neu-Str. 10-14, D-76131 Karlsruhe
Tel.: +49-721-9654-0, Fax: +49-721-9654-959
Stiftung des b?rgerlichen Rechts, Az: 14-0563.1 Regierungspr?sidium Karlsruhe.
Vorstand: Prof. Dr.-Ing. R?diger Dillmann, Dipl. Wi.-Ing. Michael Flor
Prof. Dr. Dr.-Ing. Jivka Ovtcharova, Prof. Dr. rer. nat. Rudi Studer
Vorsitzender des Kuratoriums: Ministerialdirigent G?nther Le?nerkraus
From list at incunabulum.de Fri Jan 25 13:03:32 2008
From: list at incunabulum.de (Michael Zimmermann)
Date: Fri, 25 Jan 2008 13:03:32 +0100
Subject: [Rdf2go-devel] prefix:Thing leads to incorrect code (rdfReactor)
In-Reply-To: <1708489290.20080124221927@fzi.de>
References: <4798F236.40308@incunabulum.de> <1708489290.20080124221927@fzi.de>
Message-ID: <4799D014.5020000@incunabulum.de>
Sorry, this should go on the mailing list!
>>>>>
Hi Max,
> Wow! Right. You seem to be a quite clever developer, I guess you really found
> exactly the right spot. I'll fix this one.
Thanks!
> Help is always welcome - especially as I am myself not a frequent OWL user, I
> don't know what would be a good conversion from OWL to Java. Or more
> specifically, from OWL to RDFReactors JModel.
Well, I will try to look into the details of the problems I encounter
and follow up on the mailing list if you don't mind :-) Do you accept
patches?
In general, supporting multiple inheritance is an issue without going
the interface approach as done e. g. by the protege bean generator (this
has some issues as well). otherwise most aspects should be solvable
following the approach you proposed in your paper.
Question:
And what is the best way to setup a dev environment from SVN for
eclipse? Currently, I am using some hacked stuff using rdfreactor from
trunk and some rdf2go and other libs from rdfreactor 4.4.13.
Well, some more questions that came up this moring... understanding them
would make reading the code easier...
- How are imported ontologies handled? Are they loaded from the
namespace URL or can I also define a filesystem location for them?
- How about generating individual packages "base.package.prefix" for
each prefix. Builtins and Classes without prefixes are created in
base.pacakge. This would break API compliance, though! This might lead
to easier ClassNames.
- What is the difference in using Reasoning.RDFS, .OWL, .RDFS+OWL?
thx and cu, Michael