Fatiha Latfi | 1 Jan 2008 18:56
Picon

Re: swrl exceptions

Hi dears,
 
I wish you a very happy new year.
 
I use the same example of the Protégé-OWL API Programmer's Guide in NetBeans 6.0 with my ontology. It works but I have much warnings like :  
 
SEVERE: Exception caught -- java.io.IOException: Server returned HTTP response code: 403 for URL: http://sqwrl.stanford.edu/ontologies/built-ins/3.4/sqwrl.owl
        at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1245)
....
 
I set the -Dprotege.dir to the Protege insllation folder in VM arguments... but it still happened... 
 
Thanks for any help.
Fatiha.
 
 
_______________________________________________
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 
zhang weishan | 1 Jan 2008 21:29
Picon
Favicon

Re: reloading swrl rules for re-execution

Hello Martin,
  Thank you for your information.
  I get problem with the reloading issue:
 It seems that sequence is working the same way as infer().
            bridge.importSWRLRulesAndOWLKnowledge();
            bridge.run();
 The instances in the ontology are updated periodically, but i always get the same reasoning result (same j value in my case), which should not be the case.
  Below is the method which is quit e simple, and called in another class, 'bridge' is private attribute.
public HashSet<String> getAllSWRLInferred() {
        HashSet<String> set = new HashSet<String>();

        try {
        //    bridge.infer();
            bridge.importSWRLRulesAndOWLKnowledge();
            bridge.run();
        } catch (SWRLRuleEngineException e) {
            e.printStackTrace();
        }

        int i = bridge.getNumberOfInferredIndividuals();
        // System.out.println("getNumberOfInferredIndividuals: "+i);
      &nbsp ; if (i > 0) {
           
            Set<OWLIndividual> infered = bridge.getInferredIndividuals();

            for (Iterator it = infered.iterator(); it.hasNext();) {
                set.add(it.next().toString());
            }
        }
        int j = bridge.getNumberOfInferredPropertyAssertionAxioms();
        System.out.println("getNumberOfInferred Property:  " + j);
        if (j > 0) {// System.out.println("getNumberOfInferredIndividuals "+i);
            Set<OWLPropertyAssertionAxiom> i nfered = bridge
                    .getInferredPropertyAssertionAxioms();

            for (Iterator it = infered.iterator(); it.hasNext();) {

                // System.out.println("...."+it.next());
                set.add(it.next().toString());
            }
        }
       
        return set;
    }





----- Original Message ----
From: Martin O'Connor <martin.oconnor <at> stanfo rd.edu>
To: User support for  Protege-OWL editor <protege-owl <at> lists.stanford.edu>
Sent: Monday, December 31, 2007 3:58:04 AM
Subject: Re: [protege-owl] reloading swrl rules for re-execution


The method is importSWRLRulesandOWLKnowledge(). cf. [1]

Rule grouping is something I am working on but it is not currently
available. Hopefully in a month or so I will have something.
Parameterized rules are only a vague idea at the moment though we are
thinking about it for a project that we are working on.

Martin

[1]
http://protege.stanford.edu/download/prerelease_javadoc_owl/edu/stanford/smi/protegex/owl/swrl/SWRLRuleEngine.html

zhang weishan wrote:

> Hello Martin,
>  I could not find the loadSWRLRulesAndOWLKnowledge() method in the
> SWRLRuleEngine interface. And runn ing infer() method, and then
> reset(), could not help.
>  I also found that there is infer(rulegroup) which is interesting,
> how to use a rule group, any examples?
>  I remembered some time ago, there is a message say that there will
> be dynamic rule support, or parameterized rule... Are these features
> available?
>
>  Best,
>  Weishan

