strange classes named "genidxxx" appear in 4.0, 115

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

strange classes named "genidxxx" appear in 4.0, 115

charlhood1
If I work with Protege for a mac and open this file with Windows afterwards, there additionally appear strange entities in the file.
They are named "genid153". for instance. Each with a special number at the end. They are listed under the category "classes".
Does anyone know why this happens? May this have anything to do with the change from Mac to Windows?

I've also checked if I work with the same volume (it is 4.0, 115).
Reply | Threaded
Open this post in threaded view
|

Re: strange classes named "genidxxx" appear in 4.0, 115

Timothy Redmond

I don't think that this has anything to do with the change from mac to
windows.  I would guess that something happened to the ontology.  I
would further guess that it might have something to do with an OWL 2
construct.    There are two things that I can think of trying.  You
could try Protege 4.1 and see if the problem is the same.  Protege  4.0
has several problems with OWL 2.0 and Protege 4.1 is recommended.

-Timothy


On 07/23/2010 03:18 AM, charlhood1 wrote:
> If I work with Protege for a mac and open this file with Windows afterwards,
> there additionally appear strange entities in the file.
> They are named "genid153". for instance. Each with a special number at the
> end. They are listed under the category "classes".
> Does anyone know why this happens? May this have anything to do with the
> change from Mac to Windows?
>
> I've also checked if I work with the same volume (it is 4.0, 115).
>    

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

Re: strange classes named "genidxxx" appear in 4.0, 115

Timothy Redmond
In reply to this post by charlhood1

Oops...   I sent the message without mentioning my second suggestion.  
You could send me the ontology (either on list or off) and I could  tell
you more  about  what is going on.

-Timothy


On 07/23/2010 03:18 AM, charlhood1 wrote:
> If I work with Protege for a mac and open this file with Windows afterwards,
> there additionally appear strange entities in the file.
> They are named "genid153". for instance. Each with a special number at the
> end. They are listed under the category "classes".
> Does anyone know why this happens? May this have anything to do with the
> change from Mac to Windows?
>
> I've also checked if I work with the same volume (it is 4.0, 115).
>    

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

Re: strange classes named "genidxxx" appear in 4.0, 115

Julian Vincent
The same thing happens with the 'photography' ontology loaded into P  
4.1 on a Mac.  And I thought it was a feature . . . .

Julian

On 23 Jul 2010, at 17:15, Timothy Redmond wrote:

>
> Oops...   I sent the message without mentioning my second  
> suggestion.  You could send me the ontology (either on list or off)  
> and I could  tell you more  about  what is going on.
>
> -Timothy
>
>
> On 07/23/2010 03:18 AM, charlhood1 wrote:
>> If I work with Protege for a mac and open this file with Windows  
>> afterwards,
>> there additionally appear strange entities in the file.
>> They are named "genid153". for instance. Each with a special number  
>> at the
>> end. They are listed under the category "classes".
>> Does anyone know why this happens? May this have anything to do  
>> with the
>> change from Mac to Windows?
>>
>> I've also checked if I work with the same volume (it is 4.0, 115).
>>
>
> _______________________________________________
> p4-feedback mailing list
> [hidden email]
> https://mailman.stanford.edu/mailman/listinfo/p4-feedback
>

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

Re: strange classes named "genidxxx" appear in 4.0, 115

Timothy Redmond

On 07/23/2010 10:04 AM, Julian Vincent wrote:
The same thing happens with the 'photography' ontology loaded into P 4.1 on a Mac.  And I thought it was a feature . . . .


This one I was able to figure out.  It would be nice to have a tool that would do this but I had to figure it out the hard way (binary search).  I am assuming that you are talking  about the ontology [1]. 

The short and simple story is that this ontology is not a (completely) valid OWL 2  ontology.  There are a couple of glitches in the syntax which probably are due to an OWL 1.1 vs. OWL 2 change.  I tried the Manchester OWL 2 validator [2] and it found some issues but they were not the issue that gives the OWL api trouble.

If you open the ontology [1] in Protege 4.1 and go to the Daylight class (Thing -> LightType -> Daylight) you will see the statement:

hasColourTemperature some genid101
  

