Re: Evaluating PAL constraints in JessTab [solved]

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Re: Evaluating PAL constraints in JessTab [solved]

Dona Mommsen

Hi Henrik,

thanks for the hint about using the internal name. There is another PAL
constraint in the newspaper example editor-employees-salary-constraint
that is working:

(pal-evaluate-constraints* (find-instance ((?pal :PAL-CONSTRAINT))  (eq
(slot-get ?pal :PAL-NAME) "editor-employees-salary-constraint")))

Could you please add that tipp to your documentation for future
releases, since the internal name is not shown in the instance tab,
only the :PAL-NAME.?
Would it be possible to add an alternative implementation that uses
:PAL-NAME, just as a convenience?

Thanks for the help.

Dona


On May 25, 2006, at 5:28 PM, Henrik Eriksson wrote:

> Hi Donna,
>
> The problem here is that the internal Protege name of the constraint
> article-section-constrained-by-author is really newspaper_00001. For
> example, calling (instancep article-section-constrained-by-author)
> returns FALSE. It should work somewhat better with
> (pal-evaluate-constraints* newspaper_00001)
>
> However, there seems to be a problem with the constraints in the
> newspaper example. I'm getting a "validation error" when trying to
> check the article-section-constrained-by-author constraint in the PAL
> Constraints tab (and in JessTab because it is also calling the PAL
> engine).
>
>
> --Henrik
>
>
>
>
> Dona Mommsen wrote:
>> Hi Henrik,
>> I'm learning to use PAL constraints, and how to use them from JessTab
>> (version 1.4). I'm still using Protege 3.1.1 on Mac OS X 10.3.9, and
>> upgrading is not an option.
>>  (Protege 3.2 requires Java 5 and OS X 10.4.x but I cannot upgrade
>> due to version conflicts of other software that I really need — I
>> spare you the details).
>> I know that Protege 3.2 fixed an issue with PAL and the
>> plugin.properties. I tried to edit  it for 3.1.1, where I added a
>> plugin dependency:
>>> plugin.component.count=1
>>> plugin.component.name.0=JessTab Plugin
>>> plugin.component.about.0=http://www.ida.liu.se/~her/JessTab/
>>> plugin.component.doc.0=http://www.ida.liu.se/~her/JessTab/JessTab.pdf
>>> plugin.dependency.count=2
>>> plugin.dependency.0=edu.stanford.smi.protegex.owl
>>> plugin.dependency.1=edu.stanford.smi.protegex.pal_tabs
>> This helped me so far that there is no more error message in the
>> console and Jess finds the pal-evaluate-constraints* function.
>> However, when I try to evaluate a constraint in the newspaper
>> example, I get the following error:
>>> Jess> (pal-evaluate-constraints*
>>> article-section-constrained-by-author)
>>> Jess reported an error in routine pal-evaluate-constraints*
>>>     while executing (pal-evaluate-constraints*
>>> article-section-constrained-by-author).
>>>   Message: Protege instance not found:
>>> article-section-constrained-by-author.
>>>   Program text: ( pal-evaluate-constraints*
>>> article-section-constrained-by-author )  at line 3.
>> The instance does exist, and I get the same error message whether I
>> do a  (mapclass :PAL-CONSTRAINT) or not.
>> Also, I get the same error message with pal-evaluate-constraints, and
>> when I put the constraint name in single quotes.
>> What am I missing? Is there more that needs to be fixed than just the
>> dependency in the plugin.properties?
>> Thanks in advance for any help
>> Dona
>

-------------------------------------------------------------------------
To unsubscribe go to http://protege.stanford.edu/community/subscribe.html