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] Request for a method for changing a SWRL-rule name

Martin O'Connor martin.oconnor at stanford.edu
Thu Feb 12 14:44:29 PST 2009


Since you are renaming the individuals you could have dangling 
references in your code.

There is always a danger of renaming OWL individuals at run-time because 
the URI or name of the individual is its unique ID and could be used 
elsewhere. I would avoid doing it unless you have a very compelling use 
case. It may be better to annotate the rules with a name (as I plan to 
do in Protege 4).

Martin

Michael Lodemann wrote:

>Thank you again for your comprehensive answer, Martin.
>I was so focused on "getName" and "setName" so I forgot to search for 
>sth. like "rename" - thanks for that hint.
>
>Are dangling references a real problem in case of SWRL rules? I mean, is 
>there a scenario where rules are referenced? Perhaps I'm not having that 
>imaginativeness or I'm just not deep enough into the whole subject.
>
>Regards,
>Michael
>
>
>Martin O'Connor schrieb:
>  
>
>>In Protege 3 SWRL rules are stored as OWL individuals and the rule name 
>>is the name of the individual - so the normal Protege-OWL API mechanism 
>>can be used to 'change' the name. (There is a 'rename' method inherited 
>>by SWRLImp [which is an OWLIndividual] that returns a *new* instance 
>>with the supplied name; the old individual is deleted - and care must be 
>>taken to ensure that references to the old individual are not 
>>subsequently used.)
>>
>>It is worth noting that the SWRL Submission says nothing about rule 
>>names, though they are useful. In Protege 4, rule names will be probably 
>>be supported by annotating a rule or perhaps storing them in an 
>>rdfs:label. Changing the name of OWL individuals in code in 3.4 can be 
>>somewhat risky because of the risk of dangling references.
>>
>>Martin
>>
>>Michael Lodemann wrote:
>>
>>  
>>    
>>
>>>Hello protegeeks,
>>>
>>>I would like to have a method for changing the name of a SWRL-rule by 
>>>application. A method for "getName()" does exist, but no method 
>>>"setName(String name)" - on purpose?
>>>
>>>Thanks in advance,
>>>Michael
>>>      
>>>
>_______________________________________________
>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 
>
>  
>




More information about the protege-owl mailing list