Lange's Object-Oriented Model

The datamodel can be generalized by giving an object-oriented definition, in which data types are combined with operations.

The "top-level" class for hypertext is called the hyperbase. The hyperbase covers basic operations on instances as the creation of new instances, basic object version management and object access control.

An object-oriented hyperbase is defined as a collection of uniquely named instances of three object types: nodes, networks and structures. A set of operations is defined for each type. Furthermore, each instance has a set of predecessors and successors, identifying the neighbors of the instance in the version chain.

Fundamental Operations

The CreateInstanceOf operation can make instances of subclasses, that is, it can make node, network and structure objects, returning the unique names of these objects. These instances can be destroyed by the DestroyInstance operation. The collection of identities of a given class can be collected by the SetOfInstances operation.

The CreateSuccessorOfInstance operation creates a copy of a specified object instance. The identity of the created object instance is added to the successor set of the specified instance, while the original instance is added to the predecessor set of the new object instance. The predecessor and successor sets of an instance are returned by the PredecessorOfInstance and SuccessorOfInstance operations. The MergeInstances operation merges two objects into one object.

The Open operation checks the access conditions of the instance before allowing access to the specified instance and operations. The Close operation resets the access conditions after they have been altered by a previous open. One has access to the operations of the hyperbase objects through the OperateOnInstance function, which is passed as parameters the identity of the object instance and the name of the operation to be executed.

The AddAttribute operation adds a named attribute to the set of attributes of the object instance. Attributes can be removed by the RemoveAttribute operation. Values are assigned to attributes by the AssignAttribute operation, and are read by using ReadAttribute. The operations on attributes are the same for all classes of objects.

The Object Classes of a Hyperbase

Objects of the node class have zero or more slots. Three groups of operations work on nodes: operations on the schema (the slots) of the node, operations on the end-points of links: handles and regions, and finally operations on the node attributes.

The AddSlot operation adds a new and empty slot to the node instance. The identity of the new slot is returned to the user. The RemoveSlot operation can remove a slot and its contents from the node. One can use the ReturnSlots operation to get the set of names of the slots allocated in the schema of a node instance.

The contents of a specified slot can be delivered as a string of characters by using SlotView. SlotInsert is an editing operation. It inserts a string into a specified position in the contents of a specified slot. SlotDelete is used to remove a specified portion of text from the contents of a slot.

A handle can be added to a specified region of the contents of a slot by the AddHandle operation. The handle is given a unique identity which is returned to the user. One can add several handles to the same region, and regions can be overlapping. A handle is removed by using RemoveHandle. The names of the handles located in a slot are returned by ReturnSlotHandles, and the names of the handles at a specified position in a slot are returned by the ReturnPositionHandles operation. The region specified by a handle is returned by GetHandle.

The network class is used to implement links in a hypertext. The operations of the network class consist of six network changing operations and three querying operations.

The AddLink operation adds a new and empty link to the network. The operation returns a unique identity for the link to the user. The link is given an anchor by the AddAnchor operation and a destination by AddDestination. Links, anchors and destinations are removed by RemoveLink, RemoveAnchor and RemoveDestination respectively.

The two querying operations HavingAnchor and HavingDestinatin are used to identify the links of a certain network instance, that have the specified anchor/destination in common.

The operations on structures are divided into four groups. The first is concerned with the more general operations on the structure, i.e. adding and removing substructures, etc. The other three groups are concerned with the specific operations of the three types of substructures: sets, sequences and maps.

A substructure can be added to a structure by using the AddSubstructure operation and removed by RemoveSubstructure. The identities of the substructures pointing to the specified destination is returned by the HavingDestination operation. Finally, one can get the type of a substructure by using the GetSubstructureType operation.

The AddDestination operation adds a destination to a set of destinations. A destination element of a set is removed by RemoveDestination. The HavingDestinationSet operation can be used to find out whether a specified destination is in the set. The set of destinations is returned by GetDestinationSet. One can get the number of elements in the set by using the GetCardinality operation.

In a sequence destinations can be inserted at a specified position in the list by InsertDestination. Destinations positioned at a position greater or equal to the insertion point are shifted one place. The RemoveDestination works the opposite way. The GetDestination operation returns the destination at the specified position. GetLength returns the length, i.e. the number of destinations in the list.

AddDestination and RemoveDestination are also used to add destinations to a map (resp. remove them). HavingDestination gives all the names of a specified destination. One can get the destination identified by a given name by using the GetDestination operation. The set of names bound to destinations is returned by GetDomain.