DIRECTORY Buttons USING[ ButtonProc, Button ], DB USING [DataType, Domain, Relation, Attribute, Segment], Rope USING [ROPE], Labels, ViewerClasses; SchemaNut: CEDAR DEFINITIONS = BEGIN OPEN DB, Rope, ViewerClasses; AttributeInfo: TYPE = REF AttributeInfoRecord; AttributeInfoRecord: TYPE = RECORD[ relation: Relation, nameLabel: Buttons.Button, name: Viewer, typeLabel: Labels.Label, type: Viewer, lengthLabel: Labels.Label, length: Viewer, uniqueness: Buttons.Button ]; DomainInfo: TYPE = REF DomainInfoRecord; DomainInfoRecord: TYPE = RECORD[ name: Rope.ROPE, subTypes: Viewer, superTypes: Viewer, deleted: LIST OF Relation, -- deleted properties properties: LIST OF AttributeInfo]; RelationInfo: TYPE = REF RelationInfoRecord; RelationInfoRecord: TYPE = RECORD[name: Rope.ROPE, attributes: LIST OF AttributeInfo]; CopyDomainContents: PROCEDURE[oldD, newD: DB.Domain]; CopyRelships: PROCEDURE[oldR, newR: DB.Relation]; GetRelationsOf: PROC[d: DB.Domain] RETURNS[relations: LIST OF DB.Relation]; SubType: PROC[sub, super: DB.Domain] RETURNS[BOOLEAN]; GetDataType: PROC[type: ROPE, segment: DB.Segment] RETURNS[dt: DB.DataType]; Optimized: PROCEDURE [d: Domain] RETURNS [opt: BOOLEAN]; SaveProperty: PROCEDURE [d: Domain, info: AttributeInfo]; NewAttribute: Buttons.ButtonProc; AddAttribute: PROC[button: Viewer, segment: DB.Segment, oldList: LIST OF AttributeInfo] RETURNS[newList: LIST OF AttributeInfo]; RemoveAttribute: PROCEDURE[button: Viewer, oldList: LIST OF AttributeInfo] RETURNS[newList: LIST OF AttributeInfo, relation: Relation]; DisplayAttribute: PROC[r: Relation, a: Attribute, lastV: Viewer, segment: Segment _ NIL] RETURNS[info: AttributeInfo]; CheckProperty: PROCEDURE[d: Domain, info: AttributeInfo, deleted: LIST OF Relation] RETURNS[ok: BOOLEAN _ TRUE]; Reverse: PROCEDURE[old: LIST OF AttributeInfo] RETURNS[new: LIST OF AttributeInfo]; RemoveDeleted: PROCEDURE[d: Domain, info: AttributeInfo, relations: LIST OF Relation] RETURNS[LIST OF Relation]; NextName: PROCEDURE[list: ROPE] RETURNS[token, newList: ROPE, ok: BOOLEAN _ TRUE]; END . . `SchemaNut.mesa edited by Maxwell, May 26, 1982 8:18 am Last Edited by: Willie-Sue, February 22, 1983 3:46 pm Last Edited by: Donahue, July 17, 1984 5:32:38 pm PDT Last Edited by: Cattell, July 22, 1983 1:57 pm Last Edited by: Butler, June 26, 1984 4:45:48 pm PDT ******************************************************* -- SchemaCopyImpl-- copy the elements of a schemata coerce the data on a per-attribute data ******************************************************* ******************************************************* --SchemaNutImpl-- useful routines ******************************************************* Check to see that the property defined by the attribute is legal for the domain Removes the attribute corresponding to the given attribute information from the list of relations (unless the viewers referred to in the info have been unchanged) Ê›˜J˜Jšœ™Jšœ(™(Jšœ5™5Jšœ5™5Jšœ.™.Jšœ4™4J˜šÏk ˜ Jšœœ˜$Jšœœ2˜:Jšœœœ˜J˜J˜—šœ œ œ˜Jšœ˜Jšœœ˜J˜Jšœœœ˜.šœœœ˜#Jšœ˜Jšœ˜Jšœ ˜ Jšœ˜Jšœ ˜ Jšœ˜Jšœ˜šœ˜J˜——Jšœ œœ˜(šœœœ˜ Jšœ œ˜J˜J˜Jšœ œœ Ïc˜0Jšœ œœ˜#J˜—Jšœœœ˜,š œœœ œœœ˜VJ˜J˜J˜—Jšœ7™7J™Jšœ™Jšœ'™'Jšœ7™7J˜JšÏnœ œ œ ˜5J˜JšŸ œ œ œ ˜1J˜J˜Jšœ7™7J™Jšœ™Jšœ7™7J˜JšŸœœœ œ œœœ ˜KJ˜Jš Ÿœœ œ œœ˜6J˜Jš Ÿ œœœ œ œœ ˜LJ˜JšŸ œ œ œœ˜8J˜JšŸ œ œ"˜9J˜J˜!J˜š Ÿ œœœœœ˜WJšœ œœ˜(J˜—šŸœ œœœ˜KJšœ œœ$˜œœ˜vJ˜—šŸ œ œ*œœ œœœ˜pJ™OJ˜—JšŸœ œœœœœœ˜SJ˜šŸ œ œ,œœ œœœ ˜pJ™¢J˜—JšŸœ œœœœœœ˜SJ˜J˜Jšœ˜J˜——…—0+