Vassilis Koutkias | 1 Aug 15:04 2004
Picon

[protege-discussion] Problem with PAL queries and :SYMBOL typed slots...


Dear all,

I am working with the PAL Queries Tab and I am facing the following problem:

I am querying a class to obtain its instances, with a slot criterion which is of

type :SYMBOL, in the following way (i.e., query for instances of the Article

class, which has the value "College" in the reading_level slot, corresponding to

the Newspaper project) :

(defrange ?item :FRAME Article)
(findall ?item
        (= (reading_level ?item) "College"))

This query would work fine in case the reading_level slot was not of :SYMBOL

type but of :STRING type. I also excluded quotas in College, but there were no

results generated by the query. In any case, I get an empty "Warnings and

Errors" textarea in the PAL Queries Tab and some exceptions in the Protege

console window triggered by

"edu.stanford.smi.protegex.pal.language.Type_Symbol.coerceValue(Unknown Source)".

I would appreciate any idea, regarding the way such a query should be 
(Continue reading)

Samson Tu | 1 Aug 17:14 2004
Picon

[protege-discussion] Re: Problem with PAL queries and :SYMBOL typed slots...


Use the "coerce-to-string" function:

(findall ?item
          (= (coerce-to-string (reading_level ?item))   "College"))

Vassilis Koutkias wrote:
> Dear all,
> 
> I am working with the PAL Queries Tab and I am facing the following problem:
> 
> I am querying a class to obtain its instances, with a slot criterion which is of
> 
> type :SYMBOL, in the following way (i.e., query for instances of the Article
> 
> class, which has the value "College" in the reading_level slot, corresponding to
> 
> the Newspaper project) :
> 
> (defrange ?item :FRAME Article)
> (findall ?item
>         (= (reading_level ?item) "College"))
> 
> This query would work fine in case the reading_level slot was not of :SYMBOL
> 
> type but of :STRING type. I also excluded quotas in College, but there were no
> 
> results generated by the query. In any case, I get an empty "Warnings and
> 
> Errors" textarea in the PAL Queries Tab and some exceptions in the Protege
(Continue reading)

Samson Tu | 1 Aug 17:41 2004
Picon

[protege-discussion] Re: An additional attribute on a slot value?


