Gerhard Austaller | 1 Nov 2006 10:20
Picon
Favicon

Another small code generation issue.

Hi

Sometimes I name by accident concepts in Protege like classes in JAVA, 
e.g. Process. The code generator then generates ambiquous code. The 
DefaulProcess implements Interface Process but it is not clear to javac 
from witch package Process (ontologie or java.comes from java.util) is 
importet.

Gerhard

_______________________________________________
protege-owl mailing list
protege-owl <at> lists.stanford.edu
https://mailman.stanford.edu/mailman/listinfo/protege-owl

Instructions for unsubscribing: http://protege.stanford.edu/doc/faq.html#01a.03 

dimitris bilidas | 1 Nov 2006 12:35
Picon
Favicon

restriction concerning 2 properties

Hello all!

I have a Class AthleticPerformance which has a Datatype Property value and 
an Object Property RelatedToSport with range the class Sport. Sport has the 
class RunningSport as a subclass. I want to put a restriction, so that if an 
instance of AthleticPerformance has as a filler for the property 
RelatedToSport an istance of RunningSport, then some values of property 
value must be of type xsd:duration. To do this, I have put the following 
condition on the class AthleticPerformance
((&#8707; value xsd:duration) &#8851; (&#8707; RelatedToSport RunningSport) 
&#8852; (¬(&#8707; RelatedToSport RunningSport))). Is this right? Or if it's 
wrong, how should it be? Or maybe it's better instead of putting such a 
restriction, to create a subclass AthleticPerformanceForRunningSport of the 
Class AthleticPerformance and put a restriction someValuesFrom xsd:duration 
on this new subclass?

Thanks in advance,
Dimitris.

_________________________________________________________________
Try the next generation of search with Windows Live Search today!  
http://imagine-windowslive.com/minisites/searchlaunch/?locale=en-us&source=hmtagline

_______________________________________________
protege-owl mailing list
protege-owl <at> lists.stanford.edu
https://mailman.stanford.edu/mailman/listinfo/protege-owl

(Continue reading)

Vlad Posea | 1 Nov 2006 13:06
Picon
Favicon

Re: Load owl file with Protege API question -can we load multiple ontologies?

Is it possible to load multiple files in a model using this method?

Thank you!
Regards,

Vlad Posea

Tania Tudorache <tudorache <at> stanford.edu> wrote:

Gerhard,

The next beta release will have this fix incorporated, but if you want
to programatically associate a local file to a certain ontology, you can
do it with the following code:

JenaOWLModel owlModel = ProtegeOWL.createJenaOWLModel();
URI uri =
URIUtilities.createURI("file:///work/protege/projects/test_forms_owl/importing.owl");

File file = new File("/work/protege/projects/test_forms_owl/imported.owl");

//instead of adding the LocalFileRepository, you can add any other
implementation of the Repository interface
owlModel.getRepositoryManager().addProjectRepository(new
LocalFileRepository(file));

owlModel.load(uri, FileUtils.langXMLAbbrev);


Tania


Gerhard Austaller wrote:
> Hi
>
> "Tania Tudorache" schrieb:
>
>> Gerhard,
>>
>> Indeed, the createJenaModel() method in the latest beta does not take
>> into consideration the repository files, in which the local paths of the
>> imports are stored. We have fixed this. The fix will be available in the
>> next beta.
>>
>
> Aha! I tried to "work around" (see message with subject Load ontology
> with imports with Protege API...) but failed :-( Can i somehow manually
> set the mapping from namespace to local path?
>
>> if you want to create an OWLModel from an URI, you can also call the method:
>>
>> OWLModel owlModel =
>> ProtegeOWL.createJenaOWLModelFromURI("file:///tmp/ontology.owl");
>>
>> which is easier than calling the other three methods.
>>
>
> Thx for the hint.
>
> Gerhard
>
> _______________________________________________
> protege-owl mailing list
> protege-owl <at> lists.stanford.edu
> 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 <at> lists.stanford.edu
https://mailman.stanford.edu/mailman/listinfo/protege-owl

Instructions for unsubscribing: http://protege.stanford.edu/doc/faq.html#01a.03

We have the perfect Group for you. Check out the handy changes to Yahoo! Groups.
_______________________________________________
protege-owl mailing list
protege-owl <at> lists.stanford.edu
https://mailman.stanford.edu/mailman/listinfo/protege-owl

Instructions for unsubscribing: http://protege.stanford.edu/doc/faq.html#01a.03 
Gerhard Austaller | 1 Nov 2006 15:01
Picon
Favicon

JessTab problem/question

Hi

I was reading the JessTab tutorial and manual but I can not get the 
newspaper example running. After loading the newspaper ontology and 
opening the JESSTab I get the JESS prompt. After typing (mapclass 
Content) the JessTab isn't doing anything. The prompt does not return.  
Any idea what I could try? JessTab should be installed properly because 
I can use other commands like creating new concepts or individuals 
through the tab. 

Thx for help
Gerhard

_______________________________________________
protege-owl mailing list
protege-owl <at> lists.stanford.edu
https://mailman.stanford.edu/mailman/listinfo/protege-owl

Instructions for unsubscribing: http://protege.stanford.edu/doc/faq.html#01a.03 

uuser | 1 Nov 2006 18:48

Re: JessTab problem/question


I had this same problem, I was using Protege 3.2 and Jess 7.0RC1
The problem went away when I switched to Jess 7.0RC3, and also works fine
with the latest jess 7.0
It also worked fine with Jess 6.1p8, it was just a problem with Jess 7.0RC1.

So I would try downloading the latest version of Jess and make sure you put
the latest jess.jar file in the Eclipse plugins directory.

Gerhard Austaller-4 wrote:
> 
> Hi
> 
> I was reading the JessTab tutorial and manual but I can not get the 
> newspaper example running. After loading the newspaper ontology and 
> opening the JESSTab I get the JESS prompt. After typing (mapclass 
> Content) the JessTab isn't doing anything. The prompt does not return.  
> Any idea what I could try? JessTab should be installed properly because 
> I can use other commands like creating new concepts or individuals 
> through the tab. 
> 
> Thx for help
> Gerhard
> 
> _______________________________________________
> protege-owl mailing list
> protege-owl <at> lists.stanford.edu
> https://mailman.stanford.edu/mailman/listinfo/protege-owl
> 
> Instructions for unsubscribing:
> http://protege.stanford.edu/doc/faq.html#01a.03 
> 
> 

--

-- 
View this message in context: http://www.nabble.com/-protege-owl--JessTab-problem-question-tf2553425.html#a7118832
Sent from the Protege - OWL mailing list archive at Nabble.com.

_______________________________________________
protege-owl mailing list
protege-owl <at> lists.stanford.edu
https://mailman.stanford.edu/mailman/listinfo/protege-owl

Instructions for unsubscribing: http://protege.stanford.edu/doc/faq.html#01a.03 

Mudunuri, Raj | 1 Nov 2006 18:47
Picon

expand option for the class hierarchy in individuals tab

Hi,

 

In the OWL Classes tab, the Asserted and Inferred hierarchies can be expanded/collapsed by right clicking the mouse on owl:Thing and selecting the expand/collapse options... but this option is not there for the Class hierarchy in Individuals tab... there, if we want to see the entire expanded hierarchy then we have to do it manually for every class... why is this so? Why are the expand/collapse options not provided there?

 

Cheers,

Raj

_______________________________________________
protege-owl mailing list
protege-owl <at> lists.stanford.edu
https://mailman.stanford.edu/mailman/listinfo/protege-owl

Instructions for unsubscribing: http://protege.stanford.edu/doc/faq.html#01a.03 
Martin O'Connor | 1 Nov 2006 20:01
Picon
Favicon

Re: Import OWL into JESS (or more general ontologies intoexpert systems)


DL-based reasoners do not create new individuals to be inserted into an 
ontology. Some reasoners will create temporary individuals during their 
reasoning processes, but those individuals are not saved. SWRL is DL 
based and is similarly restricted.

Basically, OWL and SWRL do not have the expressivity that you want. A 
possible 'back door' would be to develop SWRL built-ins to create 
individuals in rules, but the semantics of such an approach would be 
unclear.

Martin

Gerhard Austaller wrote:

>Hi
>
>"Martin O'Connor" <martin.oconnor <at> stanford.edu> schrieb:
>  
>
>>Gerhard Austaller wrote:
>>
>>Some reasoners now support (typically custom) rule languages. Mapping 
>>SWRL rules to a reasoner's rule language in parallel with the normal OWL 
>>constraint mapping mechanisms would produce a much nicer solution 
>>because reasoning and inference would be integrated. The KAON2 reasoner 
>>has the nice feature that it supports SWRL as its rule language. We are 
>>currently investigating the use of KAON2 as a rule engine for SWRL.
>>    
>>
>
>Thanx you for your answer. But I am still wondering is there is a 
>significant difference between reasoners for ontologies and rule 
>engines for expert systems. One feature of expert systems is that rules 
>can create new facts and on this facts other rules may fire until there 
>is a stable state. It is sort of declaritive programming. How is this 
>in resoners that support e.g. SWRL? With SWRL  it is not possible to 
>create new individuals ("facts"), is it? Is this a limitation of SWRL. 
>Did I look for the wrong rule language? Or do I mix something (rules in 
>expert systems and rules in ontilogies) that can not be compared?
>
>What I want to do is to create individuals and add it to my ontology 
>through rules. This new individual may trigger other rules until all 
>rules have fired. Where should I look for a solution? What I'd like to 
>have combined is the expressiveness of ontologies and the power of rule 
>engines from expert systems. 
>
>Thx
>Gerhard  
>
>_______________________________________________
>protege-owl mailing list
>protege-owl <at> lists.stanford.edu
>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 <at> lists.stanford.edu
https://mailman.stanford.edu/mailman/listinfo/protege-owl

Instructions for unsubscribing: http://protege.stanford.edu/doc/faq.html#01a.03 

Stefan Göhring | 1 Nov 2006 20:20
Picon
Picon

Re: How do I use DatabaseKnowledgeBaseFactory?

Hi Tania,
thanks now I found all the info I was looking for you. Thanks!
I oversaw that the protege-owl sources 
(http://protege.stanford.edu/download/registered.html) include the 
javadoc. Because I'm not alway connected to the net I needed a 
downloadable version.

Stefan

Tania Tudorache schrieb:
> Hi Stefan,
> 
> Stefan Göhring wrote:
>> Hey Tania!
>> Thank you so much for your help! It works perfectly now.
>> I am using the harder way because my app won't have access to the pprj file.
>>
>> Did I oversee some documentation or is there none for this procedure? Is 
>> there some further documentation than the protégé-owl api programmer's 
>> guide and the javadoc?
>>   
> There are still the wiki pages 
> (http://protege.cim3.net/cgi-bin/wiki.pl/), where both developers and 
> users document different topics.
> Some programming issues are described here:
> http://protege.cim3.net/cgi-bin/wiki.pl?ProgrammingTipsAndTricks
> 
>> I would like to download the javadoc and the owl source files on my 
>> computer to use them with eclipse, but i can't find where to get a 
>> zipped javadoc and I'm obviously too silly to use the cvs import utility 
>> of eclipse to get the sources...
>> any hints?
>>
>>   
> You find the sources and the javadoc of the latest Protege beta on the 
> Download page:
> http://protege.stanford.edu/download/registered.html
> 
> Cheers,
> Tania
> 
> 
>> Greeting from rainy Germany,
>> Stefan
>>
>> Tania Tudorache schrieb:
>>   
>>> Stefan,
>>>
>>> The simplest way to read/write to an OWL database, is to load 
>>> programmatically the project (pprj file), which already contains all 
>>> database connection information:
>>>
>>> Project prj = Project.loadProjectFromFile("/home/pizza_db.pprj",errors);
>>> OWLModel owlModel = (OWLModel) prj.getKnowledgeBase();
>>> ....
>>>
>>> The harder way to do the same is to use the factory:
>>>
>>> OWLDatabaseKnowledgeBaseFactory factory = new 
>>> OWLDatabaseKnowledgeBaseFactory();         
>>> Project prj = Project.createNewProject(factory, errors);
>>> OWLDatabaseKnowledgeBaseFactory.setSources(prj.getSources(), 
>>> "com.mysql.jdbc.Driver", "jdbc:mysql://localhost:3306/protege", "pizza", 
>>> "user", "password");
>>> prj.createDomainKnowledgeBase(factory, errors, true);
>>>
>>> OWLModel owlModel = (OWLModel) prj.getKnowledgeBase();
>>> ....
>>>
>>> I hope this helps.
>>>
>>> Tania
>>>
>>> Stefan Göhring wrote:
>>>     
>>>> Hi protege-owl programmers!
>>>>
>>>> I am trying to learn the use the protege-owl api, but I can't answer the 
>>>> following questions by using goole, protege owl guide and javadoc. 
>>>> Searching for "DatabaseKnowledgeBaseFactory" in this newsgroup just 
>>>> brought up one unanswered thread.
>>>>
>>>> My small app shold be able to read from and write in an owl database 
>>>> created by protege 3.2b. For that I use the protege owl jars from the 
>>>> plugins dir, the base protege jar file and the same jdbc connector i use 
>>>> with protege.
>>>>
>>>> This is the important code snippet:
>>>>
>>>> DatabaseKnowledgeBaseFactory dbFactory = new DatabaseKnowledgeBaseFactory();
>>>> KnowledgeBase kb = dbFactory.createKnowledgeBase(new ArrayList());
>>>> dbFactory.loadKnowledgeBase(kb, "com.mysql.jdbc.Driver", 
>>>> "jdbc:mysql://localhost/protege", "root", "", "logiktest", new ArrayList());
>>>> OWLDatabaseModel owlModel = new OWLDatabaseModel(dbFactory);
>>>>
>>>> System.out.println(printerFriendlyCollection(owlModel.getUserDefinedOWLNamedClasses()));
>>>>
>>>> 	private String printerFriendlyCollection(Collection c){
>>>> 		String s = "";
>>>> 		Iterator it = c.iterator();
>>>> 		while(it.hasNext()){
>>>> 			RDFResource next = (RDFResource)it.next();
>>>> 			s+=next.getName()+"\n";
>>>> 		}
>>>> 		return s;
>>>> 	}
>>>>
>>>> I use new ArrayList() for the error collection - I do not know what kind 
>>>> of collection I have to pass, so I just used an empty one and hoped to 
>>>> understand it with a following error code.
>>>>
>>>> I get the following error executing this code:
>>>>
>>>>
>>>> CONFIG: Protege 3.2 Build 318, JVM 1.5.0_06-b05, memory=66M, Windows XP, 
>>>> encoding=UTF-8, language=de, country=DE
>>>> WARNING: Look and feel not found: 
>>>> com.jgoodies.looks.plastic.PlasticLookAndFeel -- 
>>>> SystemUtilities.setLookAndFeel()
>>>> WARNING: Plugins directory not found: D:\Eigene 
>>>> Dateien\develop\java\projects\protege owl test\plugins -- 
>>>> PluginUtilities.findPluginsDirectory()
>>>> WARNING: Unable to load knowledgebase -- java.lang.NullPointerException
>>>> 	at 
>>>>
edu.stanford.smi.protege.storage.database.DatabaseKnowledgeBaseFactory.initializeKB(Unknown 
>>>> Source)
>>>> 	at 
>>>>
edu.stanford.smi.protege.storage.database.DatabaseKnowledgeBaseFactory.loadKnowledgeBase(Unknown 
>>>> Source)
>>>> 	at OWLDatabaseTest.<init>(OWLDatabaseTest.java:30)
>>>> 	at OWLDatabaseTest.main(OWLDatabaseTest.java:13)
>>>>
>>>> Any ideas, solution proposals or links to tutorials?
>>>>
>>>> Greetings,
>>>> Stefan Göhring
>>>>
>>>> _______________________________________________
>>>> protege-owl mailing list
>>>> protege-owl <at> lists.stanford.edu
>>>> 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 <at> lists.stanford.edu
>>> 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 <at> lists.stanford.edu
>> 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 <at> lists.stanford.edu
> 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 <at> lists.stanford.edu
https://mailman.stanford.edu/mailman/listinfo/protege-owl

Instructions for unsubscribing: http://protege.stanford.edu/doc/faq.html#01a.03 

Daniel Elenius | 2 Nov 2006 00:06
Favicon

Protege-OWL API problem

Hi,

I am using the Protege-OWL API in a standalone application for a project 
here at SRI, and I ran into a problem.

When I call getOWLIndividuals() on my OWLModel, I get the following 
exception:

java.lang.NullPointerException
        at edu.stanford.smi.protege.model.DefaultFrame.isVisible(Unknown 
Source)
        at 
edu.stanford.smi.protegex.owl.model.impl.AbstractOWLModel.getRDFIndividuals(Unknown 
Source)
        at 
edu.stanford.smi.protegex.owl.model.impl.AbstractOWLModel.getOWLIndividuals(Unknown 
Source)
        at 
edu.stanford.smi.protegex.owl.model.impl.AbstractOWLModel.getOWLIndividuals(Unknown 
Source)

Any idea what could cause this? I can get the classes and properties ok, 
i.e. OWLModel.getRDFProperties() and OWLModel.getRDFSClasses() work as 
expected.

Another gripe: When I call the load() method on an OWLModel, and there 
are missing imports, the "Add repository" dialog pops up. What if I 
don't want it to? I shouldn't have to use the Protege GUI just because 
I'm using the API.

It seems like the API was not really designed to be used without a 
Protege GUI running...

Daniel
_______________________________________________
protege-owl mailing list
protege-owl <at> lists.stanford.edu
https://mailman.stanford.edu/mailman/listinfo/protege-owl

Instructions for unsubscribing: http://protege.stanford.edu/doc/faq.html#01a.03 

Nini Mao | 2 Nov 2006 03:21
Picon
Favicon

my tab widget plugin is not shown in the list!

Hi everyone!
 
I have developed a small tab widget plugin of Protege following the instruction "how to write a tab widget plug-in" from http://protege.stanford.edu/doc/pdk/plugins/tab_widget.html. I use Eclipse to write my plugin. When I compile and run my plugin from Eclipse, the Protege starts up, and my plugin is in the list of configure panel, everything is ok; but when I try to start Protege directly, my plugin does not show in the list! What's wrong? Could anyone please help me? Many thanks!
 
Following is the directory structure and the documentation I have :
 
metadata (folder) (created automatically by Eclipse)
OntologyTab Test (folder)
    OntologyTab (folder)
        OntologyTestTab.class
        OntologyTestTab.jaca
        (other .class and .java files)
    meta-info (folder)
        Manifest.mf
    .classpath (created automatically by Eclipse)
    .project  (created automatically by Eclipse)
 
the Manifest.mf file is:
Manifest-Version: 1.0
 
Name: OntologyTab/OntologyTestTab.class
Tab-Widget: True
 
(one white line before and after the plugin entry)
Nini

_______________________________________________
protege-owl mailing list
protege-owl <at> lists.stanford.edu
https://mailman.stanford.edu/mailman/listinfo/protege-owl

Instructions for unsubscribing: http://protege.stanford.edu/doc/faq.html#01a.03 

Gmane