Clearly something is wrong.  There is also a (differently colored) class called Datatype and one of the members of this class is an anonymous individual called ...#genid101.   The class Datatype is also an indication that something is wrong because its name puns a reserved term in the OWL vocabulary.  The different coloring is not actually a warning of a problem (can't take credit) - it is a Protege 4.1 bug that has a GForge ticket somewhere.

If we go to the RDF (not generally recommended) to see what is going on we see the following declaration:

    <owl:Class rdf:about="#Daylight">
        <rdfs:subClassOf rdf:resource="#LightType"/>
        <rdfs:subClassOf>
            <owl:Restriction>
                <owl:onProperty rdf:resource="#hasColourTemperature"/>
                <owl:someValuesFrom>
                    <rdf:Description>
                        <rdf:type rdf:resource="&owl;DataRange"/>
                        <xsd:minExclusive rdf:datatype="&xsd;integer">5000</xsd:minExclusive>
                        <xsd:maxExclusive rdf:datatype="&xsd;integer">6000</xsd:maxExclusive>
                        <owl:onDataRange rdf:resource="&xsd;int"/>
                    </rdf:Description>
                </owl:someValuesFrom>
            </owl:Restriction>
        </rdfs:subClassOf>
        <rdfs:comment
            >Same temperature as flash (roughly)</rdfs:comment>
    </owl:Class>

  

To a human eye it is pretty clear what was intended.  If I look in [3] (search for DatatypeRestriction)  we see that  it should use a different syntax.  So then I create a small ontology that simply  states what was clearly intended above.  This is the attached ontology.  If you open this ontology in Protege 4.1 you will see that Daylight is a subclass of

hasColorTemperature some integer[> "5000", < "6000"]
  

In this ontology we have a different RDF syntax for the same (intended) statement:

    <owl:Class rdf:about="&photography;Daylight">
        <rdfs:label rdf:datatype="&rdf;PlainLiteral">Daylight</rdfs:label>
        <rdfs:subClassOf rdf:resource="&photography;LightType"/>
        <rdfs:subClassOf>
            <owl:Restriction>
                <owl:onProperty rdf:resource="&photography;hasColorTemperature"/>
                <owl:someValuesFrom>
                    <rdfs:Datatype>
                        <owl:onDatatype rdf:resource="&xsd;integer"/>
                        <owl:withRestrictions rdf:parseType="Collection">
                            <rdf:Description>
                                <xsd:maxExclusive rdf:datatype="&xsd;string">6000</xsd:maxExclusive>
                            </rdf:Description>
                            <rdf:Description>
                                <xsd:minExclusive rdf:datatype="&xsd;string">5000</xsd:minExclusive>
                            </rdf:Description>
                        </owl:withRestrictions>
                    </rdfs:Datatype>
                </owl:someValuesFrom>
            </owl:Restriction>
        </rdfs:subClassOf>
    </owl:Class>
  

Note that  if you load [1] in Protege 4.0 it looks fine which confirms the idea that this is a OWL 1.1 vs OWL 2.0 issue.

-Timothy




[1] http://www.co-ode.org/ontologies/photography/photography.owl
[2] http://owl.cs.manchester.ac.uk/validator
[3] http://www.w3.org/TR/2009/REC-owl2-mapping-to-rdf-20091027/


Julian

On 23 Jul 2010, at 17:15, Timothy Redmond wrote:


Oops...   I sent the message without mentioning my second suggestion.  You could send me the ontology (either on list or off) and I could  tell you more  about  what is going on.

-Timothy


On 07/23/2010 03:18 AM, charlhood1 wrote:
If I work with Protege for a mac and open this file with Windows afterwards,
there additionally appear strange entities in the file.
They are named "genid153". for instance. Each with a special number at the
end. They are listed under the category "classes".
Does anyone know why this happens? May this have anything to do with the
change from Mac to Windows?

I've also checked if I work with the same volume (it is 4.0, 115).


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


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


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

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

Re: strange classes named "genidxxx" appear in 4.0, 115

astrekalova
In reply to this post by Timothy Redmond
I have tried opening the file with Protege 4.1 but it seems to make the problem even worse, because even more of these genid classes appear. I attached the file, may be you can figure out what is wrong with it.

