Mercurial > hg > svapp
comparison framework/MainWindowBase.cpp @ 148:7dca51571320 sv-v1.4rc1
* Ensure SimpleSPARQLQuery stores an error string properly when query
fails -- so (apart from anything else) RDFImporter::identifyDocumentType
returns a sensible result for non-RDF
author | Chris Cannam |
---|---|
date | Mon, 08 Dec 2008 15:08:39 +0000 |
parents | c02706551309 |
children | 6e8bce502be3 |
comparison
equal
deleted
inserted
replaced
147:c02706551309 | 148:7dca51571320 |
---|---|
866 bool rdfSession = false; | 866 bool rdfSession = false; |
867 if (rdf) { | 867 if (rdf) { |
868 RDFImporter::RDFDocumentType rdfType = | 868 RDFImporter::RDFDocumentType rdfType = |
869 RDFImporter::identifyDocumentType | 869 RDFImporter::identifyDocumentType |
870 (QUrl::fromLocalFile(source.getLocalFilename()).toString()); | 870 (QUrl::fromLocalFile(source.getLocalFilename()).toString()); |
871 // std::cerr << "RDF type: " << (int)rdfType << std::endl; | |
871 if (rdfType == RDFImporter::AudioRefAndAnnotations || | 872 if (rdfType == RDFImporter::AudioRefAndAnnotations || |
872 rdfType == RDFImporter::AudioRef) { | 873 rdfType == RDFImporter::AudioRef) { |
873 rdfSession = true; | 874 rdfSession = true; |
874 } else if (rdfType == RDFImporter::NotRDF) { | 875 } else if (rdfType == RDFImporter::NotRDF) { |
875 rdf = false; | 876 rdf = false; |
1176 QString path = source.getLocalFilename(); | 1177 QString path = source.getLocalFilename(); |
1177 | 1178 |
1178 RDFImporter::RDFDocumentType rdfType = | 1179 RDFImporter::RDFDocumentType rdfType = |
1179 RDFImporter::identifyDocumentType(QUrl::fromLocalFile(path).toString()); | 1180 RDFImporter::identifyDocumentType(QUrl::fromLocalFile(path).toString()); |
1180 | 1181 |
1182 // std::cerr << "RDF type: (in layer) " << (int) rdfType << std::endl; | |
1183 | |
1181 if (rdfType != RDFImporter::NotRDF) { | 1184 if (rdfType != RDFImporter::NotRDF) { |
1182 | 1185 |
1183 return openLayersFromRDF(source); | 1186 return openLayersFromRDF(source); |
1184 | 1187 |
1185 } else if (source.getExtension() == "svl" || | 1188 } else if (source.getExtension() == "svl" || |
1347 if (source.getExtension() != "sv") { | 1350 if (source.getExtension() != "sv") { |
1348 | 1351 |
1349 RDFImporter::RDFDocumentType rdfType = | 1352 RDFImporter::RDFDocumentType rdfType = |
1350 RDFImporter::identifyDocumentType | 1353 RDFImporter::identifyDocumentType |
1351 (QUrl::fromLocalFile(source.getLocalFilename()).toString()); | 1354 (QUrl::fromLocalFile(source.getLocalFilename()).toString()); |
1355 | |
1356 // std::cerr << "RDF type: " << (int)rdfType << std::endl; | |
1352 | 1357 |
1353 if (rdfType == RDFImporter::AudioRefAndAnnotations || | 1358 if (rdfType == RDFImporter::AudioRefAndAnnotations || |
1354 rdfType == RDFImporter::AudioRef) { | 1359 rdfType == RDFImporter::AudioRef) { |
1355 return openSessionFromRDF(source); | 1360 return openSessionFromRDF(source); |
1356 } else if (rdfType != RDFImporter::NotRDF) { | 1361 } else if (rdfType != RDFImporter::NotRDF) { |