Methods
- -close
- Call this method if you do not need this instance any more
- -createDatabaseGraphDirectory
- Creates the (sub) directory for a new graph
- -createNodeWithId:
- create a node of a certain node id
- -databasesMounted
- -encodeWithCoder:
- Encodes the receiver using encoder
- -graphId
- -idToRecnoDBConfig
- -init
- May not be called directly.
- -initAfterDecodeForServer
- this method may directly be called after deserialization of
this object
- -initAfterDecodeForServer:graphManager:
- this method may directly be called after deserialization of
this object
- -initForServer
- initializes the receiver
- -initForServer:graphManager:withId:
- initializes the receiver
- -initWithCoder:
- Initializes a newly allocated instance from data in decoder
- -insertNodeToDatabase:
- inserts a node to the database
- -internalStateChanged:
- Updates the persistent state of the given node
- -mountDatabases
- Opens all databases
- -nameOfIdToRecnoDatabase
- -nameOfkeyToGraphInfoDatabase
- -nameOfNodesDatabase
- Name of database mapping a record number to a node's data
- -nameOfObjectToIdMapperDatabase
- -nodeAtRecordNumber:
- fetch the node at the specified record number
- -nodeDBConfig
- -nodeIterator
- -nodeWithId:
- -objectToIdMapper
- -performAction
- Called by the transaction controll in order to run the
transaction
- -recordNumberOfNode:
- -recordNumberOfNodeId:
- -remove
- Removes the complete graph. Does not check wether the
graph (or one of its elements) is still in use. (TODO)
- -removeNode:
- removes the specified node from the graph
- -removeNodeFromDatabase:
- removes the specified node from the database
- -removeNodeFromIdToRecnoDB:
- removed the specified node from the database idToRecnoDB and
returns the record number (value) of the deleted entry.
- -removeNodeWithRecordNumber:
- -serviceWithId
- Fetch a service for the specified id and node
- -serviceWithId:
- Fetch a service for the specified id
- -serviceWithId:forNode:
- Fetch a service for the specified id and node
- -setupDatabases
- Initializes the graph database
- -unmountDatabases
- closes all databases used for this graph
- -updateNode:
- removes the existing node data from the database(s) and adds the
current data of the given node to the database(s)
Call this method if you do not need this instance any more
- (void) close;
Discussion
After this method release may also be called
Creates the (sub) directory for a new graph
- (NSString *) createDatabaseGraphDirectory;
- method result
- name of created directory excluding the base directory path
create a node of a certain node id
- (id <FTNode>) createNodeWithId: (id <FTId>) aNodeId;
- (BOOL) databasesMounted;
- method result
- YES if all databases are mounted.
Encodes the receiver using encoder
- (void) encodeWithCoder: (NSCoder *) coder;
- (id <FTId>) graphId;
- method result
- the identifier of this graph
- (BDBDatabaseConfig *) idToRecnoDBConfig;
- method result
- database configuration for the database "idToNode"
May not be called directly.
- init;
- method result
- self
this method may directly be called after deserialization of
this object
See Also:
- initAfterDecodeForServer:graphManager:
- initAfterDecodeForServer: (FTServerImpl *) theServer graphManager: (FTGraphManagerImpl *) theGraphManager;
Parameter Descriptions
theServer
- reference to underlying server
theGraphManager
- graph manager to use
- method result
- self
this method may directly be called after deserialization of
this object
See Also:
- initAfterDecodeForServer
- initAfterDecodeForServer: (FTServerImpl *) theServer graphManager: (FTGraphManagerImpl *) theGraphManager;
Parameter Descriptions
theServer
- reference to underlying server
theGraphManager
- graph manager to use
initializes the receiver
See Also:
- initForServer:graphManager:withId:
- initForServer: (FTServerImpl *) theServer graphManager: (FTGraphManagerImpl *) theGraphManager withId: (id <FTId>) anId;
Parameter Descriptions
theServer
- reference to the underlying server
anId
- id of this graph
- method result
- self
initializes the receiver
See Also:
- initForServer
- initForServer: (FTServerImpl *) theServer graphManager: (FTGraphManagerImpl *) theGraphManager withId: (id <FTId>) anId;
Parameter Descriptions
theServer
- reference to the underlying server
anId
- id of this graph
Initializes a newly allocated instance from data in decoder
- initWithCoder: (NSCoder *) coder;
inserts a node to the database
- insertNodeToDatabase: (FTNodeImpl *) node;
Parameter Descriptions
node
- to insert
- method result
- self
Discussion
the caller has to make sure that the node is not already to
be found in the database.
Updates the persistent state of the given node
- internalStateChanged: (FTNodeImpl *) nodeToUpdate;
Parameter Descriptions
nodeToUpdate
- node to update in the database
- method result
- self
Opens all databases
- mountDatabases;
- method result
- self
- (NSString *) nameOfIdToRecnoDatabase;
- method result
- return the fully qualified name of the database idToNode
Discussion
must be set before
- (NSString *) nameOfkeyToGraphInfoDatabase;
- method result
- name of the database used to store generic
information related to a graph, such as the identifiers of
all nodes
Name of database mapping a record number to a node's data
- (NSString *) nameOfNodesDatabase;
- (NSString *) nameOfObjectToIdMapperDatabase;
- method result
- return the fully qualified name of the database objectToIdMapper
Discussion
must be set before
fetch the node at the specified record number
- (FTNodeImpl *) nodeAtRecordNumber: (BDBDatabaseRecordNumber *) recno;
Parameter Descriptions
recno
- record number related to database nodeDB
- method result
- fetched node or nil if not existent
- (BDBDatabaseConfig *) nodeDBConfig;
- method result
- database configuration for the node database
- (id <ECIterator>) nodeIterator;
- method result
- iterator over all nodes of the graph
- (id <FTNode>) nodeWithId: (id <FTId>) aNodeId;
- method result
- return the node corresponding to the given identifier
- (id <FTObjectToIdMapper>) objectToIdMapper;
- method result
- mapper for this graph
Called by the transaction controll in order to run the
transaction
- (BOOL) performAction;
- method result
- return information about the success of this operation
- recordNumberOfNode: (FTNodeImpl *) node;
- method result
- returns the record number of a given node.
- recordNumberOfNodeId: (id <FTId>) nodeId;
- method result
- returns the record number of a given node id.
Removes the complete graph. Does not check wether the
graph (or one of its elements) is still in use. (TODO)
- (BOOL) remove;
- method result
- YES if successful, NO otherwise
removes the specified node from the graph
- removeNode: (id <FTNode>) nodeToRemove;
Parameter Descriptions
nodeToRemove
- node to remove
- method result
- self
Discussion
A node can only be removed if it contains no incoming and no
outgoing links
removes the specified node from the database
- removeNodeFromDatabase: (FTNodeImpl *) node;
Parameter Descriptions
node
- to remove
- method result
- self
Discussion
Removes the node from both BDB databases: idToRecnoDB and
nodeDB
removed the specified node from the database idToRecnoDB and
returns the record number (value) of the deleted entry.
- removeNodeFromIdToRecnoDB: (FTNodeImpl *) node;
Parameter Descriptions
node
- to remove. The node will only be removed from the database, not
from memory.
- method result
- the value (record number) of the entry being deleted ir nil
if entry could not be found
- (BOOL) removeNodeWithRecordNumber: (id) recordNumber;
Parameter Descriptions
recordNumber
- specifies the entry to delete. the record number can
be determined for a given node via method recordNumberOfNode.
- method result
- YES if the node has successfully been removed
Fetch a service for the specified id and node
See Also:
- serviceWithId:forNode:
- (id <FTService>) serviceWithId: (NSString *) aServiceId forNode: (FTNodeImpl *) aNode;
Parameter Descriptions
aServiceId
- id of the service
aNode
- particular node for which the service has to been offered
- method result
- the specified service or nil if not existent
Fetch a service for the specified id
- (id <FTService>) serviceWithId: (NSString *) aServiceId;
Parameter Descriptions
aServiceId
- id of the service
- method result
- the specified service or nil if not existent
Fetch a service for the specified id and node
See Also:
- serviceWithId
- (id <FTService>) serviceWithId: (NSString *) aServiceId forNode: (FTNodeImpl *) aNode;
Parameter Descriptions
aServiceId
- id of the service
aNode
- particular node for which the service has to been offered
Initializes the graph database
- setupDatabases;
- method result
- self
Discussion
Has to be called when creating a graph. It creates the
underlying directory and files
closes all databases used for this graph
- unmountDatabases;
- method result
- self
removes the existing node data from the database(s) and adds the
current data of the given node to the database(s)
- updateNode: (FTNodeImpl *) node;
Parameter Descriptions
node
- node to update
- method result
- self
(Last Updated August 27, 2006)