0

i am working about inferences on Jena. I would test that a property is a particular string. I have an ontology about servers, an individuals like this:

<owl:NamedIndividual rdf:about="&data;serveur-106216">
    <heberge rdf:resource="&data;applications-105049"/>
    <rdf:type rdf:resource="&data;serveur"/>
    <identifiant-reseau rdf:datatype="&xsd;string">SRVLINMAGZ06</identifiant-reseau>
    <status rdf:datatype="&xsd;string">En service</status>
    <svr-numero-serie rdf:datatype="&xsd;string">-</svr-numero-serie>
</owl:NamedIndividual>

i would add a new information (new property) to the servers that have a property

identifiant-reseau="POLO"

so, for this i have written a Jena rule like this:

[rule: (?S rdf:type data:serveur), (?S data:identifiant-reseau "POLO")-> (?S data:newproperty "TEST")]

But obviously, the test (?S data:identifiant-reseau "POLO") don't work. Have you an idea for do this?

Thank you.

Stephan Muller
  • 27,018
  • 16
  • 85
  • 126
  • 1
    Can you provide example data that shows what you expect the data to look like server side? (ie: give the data regarding what the individual looks like after the update). Additionally, note that you may need to make sure that your data types align property. `"POLO"` is a plain literal, but `"SRVLINMAGZ06"^^xsd:string` is a typed-literal. (sometimes plain literals and strings can be used interchangeably, so that may not matter in the case of the rule engine. – Rob Hall Jul 09 '14 at 16:32
  • Duplicated on the mailing list at http://mail-archives.apache.org/mod_mbox/jena-users/201407.mbox/%3C1404900986.26653.YahooMailNeo%40web133105.mail.ir2.yahoo.com%3E, and received a response from Dave Reynolds, and duplicated at answers.semanticweb.com: http://answers.semanticweb.com/questions/29125/jena-rules-test-a-literal-property-to-string. – Joshua Taylor Jul 09 '14 at 20:37

0 Answers0