>
>
> ----- Original Message ----
> From: Martin O'Connor <martin.oconnor <at> stanford.edu>
> To: protege-owl <at> lists.stanford.edu
> Sent: Sunday, December 30, 2007 5:46:28 AM
> Subject: Re: [protege-owl] reloading swrl rules for re-execution
>
>
> My suggestion about the infer() call may not be the best choice now
> that I think of it because this call saves inferred knowledge back to
> the OWL model. Using the sequence:
>
> ruleEngine.loadSWRLRulesAndOWLKnowledge()
> ruleEngine.run()
>
> will do the inference but will not save the inferred knowledge to the
> OWL model, which I think is what you were looking for.
>
> Martin
>
> Quoting zhang weishan <dr_zhangws <at> yahoo.com
> <mailto:dr_zhangws <at> yahoo.com>>:
>
> > Thank you Martin.
> > The whole Protege website is not accessible here. I noticed this
> > happened several times during weekend...
> >
> >
> > ----- Original Message ----
> > From: Martin O'Connor <martin.oconnor <at> stanford.edu
> <mailto:martin.oconnor <at> stanford.edu>>
> > To: protege-owl <at> lists.stanford.edu
> <mailto:protege-owl <at> lists.stanford.edu>
> > Sent: Sunday, December 30, 2007 4:28:01 AM
> > Subject: Re: [protege-owl] reloading swrl rules for re-execution
> >
> >
> >
> > The web site works for me. Which pages are down for you?
> >
> > When you open an OWL model from a file it is effectively reloaded.
> > Also, if you do not save the inferred knowledge when running a rule
> > engine, a new call to infer() [1] will effectively reload the model.
> >
> > Martin
> >
> >
> > [1]
> >
> http://protege.stanford.edu/download/prerelease_javadoc_owl/edu/stanford/smi/protegex/owl/swrl/SWRLRuleEngine.html
> >
> > Quoting zhang weishan <dr_zhangws <at> yahoo.com
> <mailto:dr_zhangws <at> yahoo.com>>:
> >
> >> Dear All,
> >>  How to re-load the model in order to re-evaluate the rules? I need
> >
> >>  to update instances of some concepts and then check the and execute
> >
> >>  the related swrl rules.
> >>  Is the protege web site down? I could not access to any api docs.
> >>
> >>  Thank you,
> >>  Weishna
> >>
> >>
> >>
> >>
> >>
> >>
> > 
> >
> ____________________________________________________________________________________
> >> Never miss a thing.  Make Yahoo your home page.
> >> http://www.yahoo.com/r/hs
> >
> >
> > _______________________________________________
> > protege-owl mailing list
> > protege-owl <at> lists.stanford.edu <mailto: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
> >
> >
> >
> >
> >
> >
> >     
> >
> ____________________________________________________________________________________
> > Looking for last minute shopping deals?
> > Find them fast with Yahoo! Search. 
> > http://tools.search.yahoo.com/newsearch/category.php?category=shopping
>
>
> _______________________________________________
> protege-owl mailing list
> protege-owl <at> lists.stanford.edu <mailto: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
>
>
> ------------------------------------------------------------------------
> Never miss a thing. Make Yahoo your homepage.
> <http://us.rd.yahoo.com/evt=51438/*http://www.yahoo.com/r/hs>
>
>------------------------------------------------------------------------
>
>_______________________________________________
>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


Looking for last minute shopping deals? Find them fast with Yahoo! Search.
_______________________________________________
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 
Carmen Martinez | 2 Jan 2008 03:39
Picon
Picon
Favicon

Import ontologies and Visibility

Hello!,

I have imported an ontology programmatically when I load my new tab plugin. And it works!, because I see the ontology in the metadata tab, but, I do not see the classes in the classes explorer. I only see them when I check the Display Hidden Frames checkbox. Then I can uncheck the same checkbox, but my imported ontology is still there (in grey). I have used the function owlModel.getProject().setDisplayHiddenClasses(true) in order to do the same; but it doesn't work, because it doesn't refresh the explorer. Only when I uncheck the checkbox the window is refreshed.

My question is; how can I put visible my imported ontology (in grey is perfect) without doing this check/uncheck action? Is there any function that let me refresh the classes explorer?.

And the last question is related to this problem because: My imported ontology is read only because  I have imported using a real URI. Using Protege I can instantiate my imported ontology, and save the instances very well, but, programmatically, I can not instantiate the classes in the same way. For example, when I do:
          (My tableClass is a metaclass, is subclass of owl:Class)
         OWLNamedClass tableClass = owlModel.getOWLNamedClass("Table");
         OWLIndividual individual = tableClass.createOWLIndividual("Table1");
 As you know, Table1 must be a class too, because, is an instance of a metaclass. But, when I execute these instructions, Table1, is created (I can not see it due to the previous problem I have commented), but not as a class!!. When I make visible the imported ontology, I can see this instance, but only as an instance!!. However, it works perfect, if I do it manually. Can anyone explain that?
Isn´t protege interpreting the Table1 instance as  a class?

Thanks a lot,

Carmen.


¿Chef por primera vez? - Sé un mejor Cocinillas.
Entra en Yahoo! Respuestas.
_______________________________________________
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 
Alexander Garcia Castro | 2 Jan 2008 04:34
Picon

Re: osgi bundle error: jena or protege-owl

