How to rename an individual, and assign datatype to property value

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

How to rename an individual, and assign datatype to property value

houzw
Hi,
I have got an ontology that name of individuals are generated by UUID, while readable name is defined as skos prefLabel.
My question is, how to rename those individuals use their prefLable? I know how to get name and prefLabel value, but not found the function to set(update) the name value.

Another question is, I'm not clear about how to assign datatype xsd:anyURI to a property,  just found normstr()


Many thanks!
:)
Reply | Threaded
Open this post in threaded view
|

Re: How to rename an individual, and assign datatype to property value

Jiba
Administrator
Hi,

For renaming individual, just use individual.name = "new_name" (in Owlready, most attributes and list are writeable).

For assigning datatype xsd:anyURI to a property, you can use the property.range_iri attribute (currently available only in the development version of Owlready).

Jiba
Reply | Threaded
Open this post in threaded view
|

Re: How to rename an individual, and assign datatype to property value

houzw
got it, thanks :)