0024428: Implementation of LGPL license
[occt.git] / src / CDF / CDF_MetaDataDriver.cdl
1 -- Created on: 1997-11-17
2 -- Created by: Jean-Louis Frenkel
3 -- Copyright (c) 1997-1999 Matra Datavision
4 -- Copyright (c) 1999-2014 OPEN CASCADE SAS
5 --
6 -- This file is part of Open CASCADE Technology software library.
7 --
8 -- This library is free software; you can redistribute it and / or modify it
9 -- under the terms of the GNU Lesser General Public version 2.1 as published
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.
13 --
14 -- Alternatively, this file may be used under the terms of Open CASCADE
15 -- commercial license or contractual agreement.
16
17 deferred class MetaDataDriver from CDF inherits Transient from Standard
18
19
20 uses
21     Document from CDM, MetaData from CDM,
22     ExtendedString from TCollection,
23     ReferenceIterator from PCDM
24     
25 raises 
26     NotImplemented from Standard
27 is
28
29     Initialize;
30
31     ---Category: virtual methods
32
33     HasVersionCapability(me: mutable)
34     ---Purpose: returns true if the MetaDataDriver can manage different
35     --          versions of a Data.
36     --          By default, returns Standard_False.
37     returns Boolean from Standard
38     is virtual;
39
40     CreateDependsOn(me: mutable; aFirstData: MetaData from CDM;
41                                 aSecondData: MetaData from CDM)
42     ---Purpose: Creates a "Depends On"  relation between two Datas.
43     --          By default does nothing
44     is virtual;
45     
46     CreateReference(me: mutable; aFrom, aTo: MetaData from CDM; aReferenceIdentifier: Integer from Standard; aToDocumentVersion: Integer from Standard)
47     is virtual;
48     
49     HasVersion(me: mutable; aFolder, aName: ExtendedString from TCollection)
50     returns Boolean from Standard
51     ---Purpose: by default return Standard_True.
52     is virtual;
53     
54     BuildFileName(me: mutable; aDocument: Document from CDM)
55     returns ExtendedString from TCollection
56     is deferred;
57
58     SetName(me: mutable; aDocument: Document from CDM; aName: ExtendedString from TCollection)
59     returns ExtendedString from TCollection
60     is virtual;
61     ---Purpose: this methods  is usefull if the name  of an  object --
62     --           depends on  the metadatadriver. For  example a Driver
63     --           -- based  on the operating  system can choose to  add
64     --           the extension of file to create to the object.
65     
66 ---Category: Deferred methods
67
68     ---Overview: inquiring can be made either using a folder, a name and eventually
69     --           a version 
70     --           or a path which is the concatenation of a folder, a name  and eventually
71     --           a version.
72     Find(me: mutable; aFolder, aName, aVersion: ExtendedString from TCollection)
73     returns Boolean from Standard
74     ---Purpose: should indicate whether meta-data exist in the DBMS corresponding 
75     --          to the Data.
76     --          aVersion may be NULL;
77     is deferred;
78     
79     HasReadPermission(me: mutable; aFolder, aName, aVersion: ExtendedString from TCollection)
80     returns Boolean from Standard
81     is deferred;
82     
83     MetaData(me: mutable; aFolder, aName, aVersion: ExtendedString from TCollection)
84     returns MetaData from CDM
85     ---Purpose: should return the MetaData stored in the DBMS with the meta-data
86     --          corresponding to the Data. If the MetaDataDriver has version management capabilities
87     --          the version has to be set in the returned MetaData.
88     --          aVersion may be NULL
89     --          MetaData is called by GetMetaData
90     --          If the version is  set to NULL, MetaData should return
91     --          the last version of the metadata 
92     is deferred;
93     
94     LastVersion(me: mutable; aMetaData: MetaData from CDM)
95     returns MetaData from CDM
96     is virtual;
97     ---Purpose: by default returns aMetaDATA
98             
99 --    MetaData(me: mutable; aPath: ExtendedString from TCollection)
100 --    returns MetaData from CDM
101     ---Purpose: should return the MetaData stored in the DBMS with the meta-data
102     --          corresponding to the path. If the MetaDataDriver has version management capabilities
103     --          the version has to be set in the returned MetaData.
104     --          MetaData is called by GetMetaData
105     --          If the version is not included in the path , MetaData should return
106     --          the last version of the metadata 
107 --    is deferred;
108     
109
110
111     
112     CreateMetaData(me: mutable; aDocument: Document from CDM;
113                  aFileName: ExtendedString from TCollection)
114     ---Purpose:  should create meta-data corresponding to aData and maintaining a meta-link
115     --           between these meta-data and aFileName
116     --           CreateMetaData is called by CreateData
117     returns  MetaData from CDM
118     ---Purpose: If the metadata-driver 
119     --          has version capabilities, version must be set in the returned Data.
120     is deferred;
121     
122     FindFolder(me: mutable; aFolder: ExtendedString from TCollection)
123     returns Boolean from Standard
124     is deferred;
125
126    DefaultFolder(me: mutable) returns ExtendedString from TCollection
127    is deferred;
128    
129    
130 ---Category:  methods about references.
131
132     ReferenceIterator(me: mutable)
133     returns ReferenceIterator from PCDM
134     is virtual;
135     
136
137     Find(me: mutable; aFolder, aName: ExtendedString from TCollection)
138     returns Boolean from Standard;
139     ---Purpose: calls Find with an empty version
140
141     MetaData(me: mutable; aFolder, aName: ExtendedString from TCollection)
142     returns MetaData from CDM;
143     ---Purpose: calls MetaData with an empty version
144     
145
146 end MetaDataDriver from CDF;