The "string" data type within the data property assertion in protégé 5.5 dose not saved

65 Views Asked by At

I am developing ontology using protégé 5.5. After I created data properties and I created data property assertions, the data type "String" dose not save. I mean when I save the ontology and exit from it. When I return back and open my ontology I fond the data type of data property assertions which given "String" is not there. By the way this happen only with "String" but not with for example "decimal" or "integer".

So, please who has a solution of this problem.

I am expected the "string" data type within the data property assertion will be saved.


It looks like I was not clear in describing my problem. Here are some details. I use Protégé 5.6.0 on Windows 10. I have some data properties of type string. I specify String in their Range, as shown in the following example: Rang String Then, for each data property, I provide the data value and data type String, as shown in the following example: Data type: String When I save my ontology and close, then reopen my ontology, the data type “String” disappears, as shown in the following example: Data type disappears I tried saving my ontology in different formats, like RDF/XML, OWL but the same problem happened. Also, I checked my ontology in a text editor, and there is no string data type shown; however, integer types are saved or serialized. I think because String is the default type, it does not serialize, and this should be fine in many cases. However, In my case, it causes a problem when running SWRL rules with the Drools engine, and it gives the following error:

Exception running rule engine: error running Drools rule engine: [Error: invoker.invoke("S12", "swrlb:equal", 0, false, new VPATH(), new BAVNs("BjtDP", "BjtJSDP"), $BjtDP, $BjtJSDP): built-in exception thrown by built-in swrlb:equal in rule S12: exception thrown by built-in swrlb:equal in rule S12: unsupported argument type: expecting boolean, numeric, string, xsd:date, xsd:dateTime, xsd:time, or xsd:duration argument for comparison, got "DigitalSecurityManagerOfficer"^^rdf:PlainLiteral for (0-offset) argument #0] [Near : {... invoker.invoke("S12", "swrlb:e ....}] …..

I need to save SWRL rules and Drools results in the ontology, but as the error shows, it fails to run. What could be the cause of this problem, and how can it be solved? Thank you for any help

1

There are 1 best solutions below

2
Ignazio On

In most output syntaxes the string datatype is optional. It will appear where required.