DIRECTORY DB USING [ DeclareDomain, DeclareAttribute, DeclareEntity, DeclareRelation, Version, BoolType, IntType, TimeType, RopeType, DeclareIndex], HickoryStorage USING [ ProtectedData, protData], Rope USING [ ROPE] ; HickoryStorageImpl: CEDAR MONITOR LOCKS HickoryStorage.protData IMPORTS HickoryStorage, DB EXPORTS HickoryStorage = BEGIN OPEN DB, HickoryStorage.protData; protData: PUBLIC HickoryStorage.ProtectedData; SetUpRelationSchemes: PUBLIC INTERNAL PROCEDURE = BEGIN eventDomain _ DeclareDomain[ name: "EventDomain", segment: $Hickory, estRelships:10]; iconDomain _ DeclareDomain[ "IconDomain", $Hickory]; textDomain _ DeclareDomain[ "TextDomain", $Hickory]; placeDomain _ DeclareDomain[ "PlaceDomain", $Hickory]; messageDomain _ DeclareDomain[ "MessageDomain", $Hickory]; repTimeDomain _ DeclareDomain[ "RepTimeDomain", $Hickory]; groupDomain _ DeclareDomain[ "GroupDomain", $Hickory]; propertyDomain _ DeclareDomain[ "PropertyDomain", $Hickory]; typeDomain _ DeclareDomain[ "TypeDom", $Hickory]; SetUpEventRelation[]; SetUpRepeatRel[]; SetUpIconRelation[]; SetUpAdministrativeRelation[]; SetUpCacheRelation[]; SetUpGroupRelation[]; SetUpPropertyRelations[]; END; -- SetUpRelationSchemes SetUpEventRelation: INTERNAL PROCEDURE [] = BEGIN OPEN eventRel; Name _ "EventRelation"; Rel _ DeclareRelation[ Name, $Hickory, NewOrOld]; Key _ DeclareAttribute[ Rel, "EvKey", eventDomain, Key]; Time _ DeclareAttribute[ Rel, "EvTime", TimeType]; Duration _ DeclareAttribute[ Rel, "EvDuration", IntType]; RepeatType _ DeclareAttribute[ Rel, "EvRepeatType", IntType]; Forgotten _ DeclareAttribute[ Rel, "EvForgotten", BoolType]; KeepTime _ DeclareAttribute[ Rel, "EvKeepTime", TimeType]; LeadTime _ DeclareAttribute[ Rel, "EvLeadTime", IntType]; NagTime _ DeclareAttribute[ Rel, "EvNagTime", IntType]; Message _ DeclareAttribute[ Rel, "EvMessage", messageDomain]; Text _ DeclareAttribute[ Rel, "EvText", textDomain]; Icon _ DeclareAttribute[ Rel, "EvIcon", iconDomain]; Protection _ DeclareAttribute[ Rel, "EvProtection", IntType]; Place _ DeclareAttribute[ Rel, "EvPlace", placeDomain]; Reminder _ DeclareAttribute[ Rel, "EvReminder", BoolType]; TimeIndex _ DeclareIndex[ Rel, LIST[ Time], NewOrOld]; END; -- SetUpEventRelation SetUpRepeatRel: INTERNAL PROCEDURE [] = BEGIN OPEN repeatRel; Name _ "RepeatRelation"; Rel _ DeclareRelation[ Name, $Hickory, NewOrOld]; Event _ DeclareAttribute[ Rel, "EvKey", eventDomain]; FirstTime _ DeclareAttribute[ Rel, "FirstTime", TimeType]; RepeatType _ DeclareAttribute[ Rel, "RepeatTyp", IntType]; RepeatTime _ DeclareAttribute[ Rel, "RepeatTime", repTimeDomain]; RepeatUntil _ DeclareAttribute[ Rel, "RepeatUntil", TimeType]; LastOccurred _ DeclareAttribute[ Rel, "LastOccurred", TimeType]; EventIndex _ DeclareIndex[ Rel, LIST[ Event], NewOrOld]; END; -- SetUpRepeatRel SetUpIconRelation: INTERNAL PROCEDURE [] = BEGIN OPEN iconRel; Name _ "IconRelation"; Rel _ DeclareRelation[ Name, $Hickory, NewOrOld]; Key _ DeclareAttribute[ Rel, "iconKey", iconDomain, Key]; IconFlavor _ DeclareAttribute[ Rel, "iconFlavor", RopeType]; IconLabel _ DeclareAttribute[ Rel, "iconLabel", RopeType]; END; -- SetUpIconRelation SetUpAdministrativeRelation: INTERNAL PROCEDURE [] = BEGIN OPEN administrativeRel; Name _ "Administrative"; Rel _ DeclareRelation[ Name, $Hickory, NewOrOld]; CleanTime _ DeclareAttribute[ Rel, "CleanTime", TimeType]; Owner _ DeclareAttribute[ Rel, "Owner", RopeType]; PassWord _ DeclareAttribute[ Rel, "PassWord", RopeType]; END; -- SetUpAdministrativeRelation SetUpCacheRelation: INTERNAL PROCEDURE = BEGIN OPEN cacheRel; Name _ "CacheRel"; Rel _ DeclareRelation[ Name, $Hickory, NewOrOld]; Time _ DeclareAttribute[ Rel, "CacheTime", TimeType]; Event _ DeclareAttribute[ Rel, "CacheEvent", eventDomain]; TimeIndex _ DeclareIndex[ Rel, LIST[ Time]]; END; -- SetUpCacheRelation SetUpGroupRelation: INTERNAL PROCEDURE = BEGIN OPEN groupRel; Name _ "GroupRel"; Rel _ DeclareRelation[ Name, $Hickory, NewOrOld]; Event _ DeclareAttribute[ Rel, "GroupEvent", eventDomain]; Group _ DeclareAttribute[ Rel, "GroupName", groupDomain]; EventIndex _ DeclareIndex[ Rel, LIST[ Event]]; END; -- SetUpGroupRelation SetUpPropertyRelations: INTERNAL PROCEDURE = BEGIN BEGIN OPEN propertyDescriptorRel; Name _ "PropDescrRel"; Rel _ DeclareRelation[ Name, $Hickory, NewOrOld]; Property _ DeclareAttribute[ Rel, "PropertyName", propertyDomain, Key]; Type _ DeclareAttribute[ Rel, "PropertyType", typeDomain]; END; BEGIN OPEN propertyRels[ Int]; Name _ "IntPropertyRel"; Rel _ DeclareRelation[ Name, $Hickory, NewOrOld]; Event _ DeclareAttribute[ Rel, "Event", eventDomain]; PropValue _ DeclareAttribute[ Rel, "PropValue", IntType]; Property _ DeclareAttribute [ Rel, "Property", propertyDomain]; EventIndex _ DeclareIndex[ Rel, LIST[ Event]]; END; BEGIN OPEN propertyRels[ Bool]; Name _ "BoolPropertyRel"; Rel _ DeclareRelation[ Name, $Hickory, NewOrOld]; Event _ DeclareAttribute[ Rel, "Event", eventDomain]; PropValue _ DeclareAttribute[ Rel, "PropValue", BoolType]; Property _ DeclareAttribute [ Rel, "Property", propertyDomain]; EventIndex _ DeclareIndex[ Rel, LIST[ Event]]; END; BEGIN OPEN propertyRels[ Time]; Name _ "TimePropertyRel"; Rel _ DeclareRelation[ Name, $Hickory, NewOrOld]; Event _ DeclareAttribute[ Rel, "Event", eventDomain]; PropValue _ DeclareAttribute[ Rel, "PropValue", TimeType]; Property _ DeclareAttribute [ Rel, "Property", propertyDomain]; EventIndex _ DeclareIndex[ Rel, LIST[ Event]]; END; BEGIN OPEN propertyRels[ String]; Name _ "RopePropertyRel"; Rel _ DeclareRelation[ Name, $Hickory, NewOrOld]; Event _ DeclareAttribute[ Rel, "Event", eventDomain]; PropValue _ DeclareAttribute[ Rel, "PropValue", RopeType]; Property _ DeclareAttribute [ Rel, "Property", propertyDomain]; EventIndex _ DeclareIndex[ Rel, LIST[ Event]]; END; BooleanEntity _ DeclareEntity[ typeDomain, "Boolean", NewOrOld]; IntegerEntity _ DeclareEntity[ typeDomain, "Integer", NewOrOld]; TimeEntity _ DeclareEntity[ typeDomain, "Time", NewOrOld]; RopeEntity _ DeclareEntity[ typeDomain, "Rope", NewOrOld]; END; -- SetUpPropertyRelations END. $/ivy/binding/hickory/hickoryStorageImpl.mesa providing the declaration and initialization of the DB schemes used in Hickory. Last edited by: Binding, July 25, 1984 4:01:56 pm PDT PDT Providing the shared, monitored record setting up the relation schemes declare domains and relations also declare indices on simpleEventRel.[ Time, Key, Duration] assume that a transaction is alive when called to set up the event relation in the data base to set up the event relation in the data base to set up the icon relation in data base to set up administrative relation in data base to set up the cacheRel relation in data base to set up the groupeRel relation in data base to set up the propertyRels and propertyDescriptorRel relation in data base see also HickoryPropImpl for rationale behind this... Êi˜Jšœ,™,J™OJ™9J™šÏk ˜ J˜ŠJ˜0Jšœœœ˜J˜J˜—šœœ˜!Jšœ˜Jšœ˜Jšœ˜J˜—šœœœ˜)J˜šœ&™&J˜J˜.J˜—šœ™J™šÏnœœ œ˜7Jšœ™Jšœ>™>Jšœ.™.J˜JšœU˜UJšœ4˜4J˜4J˜6J˜:J˜:J˜6J˜J˜@Jšœ œ˜8JšœŸ˜J˜—šžœœ œœ˜1Jšœ*™*Jšœ ˜ J˜J˜1Jšœ9˜9Jšœ<˜