Forráskód Böngészése

Changed xsiType style.

xsi:Type leads to an error when uploading a new xnat object.
Should be xsiType
Andreas Fetzer 10 éve
szülő
commit
2f37a2d7ca

+ 2 - 2
Libs/XNAT/Core/ctkXnatFile.cpp

@@ -151,7 +151,7 @@ void ctkXnatFile::saveImpl(bool overwrite)
   Q_D(ctkXnatFile);
 
   ctkXnatSession::UrlParameters urlParams;
-  urlParams["xsi:type"] = this->schemaType();
+  urlParams["xsiType"] = this->schemaType();
   // Flag needed for file upload
   urlParams["inbody"] = "true";
 
@@ -165,7 +165,7 @@ void ctkXnatFile::saveImpl(bool overwrite)
     // Do not append these file specific properties since they require a slightly
     // different key for uploading a file (e.g. instead of "file_format" only "format")
     if (itProperties.key() == FILE_TAGS || itProperties.key() == FILE_FORMAT ||
-        itProperties.key() == FILE_CONTENT)
+        itProperties.key() == FILE_CONTENT || itProperties.key() == "xsiType")
       continue;
 
     urlParams[itProperties.key()] = itProperties.value();

+ 2 - 2
Libs/XNAT/Core/ctkXnatObject.cpp

@@ -377,7 +377,7 @@ void ctkXnatObject::saveImpl(bool /*overwrite*/)
 {
   Q_D(ctkXnatObject);
   ctkXnatSession::UrlParameters urlParams;
-  urlParams["xsi:type"] = this->schemaType();
+  urlParams["xsiType"] = this->schemaType();
 
   // Just do this if there is already a valid last-modification-time,
   // otherwise the object is not yet on the server!
@@ -401,7 +401,7 @@ void ctkXnatObject::saveImpl(bool /*overwrite*/)
   while (itProperties.hasNext())
   {
     itProperties.next();
-    if (itProperties.key() == "ID")
+    if (itProperties.key() == "ID" || itProperties.key() == "xsiType")
       continue;
 
     urlParams[itProperties.key()] = itProperties.value();

+ 1 - 1
Libs/XNAT/Core/ctkXnatResource.cpp

@@ -173,7 +173,7 @@ void ctkXnatResource::downloadImpl(const QString& filename)
 void ctkXnatResource::saveImpl(bool /*overwrite*/)
 {
   ctkXnatSession::UrlParameters urlParams;
-  urlParams["xsi:type"] = this->schemaType();
+  urlParams["xsiType"] = this->schemaType();
 
   const QMap<QString, QString>& properties = this->properties();
   QMapIterator<QString, QString> itProperties(properties);