| org.mmbase.bridge.RelationManager
All known Subclasses: org.mmbase.bridge.implementation.BasicRelationManager,
RelationManager | public interface RelationManager extends NodeManager(Code) | | This interface represents a relation constraint (or contex, if you like).
More specifically, it represents a relation manager (itself a node manager) as it applies between bnode belonging to
two other node managers.
Some of the information here is retrieved from the NodeManager used to build the catual relation node
(the data as described in the xml builder config file). This NodeManager is also referred to as the parent.
Other data is retrieved from a special (hidden) object that decsribes what relations apply between two nodes.
(formerly known as the TypeRel builder).
This includes direction and cardinality, and the NodeManagers of nodes itself. These fields cannot be changed
except through the use of an administration module.
This interface is therefore not a real mmbase 'object' in itself - it exists of two objects joined together.
author: Rob Vermeulen author: Pierre van Rooden version: $Id: RelationManager.java,v 1.9 2007/11/28 15:09:55 michiel Exp $ |
BIDIRECTIONAL | final public static int BIDIRECTIONAL(Code) | | Directionality constant : bi-directional
|
UNIDIRECTIONAL | final public static int UNIDIRECTIONAL(Code) | | Directionality constant : uni-directional
|
createRelation | public Relation createRelation(Node sourceNode, Node destinationNode)(Code) | | Adds a relation from this type.
Parameters: sourceNode - the node from which you want to relate Parameters: destinationNode - the node to which you want to relate the added relation |
createRelation | public Relation createRelation(Node sourceNode, RelationManager relationManager)(Code) | | This method from Node is redeclared here to prevent an ambiguous invocation of method.
reson: the the method in the base class (Node) is more specific than the one in the RelationManager
(RelationManager extends Node).
Parameters: sourceNode - source node of the relation Parameters: relationManager - relation manager of the relation new Relation |
getDestinationManager | public NodeManager getDestinationManager()(Code) | | Retrieves the type of node that can act as the destination of a relation of this type.
the destination NodeManager |
getDirectionality | public int getDirectionality()(Code) | | Retrieves the directionality for this type (the default assigned to a new relation).
one of the directionality constants |
getForwardGUIName | public String getForwardGUIName()(Code) | | Retrieves the gui name (prompt) of the role from source to destination
the name as a String |
getForwardRole | public String getForwardRole()(Code) | | Retrieves the role of the source to the destination
the role as a String |
getReciprocalGUIName | public String getReciprocalGUIName()(Code) | | Retrieves the gui name (prompt) of the role from destination to source
the name as a String |
getReciprocalRole | public String getReciprocalRole()(Code) | | Retrieves the role of the destination to the source
the role as a String |
getRelations | public RelationList getRelations(Node node)(Code) | | Retrieves all the relations of this type from a given node.
This method returns all relations of a certain node not considering role, source
manager and destination manager, but only the builder of relation (e.g. it queries either
insrel, or an extension thereof).
See
Node.getRelations(StringNodeManagerString) .
Parameters: node - the node from which to give the relations a list of relations |
getSourceManager | public NodeManager getSourceManager()(Code) | | Retrieves the NodeManager of node that can act as the source of a relation of this type.
the source NodeManager |
mayCreateRelation | public boolean mayCreateRelation(Node sourceNode, Node destinationNode)(Code) | | Check if the current user may create a new relation of this type between
the specified nodes.
Parameters: sourceNode - source node of the relation Parameters: destinationNode - destination node of the relation Check if the current user may create a new relation of this typebetween the specified nodes. |
|
|