Protege is losing xsd:string type when I re-open it

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

Protege is losing xsd:string type when I re-open it

anacrl
Hi, Matthew/Csongor.

Martin said to post here. I think that something is wrong.

I attached some print screens to explain my problem.

I think the problem is when I close and re-open my ontology. Protege is
losing my changes about types of the individuals and assumes that my data
properties are plain literal and rewrites my SWRL rules.

I ordered my screens before close Protege and after. Please, could you see
these screens and return to me?

I re-created my old ontology in the new version of the Protege. Before close
the Protege, the two SWRL rules execute ok with one inferred individual.
But, when i close protege and re-open it, the same rules are not ok.

Could you help me, please?
Thanks.
0_BeforeClose_DML_TPCH_1_Individual.jpg
<http://protege-project.136.n4.nabble.com/file/t375138/0_BeforeClose_DML_TPCH_1_Individual.jpg>  
1_BeforeClose_RuleQueryStatement.jpg
<http://protege-project.136.n4.nabble.com/file/t375138/1_BeforeClose_RuleQueryStatement.jpg>  
2_BeforeClose_RuleSelectClause.jpg
<http://protege-project.136.n4.nabble.com/file/t375138/2_BeforeClose_RuleSelectClause.jpg>  
3_BeforeClose_RulesRunningOk.jpg
<http://protege-project.136.n4.nabble.com/file/t375138/3_BeforeClose_RulesRunningOk.jpg>  
4_BeforeClose_InferredIndividual.jpg
<http://protege-project.136.n4.nabble.com/file/t375138/4_BeforeClose_InferredIndividual.jpg>  
5_AfterReopen_DML_TPCH_1_Individual.jpg
<http://protege-project.136.n4.nabble.com/file/t375138/5_AfterReopen_DML_TPCH_1_Individual.jpg>  
6_AfterReopen_RuleQueryStatement.jpg
<http://protege-project.136.n4.nabble.com/file/t375138/6_AfterReopen_RuleQueryStatement.jpg>  
7_AfterReopen_RuleSelectClause.jpg
<http://protege-project.136.n4.nabble.com/file/t375138/7_AfterReopen_RuleSelectClause.jpg>  
8_AfterReopen_RulesRunningNOTOk.jpg
<http://protege-project.136.n4.nabble.com/file/t375138/8_AfterReopen_RulesRunningNOTOk.jpg>  




--
Sent from: http://protege-project.136.n4.nabble.com/Protege-User-f4659818.html
_______________________________________________
protege-user mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-user
Reply | Threaded
Open this post in threaded view
|

Re: Protege is losing xsd:string type when I re-open it