Is there any "rule of thumb" that can help us to avoid such mistakes in the future? Is it sufficient to always use the same version, when several people work on one file?

furniture2-extended_updated.owl
Reply | Threaded
Open this post in threaded view
|

Re: strange classes named "genidxxx" appear in 4.0, 115

regmito
I cannot see your attachment in the message. However I think I know the answer, as I refactored my ontologies after having the same problem.

The problem is in a RDF/XML serialization format incompatibility in transition from Protégé 4.0 (OWL API 2) to Protégé 4.1 (OWL API 3). Some OWL 2 constructs, especially data ranges, are serialized in a non-standard way in OWL API 2. OWL API 3 corrects the serialization, but cannot read properly those constructs from old files created by OWL API 2.

The recommended refactoring process is as follows.

1. Open the problematic file (or its copy) in Protégé 4.1 for browsing only, do not edit it in this tool.

2. Open the file in Protégé 4.0 for editing.

3. In Protégé 4.1, look at occurrences of the strange/unexpected classes and find axioms, where they occur.

4. In Protégé 4.0, copy those axioms as text (Manchester syntax) to values of annotation properties of your choice (I use the comment property for this), delete these axioms, save the file, and close Protege.

5. Refresh the file in Protégé 4.1 for editing, restore the deleted axioms by copying their text from the annotation property values, delete the corresponding annotation property assertions, and save the file.

In collaborative development, it is recommended to agree on versions of Protégé 4 in use.

Cheers,
Igor

-----Original Message-----
From: [hidden email] [mailto:[hidden email]] On Behalf Of a.strekalova
Sent: 06 August 2010 07:48
To: [hidden email]
Subject: Re: [p4-feedback] strange classes named "genidxxx" appear in 4.0, 115


I have tried opening the file with Protege 4.1 but it seems to make the
problem even worse, because even more of these genid classes appear. I
attached the file, may be you can figure out what is wrong with it.

Is there any "rule of thumb" that can help us to avoid such mistakes in the
future? Is it sufficient to always use the same version, when several people
work on one file?

http://protege-ontology-editor-knowledge-acquisition-system.136.n4.nabble.com/file/n2315960/furniture2-extended_updated.owl
furniture2-extended_updated.owl
--
View this message in context: http://protege-ontology-editor-knowledge-acquisition-system.136.n4.nabble.com/strange-classes-named-genidxxx-appear-in-4-0-115-tp2299948p2315960.html
Sent from the Protege 4 Feedback mailing list archive at Nabble.com.
_______________________________________________
p4-feedback mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/p4-feedback
_______________________________________________
p4-feedback mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/p4-feedback
Reply | Threaded
Open this post in threaded view
|

Re: strange classes named "genidxxx" appear in 4.0, 115

Timothy Redmond
In reply to this post by astrekalova

Your ontology has already lost its original data.   But there are only three axioms that have been damaged so it should not be too hard to fix.  The axioms are

  1. the definition of Antique
  2. the definition of AntiqueFurniture
  3. the definition of Vintage
I found these axioms in Protege 4.1 in the Classes tab (the Entities tab works equally well).  In these tabs select the Class Usage view and then select the three genid classes in question.  You will see where they are used.  Often it turns out that when you look at these definitions in a different version of Protege, the desired data will be there and you can transcribe it.  But in this case the definitions are gone.

Is there any "rule of thumb" that can help us to avoid such mistakes in the
future? Is it sufficient to always use the same version, when several people
work on one file?

Don't use Protege 4.0, use Protege 4.1 instead.

-Timothy






On 08/05/2010 11:47 PM, a.strekalova wrote:
I have tried opening the file with Protege 4.1 but it seems to make the
problem even worse, because even more of these genid classes appear. I
attached the file, may be you can figure out what is wrong with it.

Is there any "rule of thumb" that can help us to avoid such mistakes in the
future? Is it sufficient to always use the same version, when several people
work on one file?

http://protege-ontology-editor-knowledge-acquisition-system.136.n4.nabble.com/file/n2315960/furniture2-extended_updated.owl
furniture2-extended_updated.owl 
  


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