1 -- File: PCDM_StorageDriver.cdl
2 -- Created: Mon Nov 3 10:09:25 1997
3 -- Author: Jean-Louis Frenkel
4 -- <rmi@frilox.paris1.matra-dtv.fr>
5 ---Copyright: Matra Datavision 1997
7 deferred class StorageDriver from PCDM inherits Writer from PCDM
9 ---Purpose: persistent implemention of storage.
11 -- The application must redefine one the two Make()
12 -- methods. The first one, if the application wants to
13 -- put only one document in the storage file.
15 -- The second method should be redefined to put
16 -- additional document that could be used by the
17 -- retrieval instead of the principal document, depending
18 -- on the schema used during the retrieval. For example,
19 -- a second document could be a standard
20 -- CDMShape_Document. This means that a client
21 -- application will already be able to extract a CDMShape_Document
22 -- of the file, if the Shape Schema remains unchanged.
24 ---Category: persistent implemention of storage.
26 uses Document from CDM, Document from PCDM, Data from Storage, ExtendedString from TCollection, Schema from Storage,SequenceOfExtendedString from TColStd, SequenceOfDocument from PCDM
28 raises NoSuchObject from Standard,DriverError from PCDM
32 Make(me: mutable; aDocument: Document from CDM)
33 returns Document from PCDM
35 ---Purpose: raises NotImplemented.
37 Make(me: mutable; aDocument: Document from CDM; Documents: out SequenceOfDocument from PCDM)
39 ---Purpose:By default, puts in the Sequence the document returns
40 -- by the previous Make method.
44 SchemaName(me) returns ExtendedString from TCollection
47 LoadExtensions(me: mutable; aSchema: Schema from Storage; Extensions: SequenceOfExtendedString from TColStd)
50 Write(me: mutable; aDocument: Document from CDM; aFileName: ExtendedString from TCollection)
52 ---Purpose: Warning! raises DriverError if an error occurs during inside the
55 ---Purpose: stores the content of the Document into a new file.
57 -- by default Write will use Make method to build a persistent
58 -- document and the Schema method to write the persistent document.
61 SetFormat (me : mutable; aformat : ExtendedString from TCollection);
64 returns ExtendedString from TCollection;
68 myFormat : ExtendedString from TCollection;
70 end StorageDriver from PCDM;