Thank's for your help. I was of the opinion that I've tried to override the class with codes_core:Category in the Wizard. But I probably have not used the correct qname. With the usage of correct qnames in the Excel spreadsheet everything works fine.
Sven 2011/7/8 Bob Ducharme <[email protected]> > (First, I apologize for my comment about the target spreadsheet--I was > confusing your situation with a similar one I was trying.) **** > > ** ** > > As you saw, when importing a tsv, the first row is interpreted as the class > name (column 1) and instance identifiers. If these are not present in the > existing ontology, no data is imported. The rest of the rows are > interpreted as named instances of the class in column-1/row-1.**** > > ** ** > > The key is the "existing ontology" part. Data imported from spreadsheet > files is imported into the namespace of the importing document's base URI > unless you specify otherwise. It worked for core.rdf because it declares a > Category class in the namespace of its base URI, but for fact.rdf the base > URI didn't have a Category class, which is why the import wizard complained. > If you change Category to codes_core:Category in your tab-delimited file, > then when you import it into fact.rdf, TBC will know which Category class > declaration it refers to. That worked for me with your files.**** > > ** ** > > Bob**** > > ** ** > > *From:* [email protected] [mailto: > [email protected]] *On Behalf Of *Sven Miersch > *Sent:* Friday, July 08, 2011 5:06 AM > *To:* [email protected] > *Subject:* Re: [topbraid-users] Topbraid Composer: class error when > importing a spreadsheet into an existing ontology**** > > ** ** > > Hi Bob, > > Thank's for the fast answer. > Yes, you've understood correctly. > But what do you mean with "and it's declared as a class in the target > spreadsheet"? The class is defined in my ontology, but not in my > spreadsheet. there it is declared as Category and as a heading in the > first row. The example speadsheet: > > Category categoryID categoryName > GastroType GAT Gastro Type > GastroCuisine GAC Gastro Cuisine > GastroProfile GAP Gastro Profile > > I used the manual from > http://www.topquadrant.com/composer/videos/tutorials/spreadsheets/import.htmland > there the spreadsheet format from section "Addin to Existing Ontology". > > The answers to your questions: > I use the maestro edition of TBC in Version: 3.5.1.v20110629-1105R (latest > download yesterday) and on Windows XP SP 3 (with all recommended updates and > a clean/fresh installation). > > And for reproduce my promblems I attached the two files. > core.rdf: > > # Saved by TopBraid on Thu Jul 07 16:13:55 CEST 2011 > # baseURI: http://hts.com/obtm/codes/codes_core > > @prefix : > <http://hts.com/obtm/codes/codes_core#<http://hts.com/obtm/codes/codes_core>> > . > @prefix owl: > <http://www.w3.org/2002/07/owl#<http://www.w3.org/2002/07/owl>> > . > @prefix rdf: > <http://www.w3.org/1999/02/22-rdf-syntax-ns#<http://www.w3.org/1999/02/22-rdf-syntax-ns>> > . > @prefix rdfs: > <http://www.w3.org/2000/01/rdf-schema#<http://www.w3.org/2000/01/rdf-schema>> > . > @prefix xsd: > <http://www.w3.org/2001/XMLSchema#<http://www.w3.org/2001/XMLSchema>> > . > > <http://hts.com/obtm/codes/codes_core> > rdf:type owl:Ontology ; > owl:versionInfo "Created with TopBraid Composer"^^xsd:string . > > :Category > rdf:type rdfs:Class ; > rdfs:subClassOf :Root . > > :CodeObject > rdf:type rdfs:Class ; > rdfs:subClassOf :Root . > > :Root > rdf:type rdfs:Class . > > :categoryID > rdf:type owl:DatatypeProperty ; > rdfs:comment "A unique identifier for the code group / category, e.g. > RMA for Room Amenity Type in the OTA spezification."^^xsd:string ; > rdfs:domain :Category ; > rdfs:range xsd:string . > > :categoryName > rdf:type owl:DatatypeProperty ; > rdfs:comment "A human-readable name for the code category, e.g. Room > Amenity Type for the RMA category in the OTA spezification."^^xsd:string ; > rdfs:domain :Category ; > rdfs:range xsd:string . > > :codeCategory > rdf:type owl:ObjectProperty ; > rdfs:domain :CodeObject ; > rdfs:range :Category . > > :codeID > rdf:type owl:DatatypeProperty ; > rdfs:comment "A unique identifier, e.g. RMA50 for a hairdryer in the > OTA spezification."^^xsd:string ; > rdfs:domain :CodeObject ; > rdfs:range xsd:string . > > :codeName > rdf:type owl:DatatypeProperty ; > rdfs:comment "A human-readable name for the code, e.g. hairdryer for > OTA code RMA 50."^^xsd:string ; > rdfs:domain :CodeObject ; > rdfs:range xsd:string . > > :comment > rdf:type owl:DatatypeProperty ; > rdfs:range xsd:string . > > > And the fact.rdf: > > # Saved by TopBraid on Fri Jul 08 10:52:01 CEST 2011 > # baseURI: http://hts.com/obtm/codes/hto_codes > # imports: http://hts.com/obtm/codes/codes_core > > @prefix : > <http://hts.com/obtm/codes/hto_codes#<http://hts.com/obtm/codes/hto_codes>> > . > @prefix codes_core: > <http://hts.com/obtm/codes/codes_core#<http://hts.com/obtm/codes/codes_core>> > . > @prefix owl: > <http://www.w3.org/2002/07/owl#<http://www.w3.org/2002/07/owl>> > . > @prefix rdf: > <http://www.w3.org/1999/02/22-rdf-syntax-ns#<http://www.w3.org/1999/02/22-rdf-syntax-ns>> > . > @prefix rdfs: > <http://www.w3.org/2000/01/rdf-schema#<http://www.w3.org/2000/01/rdf-schema>> > . > @prefix xsd: > <http://www.w3.org/2001/XMLSchema#<http://www.w3.org/2001/XMLSchema>> > . > > <http://hts.com/obtm/codes/hto_codes> > rdf:type owl:Ontology ; > owl:imports <http://hts.com/obtm/codes/codes_core> ; > owl:versionInfo "Created with TopBraid Composer"^^xsd:string . > > Please note that the import of the spreadsheet into fact.rdf doesn't work. > The import into core.rdf works as well. > > Regards, > Sven > > **** > > 2011/7/7 Bob Ducharme <[email protected]>**** > > Sven, > > I just tried a similar import, and it worked as I expected. > > Just to make sure I understand correctly, Category is the first column of > your tab-delimited file, and it's declared as a class in the target > spreadsheet, and all the other columns of the tab-delimited file are > properties of the Category instances, right? > > Also, what release of TBC are you running, and on what platform? > > Thanks, > > Bob DuCharme > TopQuadrant > > > -----Original Message----- > From: [email protected] > [mailto:[email protected]] On Behalf Of Sven Miersch > Sent: Thursday, July 07, 2011 12:45 PM > To: TopBraid Suite Users > Subject: [topbraid-users] Topbraid Composer: class error when importing a* > *** > > spreadsheet into an existing ontology > > Hi, > > I have the following problem with importing an excel spreadsheet into > an existing ontology: > > Environment: > I use two files: one for the schema definition (core.rdf) and one for > the instances (fact.rdf). The fact.rdf has imported the core.rdf, so > that the schema in fact.rdf is also known. > The core.rdf should be used for different facts with different > namespaces (each of them in its own rdf-file). For this reason, the > scheme must/should be outsourced. > > My procedure: > Now I want to import my facts from an Excel spreadsheet. For this I > open the fact.rdf and use the import function of the TBC. There I > choose the option "Import Tab-Delimited Spreadsheet File" from the > category "TopBraid Composer". > In the following Assistant-Window I select my file and choose the > option "Import to the current ontology (uses the current namespace". I > skip the following window with the Next button. > > The Problem: > The class Category, that I have defined in the first column (first > row) of my spradsheet wasn't found. This class exist in my schema > definition core.rdf. So I think, that the import function dosn't work > with imported classes (an other namespace). But the imported > properties (also defined in core.rdf) are known. > > Verification that my spreadsheet works: > I have imported the same spradsheet into my core.rdf and it works. > > Can anyone help me? How can I use the 2 files and the import from an > spreadsheet with classes from an other namespace? I don't understand > that the TBC identifies imported properties, but not work with > imported classes. > > Regards, > Sven Miersch**** > > -- > You received this message because you are subscribed to the Google > Group "TopBraid Suite Users", the topics of which include TopBraid > Composer, > TopBraid Live, TopBraid Ensemble, SPARQLMotion and SPIN. > To post to this group, send email to > [email protected] > To unsubscribe from this group, send email to > [email protected] > For more options, visit this group at > http://groups.google.com/group/topbraid-users?hl=en > > -- > You received this message because you are subscribed to the Google > Group "TopBraid Suite Users", the topics of which include TopBraid > Composer, > TopBraid Live, TopBraid Ensemble, SPARQLMotion and SPIN. > To post to this group, send email to > [email protected] > To unsubscribe from this group, send email to > [email protected] > For more options, visit this group at > http://groups.google.com/group/topbraid-users?hl=en**** > > ** ** > > -- > You received this message because you are subscribed to the Google > Group "TopBraid Suite Users", the topics of which include TopBraid > Composer, > TopBraid Live, TopBraid Ensemble, SPARQLMotion and SPIN. > To post to this group, send email to > [email protected] > To unsubscribe from this group, send email to > [email protected] > For more options, visit this group at > http://groups.google.com/group/topbraid-users?hl=en**** > > -- > You received this message because you are subscribed to the Google > Group "TopBraid Suite Users", the topics of which include TopBraid > Composer, > TopBraid Live, TopBraid Ensemble, SPARQLMotion and SPIN. > To post to this group, send email to > [email protected] > To unsubscribe from this group, send email to > [email protected] > For more options, visit this group at > http://groups.google.com/group/topbraid-users?hl=en > -- You received this message because you are subscribed to the Google Group "TopBraid Suite Users", the topics of which include TopBraid Composer, TopBraid Live, TopBraid Ensemble, SPARQLMotion and SPIN. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/topbraid-users?hl=en
