DIRECTORY DB USING [Domain, Entity, Relation, Relship], IO USING [STREAM], Rope USING [ROPE]; NutDump: CEDAR DEFINITIONS = BEGIN OPEN DB, IO, Rope; DumpToFile: PROC[ segment: ROPE, fileName: ROPE _ NIL, dl: LIST OF Domain _ NIL, rl: LIST OF Relation _ NIL, complement: BOOLEAN _ FALSE, entityCentric: BOOLEAN _ FALSE]; DumpAll: PROC[segment: ROPE, fileName: ROPE _ NIL] = INLINE {DumpToFile[segment, fileName, NIL, NIL, TRUE]}; LoadFromFile: PROC[dumpFile: ROPE _ NIL, DBFile: ROPE _ NIL]; OpenFile: PROC[fileName: ROPE] RETURNS[STREAM]; CloseFile: PROC[fileStream: STREAM]; WriteSchema: PROC[s: STREAM, dl: LIST OF Domain, rl: LIST OF Relation]; WriteDomain: PROC[s: STREAM, d: Domain, refs: BOOL_ FALSE]; -- writes entities in domain WriteEntity: PROC[s: STREAM, e: Entity]; -- writes a particular entity WriteRelation: PROC[s: STREAM, r: Relation]; -- writes all the relships of the relation WriteRelship: PROC[s: STREAM, r: Relship]; -- writes a particular relship END . . . ÂFile: NutDump.mesa Implemented by: NutDumpImpl, NutLoadImpl Last edited by: John Maxwell on: June 3, 1982 9:36 am Willie-Sue on: February 22, 1983 3:46 pm Donahue on: January 20, 1983 9:58 am Last Edited by: Cattell, April 28, 1983 2:28 pm ************************************************** for gross dumping of the data base ************************************************** dumps only the domains and relations given. If complement = TRUE, dumps everything but the domains and relations given. If entityCentric = TRUE, dumps entities with relships reffing them in first attribute Loads whatever is in the dumpFile into the DBFile; uses same dump format as DumpToFile. The segment name is given in the dumpFile; if the DBFile does not exist, it is created ************************************************** for selective dumping of the data base ************************************************** you may use a different type of stream if you choose ÊK˜J˜Jšœ™Jšœ(™(Jšœ5™5Jšœ(™(Jšœ$™$Jšœ/™/J˜šÏk ˜ Jšœœ%˜-Jšœœœ˜Jšœœœ˜J˜—šœ œ œ˜Jšœœœœ˜J˜—Jšœ2™2Jšœ"™"šœ2™2J˜šÏn œœ œ œœœœ œœœ œœœœœ˜¬JšœÏ™Ï—J˜š žœœ œ œœ˜4Jšœ œœœ˜7J˜—š ž œœ œœ œœ˜=Jšœ¯™¯——J˜Jšœ2™2Jšœ&™&Jšœ2™2˜Jš žœœ œœœ˜/šž œœ œ˜$Jšœ4™4J˜—Jšž œœœœœ œœ ˜HJš ž œœœœœÏc˜XJšž œœœŸ˜FJšž œœœŸ*˜WJšž œœœŸ˜IJ˜—Jšœ˜ J˜J˜J˜J˜—…—æ ó