Mercurial > hg > orthanc
comparison OrthancServer/ServerIndex.cpp @ 197:530a25320461
removal of text as ids in sqlite db
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Tue, 27 Nov 2012 14:59:55 +0100 |
parents | 0186ac92810c |
children | 663cc6c46d0a |
comparison
equal
deleted
inserted
replaced
196:6d0225a26fd8 | 197:530a25320461 |
---|---|
587 assert(type == ResourceType_Series); | 587 assert(type == ResourceType_Series); |
588 db2_->AttachChild(series, instance); | 588 db2_->AttachChild(series, instance); |
589 } | 589 } |
590 | 590 |
591 // Attach the files to the newly created instance | 591 // Attach the files to the newly created instance |
592 db2_->AttachFile(instance, "dicom", fileUuid, uncompressedFileSize); | 592 db2_->AttachFile(instance, AttachedFileType_Dicom, fileUuid, uncompressedFileSize); |
593 db2_->AttachFile(instance, "json", jsonUuid, 0); // TODO "0" | 593 db2_->AttachFile(instance, AttachedFileType_Json, jsonUuid, 0); // TODO "0" |
594 | 594 |
595 // Attach the metadata | 595 // Attach the metadata |
596 db2_->SetMetadata(instance, MetadataType_Instance_ReceptionDate, Toolbox::GetNowIsoString()); | 596 db2_->SetMetadata(instance, MetadataType_Instance_ReceptionDate, Toolbox::GetNowIsoString()); |
597 db2_->SetMetadata(instance, MetadataType_Instance_RemoteAet, remoteAet); | 597 db2_->SetMetadata(instance, MetadataType_Instance_RemoteAet, remoteAet); |
598 | 598 |
944 | 944 |
945 | 945 |
946 bool ServerIndex::GetFile(std::string& fileUuid, | 946 bool ServerIndex::GetFile(std::string& fileUuid, |
947 CompressionType& compressionType, | 947 CompressionType& compressionType, |
948 const std::string& instanceUuid, | 948 const std::string& instanceUuid, |
949 const std::string& contentName) | 949 AttachedFileType contentType) |
950 { | 950 { |
951 boost::mutex::scoped_lock scoped_lock(mutex_); | 951 boost::mutex::scoped_lock scoped_lock(mutex_); |
952 | 952 |
953 int64_t id; | 953 int64_t id; |
954 ResourceType type; | 954 ResourceType type; |
958 throw OrthancException(ErrorCode_InternalError); | 958 throw OrthancException(ErrorCode_InternalError); |
959 } | 959 } |
960 | 960 |
961 uint64_t compressedSize, uncompressedSize; | 961 uint64_t compressedSize, uncompressedSize; |
962 | 962 |
963 return db2_->LookupFile(id, contentName, fileUuid, compressedSize, uncompressedSize, compressionType); | 963 return db2_->LookupFile(id, contentType, fileUuid, compressedSize, uncompressedSize, compressionType); |
964 } | 964 } |
965 | 965 |
966 | 966 |
967 | 967 |
968 void ServerIndex::GetAllUuids(Json::Value& target, | 968 void ServerIndex::GetAllUuids(Json::Value& target, |