In the current Protege, what you mentioned, making the slot 
instance-valued (e.g. FirstName slot taking on a value of 
TimeStampedValue instance (with value="John", time-stamp= "2004/08/01 
12:00:00")) is one approach.

Another possibility is to define you own subclass of :ANNOTATION class, 
say, :SLOT_VALUE_ANNOTATION, that has slots pointing to the instance, 
slot, and slot value, and additional slots holding information about the 
slot value. Programmatically, creating and setting values of these 
annotations are no different from using other frames. You'd have to 
define your own methods for setting values of slots whose values you 
want to have these annotations.

Samson

Dawid Weiss wrote:

> 
> Hi.
> 
> I have been trying to accomplish this, but so far with no success. I 
> would be very grateful for hints/ suggestions. The problem is:
> 
> 1. I want to have an additional attribute (slot of type string?) 
> "timestamp" on each particular value of a slot of a class. Let's say we 
> have a class Person with slots "FirstName" and "LastName". I would like 
> to preserve the date of last change of values on these slots.
> 
> I probably could model 'attributes' of class Person as instances of 
(Continue reading)

Vassilis Koutkias | 1 Aug 18:22 2004
Picon

[protege-discussion] Re: Problem with PAL queries and :SYMBOL typed slots...

Dear Samson,

thank you very much! It really worked ;-)

By the way, in the corresponding documentation page entitled "Supported
Predicates and Functions in PAL", 
(.../pal-documentation/PalKeywords/pal-predicates-functions.html)
the link to each particular predicate, function, etc. leads to pages 
with no additional description...

Kind regards,

Vassilis.

Samson Tu wrote:

>Use the "coerce-to-string" function:
>
>(findall ?item
>          (= (coerce-to-string (reading_level ?item))   "College"))
>
>
>Vassilis Koutkias wrote:
>  
>
>>Dear all,
>>
>>I am working with the PAL Queries Tab and I am facing the following problem:
>>
>>I am querying a class to obtain its instances, with a slot criterion which is of
(Continue reading)

Vassilis Koutkias | 1 Aug 23:09 2004
Picon

[protege-discussion] Re: Problem with PAL queries and :SYMBOL typed slots...

Another problem related to the PAL syntax...

What is the form of the query in case where the reading_level slot 
accepted multiple values?

Samson, I noticed that the result of the query you suggested contains 
only the instances where the searched value ("College" in our previous 
example) is defined first in the list of multiple values. In case it is 
not the first one, it is just ignored...

Any suggestions?

Vassilis.

Samson Tu wrote:

>Use the "coerce-to-string" function:
>
>(findall ?item
>          (= (coerce-to-string (reading_level ?item))   "College"))
>
>
>Vassilis Koutkias wrote:
>  
>
>>Dear all,
>>
>>I am working with the PAL Queries Tab and I am facing the following problem:
>>
>>I am querying a class to obtain its instances, with a slot criterion which is of
(Continue reading)

Stanley Knutson | 2 Aug 00:46 2004

[protege-discussion] Apparent regression in instance table in Protégé 2.1.1 release


In 2.1.1 release, the configuration of instance table widget for a slot in a metclass does not work
properly.  It did in previous versions.

I compared the new source to 2.1 build 197 source I have been using.

The problem is in protegex instance table.
Package edu.stanford.smi.protegex.widget.instancetable;
File  ConfigTableModel

The old value of the method works properly:

    private Object getRealValues(int row, int column) {
        VisibleSlotDescription vsd = _state.getDescriptionForIndex(column);
        switch (row) {
            case 0 :
                return vsd.slot;
            case 1 :
                return vsd.columnName;
            case 2 :
                return vsd.color;
    }
        return null;
    }

The new value was to always return an empty string.  The new method does not work.

Stanley Knutson
sknutson <at> purisma.com
Director of Back-End Engineering
(Continue reading)

Samson Tu | 2 Aug 01:40 2004
Picon

[protege-discussion] Re: Problem with PAL queries and :SYMBOL typed slots...


You access the slot value in the functioal form
(reading-level ?item) ONLY when the slot reading-level is single-valued. 
  (function <=> cardinality single)

When the slot has cardinatliy multiple, you have to use the predicate 
form (slot frame slot-value), i.e.

(findall ?item (reading_level ?item (coerce-to-symbol "College")))

Samson

Vassilis Koutkias wrote:

> Another problem related to the PAL syntax...
> 
> What is the form of the query in case where the reading_level slot 
> accepted multiple values?
> 
> Samson, I noticed that the result of the query you suggested contains 
> only the instances where the searched value ("College" in our previous 
> example) is defined first in the list of multiple values. In case it is 
> not the first one, it is just ignored...
> 
> Any suggestions?
> 
> Vassilis.
> 
> Samson Tu wrote:
> 
(Continue reading)

Dawid Weiss | 2 Aug 02:58 2004
Picon

[protege-discussion] Re: An additional attribute on a slot value?


Hi Samson,

Thanks for swift response. I had actually found out how Protege stores 
annotations before you posted your answer, but nonetheless it is good to 
know I was on the right track. One doubt remains, however... if we have 
a lot of those timestamped attributes, it would be quite interesting to 
see how such 'reverse' annotations behave performance-wise. If I find 
out anything interesting I'll let the community know about the results.

Thanks again,
Dawid

>In the current Protege, what you mentioned, making the slot 
>instance-valued (e.g. FirstName slot taking on a value of 
>TimeStampedValue instance (with value="John", time-stamp= "2004/08/01 
>12:00:00")) is one approach.
>
>Another possibility is to define you own subclass of :ANNOTATION class, 
>say, :SLOT_VALUE_ANNOTATION, that has slots pointing to the instance, 
>slot, and slot value, and additional slots holding information about the 
>slot value. Programmatically, creating and setting values of these 
>annotations are no different from using other frames. You'd have to 
>define your own methods for setting values of slots whose values you 
>want to have these annotations.
>
>Samson
>
>Dawid Weiss wrote:
>
(Continue reading)

Vinodh Natarajan | 2 Aug 16:38 2004
Picon

[protege-discussion] more doubts on petrinets

Dear Samson

thank you for you reply.

i have earlier looked at CPN tools for petrinets, the main point why i chose Protege for representing
petrinet style  graphs is the source code for protege is open.

as i had indicated earlier, my aim is not to implement a tokengame, i need a tool for users to graphically
represent the petrinet. since protege is an open source i thought even if i hit any hurdles ic an ask doubts.

the aim of my work is not implementing or running the petrinet. rather, once the petrinet style graph has
been drawn, i want to see what has been drawn, that is how the graph is, once i get the components in the graph,
i want to get the rules for the graph.

its like the user gives a graphical representation of his question and we get the rules out of that representation.

so i need to know whether protege can be used just for representation alone and that representation can be
read and used. 

another reason i chose protege was i read that it is easily deployable over the net,

the reason why i did not chose CPN was, CPN is a end user tool, to draw and execute, but for me, once the drawing
is done, i need to infer from the drawing not implement and i cud not find CPN as open source to do it

do you think i can go ahead with protege as a drawing tool? what did you mean the analysis will take lot of work,
what analysis are you refering?

thank you
vinodh

(Continue reading)

Shantharam R. Iyer | 2 Aug 17:03 2004
Picon

[protege-discussion] PERL API


Is there a perl API for the Protege 

=====

Shantharam Iyer 

Email add. : shaan1980 <at> yahoo.com , shantharamri <at> hotmail.com 
1202 44th Street

North Bergen,

NJ  07047

Ph no: 1-732-9866107

		
__________________________________
Do you Yahoo!?
New and Improved Yahoo! Mail - Send 10MB messages!
http://promotions.yahoo.com/new_mail 

Gmane