I noticed that Protege creates "copies" properties I created as DatatypeProperty and marks them as ObjectProperty. Which in turn makes them to be both datatype and object property at the same time.
I tried to fix it manually in the OWL file.
Assigned "xsd:string" as Range.
Nothing helps.
Protege reads in the OWL file and shows the property I just fixed on both lists. If I modify anything and it will save the ontology back to the OWL file, two entries will be made.
What is more "funny" my Range specification (to xsd:string) is set to the ObjectProperty entry, not the original Datatype.
Any ideas?
Here is an example.
"Original"
### http://www.umwd.dolnyslask.pl/ontologies/2014/03/midas#title
:title rdf:type owl:DatatypeProperty ,
owl:FunctionalProperty ;
rdfs:label "tytuł"@pl ;
skos:definition """xxxxxx""" ;
rdfs:comment """comment"""@pl ;
rdfs:domain :Annotation ,
:Entity .
Copy added by Protege (notice that rdfs:range has been moved to the copy)
### http://www.umwd.dolnyslask.pl/ontologies/2014/03/midas#title
:title rdf:type owl:ObjectProperty ;
rdfs:label "tytuł"@pl ;
skos:definition """xxxxxx""" ;
rdfs:comment """comment"""@pl ;
rdfs:range xsd:string .
UPDATE: Here is the minimal ontology which after opening in protege results in problem shown above:
@prefix : <http://my.ontolo.gy/test#> .
@prefix dc: <http://purl.org/dc/elements/1.1/> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix xml: <http://www.w3.org/XML/1998/namespace> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix bibo: <http://purl.org/ontology/bibo/> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix skos: <http://www.w3.org/2004/02/skos/core#> .
@prefix midas: <http://my.ontolo.gy/test#> .
@prefix vcard: <http://www.w3.org/2006/vcard/ns#> .
@prefix dctype: <http://purl.org/dc/dcmitype/> .
@prefix schema: <http://schema.rdfs.org/all#> .
@prefix dbpedia: <http://dbpedia.org/ontology/> .
@prefix dcterms: <http://purl.org/dc/terms/> .
@prefix location: <http://www.w3.org/ns/locn#> .
@base <http://my.ontolo.gy/test> .
<http://my.ontolo.gy/test> rdf:type owl:Ontology ;
rdfs:label "Ontologia"@pl ;
rdfs:comment "Komentarz"@pl ;
owl:imports bibo: ,
<http://schema.rdfs.org/all> ,
<http://www.w3.org/2006/vcard/ns> ,
<http://www.w3.org/ns/locn> .
### http://my.ontolo.gy/test#title
:title rdf:type owl:DatatypeProperty ,
owl:FunctionalProperty ;
rdfs:label "tytuł"@pl ;
skos:definition """definition""" ;
rdfs:comment """komentarz"""@pl ;
rdfs:range xsd:string ;
rdfs:domain :Annotation ,
:Entity .
And after saving it back to the file:
@prefix : <http://my.ontolo.gy/test#> .
@prefix dc: <http://purl.org/dc/elements/1.1/> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix xml: <http://www.w3.org/XML/1998/namespace> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix bibo: <http://purl.org/ontology/bibo/> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix skos: <http://www.w3.org/2004/02/skos/core#> .
@prefix midas: <http://my.ontolo.gy/test#> .
@prefix vcard: <http://www.w3.org/2006/vcard/ns#> .
@prefix dctype: <http://purl.org/dc/dcmitype/> .
@prefix schema: <http://schema.rdfs.org/all#> .
@prefix dbpedia: <http://dbpedia.org/ontology/> .
@prefix dcterms: <http://purl.org/dc/terms/> .
@prefix location: <http://www.w3.org/ns/locn#> .
@base <http://my.ontolo.gy/test> .
<http://my.ontolo.gy/test> rdf:type owl:Ontology ;
rdfs:label "Ontologia"@pl ;
rdfs:comment "Komentarz"@pl ;
owl:imports bibo: ,
<http://schema.rdfs.org/all> ,
<http://www.w3.org/2006/vcard/ns> ,
<http://www.w3.org/ns/locn> .
#################################################################
#
# Object Properties
#
#################################################################
### http://my.ontolo.gy/test#title
:title rdf:type owl:ObjectProperty ;
rdfs:label "tytuł "@pl ;
skos:definition "definition" ;
rdfs:comment "komentarz"@pl ;
rdfs:range xsd:string .
#################################################################
#
# Data properties
#
#################################################################
### http://my.ontolo.gy/test#title
:title rdf:type owl:DatatypeProperty ,
owl:FunctionalProperty ;
rdfs:label "tytuł "@pl ;
skos:definition "definition" ;
rdfs:comment "komentarz"@pl ;
rdfs:domain :Annotation ,
:Entity .
#################################################################
#
# Classes
#
#################################################################
### http://my.ontolo.gy/test#Annotation
:Annotation rdf:type owl:Class .
### http://my.ontolo.gy/test#Entity
:Entity rdf:type owl:Class .
### Generated by the OWL API (version 3.4.2) http://owlapi.sourceforge.net