|
View:
New views
20 Messages
—
Rating Filter:
Alert me
|
| < Prev | 1 - 2 | Next > |
|
|
Bug in Protege to Java: Duplicated function definitions will be generatedHi,
This is a bug in both Protege 3.3.1 and Protege 3.4 beta when generating Protege-OWL Java Code. Some generated Java classes (those "impl/*_.java") will have duplicated function definitions. That is, it will generate two functions with the same name, the same parameter list, and the same return values for the same class. Some of those duplicated function definitions are: public Collection getPartOfEnumeratedClass() public RDFProperty getPartOfEnumeratedClassProperty() public boolean hasPartOfEnumeratedClass() public Iterator listPartOfEnumeratedClass() public void addPartOfEnumeratedClass(Object newPartOfEnumeratedClass) public void removePartOfEnumeratedClass(Object oldPartOfEnumeratedClass) public void setPartOfEnumeratedClass(Collection newPartOfEnumeratedClass) I try the same project with Protege 3.1.1. It has no such error. No workaround is found, exactly remove the duplicated definition manually. But it is cumbersome to remove duplicated functions when number of classes are large. Regards, Ken _______________________________________________ protege-owl mailing list protege-owl@... https://mailman.stanford.edu/mailman/listinfo/protege-owl Instructions for unsubscribing: http://protege.stanford.edu/doc/faq.html#01a.03 |
|
|
Re: Bug in Protege to Java: Duplicated function definitions will be generatedKen,
We have the same problem and it appears when you import two Ontologies with either the same Class or Property name. Example: OntA.Class1 and OntB.Class1 are included into OntC. RDF/OWL-wise they are separated by namespaces. When the Java code is created, the namespace is removed and you get the collision. The best solution would be to sub-class or sub-package, so OntA would be a Java Package with Class1 and OntB would be a Java Package with a Class1, leaving OntC to inherit correctly. They tried to work around it with a switch to prefix the Classes and Properties, however it's kludgy and not elegant. (Sorry Csognor.) > -----Original Message----- > From: protege-owl-bounces@... [mailto:protege-owl- > bounces@...] On Behalf Of Wing Kuen LEE > Sent: Tuesday, July 22, 2008 4:07 AM > To: protege-owl@... > Subject: [protege-owl] Bug in Protege to Java: Duplicated function > definitions will be generated > > Hi, > > This is a bug in both Protege 3.3.1 and Protege 3.4 beta when > Protege-OWL Java Code. > > Some generated Java classes (those "impl/*_.java") will have duplicated > function definitions. That is, it will generate two functions with the > same name, the same parameter list, and the same return values for the > same class. Some of those duplicated function definitions are: > > public Collection getPartOfEnumeratedClass() > public RDFProperty getPartOfEnumeratedClassProperty() > public boolean hasPartOfEnumeratedClass() > public Iterator listPartOfEnumeratedClass() > public void addPartOfEnumeratedClass(Object newPartOfEnumeratedClass) > public void removePartOfEnumeratedClass(Object > oldPartOfEnumeratedClass) > public void setPartOfEnumeratedClass(Collection > newPartOfEnumeratedClass) > > I try the same project with Protege 3.1.1. It has no such error. > > No workaround is found, exactly remove the duplicated definition > manually. But it is cumbersome to remove duplicated functions when > number of classes are large. > > Regards, > > > Ken > > _______________________________________________ > protege-owl mailing list > protege-owl@... > https://mailman.stanford.edu/mailman/listinfo/protege-owl > > Instructions for unsubscribing: > http://protege.stanford.edu/doc/faq.html#01a.03 protege-owl mailing list protege-owl@... https://mailman.stanford.edu/mailman/listinfo/protege-owl Instructions for unsubscribing: http://protege.stanford.edu/doc/faq.html#01a.03 |
|
|
Re: Bug in Protege to Java: Duplicated function definitions will be generatedHere's some OWL files as an example. OntAB depends on OntA and OntB.
The MyFactory.java is what comes from Protégé 3.4b120. The UpdatedMyFactory.java is one example of how I think the generated Java code could be generated and address Ken's and my concerns. > -----Original Message----- > From: protege-owl-bounces@... [mailto:protege-owl- > bounces@...] On Behalf Of Wing Kuen LEE > Sent: Tuesday, July 22, 2008 4:07 AM > To: protege-owl@... > Subject: [protege-owl] Bug in Protege to Java: Duplicated function > definitions will be generated > > Hi, > > This is a bug in both Protege 3.3.1 and Protege 3.4 beta when generating > Protege-OWL Java Code. > > Some generated Java classes (those "impl/*_.java") will have duplicated > function definitions. That is, it will generate two functions with the > same name, the same parameter list, and the same return values for the > same class. Some of those duplicated function definitions are: > > public Collection getPartOfEnumeratedClass() > public RDFProperty getPartOfEnumeratedClassProperty() > public boolean hasPartOfEnumeratedClass() > public Iterator listPartOfEnumeratedClass() > public void addPartOfEnumeratedClass(Object newPartOfEnumeratedClass) > public void removePartOfEnumeratedClass(Object > oldPartOfEnumeratedClass) > public void setPartOfEnumeratedClass(Collection > newPartOfEnumeratedClass) > > I try the same project with Protege 3.1.1. It has no such error. > > No workaround is found, exactly remove the duplicated definition > manually. But it is cumbersome to remove duplicated functions when > number of classes are large. > > Regards, > > > Ken > > _______________________________________________ > protege-owl mailing list > protege-owl@... > https://mailman.stanford.edu/mailman/listinfo/protege-owl > > Instructions for unsubscribing: > http://protege.stanford.edu/doc/faq.html#01a.03 _______________________________________________ protege-owl mailing list protege-owl@... https://mailman.stanford.edu/mailman/listinfo/protege-owl Instructions for unsubscribing: http://protege.stanford.edu/doc/faq.html#01a.03 |
|
|
Re: Bug in Protege to Java: Duplicated function definitions will be generatedKen,
Do you have the multiple import situation Joseph has described? If not, can you send us the (part of) ontology that is creating the problem. If you do have the situation described by Joseph, you can use the solution proposed by him, or the direct solution he mentioned: a relatively new option (last check box in Protege 3.4's code generation dialog box) to include the namespace prefixes in the generated Java name of classes and properties. This is not an elegant solution, indeed, but it can be very useful. We have implemented this solution on user's demand and because implementing the more correct solution of generating Java packages was not a trivial fix, and we did not have the resources for that. If anybody would like to improve the code generation in this regard he or she is welcome to help us out. Csongor Kormann, Joseph wrote: > Ken, > > We have the same problem and it appears when you import two Ontologies > with either the same Class or Property name. Example: OntA.Class1 and > OntB.Class1 are included into OntC. RDF/OWL-wise they are separated by > namespaces. When the Java code is created, the namespace is removed and > you get the collision. > > The best solution would be to sub-class or sub-package, so OntA would be > a Java Package with Class1 and OntB would be a Java Package with a > Class1, leaving OntC to inherit correctly. They tried to work around it > with a switch to prefix the Classes and Properties, however it's kludgy > and not elegant. (Sorry Csognor.) > > >> -----Original Message----- >> From: protege-owl-bounces@... [mailto:protege-owl- >> bounces@...] On Behalf Of Wing Kuen LEE >> Sent: Tuesday, July 22, 2008 4:07 AM >> To: protege-owl@... >> Subject: [protege-owl] Bug in Protege to Java: Duplicated function >> definitions will be generated >> >> Hi, >> >> This is a bug in both Protege 3.3.1 and Protege 3.4 beta when >> > generating > >> Protege-OWL Java Code. >> >> Some generated Java classes (those "impl/*_.java") will have >> > duplicated > >> function definitions. That is, it will generate two functions with the >> same name, the same parameter list, and the same return values for the >> same class. Some of those duplicated function definitions are: >> >> public Collection getPartOfEnumeratedClass() >> public RDFProperty getPartOfEnumeratedClassProperty() >> public boolean hasPartOfEnumeratedClass() >> public Iterator listPartOfEnumeratedClass() >> public void addPartOfEnumeratedClass(Object >> > newPartOfEnumeratedClass) > >> public void removePartOfEnumeratedClass(Object >> oldPartOfEnumeratedClass) >> public void setPartOfEnumeratedClass(Collection >> newPartOfEnumeratedClass) >> >> I try the same project with Protege 3.1.1. It has no such error. >> >> No workaround is found, exactly remove the duplicated definition >> manually. But it is cumbersome to remove duplicated functions when >> number of classes are large. >> >> Regards, >> >> >> Ken >> >> _______________________________________________ >> protege-owl mailing list >> protege-owl@... >> https://mailman.stanford.edu/mailman/listinfo/protege-owl >> >> Instructions for unsubscribing: >> http://protege.stanford.edu/doc/faq.html#01a.03 >> > _______________________________________________ > protege-owl mailing list > protege-owl@... > https://mailman.stanford.edu/mailman/listinfo/protege-owl > > Instructions for unsubscribing: http://protege.stanford.edu/doc/faq.html#01a.03 > _______________________________________________ protege-owl mailing list protege-owl@... https://mailman.stanford.edu/mailman/listinfo/protege-owl Instructions for unsubscribing: http://protege.stanford.edu/doc/faq.html#01a.03 |
|
|
Import ontologies from databases using datamasterDear All, I've some problems importing ontologies from databases using datamaster. I've some big table, with large size, that I can import, for memory problem of protege, also incrementing lax parameters. It is possible, when connecting to databases, to import only a part of a table, for examples using a filter on a value of an attribute, or like a where condition ? Thanks and best regards. Riccardo Grosso CSI-Piemonte - Direzione Banche Dati, Cultura e Atenei / Cataloghi, Banche Dati, Cultura e Turismo C.so Unione Sovietica 216 - 10134 TORINO e-mail: riccardo.grosso@... skype: riccardo.grosso http://www.csipiemonte.it ___________________________________________________________ Il presente messaggio, corredato degli eventuali allegati, contiene informazioni da considerarsi strettamente riservate e confidenziali. Ne è vietato l'uso improprio, la diffusione, la distribuzione o la riproduzione da parte di altre persone e/o entità diverse da quelle specificate. Qualora lo abbiate ricevuto per errore, vi preghiamo di distruggere il messaggio, comunicando l'errata ricezione tramite il reply all'indirizzo mittente. _______________________________________________ protege-owl mailing list protege-owl@... https://mailman.stanford.edu/mailman/listinfo/protege-owl Instructions for unsubscribing: http://protege.stanford.edu/doc/faq.html#01a.03 |
|
|
Re: Import ontologies from databases using datamasterDear Riccardo,
This is not possible, and it we are not planning to change DataMaster to offer such an option. I wanted to recommend to you to use a database back-end for Protege, to store your ontology (that is getting very big by importing many instances) in a database instead of a file. This is a good advise, which you could definitely follow, but I realized afterwards, that maybe this won't solve your problem, because DataMaster itself will try to get the whole table (though only one at a time) in the memory when importing the rows of a table as instances in the ontology. I could change that behavior, to fetch one row at a time, but it will slow down DataMaster considerably. I am not sure what would be the best solution. BTW, I hope you are using the DataMaster v1.3 or later (for example 1.3.1) which is bundled with the Protege 3.4 beta starting with Build 500 and has some important performance improvements. For more information check out the change logs: http://protegewiki.stanford.edu/index.php/DataMaster_1.3 http://protegewiki.stanford.edu/index.php/DataMaster_1.3.1 Csongor Riccardo.Grosso@... wrote: > Dear All, > > I've some problems importing ontologies from databases using datamaster. > > I've some big table, with large size, that I can import, for memory > problem of protege, also incrementing lax parameters. > > It is possible, when connecting to databases, to import only a part of > a table, for examples using a filter on a value of an attribute, or > like a where condition ? > > Thanks and best regards. > > Riccardo Grosso > > CSI-Piemonte - Direzione Banche Dati, Cultura e Atenei / Cataloghi, Banche Dati, Cultura e Turismo > C.so Unione Sovietica 216 - 10134 TORINO > > e-mail: riccardo.grosso@... <mailto:riccardo.grosso@...> > skype: riccardo.grosso > http://www.csipiemonte.it > > ___________________________________________________________ > Il presente messaggio, corredato degli eventuali allegati, contiene informazioni da considerarsi strettamente riservate e confidenziali. > Ne è vietato l'uso improprio, la diffusione, la distribuzione o la riproduzione da parte di altre persone e/o entità diverse da quelle specificate. > Qualora lo abbiate ricevuto per errore, vi preghiamo di distruggere il messaggio, comunicando l'errata ricezione tramite il reply all'indirizzo mittente. > ------------------------------------------------------------------------ > > _______________________________________________ > protege-owl mailing list > protege-owl@... > https://mailman.stanford.edu/mailman/listinfo/protege-owl > > Instructions for unsubscribing: http://protege.stanford.edu/doc/faq.html#01a.03 > _______________________________________________ protege-owl mailing list protege-owl@... https://mailman.stanford.edu/mailman/listinfo/protege-owl Instructions for unsubscribing: http://protege.stanford.edu/doc/faq.html#01a.03 |
|
|
|