Commit | Line | Data |
---|---|---|
b311480e | 1 | // Created on: 1997-08-08 |
2 | // Created by: Jean-Louis Frenkel | |
3 | // Copyright (c) 1997-1999 Matra Datavision | |
973c2be1 | 4 | // Copyright (c) 1999-2014 OPEN CASCADE SAS |
b311480e | 5 | // |
973c2be1 | 6 | // This file is part of Open CASCADE Technology software library. |
b311480e | 7 | // |
d5f74e42 | 8 | // This library is free software; you can redistribute it and/or modify it under |
9 | // the terms of the GNU Lesser General Public License version 2.1 as published | |
973c2be1 | 10 | // by the Free Software Foundation, with special exception defined in the file |
11 | // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT | |
12 | // distribution for complete text of the license and disclaimer of any warranty. | |
b311480e | 13 | // |
973c2be1 | 14 | // Alternatively, this file may be used under the terms of Open CASCADE |
15 | // commercial license or contractual agreement. | |
b311480e | 16 | |
7fd59977 | 17 | // Modified by rmi, Wed Jan 14 08:17:35 1998 |
18 | ||
42cf5bc1 | 19 | #include <CDF_Application.hxx> |
7fd59977 | 20 | #include <CDF_Directory.hxx> |
21 | #include <CDF_MetaDataDriver.hxx> | |
42cf5bc1 | 22 | #include <CDF_Session.hxx> |
23 | #include <CDF_Timer.hxx> | |
24 | #include <CDM_CanCloseStatus.hxx> | |
25 | #include <CDM_Document.hxx> | |
26 | #include <CDM_MetaData.hxx> | |
27 | #include <PCDM_Reader.hxx> | |
15e8b082 | 28 | #include <PCDM_ReaderStatus.hxx> |
7fd59977 | 29 | #include <PCDM_ReadWriter.hxx> |
30 | #include <PCDM_RetrievalDriver.hxx> | |
31 | #include <PCDM_StorageDriver.hxx> | |
7fd59977 | 32 | #include <Plugin.hxx> |
42cf5bc1 | 33 | #include <Standard_ErrorHandler.hxx> |
34 | #include <Standard_GUID.hxx> | |
35 | #include <Standard_NoSuchObject.hxx> | |
36 | #include <Standard_ProgramError.hxx> | |
37 | #include <Standard_Type.hxx> | |
38 | #include <TCollection_ExtendedString.hxx> | |
7fd59977 | 39 | #include <UTL.hxx> |
40 | ||
7fd59977 | 41 | #define theMetaDataDriver CDF_Session::CurrentSession()->MetaDataDriver() |
42 | ||
43 | ||
44 | //======================================================================= | |
45 | //function : | |
46 | //purpose : | |
47 | //======================================================================= | |
15e8b082 | 48 | CDF_Application::CDF_Application():myRetrievableStatus(PCDM_RS_OK) {} |
7fd59977 | 49 | |
50 | //======================================================================= | |
51 | //function : Load | |
52 | //purpose : | |
53 | //======================================================================= | |
54 | Handle(CDF_Application) CDF_Application::Load(const Standard_GUID& aGUID) { | |
55 | return Handle(CDF_Application)::DownCast(Plugin::Load(aGUID)); | |
56 | } | |
57 | ||
58 | //======================================================================= | |
59 | //function : Open | |
60 | //purpose : | |
61 | //======================================================================= | |
62 | void CDF_Application::Open(const Handle(CDM_Document)& aDocument) { | |
63 | CDF_Session::CurrentSession()->Directory()->Add(aDocument); | |
64 | aDocument->Open(this); | |
65 | Activate(aDocument,CDF_TOA_New); | |
66 | } | |
67 | ||
68 | //======================================================================= | |
69 | //function : CanClose | |
70 | //purpose : | |
71 | //======================================================================= | |
72 | CDM_CanCloseStatus CDF_Application::CanClose(const Handle(CDM_Document)& aDocument) { | |
73 | return aDocument->CanClose(); | |
74 | } | |
75 | ||
76 | //======================================================================= | |
77 | //function : Close | |
78 | //purpose : | |
79 | //======================================================================= | |
80 | void CDF_Application::Close(const Handle(CDM_Document)& aDocument) { | |
81 | CDF_Session::CurrentSession()->Directory()->Remove(aDocument); | |
82 | aDocument->Close(); | |
83 | } | |
84 | ||
85 | //======================================================================= | |
86 | //function : Retrieve | |
87 | //purpose : | |
88 | //======================================================================= | |
89 | Handle(CDM_Document) CDF_Application::Retrieve(const TCollection_ExtendedString& aFolder, | |
90 | const TCollection_ExtendedString& aName, | |
91 | const Standard_Boolean UseStorageConfiguration) { | |
92 | TCollection_ExtendedString nullVersion; | |
93 | return Retrieve(aFolder,aName,nullVersion,UseStorageConfiguration); | |
94 | } | |
95 | ||
96 | //======================================================================= | |
97 | //function : Retrieve | |
98 | //purpose : | |
99 | //======================================================================= | |
100 | Handle(CDM_Document) CDF_Application::Retrieve(const TCollection_ExtendedString& aFolder, | |
101 | const TCollection_ExtendedString& aName, | |
102 | const TCollection_ExtendedString& aVersion, | |
103 | const Standard_Boolean UseStorageConfiguration) { | |
0797d9d3 | 104 | #ifdef OCCT_DEBUG |
7fd59977 | 105 | CDF_Timer theTimer; |
106 | #endif | |
107 | ||
108 | Handle(CDM_MetaData) theMetaData; | |
109 | ||
110 | if(aVersion.Length() == 0) | |
111 | theMetaData=theMetaDataDriver->MetaData(aFolder,aName); | |
112 | else | |
113 | theMetaData=theMetaDataDriver->MetaData(aFolder,aName,aVersion); | |
114 | ||
0797d9d3 | 115 | #ifdef OCCT_DEBUG |
7fd59977 | 116 | theTimer.ShowAndRestart("Getting MetaData: "); |
117 | #endif | |
118 | ||
119 | CDF_TypeOfActivation theTypeOfActivation=TypeOfActivation(theMetaData); | |
120 | Handle(CDM_Document) theDocument=Retrieve(theMetaData,UseStorageConfiguration,Standard_False); | |
121 | ||
0797d9d3 | 122 | #ifdef OCCT_DEBUG |
7fd59977 | 123 | theTimer.ShowAndRestart("Creating Transient: "); |
124 | #endif | |
125 | ||
126 | CDF_Session::CurrentSession()->Directory()->Add(theDocument); | |
127 | Activate(theDocument,theTypeOfActivation); | |
128 | ||
0797d9d3 | 129 | #ifdef OCCT_DEBUG |
7fd59977 | 130 | theTimer.ShowAndStop("Activate: "); |
131 | #endif | |
132 | ||
133 | theDocument->Open(this); | |
134 | return theDocument; | |
135 | ||
136 | ||
137 | } | |
138 | ||
139 | //======================================================================= | |
140 | //function : CanRetrieve | |
141 | //purpose : | |
142 | //======================================================================= | |
15e8b082 | 143 | PCDM_ReaderStatus CDF_Application::CanRetrieve(const TCollection_ExtendedString& aFolder, const TCollection_ExtendedString& aName) { |
7fd59977 | 144 | TCollection_ExtendedString aVersion; |
145 | return CanRetrieve(aFolder,aName,aVersion); | |
146 | } | |
147 | ||
148 | //======================================================================= | |
149 | //function : CanRetrieve | |
150 | //purpose : | |
151 | //======================================================================= | |
15e8b082 | 152 | PCDM_ReaderStatus CDF_Application::CanRetrieve(const TCollection_ExtendedString& aFolder, const TCollection_ExtendedString& aName, const TCollection_ExtendedString& aVersion) { |
7fd59977 | 153 | |
0797d9d3 | 154 | #ifdef OCCT_DEBUG |
7fd59977 | 155 | CDF_Timer theTimer; |
156 | #endif | |
157 | ||
158 | if (!theMetaDataDriver->Find(aFolder,aName,aVersion)) | |
15e8b082 | 159 | return PCDM_RS_UnknownDocument; |
7fd59977 | 160 | else if (!theMetaDataDriver->HasReadPermission(aFolder,aName,aVersion)) |
15e8b082 | 161 | return PCDM_RS_PermissionDenied; |
7fd59977 | 162 | else { |
0797d9d3 | 163 | #ifdef OCCT_DEBUG |
7fd59977 | 164 | theTimer.ShowAndRestart("theMetaDataDriver->Find: "); |
165 | #endif | |
166 | ||
167 | Handle(CDM_MetaData) theMetaData = theMetaDataDriver->MetaData(aFolder,aName,aVersion); | |
168 | ||
0797d9d3 | 169 | #ifdef OCCT_DEBUG |
7fd59977 | 170 | theTimer.ShowAndStop("Getting MetaData: "); |
171 | #endif | |
172 | ||
173 | if(theMetaData->IsRetrieved()) { | |
174 | return theMetaData->Document()->IsModified() | |
15e8b082 | 175 | ? PCDM_RS_AlreadyRetrievedAndModified : PCDM_RS_AlreadyRetrieved; |
7fd59977 | 176 | } |
177 | else { | |
178 | TCollection_ExtendedString theFileName=theMetaData->FileName(); | |
179 | TCollection_ExtendedString theFormat=PCDM_ReadWriter::FileFormat(theFileName); | |
180 | if(theFormat.Length()==0) { | |
181 | TCollection_ExtendedString ResourceName=UTL::Extension(theFileName); | |
182 | ResourceName+=".FileFormat"; | |
183 | if(UTL::Find(Resources(),ResourceName)) { | |
184 | theFormat=UTL::Value(Resources(),ResourceName); | |
185 | } | |
186 | else | |
15e8b082 | 187 | return PCDM_RS_UnrecognizedFileFormat; |
7fd59977 | 188 | } |
15e8b082 | 189 | if(!FindReaderFromFormat(theFormat)) return PCDM_RS_NoDriver; |
7fd59977 | 190 | } |
191 | } | |
15e8b082 | 192 | return PCDM_RS_OK; |
7fd59977 | 193 | |
194 | } | |
195 | ||
196 | ||
197 | ||
198 | //======================================================================= | |
199 | //function : Activate | |
200 | //purpose : | |
201 | //======================================================================= | |
202 | //void CDF_Application::Activate(const Handle(CDM_Document)& aDocument,const CDF_TypeOfActivation aTypeOfActivation) { | |
203 | void CDF_Application::Activate(const Handle(CDM_Document)& ,const CDF_TypeOfActivation ) { | |
204 | } | |
205 | ||
206 | //======================================================================= | |
207 | //function : DefaultFolder | |
208 | //purpose : | |
209 | //======================================================================= | |
210 | Standard_ExtString CDF_Application::DefaultFolder(){ | |
211 | if(myDefaultFolder.Length() == 0) { | |
212 | myDefaultFolder=CDF_Session::CurrentSession()->MetaDataDriver()->DefaultFolder(); | |
213 | } | |
214 | return myDefaultFolder.ToExtString(); | |
215 | } | |
216 | ||
217 | //======================================================================= | |
218 | //function : SetDefaultFolder | |
219 | //purpose : | |
220 | //======================================================================= | |
221 | Standard_Boolean CDF_Application::SetDefaultFolder(const Standard_ExtString aFolder) { | |
222 | Standard_Boolean found = CDF_Session::CurrentSession()->MetaDataDriver()->FindFolder(aFolder); | |
223 | if(found) myDefaultFolder=aFolder; | |
224 | return found; | |
225 | } | |
226 | ||
227 | //======================================================================= | |
228 | //function : DefaultExtension | |
229 | //purpose : | |
230 | //======================================================================= | |
231 | Standard_ExtString CDF_Application::DefaultExtension() { | |
232 | static TCollection_ExtendedString theDefaultExtension; | |
233 | theDefaultExtension="*"; | |
234 | TColStd_SequenceOfExtendedString theFormats; | |
235 | Formats(theFormats); | |
236 | ||
237 | for (Standard_Integer i=1; i<= theFormats.Length(); i++) { | |
238 | TCollection_ExtendedString theResource(theFormats(i)); | |
239 | theResource+=".FileExtension"; | |
240 | if(UTL::Find(Resources(),theResource)) { | |
241 | theDefaultExtension=UTL::Value(Resources(),theResource); | |
242 | return theDefaultExtension.ToExtString(); | |
243 | } | |
244 | } | |
245 | return theDefaultExtension.ToExtString(); | |
246 | } | |
247 | ||
248 | //======================================================================= | |
249 | //function : Retrieve | |
250 | //purpose : | |
251 | //======================================================================= | |
252 | Handle(CDM_Document) CDF_Application::Retrieve(const Handle(CDM_MetaData)& aMetaData,const Standard_Boolean UseStorageConfiguration) { | |
253 | return Retrieve(aMetaData,UseStorageConfiguration,Standard_True); | |
254 | } | |
255 | ||
7fd59977 | 256 | //======================================================================= |
257 | //function : Retrieve | |
258 | //purpose : | |
259 | //======================================================================= | |
260 | Handle(CDM_Document) CDF_Application::Retrieve(const Handle(CDM_MetaData)& aMetaData,const Standard_Boolean UseStorageConfiguration, const Standard_Boolean IsComponent) { | |
261 | ||
262 | Handle(CDM_Document) theDocumentToReturn; | |
15e8b082 | 263 | myRetrievableStatus = PCDM_RS_DriverFailure; |
7fd59977 | 264 | if(IsComponent) { |
265 | Standard_SStream aMsg; | |
266 | switch (CanRetrieve(aMetaData)) { | |
15e8b082 | 267 | case PCDM_RS_UnknownDocument: |
7fd59977 | 268 | aMsg << "could not find the referenced document: " << aMetaData->Path() << "; not found." <<(char)0 << endl; |
15e8b082 | 269 | myRetrievableStatus = PCDM_RS_UnknownDocument; |
7fd59977 | 270 | Standard_Failure::Raise(aMsg); |
271 | break; | |
15e8b082 | 272 | case PCDM_RS_PermissionDenied: |
7fd59977 | 273 | aMsg << "Could not find the referenced document: " << aMetaData->Path() << "; permission denied. " <<(char)0 << endl; |
15e8b082 | 274 | myRetrievableStatus = PCDM_RS_PermissionDenied; |
7fd59977 | 275 | Standard_Failure::Raise(aMsg); |
276 | break; | |
277 | default: | |
278 | break; | |
279 | } | |
280 | ||
281 | } | |
282 | Standard_Boolean AlreadyRetrieved=aMetaData->IsRetrieved(); | |
15e8b082 | 283 | if(AlreadyRetrieved) myRetrievableStatus = PCDM_RS_AlreadyRetrieved; |
7fd59977 | 284 | Standard_Boolean Modified=AlreadyRetrieved && aMetaData->Document()->IsModified(); |
15e8b082 | 285 | if(Modified) myRetrievableStatus = PCDM_RS_AlreadyRetrievedAndModified; |
7fd59977 | 286 | if(!AlreadyRetrieved || Modified) { |
287 | ||
288 | Handle(PCDM_Reader) theReader=Reader(aMetaData->FileName()); | |
289 | ||
290 | ||
291 | Handle(CDM_Document) theDocument; | |
292 | ||
293 | if(Modified) { | |
294 | theDocument=aMetaData->Document(); | |
295 | theDocument->RemoveAllReferences(); | |
296 | } | |
297 | else | |
298 | theDocument=theReader->CreateDocument(); | |
299 | ||
300 | SetReferenceCounter(theDocument,PCDM_RetrievalDriver::ReferenceCounter(aMetaData->FileName(), MessageDriver())); | |
301 | ||
302 | SetDocumentVersion(theDocument,aMetaData); | |
303 | theMetaDataDriver->ReferenceIterator()->LoadReferences(theDocument,aMetaData,this,UseStorageConfiguration); | |
304 | ||
305 | try { | |
306 | OCC_CATCH_SIGNALS | |
307 | theReader->Read(aMetaData->FileName(),theDocument,this); | |
308 | } | |
309 | catch (Standard_Failure) { | |
15e8b082 M |
310 | myRetrievableStatus = theReader->GetStatus(); |
311 | if(myRetrievableStatus > PCDM_RS_AlreadyRetrieved){ | |
7fd59977 | 312 | Standard_SStream aMsg; |
313 | aMsg << Standard_Failure::Caught() << endl; | |
314 | Standard_Failure::Raise(aMsg); | |
315 | } | |
316 | } | |
15e8b082 | 317 | myRetrievableStatus = theReader->GetStatus(); |
7fd59977 | 318 | theDocument->SetMetaData(aMetaData); |
319 | ||
320 | theDocumentToReturn=theDocument; | |
321 | } | |
322 | else | |
323 | theDocumentToReturn=aMetaData->Document(); | |
324 | ||
325 | return theDocumentToReturn; | |
326 | } | |
327 | ||
328 | //======================================================================= | |
329 | //function : DocumentVersion | |
330 | //purpose : | |
331 | //======================================================================= | |
332 | Standard_Integer CDF_Application::DocumentVersion(const Handle(CDM_MetaData)& theMetaData) { | |
333 | // const Handle(CDM_MessageDriver)& aMsgDriver = MessageDriver(); | |
334 | return PCDM_RetrievalDriver::DocumentVersion(theMetaData->FileName(), MessageDriver()); | |
335 | } | |
336 | ||
337 | //======================================================================= | |
338 | //function : TypeOfActivation | |
339 | //purpose : | |
340 | //======================================================================= | |
341 | CDF_TypeOfActivation CDF_Application::TypeOfActivation(const Handle(CDM_MetaData)& aMetaData) { | |
342 | ||
343 | if(aMetaData->IsRetrieved()) { | |
344 | Handle(CDM_Document) theDocument=aMetaData->Document(); | |
345 | if(theDocument->IsOpened()) { | |
346 | if(theDocument->IsModified()) | |
347 | return CDF_TOA_Modified; | |
348 | else | |
349 | return CDF_TOA_Unchanged; | |
350 | } | |
351 | ||
352 | else | |
353 | return CDF_TOA_New; | |
354 | } | |
355 | return CDF_TOA_New; | |
356 | } | |
357 | ||
358 | ||
359 | //======================================================================= | |
360 | //function : FindReader | |
361 | //purpose : | |
362 | //======================================================================= | |
363 | Standard_Boolean CDF_Application::FindReader(const TCollection_ExtendedString& aFileName) { | |
364 | Standard_GUID voidGUID; | |
365 | TCollection_ExtendedString voidResourceName; | |
366 | return FindReader(aFileName,voidGUID,voidResourceName); | |
367 | } | |
368 | ||
369 | //======================================================================= | |
370 | //function : Reader | |
371 | //purpose : code dp | |
372 | //======================================================================= | |
373 | Handle(PCDM_Reader) CDF_Application::Reader (const TCollection_ExtendedString& aFileName) { | |
374 | TCollection_ExtendedString theFormat; | |
375 | if (!Format(aFileName,theFormat)) { | |
376 | Standard_SStream aMsg; | |
377 | aMsg << "Could not found the format" <<(char)0; | |
378 | Standard_NoSuchObject::Raise(aMsg); | |
379 | ||
380 | } | |
381 | return ReaderFromFormat (theFormat); | |
382 | } | |
383 | ||
384 | //======================================================================= | |
385 | //function : FindReaderFromFormat | |
386 | //purpose : | |
387 | //======================================================================= | |
388 | Standard_Boolean CDF_Application::FindReaderFromFormat(const TCollection_ExtendedString& aFormat) { | |
389 | Standard_GUID voidGUID; | |
390 | TCollection_ExtendedString voidResourceName; | |
391 | return FindReaderFromFormat(aFormat,voidGUID,voidResourceName); | |
392 | } | |
393 | ||
394 | ||
395 | //======================================================================= | |
396 | //function : ReaderFromFormat | |
397 | //purpose : | |
398 | //======================================================================= | |
399 | Handle(PCDM_Reader) CDF_Application::ReaderFromFormat(const TCollection_ExtendedString& aFormat) { | |
400 | TCollection_ExtendedString UnfoundResourceName; | |
401 | Standard_GUID thePluginId; | |
402 | if(!FindReaderFromFormat(aFormat,thePluginId,UnfoundResourceName)) { | |
403 | Standard_SStream aMsg; | |
404 | aMsg << "Could not found the item:" << UnfoundResourceName <<(char)0; | |
15e8b082 | 405 | myRetrievableStatus = PCDM_RS_WrongResource; |
7fd59977 | 406 | Standard_NoSuchObject::Raise(aMsg); |
407 | } | |
408 | Handle(PCDM_Reader) R; | |
409 | try { | |
410 | OCC_CATCH_SIGNALS | |
411 | R = Handle(PCDM_Reader)::DownCast(Plugin::Load(thePluginId)); | |
412 | } | |
413 | catch (Standard_Failure) { | |
15e8b082 | 414 | myRetrievableStatus = PCDM_RS_WrongResource; |
7fd59977 | 415 | Standard_SStream aMsg; |
416 | aMsg << Standard_Failure::Caught() << endl; | |
417 | Standard_Failure::Raise(aMsg); | |
418 | } | |
419 | Handle(PCDM_RetrievalDriver) RD = Handle(PCDM_RetrievalDriver)::DownCast(R); | |
420 | if (!RD.IsNull()) { | |
421 | RD->SetFormat(aFormat); | |
422 | return RD; | |
423 | } else | |
15e8b082 | 424 | myRetrievableStatus = PCDM_RS_WrongResource; |
7fd59977 | 425 | return R; |
426 | } | |
427 | ||
428 | //======================================================================= | |
429 | //function : FindReader | |
430 | //purpose : | |
431 | //======================================================================= | |
432 | Standard_Boolean CDF_Application::FindReader(const TCollection_ExtendedString& aFileName, Standard_GUID& thePluginId, TCollection_ExtendedString& ResourceName) { | |
433 | ||
434 | TCollection_ExtendedString theFormat=PCDM_ReadWriter::FileFormat(aFileName); | |
435 | ||
0d969553 | 436 | // It is good if the format is in the file. Otherwise base on the extension. |
7fd59977 | 437 | |
438 | if(theFormat.Length()==0) { | |
439 | ResourceName=UTL::Extension(aFileName); | |
440 | ResourceName+=".FileFormat"; | |
441 | ||
442 | if(UTL::Find(Resources(),ResourceName)) { | |
443 | theFormat=UTL::Value(Resources(),ResourceName); | |
444 | } | |
445 | else | |
446 | return Standard_False; | |
447 | } | |
448 | return FindReaderFromFormat(theFormat,thePluginId,ResourceName); | |
449 | } | |
450 | ||
451 | //======================================================================= | |
452 | //function : Format | |
453 | //purpose : dp | |
454 | //======================================================================= | |
455 | Standard_Boolean CDF_Application::Format(const TCollection_ExtendedString& aFileName, | |
456 | TCollection_ExtendedString& theFormat) | |
457 | { | |
458 | ||
459 | theFormat = PCDM_ReadWriter::FileFormat(aFileName); | |
0d969553 | 460 | // It is good if the format is in the file. Otherwise base on the extension. |
7fd59977 | 461 | if(theFormat.Length()==0) { |
462 | TCollection_ExtendedString ResourceName; | |
463 | ResourceName=UTL::Extension(aFileName); | |
464 | ResourceName+=".FileFormat"; | |
465 | ||
466 | if(UTL::Find(Resources(),ResourceName)) { | |
467 | theFormat = UTL::Value(Resources(),ResourceName); | |
468 | } | |
469 | else return Standard_False; | |
470 | } | |
471 | return Standard_True; | |
472 | } | |
473 | ||
474 | //======================================================================= | |
475 | //function : FindReaderFromFormat | |
476 | //purpose : | |
477 | //======================================================================= | |
478 | Standard_Boolean CDF_Application::FindReaderFromFormat(const TCollection_ExtendedString& aFormat, Standard_GUID& thePluginId, TCollection_ExtendedString& ResourceName) { | |
479 | ||
480 | ResourceName=aFormat; | |
481 | ResourceName+=".RetrievalPlugin"; | |
482 | ||
483 | if(UTL::Find(Resources(),ResourceName)) { | |
bf4bf038 | 484 | // Get GUID as a string. |
485 | TCollection_ExtendedString strPluginId = UTL::Value(Resources(),ResourceName); | |
486 | ||
487 | // If the GUID (as a string) contains blanks, remove them. | |
488 | if (strPluginId.Search(' ') != -1) | |
489 | strPluginId.RemoveAll(' '); | |
490 | ||
491 | // Convert to GUID. | |
492 | thePluginId=UTL::GUID(strPluginId); | |
7fd59977 | 493 | return Standard_True; |
494 | } | |
495 | return Standard_False; | |
496 | } | |
497 | ||
498 | //======================================================================= | |
499 | //function : CanRetrieve | |
500 | //purpose : | |
501 | //======================================================================= | |
15e8b082 | 502 | PCDM_ReaderStatus CDF_Application::CanRetrieve(const Handle(CDM_MetaData)& aMetaData) { |
7fd59977 | 503 | if(aMetaData->HasVersion()) |
504 | return CanRetrieve(aMetaData->Folder(),aMetaData->Name(),aMetaData->Version()); | |
505 | else | |
506 | return CanRetrieve(aMetaData->Folder(),aMetaData->Name()); | |
507 | } |