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-discussion] getDocumentation function (why Collection and not String)

Tania Tudorache tudorache at stanford.edu
Thu Dec 18 14:22:37 PST 2008


Hi Laszlo,

I suppose the getDocumentation returns a collection rather than a 
String, because Protege frames tried to stay as close to the OKBC 
specification [1] as possible. In the OKBC specification, documentation 
is a multi cardinality own slot on a frame. Therefore the Java API will 
return a collection rather than a string.

If you are editing the ontology in the protege editor, you are 
guaranteed that the documentation will be the string in the first 
element of the returned collection. The same applies, if you only use 
the Protege API with the calls: setDocumentation(String) and 
getDocumentation().

If you use other tools or APIs to edit the ontology, they may write 
multiple values in the documentation slot. Protege will read this file 
correctly, and for this case, the call to getDocumentation will return 
the collection of all documentation values.

Tania

[1]: http://www.ai.sri.com/~okbc/spec.html

Jabba Laci wrote:
> Hi,
>
> I'd like to get the documentation of a slot. I found the
> getDocumentation() function, but it returns a Collection, while a
> String would be more logical to me.
> My question: is it guaranteed that the collection only has one element
> (a string)? Or can it have more elements? In the latter case, why is
> it split?
>
> Thanks,
>
> Laszlo
> _______________________________________________
> protege-discussion mailing list
> protege-discussion at lists.stanford.edu
> https://mailman.stanford.edu/mailman/listinfo/protege-discussion
>
> Instructions for unsubscribing: http://protege.stanford.edu/doc/faq.html#01a.03 
>
>   




More information about the protege-discussion mailing list