Search Mailing List Archives


Limit search to: Subject & Body Subject Author
Sort by: Reverse Sort
Limit to: All This Week Last Week This Month Last Month
Select Date Range     through    

[protege-owl] Property listener is not listening

Georg Hebinger georg.hebinger at googlemail.com
Thu Oct 2 06:48:51 PDT 2008


Oh, maybe the code I posted was a bit unclear in this regard. I checked it
again, but the property listener refers indeed to the same property whose
value changed.

Adding the listener to the whole owlModel is possible and actually gives me
output messages when property values change - unfortunately, in many
undesired cases too.

-George

2008/10/2 Timothy Redmond <tredmond at stanford.edu>

>
> I am going to hazard a guess - before I check.  I think that the problem is
> that you attached the property listener to the TestProperty property.  But
> the property value that changed was of another property?  I hope to verify
> this soon...  There should be a way to attach the property listener to the
> owl model and thus get all property value changes.
>
> -Timothy
>
>
>
> On Sep 30, 2008, at 6:24 AM, Georg Hebinger wrote:
>
>   Hi everybody
>>
>> I still have a problem concerning property listeners. I added a listener
>> to a
>> property:
>>
>> TestProperty.addPropertyValueListener (new PropertyValueAdapter() {
>> public void propertyValueChanged (RDFResource resource, RDFProperty
>> property, Collection oldValues) {
>>  System.out.println("Value of property " + property.getName() + " has
>> changed.");
>>  }
>> });
>>
>> and then changed the value of a datatype property
>> within my java code:
>>
>> int a = 10;
>> RDFIndividual Individual = owlModel.getRDFIndividual ("TESTOBJECT");
>> edu.stanford.smi.protegex.owl.model.OWLDatatypeProperty Property =
>> owlModel.getOWLDatatypeProperty ("hasIntValue");
>> Individual.setPropertyValue (Property, a);
>>
>> I know that the value has been changed successfully, but my listener does
>> not
>> seem to have noticed that.
>>
>> Any help or suggestion is very much appreciated.
>>
>>
>> George
>> _______________________________________________
>> 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
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.stanford.edu/pipermail/protege-owl/attachments/20081002/d817bb90/attachment.html>


More information about the protege-owl mailing list