Mercurial > hg > orthanc
comparison OrthancServer/ServerIndex.h @ 212:f276b175dcaf
delete resources
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Thu, 29 Nov 2012 10:13:49 +0100 |
parents | 4453a010d0db |
children | bb8c260c0092 |
comparison
equal
deleted
inserted
replaced
211:b7aea293b965 | 212:f276b175dcaf |
---|---|
60 std::auto_ptr<DatabaseWrapper> db_; | 60 std::auto_ptr<DatabaseWrapper> db_; |
61 | 61 |
62 void MainDicomTagsToJson(Json::Value& result, | 62 void MainDicomTagsToJson(Json::Value& result, |
63 int64_t resourceId); | 63 int64_t resourceId); |
64 | 64 |
65 bool DeleteInternal(Json::Value& target, | |
66 const std::string& uuid, | |
67 ResourceType expectedType); | |
68 | |
69 bool LookupResource(Json::Value& result, | |
70 const std::string& publicId, | |
71 ResourceType expectedType); | |
72 | |
73 SeriesStatus GetSeriesStatus(int id); | 65 SeriesStatus GetSeriesStatus(int id); |
74 | 66 |
75 public: | 67 public: |
76 ServerIndex(FileStorage& fileStorage, | 68 ServerIndex(FileStorage& fileStorage, |
77 const std::string& dbPath); | 69 const std::string& dbPath); |
93 | 85 |
94 uint64_t GetTotalCompressedSize(); | 86 uint64_t GetTotalCompressedSize(); |
95 | 87 |
96 uint64_t GetTotalUncompressedSize(); | 88 uint64_t GetTotalUncompressedSize(); |
97 | 89 |
98 bool GetInstance(Json::Value& result, | 90 bool LookupResource(Json::Value& result, |
99 const std::string& instanceUuid) | 91 const std::string& publicId, |
100 { | 92 ResourceType expectedType); |
101 return LookupResource(result, instanceUuid, ResourceType_Instance); | |
102 } | |
103 | |
104 bool GetSeries(Json::Value& result, | |
105 const std::string& seriesUuid) | |
106 { | |
107 return LookupResource(result, seriesUuid, ResourceType_Series); | |
108 } | |
109 | |
110 | |
111 bool GetStudy(Json::Value& result, | |
112 const std::string& studyUuid) | |
113 { | |
114 return LookupResource(result, studyUuid, ResourceType_Study); | |
115 } | |
116 | |
117 | |
118 bool GetPatient(Json::Value& result, | |
119 const std::string& patientUuid) | |
120 { | |
121 return LookupResource(result, patientUuid, ResourceType_Patient); | |
122 } | |
123 | 93 |
124 bool GetFile(std::string& fileUuid, | 94 bool GetFile(std::string& fileUuid, |
125 CompressionType& compressionType, | 95 CompressionType& compressionType, |
126 const std::string& instanceUuid, | 96 const std::string& instanceUuid, |
127 AttachedFileType contentType); | 97 AttachedFileType contentType); |
128 | 98 |
129 void GetAllUuids(Json::Value& target, | 99 void GetAllUuids(Json::Value& target, |
130 ResourceType resourceType); | 100 ResourceType resourceType); |
131 | 101 |
132 bool DeletePatient(Json::Value& target, | 102 bool DeleteResource(Json::Value& target, |
133 const std::string& patientUuid) | 103 const std::string& uuid, |
134 { | 104 ResourceType expectedType); |
135 return DeleteInternal(target, patientUuid, ResourceType_Patient); | |
136 } | |
137 | |
138 bool DeleteStudy(Json::Value& target, | |
139 const std::string& studyUuid) | |
140 { | |
141 return DeleteInternal(target, studyUuid, ResourceType_Study); | |
142 } | |
143 | |
144 bool DeleteSeries(Json::Value& target, | |
145 const std::string& seriesUuid) | |
146 { | |
147 return DeleteInternal(target, seriesUuid, ResourceType_Series); | |
148 } | |
149 | |
150 bool DeleteInstance(Json::Value& target, | |
151 const std::string& instanceUuid) | |
152 { | |
153 return DeleteInternal(target, instanceUuid, ResourceType_Instance); | |
154 } | |
155 | 105 |
156 bool GetChanges(Json::Value& target, | 106 bool GetChanges(Json::Value& target, |
157 int64_t since, | 107 int64_t since, |
158 unsigned int maxResults); | 108 unsigned int maxResults); |
159 }; | 109 }; |