Michael DeBellis-2
I just took a quick look at your screen snapshots (btw, if your ontology isn't proprietary or huge you can include the owl file as well, that usually makes it a lot easier to debug problems) so I could be wrong but I think the problem might be with the way you are using strings in your rule. So in one rule you currently have the expression: swrlb:startsWith(?d, "SELECT")

Where ?d has the value for the data property hasDMLDescription. I'm assuming that the datatype for  hasDMLDescription  is xsd:string. If that's the case try changing the rule so that instead you have: swrlb:startsWith(?d,  "SELECT"^^xsd:string)  or use whatever the datatype for hasDMLDescription is. I've had similar issues in the past where SWRL is very particular about datatypes and problems arise when you use literals thinking it will default to one datatype but it defaults to something else.  Also, make sure all the values set for hasDMLDescription are explicitly typed as xsd:string (or whatever the datatype is supposed to be). You can do this when you set the value for a data property, there is a pull down menu at the bottom where you can declare the datatype for the value. 

Michael

On Sat, Jan 26, 2019 at 12:05 PM anacrl <[hidden email]> wrote:
Hi, Matthew/Csongor.

Martin said to post here. I think that something is wrong.

I attached some print screens to explain my problem.

I think the problem is when I close and re-open my ontology. Protege is
losing my changes about types of the individuals and assumes that my data
properties are plain literal and rewrites my SWRL rules.

I ordered my screens before close Protege and after. Please, could you see
these screens and return to me?

I re-created my old ontology in the new version of the Protege. Before close
the Protege, the two SWRL rules execute ok with one inferred individual.
But, when i close protege and re-open it, the same rules are not ok.

Could you help me, please?
Thanks.
0_BeforeClose_DML_TPCH_1_Individual.jpg
<http://protege-project.136.n4.nabble.com/file/t375138/0_BeforeClose_DML_TPCH_1_Individual.jpg
1_BeforeClose_RuleQueryStatement.jpg
<http://protege-project.136.n4.nabble.com/file/t375138/1_BeforeClose_RuleQueryStatement.jpg
2_BeforeClose_RuleSelectClause.jpg
<http://protege-project.136.n4.nabble.com/file/t375138/2_BeforeClose_RuleSelectClause.jpg
3_BeforeClose_RulesRunningOk.jpg
<http://protege-project.136.n4.nabble.com/file/t375138/3_BeforeClose_RulesRunningOk.jpg
4_BeforeClose_InferredIndividual.jpg
<http://protege-project.136.n4.nabble.com/file/t375138/4_BeforeClose_InferredIndividual.jpg
5_AfterReopen_DML_TPCH_1_Individual.jpg
<http://protege-project.136.n4.nabble.com/file/t375138/5_AfterReopen_DML_TPCH_1_Individual.jpg
6_AfterReopen_RuleQueryStatement.jpg
<http://protege-project.136.n4.nabble.com/file/t375138/6_AfterReopen_RuleQueryStatement.jpg
7_AfterReopen_RuleSelectClause.jpg
<http://protege-project.136.n4.nabble.com/file/t375138/7_AfterReopen_RuleSelectClause.jpg
8_AfterReopen_RulesRunningNOTOk.jpg
<http://protege-project.136.n4.nabble.com/file/t375138/8_AfterReopen_RulesRunningNOTOk.jpg




--
Sent from: http://protege-project.136.n4.nabble.com/Protege-User-f4659818.html
_______________________________________________
protege-user mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-user

_______________________________________________
protege-user mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-user
Reply | Threaded
Open this post in threaded view
|

Re: Protege is losing xsd:string type when I re-open it

Michael DeBellis-2
Ana, First, it's a good idea to reply to the whole list rather than just the individual that comments. There are times when people will take discussions offline but the default is to keep it on the list because (for example) while I've used SWRL a fair amount people like Matthew and Martin know exponentially more than I do so if I say something wrong I want to give people like that a chance to see what I say and chime in. I'm going to forward your reply to me to the whole list after I finish this email just so everyone can see it. 

But after looking at your ontology I think I see what may be the problem. You did change your rule so that you typed the string as a Literal but you have the data property hasDMLDescription typed as an xsd:string. What's more you want it to be typed as an xsd:string because you are using the SWRL builtins for strings. If you look at the documentation:  https://www.w3.org/Submission/SWRL/#8.4  it says:  "The following built-ins are defined for strings (only), i.e., not untyped literals"  

I think if you change your rules so that you replace rdf:PlainLiteral with xsd:string that may solve your problem. Some other issues I noticed: you are using "Domain" as the name of a class.  I think that's a part of the OWL language. You will notice that Protege highlights the Domain class in blue rather than black like the other classes. I think that is the reason it is doing that. I'm not sure if this will cause problems. My best guess is that in theory it should not cause problems because they are in different namespaces but in every ontology I've built whenever that happens I always change the name of the class so that it doesn't overlap with any of the OWL terms just to be safe. Something like DMLDomain. Also, because simply when having discussions it can be confusing to know whether someone is referring to the Domain class or to the Domain of a property in OWL. 

Also, in the domain definitions for your data properties you have multiple classes. So for example the domain for hasDMLDescription is: DMLCommand, Domain, CompositeStatement, and SingleStatement. Note that where it says Domain it says "Domain (intersection)". So this means for something to have a value for hasDMLDescription it must be in the intersection of DMLCommand, Domain, CompositeStatement, and SingleStatement. I.e., it must be a member of ALL of those classes. If that's what you want no problem but this is a common new user mistake and what they typically mean is the Union of all those classes, i.e., it could be a DMLCommand or a Domain or... You could get this with a class expression, for example delete all the current domain definitions and replace them with one definition: "DMLCommand or Domain or CompositeStatement or SingleStatement". What I usually do instead though is to find the most common superclass of all the classes and just use that, in this case it would be owl:Thing. 

Hope that helps. 

Michael



On Sat, Jan 26, 2019 at 5:02 PM Ana Almeida <[hidden email]> wrote:

Michael,

 
Thanks, but I tried to do this. I changed all rdf:PlainLiteral to xsd:string. I put hasDMLDescription with range as xsd:string. I put the data property assertion of the individual as string type.
 
When I do this, the swrl runs ok. But if I close the Protege and re-open it, the text of hasDMLDescription returns without the string type. If I try to change, it doesnt fix. I need to remove the text and put again with the string type.
 
My problem continues... :-(
I attached my owl file to you.
 
Thanks,
Ana Carolina

 

 

Em 26/01/2019 22:08, Michael DeBellis escreveu:

I just took a quick look at your screen snapshots (btw, if your ontology isn't proprietary or huge you can include the owl file as well, that usually makes it a lot easier to debug problems) so I could be wrong but I think the problem might be with the way you are using strings in your rule. So in one rule you currently have the expression: swrlb:startsWith(?d, "SELECT")
 
Where ?d has the value for the data property hasDMLDescription. I'm assuming that the datatype for  hasDMLDescription  is xsd:string. If that's the case try changing the rule so that instead you have: swrlb:startsWith(?d,  "SELECT"^^xsd:string)  or use whatever the datatype for hasDMLDescription is. I've had similar issues in the past where SWRL is very particular about datatypes and problems arise when you use literals thinking it will default to one datatype but it defaults to something else.  Also, make sure all the values set for hasDMLDescription are explicitly typed as xsd:string (or whatever the datatype is supposed to be). You can do this when you set the value for a data property, there is a pull down menu at the bottom where you can declare the datatype for the value. 
 
Michael

On Sat, Jan 26, 2019 at 12:05 PM anacrl <[hidden email]> wrote:
Hi, Matthew/Csongor.

Martin said to post here. I think that something is wrong.

I attached some print screens to explain my problem.

I think the problem is when I close and re-open my ontology. Protege is
losing my changes about types of the individuals and assumes that my data
properties are plain literal and rewrites my SWRL rules.

I ordered my screens before close Protege and after. Please, could you see
these screens and return to me?

I re-created my old ontology in the new version of the Protege. Before close
the Protege, the two SWRL rules execute ok with one inferred individual.
But, when i close protege and re-open it, the same rules are not ok.

Could you help me, please?
Thanks.
0_BeforeClose_DML_TPCH_1_Individual.jpg
<http://protege-project.136.n4.nabble.com/file/t375138/0_BeforeClose_DML_TPCH_1_Individual.jpg
1_BeforeClose_RuleQueryStatement.jpg
<http://protege-project.136.n4.nabble.com/file/t375138/1_BeforeClose_RuleQueryStatement.jpg
2_BeforeClose_RuleSelectClause.jpg
<http://protege-project.136.n4.nabble.com/file/t375138/2_BeforeClose_RuleSelectClause.jpg
3_BeforeClose_RulesRunningOk.jpg
<http://protege-project.136.n4.nabble.com/file/t375138/3_BeforeClose_RulesRunningOk.jpg
4_BeforeClose_InferredIndividual.jpg
<http://protege-project.136.n4.nabble.com/file/t375138/4_BeforeClose_InferredIndividual.jpg
5_AfterReopen_DML_TPCH_1_Individual.jpg
<http://protege-project.136.n4.nabble.com/file/t375138/5_AfterReopen_DML_TPCH_1_Individual.jpg
6_AfterReopen_RuleQueryStatement.jpg
<http://protege-project.136.n4.nabble.com/file/t375138/6_AfterReopen_RuleQueryStatement.jpg
7_AfterReopen_RuleSelectClause.jpg
<http://protege-project.136.n4.nabble.com/file/t375138/7_AfterReopen_RuleSelectClause.jpg
8_AfterReopen_RulesRunningNOTOk.jpg
<http://protege-project.136.n4.nabble.com/file/t375138/8_AfterReopen_RulesRunningNOTOk.jpg




--
Sent from: http://protege-project.136.n4.nabble.com/Protege-User-f4659818.html
_______________________________________________
protege-user mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-user

_______________________________________________
protege-user mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-user

_______________________________________________
protege-user mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-user
Reply | Threaded
Open this post in threaded view
|

Fwd: Protege is losing xsd:string type when I re-open it

Michael DeBellis-2
In reply to this post by Michael DeBellis-2


---------- Forwarded message ---------
From: Ana Almeida <[hidden email]>
Date: Sat, Jan 26, 2019 at 5:02 PM
Subject: Re: [protege-user] Protege is losing xsd:string type when I re-open it
To: <[hidden email]>


Michael,

 
Thanks, but I tried to do this. I changed all rdf:PlainLiteral to xsd:string. I put hasDMLDescription with range as xsd:string. I put the data property assertion of the individual as string type.
 
When I do this, the swrl runs ok. But if I close the Protege and re-open it, the text of hasDMLDescription returns without the string type. If I try to change, it doesnt fix. I need to remove the text and put again with the string type.
 
My problem continues... :-(
I attached my owl file to you.
 
Thanks,
Ana Carolina

 

 

Em 26/01/2019 22:08, Michael DeBellis escreveu:

I just took a quick look at your screen snapshots (btw, if your ontology isn't proprietary or huge you can include the owl file as well, that usually makes it a lot easier to debug problems) so I could be wrong but I think the problem might be with the way you are using strings in your rule. So in one rule you currently have the expression: swrlb:startsWith(?d, "SELECT")
 
Where ?d has the value for the data property hasDMLDescription. I'm assuming that the datatype for  hasDMLDescription  is xsd:string. If that's the case try changing the rule so that instead you have: swrlb:startsWith(?d,  "SELECT"^^xsd:string)  or use whatever the datatype for hasDMLDescription is. I've had similar issues in the past where SWRL is very particular about datatypes and problems arise when you use literals thinking it will default to one datatype but it defaults to something else.  Also, make sure all the values set for hasDMLDescription are explicitly typed as xsd:string (or whatever the datatype is supposed to be). You can do this when you set the value for a data property, there is a pull down menu at the bottom where you can declare the datatype for the value. 
 
Michael

On Sat, Jan 26, 2019 at 12:05 PM anacrl <[hidden email]> wrote:
Hi, Matthew/Csongor.

Martin said to post here. I think that something is wrong.

I attached some print screens to explain my problem.

I think the problem is when I close and re-open my ontology. Protege is
losing my changes about types of the individuals and assumes that my data
properties are plain literal and rewrites my SWRL rules.

I ordered my screens before close Protege and after. Please, could you see
these screens and return to me?

I re-created my old ontology in the new version of the Protege. Before close
the Protege, the two SWRL rules execute ok with one inferred individual.
But, when i close protege and re-open it, the same rules are not ok.

Could you help me, please?
Thanks.
0_BeforeClose_DML_TPCH_1_Individual.jpg
<http://protege-project.136.n4.nabble.com/file/t375138/0_BeforeClose_DML_TPCH_1_Individual.jpg
1_BeforeClose_RuleQueryStatement.jpg
<http://protege-project.136.n4.nabble.com/file/t375138/1_BeforeClose_RuleQueryStatement.jpg
2_BeforeClose_RuleSelectClause.jpg
<http://protege-project.136.n4.nabble.com/file/t375138/2_BeforeClose_RuleSelectClause.jpg
3_BeforeClose_RulesRunningOk.jpg
<http://protege-project.136.n4.nabble.com/file/t375138/3_BeforeClose_RulesRunningOk.jpg
4_BeforeClose_InferredIndividual.jpg
<http://protege-project.136.n4.nabble.com/file/t375138/4_BeforeClose_InferredIndividual.jpg
5_AfterReopen_DML_TPCH_1_Individual.jpg
<http://protege-project.136.n4.nabble.com/file/t375138/5_AfterReopen_DML_TPCH_1_Individual.jpg
6_AfterReopen_RuleQueryStatement.jpg
<http://protege-project.136.n4.nabble.com/file/t375138/6_AfterReopen_RuleQueryStatement.jpg
7_AfterReopen_RuleSelectClause.jpg
<http://protege-project.136.n4.nabble.com/file/t375138/7_AfterReopen_RuleSelectClause.jpg
8_AfterReopen_RulesRunningNOTOk.jpg
<http://protege-project.136.n4.nabble.com/file/t375138/8_AfterReopen_RulesRunningNOTOk.jpg




--
Sent from: http://protege-project.136.n4.nabble.com/Protege-User-f4659818.html
_______________________________________________
protege-user mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-user

_______________________________________________
protege-user mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-user

_______________________________________________
protege-user mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-user

protege_individuos_TPCH_v4.owl (59K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Protege is losing xsd:string type when I re-open it

anacrl
In reply to this post by Michael DeBellis-2
Michael,

I didnt change my rule typed the string as a Literal. I take off Literal but
when I re-open my ontology, Protege changes to Literal automatically. Could
you see my screens in the first e-mail? I dont put Literal in any moment.

I change Domain to TuningDomain and I rebuild the Domain of my classes and
properties. Thank you.

The problem continues.
If I create a data property (hasDMLDescription) for individual DML_TPCH_1
and typed as string, save the ontology and close Protege; when I re-open it,
the type is lost.

I attached the new version of the ontology. protege_individuos_TPCH_v4.owl
<http://protege-project.136.n4.nabble.com/file/t375138/protege_individuos_TPCH_v4.owl>  



--
Sent from: http://protege-project.136.n4.nabble.com/Protege-User-f4659818.html
_______________________________________________
protege-user mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-user
Reply | Threaded
Open this post in threaded view
|

Re: Protege is losing xsd:string type when I re-open it

Michael DeBellis-2
Ana, Sorry, my mistake. I just jumped to looking at the ontology. I'm getting the same behavior but I can understand why Protege would get rid of the string datatypes in the rule, that is going to be the expected datatype for string operations anyway. The thing I did notice though is that all your actual property assertions (the values on individual objects) are not typed. As I looked back at your message I think that is what you were asking about. Again, I apologize I should have read your first message more carefully. I went and changed all the property assertions in your ontology so they were explicitly typed as strings. Then I saved the ontology and reloaded it and the string datatypes were still there for me. I'm attaching my version of the ontology. 

Which version of Protege are you using? Are you using the beta version? If so I think you may have found a bug in it. I'm using 5.2.0. 

Michael






On Sun, Jan 27, 2019 at 5:10 AM anacrl <[hidden email]> wrote:
Michael,

I didnt change my rule typed the string as a Literal. I take off Literal but
when I re-open my ontology, Protege changes to Literal automatically. Could
you see my screens in the first e-mail? I dont put Literal in any moment.

I change Domain to TuningDomain and I rebuild the Domain of my classes and
properties. Thank you.

The problem continues.
If I create a data property (hasDMLDescription) for individual DML_TPCH_1
and typed as string, save the ontology and close Protege; when I re-open it,
the type is lost.

I attached the new version of the ontology. protege_individuos_TPCH_v4.owl
<http://protege-project.136.n4.nabble.com/file/t375138/protege_individuos_TPCH_v4.owl



--
Sent from: http://protege-project.136.n4.nabble.com/Protege-User-f4659818.html
_______________________________________________
protege-user mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-user

_______________________________________________
protege-user mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-user

protege_individMD.owl (139K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Protege is losing xsd:string type when I re-open it

anacrl
Michael,

Thank you very much.
In the Protege 5.2.0 version, it is ok.
In fact, I think there is a bug in the 5.5.0 beta 8 version of the Protege.

[]s,
Ana Carolina




--
Sent from: http://protege-project.136.n4.nabble.com/Protege-User-f4659818.html
_______________________________________________
protege-user mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-user
Reply | Threaded
Open this post in threaded view
|

Re: Protege is losing xsd:string type when I re-open it

santiagogil
Hi,

I had the same issue with Protégé 5.5. So, after reading the post and a
discussion started in github (see
https://github.com/protegeproject/swrlapi-example/issues/1
<https://github.com/protegeproject/swrlapi-example/issues/1>  ), I could
solve the type losing when reopening.
After it, the problem still remained with the SWRL rules and SQWRL queries.
So, I had to make several attempts to fix the issue. Finally, I realized
that I had to change all the data properties that involved strings as well;
I added ^^xsd:string for each one by one. After doing all this process, the
rules and queries worked again.

Thanks for your help.
I hope this solution can help more people.



--
Sent from: http://protege-project.136.n4.nabble.com/Protege-User-f4659818.html
_______________________________________________
protege-user mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-user
Reply | Threaded
Open this post in threaded view
|

Re: Protege is losing xsd:string type when I re-open it

Csongor Nyulas
Administrator
So is the bug in SWRL or Protege (probably OWLAPI)? Did someone create
an issue on github for this already?

Csongor



On 1/30/19 7:52 PM, santiagogil wrote:

> Hi,
>
> I had the same issue with Protégé 5.5. So, after reading the post and a
> discussion started in github (see
> https://github.com/protegeproject/swrlapi-example/issues/1
> <https://github.com/protegeproject/swrlapi-example/issues/1>  ), I could
> solve the type losing when reopening.
> After it, the problem still remained with the SWRL rules and SQWRL queries.
> So, I had to make several attempts to fix the issue. Finally, I realized
> that I had to change all the data properties that involved strings as well;
> I added ^^xsd:string for each one by one. After doing all this process, the
> rules and queries worked again.
>
> Thanks for your help.
> I hope this solution can help more people.
>
>
>
> --
> Sent from: http://protege-project.136.n4.nabble.com/Protege-User-f4659818.html
> _______________________________________________
> protege-user mailing list
> [hidden email]
> https://mailman.stanford.edu/mailman/listinfo/protege-user


_______________________________________________
protege-user mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-user
Reply | Threaded
Open this post in threaded view
|

Re: Protege is losing xsd:string type when I re-open it

Martin O'Connor-2
I’m also confused as to where the issue is. Can someone post the exact steps needed to reproduce this issue.

Martin

> On Jan 31, 2019, at 01:49, Csongor Nyulas <[hidden email]> wrote:
>
> So is the bug in SWRL or Protege (probably OWLAPI)? Did someone create an issue on github for this already?
>
> Csongor
>
>
>
>> On 1/30/19 7:52 PM, santiagogil wrote:
>> Hi,
>>
>> I had the same issue with Protégé 5.5. So, after reading the post and a
>> discussion started in github (see
>> https://github.com/protegeproject/swrlapi-example/issues/1
>> <https://github.com/protegeproject/swrlapi-example/issues/1>  ), I could
>> solve the type losing when reopening.
>> After it, the problem still remained with the SWRL rules and SQWRL queries.
>> So, I had to make several attempts to fix the issue. Finally, I realized
>> that I had to change all the data properties that involved strings as well;
>> I added ^^xsd:string for each one by one. After doing all this process, the
>> rules and queries worked again.
>>
>> Thanks for your help.
>> I hope this solution can help more people.
>>
>>
>>
>> --
>> Sent from: http://protege-project.136.n4.nabble.com/Protege-User-f4659818.html
>> _______________________________________________
>> protege-user mailing list
>> [hidden email]
>> https://mailman.stanford.edu/mailman/listinfo/protege-user
>
>
> _______________________________________________
> protege-user mailing list
> [hidden email]
> https://mailman.stanford.edu/mailman/listinfo/protege-user
_______________________________________________
protege-user mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-user
Reply | Threaded
Open this post in threaded view
|

Re: Protege is losing xsd:string type when I re-open it

santiagogil
Hi,
the steps to fix the error:
1. I migrated to Protégé 5.5 few days ago.
2. Realizing of the SWRL rules and SQWRL queries which contain a built-in of
type string were throwing the error 'cannot convert value of type
rdf:PlainLiteral to xsd:string.'; previously it didn't happen. Everytime I
opened the ontology with Protégé 5.5 all the rules and queries which I
defined as "anystring"^^xsd:string appears as "anystring"^^rdf:PlainLiteral.
I tried to hardcoded the owl file adding the '<Literal
datatypeIRI="http://www.w3.org/2001/XMLSchema#string">anystring</Literal>',
but anyway, the Protégé 5.5 afterwards changed it for single
<Literal>anystring</Literal> again.

3. Martin O'Connor refered me to this thread. I saw that, as stated by
anacrl and tested by Michael DeBellis-2, the issue was presented on version
5.5. So, I decided to change back to version 5.2.

4. When using version 5.2, the xsd:string type was not losing anymore, but
due to I ran my ontology file with version 5.5, all the <Literal
datatypeIRI="http://www.w3.org/2001/XMLSchema#string">anystring</Literal> in
the code were replaced by <Literal>anystring</Literal>, I needed to change
them, one by one, even the data properties assertions.

5. I replaced all the literals in conflict, and then, the ontology, the SWRL
rules, and the SQWRL queries worked again.

6. Conclusion: the bug is in Protégé 5.5 which changes all the string
literals to plain literals when reopening.

I hope it is clear for you.



--
Sent from: http://protege-project.136.n4.nabble.com/Protege-User-f4659818.html
_______________________________________________
protege-user mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-user