Dear all, I am using P4. I  need to load the Galen ontology, OWL version. I have downloaded it from http://www.co-ode.org/galen/
I try to load it and I get this error:

An error occurred whilst creating the view
nullpointerexeption:
null

What should I do? how  could I load this ontology in p4?  Thanks, cheers.

_______________________________________________
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 
Joseph Thomas-Kerr | 2 Jan 2008 07:32
Picon
Picon

SWRL rule query

Hi,

I want to be able to express the following rule:

avc:pps(?pps) ^ avc:id(?pps,?spsID)
^ avc:sps(?sps) ^ avc:id(?sps,?spsID)
^ avc:seqNo(?pps,?ppsSeqNo) ^ avc:seqNo(?sps,?spsSeqNo)
^ swrlb:lessThan(?spsSeqNo,?ppsSeqNo)
^ (?spsSeqNo = MAXIMUM(?spsSeqNo))
	-> rdo:dependsOn(?pps,?sps)}

That is, I want to infer a relationship between a avc:pps and the avc:sps  
with the matching spsID that MOST RECENTLY precedes it. An example might  
help. Given the following individuals

sps(SeqNo=0,id=0)
sps(SeqNo=1,id=1)
sps(SeqNo=2,id=2)
sps(SeqNo=3,id=0)
PPS(SeqNo=4,id=0)
sps(SeqNo=5,id=3)
sps(SeqNo=6,id=2)
sps(SeqNo=7,id=0)
sps(SeqNo=8,id=2)
PPS(SeqNo=9,id=2)

I want to infer that

rdo:dependsOn(pps(SeqNo=4,id=0),sps(SeqNo=3,id=0))
rdo:dependsOn(pps(SeqNo=9,id=2),sps(SeqNo=8,id=2))

and nothing else. sqwrl has a max function, but I don't think that this  
will get me what I am after. I tried using this function in the consequent  
along with my inferred property, but it doesn't seem to work; query and  
inference seem to have been deliberately separated.

I am not a logic expert; I suspect that this inference is nonmonotonic,  
but I'm not certain.

can anyone provide some insight?

Regards,
Joe.
_______________________________________________
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 

Jinjun Chen | 2 Jan 2008 09:41
Picon
Picon

Call for Papers: WaGe08 - Workflow Management and Applications in Grid Environments

