On 15/07/12 00:55, Fairouz FakhFakh wrote:

Hello,
I use OWL-S API (you find  attached). I know that OWL-S API use Jena.So, I would like to retrieve 
or extract the value of a datatypeProperty . For example the value of a 
"serviceProduct"., "serviceName", ...Can I use this with Jena and how ?Please, 
can some one help me. I am really blocked                                                           
                       

This list doesn't support attachments so we can't see the code you are talking about.

However, once you have a jena Resource then getting the value of some property is trivial, see for example:

http://jena.apache.org/documentation/javadoc/jena/com/hp/hpl/jena/rdf/model/Resource.html#getProperty(com.hp.hpl.jena.rdf.model.Property)

http://jena.apache.org/documentation/javadoc/jena/com/hp/hpl/jena/rdf/model/Resource.html#listProperties(com.hp.hpl.jena.rdf.model.Property)

If OWL-S uses OntModels then you probably in fact have OntResources (a subinterface of Resource) in which case you also have access to the more convenient:

http://jena.apache.org/documentation/javadoc/jena/com/hp/hpl/jena/ontology/OntResource.html#getPropertyValue(com.hp.hpl.jena.rdf.model.Property)

and

http://jena.apache.org/documentation/javadoc/jena/com/hp/hpl/jena/ontology/OntResource.html#listPropertyValues(com.hp.hpl.jena.rdf.model.Property)

Dave



Reply via email to