Call for papers - WaGe08 (http://www.swinflow.org/confs/WaGe08/WaGe08.htm). 

Deadline: January 15, 2008. 

3rd International Workshop on Workflow Management and Applications in Grid
Environments (WaGe08), May 25-28, 2008, Kunming, China -
http://www.swinflow.org/confs/WaGe08/WaGe08.htm. 

Workshop papers will be published by IEEE CS in the conference proceedings.
Selected papers will be published by a special issue in Concurrency and
Computation: Practice and Experience or Journal of Computer and System
Sciences. 

Best wishes, 
Jinjun 

------
Dr. Jinjun Chen
Lecturer in Information Technology
CITR - Centre for Information Technology Research
Faculty of Information and Communication Technologies
Swinburne University of Technology,
Hawthorn, Melbourne, Victoria 3122, Australia.
Tel: +61 3 9214 8739
Fax: +61 3 9819 0823
Office: EN508a, Engineering Building, Hawthorn Campus
Email: jchen <at> ict.swin.edu.au
URL: http://www.swinflow.org/~jchen/

_______________________________________________
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 

Jinjun Chen | 2 Jan 2008 09:49
Picon
Picon

FW: Call for Papers: WaGe08 - Workflow Management and Applications in Grid Environments

Call for papers - WaGe08 (http://www.swinflow.org/confs/WaGe08/WaGe08.htm). 

Deadline: January 15, 2008. 

3rd International Workshop on Workflow Management and Applications in Grid
Environments (WaGe08), May 25-28, 2008, Kunming, China -
http://www.swinflow.org/confs/WaGe08/WaGe08.htm. 

Workshop papers will be published by IEEE CS in the conference proceedings.
Selected papers will be published by a special issue in Concurrency and
Computation: Practice and Experience or Journal of Computer and System
Sciences. 

Best wishes, 
Jinjun 

------
Dr. Jinjun Chen
Lecturer in Information Technology
CITR - Centre for Information Technology Research
Faculty of Information and Communication Technologies
Swinburne University of Technology,
Hawthorn, Melbourne, Victoria 3122, Australia.
Tel: +61 3 9214 8739
Fax: +61 3 9819 0823
Office: EN508a, Engineering Building, Hawthorn Campus
Email: jchen <at> ict.swin.edu.au
URL: http://www.swinflow.org/~jchen/

_______________________________________________
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 | 2 Jan 2008 20:10
Picon
Favicon

Re: swrl exceptions


There were a permissions problem in that page which has now been fixed. 
However, are you sure you have set your -Dprotege.dir properly? This 
ontology is stored in Protege-OWL's repositories so you should not need 
to go the the web for it. (I'm assuming you are using the latest beta.)

Martin

Fatiha Latfi wrote:

> Hi dears,
>  
> I wish you a very happy new year.
>  
> I use the same example of the Protégé-OWL API Programmer's Guide 
> in NetBeans 6.0 with my ontology. It works but I have much 
> warnings like :  
>  
> SEVERE: Exception caught -- java.io.IOException: Server returned HTTP 
> response code: 403 for URL: 
> http://sqwrl.stanford.edu/ontologies/built-ins/3.4/sqwrl.owl 
> <http://sqwrl.stanford.edu/ontologies/built-ins/3.4/sqwrl.owl>
>         at 
> sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1245)
> ....
>  
> I set the -Dprotege.dir to the Protege insllation folder in VM 
> arguments... but it still happened... 
>  
> Thanks for any help.
> Fatiha.
>  
>  
>
>------------------------------------------------------------------------
>
>_______________________________________________
>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 

Martin O'Connor | 2 Jan 2008 20:47
Picon
Favicon

Re: SWRL rule query


Query and inference are deliberately separated in SQWRL. OWL's open 
world assumption will prevent you from inferring the maximum of your 
sequence numbers because there may another number out there that is greater.

Martin

Joseph Thomas-Kerr wrote:

>Hi,
>
>I want to be able to express the following rule:
>
>avc:pps(?pps) ^ avc:id(?pps,?spsID)
>^ avc:sps(?sps) ^ avc:id(?sps,?spsID)
>^ avc:seqNo(?pps,?ppsSeqNo) ^ avc:seqNo(?sps,?spsSeqNo)
>^ swrlb:lessThan(?spsSeqNo,?ppsSeqNo)
>^ (?spsSeqNo = MAXIMUM(?spsSeqNo))
>	-> rdo:dependsOn(?pps,?sps)}
>
>That is, I want to infer a relationship between a avc:pps and the avc:sps  
>with the matching spsID that MOST RECENTLY precedes it. An example might  
>help. Given the following individuals
>
>sps(SeqNo=0,id=0)
>sps(SeqNo=1,id=1)
>sps(SeqNo=2,id=2)
>sps(SeqNo=3,id=0)
>PPS(SeqNo=4,id=0)
>sps(SeqNo=5,id=3)
>sps(SeqNo=6,id=2)
>sps(SeqNo=7,id=0)
>sps(SeqNo=8,id=2)
>PPS(SeqNo=9,id=2)
>
>I want to infer that
>
>rdo:dependsOn(pps(SeqNo=4,id=0),sps(SeqNo=3,id=0))
>rdo:dependsOn(pps(SeqNo=9,id=2),sps(SeqNo=8,id=2))
>
>and nothing else. sqwrl has a max function, but I don't think that this  
>will get me what I am after. I tried using this function in the consequent  
>along with my inferred property, but it doesn't seem to work; query and  
>inference seem to have been deliberately separated.
>
>I am not a logic expert; I suspect that this inference is nonmonotonic,  
>but I'm not certain.
>
>can anyone provide some insight?
>
>Regards,
>Joe.
>_______________________________________________
>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 

Jibbi | 2 Jan 2008 21:21
Picon
Picon
Favicon

SWRL related Quesitons!


Hi Everyone,

I've problem with implementing negation in SWRL, the logic is very simple,
however i don't find any solution in SWRL.
like i want say, If "Elin" is not a friend of specific Member, get the
contact of Member and forward the request on his contact. to achieve that, I
have to define negation of hasFriend property.

Members(?x)  ∧ NOT hasFriend(?x, Elin)  ∧  hasContact(?x, ?t) →
SendRequest(?t)
any solution will be highly appreciated.

second Question:
If i import a ontology in my main ontology, how come possible, i can define
the imported Property is the sub property of existing property in main
Ontology.
for example. I imported a IMP_Ontology into Main_Ontology and i want to say,
the Property_IMP_Ontology is the sub property of Property_Main_Ontology.   

I'm using Progete 3.3.1

Thanks in advance
Cheers
Najeeb Elahi
--

-- 
View this message in context: http://www.nabble.com/SWRL-related-Quesitons%21-tp14585509p14585509.html
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 

Gmane