|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Object
|
+--org.mmbase.module.core.MMTable
|
+--org.mmbase.module.core.MMObjectBuilder
|
+--org.mmbase.module.corebuilders.TypeRel
TypeRel defines the allowed relations between two object types.
| Fields inherited from class org.mmbase.module.core.MMObjectBuilder |
broadcastChanges, className, database, debug, description, descriptions, fields, NODE_MAX_SIZE, nodeCache, obj2type, OBJ2TYPE_MAX_SIZE, oType, replaceCache, searchAge, sortedDBLayout, TEMPNODE_DEFAULT_SIZE, TemporaryNodes, virtual |
| Fields inherited from class org.mmbase.module.core.MMTable |
mmb, tableName |
| Constructor Summary | |
TypeRel()
Constructor for the TypeRel builder |
|
| Method Summary | |
java.util.Enumeration |
getAllowedRelations(int number)
Retrieves all relations which are 'allowed' for a specified node, that is, where the node is either allowed to be the source, or to be the destination (but where the corresponding relation definition is bidirectional). |
java.util.Enumeration |
getAllowedRelations(int snum,
int dnum)
Retrieves all relations which are 'allowed' between two specified nodes. |
java.util.Enumeration |
getAllowedRelations(MMObjectNode mmnode)
Retrieves all relations which are 'allowed' for a specified node, that is, where the node is either allowed to be the source, or to be the destination (but where the corresponing relation definition is bidirectional). |
java.util.Enumeration |
getAllowedRelations(MMObjectNode n1,
MMObjectNode n2)
Retrieves all relations which are 'allowed' between two specified nodes. |
java.util.Vector |
getAllowedRelationsNames(int number1,
int number2)
Retrieves all relations which are 'allowed' between two specified nodes. |
java.util.Enumeration |
getAllowedRelationsTable(int number)
Memory version of getAllowedRelations |
java.util.Enumeration |
getAllowedRelationsTable(int snum,
int dnum)
Memory version of getAllowedRelations |
java.util.Vector |
getAllowedRelationsTypes(int snum,
int dnum)
For use with MultiRelations Retrieves all reldef nodes for relations which are 'allowed' between two specified nodes. |
int |
getAllowedRelationType(int snum,
int dnum)
Retrieves the identifying number of the relation definition that is 'allowed' between two specified node types. |
java.util.Vector |
getAllowedRelationTypes(int snum,
int dnum)
Retrieves all reldef node numbers for relations which are 'allowed' between two specified nodes. |
java.lang.String |
getGUIIndicator(MMObjectNode node)
Returns the display string for this node It returns a commbination of objecttypes and rolename : "source->destination (role)". |
java.lang.String |
getGUIIndicator(java.lang.String field,
MMObjectNode node)
Returns the display string for a specified field. |
java.util.Vector |
getList(scanpage sp,
StringTagger tagger,
java.util.StringTokenizer tok)
Processes the BUILDER-typerel-ALLOWEDRELATIONSNAMES in the LIST command, and (possibly) returns a Vector containing requested data (based on the content of TYPE and NODE, which can be retrieved through tagger). |
boolean |
init()
Initialize this builder and load the caches |
int |
insert(java.lang.String owner,
MMObjectNode node)
Insert a new object (content provided) in the cloud, including an entry for the object alias (if provided). |
boolean |
nodeChanged(java.lang.String machine,
java.lang.String number,
java.lang.String builder,
java.lang.String ctype)
Watch for changes on relation types and adjust our memory table accordingly |
boolean |
nodeLocalChanged(java.lang.String machine,
java.lang.String number,
java.lang.String builder,
java.lang.String ctype)
Called when a local node is changed. |
boolean |
nodeRemoteChanged(java.lang.String machine,
java.lang.String number,
java.lang.String builder,
java.lang.String ctype)
Called when a remote node is changed. |
boolean |
reldefCorrect(int n1,
int n2,
int r)
Checks whether a specific relation exists. |
void |
removeNode(MMObjectNode node)
Remove a node from the cloud. |
| Methods inherited from class org.mmbase.module.core.MMTable |
size |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public TypeRel()
| Method Detail |
public boolean init()
init in class MMObjectBuilderorg.mmbase.module.core.MMObjectBuilderMMObjectBuilder.create()
public int insert(java.lang.String owner,
MMObjectNode node)
MMObjectBuilder.preCommit(org.mmbase.module.core.MMObjectNode).insert in class MMObjectBuilderowner - The administrator creating the nodenode - The object to insert. The object need be of the same type as the current builder.int value which is the new object's unique number, -1 if the insert failed.public void removeNode(MMObjectNode node)
removeNode in class MMObjectBuildernode - The node to remove.public java.util.Enumeration getAllowedRelations(MMObjectNode mmnode)
mmnode - The node to retrieve the allowed relations of.Enumeration of nodes containing the typerel relation datapublic java.util.Enumeration getAllowedRelations(int number)
number - The number of the node to retrieve the allowed relations of.Enumeration of nodes containing the typerel relation datapublic java.util.Enumeration getAllowedRelationsTable(int number)
public java.util.Enumeration getAllowedRelations(int snum,
int dnum)
n1 - The first objectnode (the source)n2 - The second objectnode (the destination)Enumeration of nodes containing the typerel relation data
public java.util.Enumeration getAllowedRelationsTable(int snum,
int dnum)
public int getAllowedRelationType(int snum,
int dnum)
snum - The first objectnode type (the source)dnum - The second objectnode type (the destination)
public java.util.Vector getAllowedRelationTypes(int snum,
int dnum)
n1 - The number of the first objectnode (the source)n2 - The number of the second objectnode (the destination)Vector of Integers containing the reldef object node numbers
public java.util.Vector getAllowedRelationsTypes(int snum,
int dnum)
n1 - The number of the first objectnode (the source)n2 - The number of the second objectnode (the destination)Vector of Integers containing the reldef object node numbers
public java.util.Enumeration getAllowedRelations(MMObjectNode n1,
MMObjectNode n2)
n1 - The first objectnode (the source)n2 - The second objectnode (the destination)Enumeration of nodes containing the typerel relation datapublic java.lang.String getGUIIndicator(MMObjectNode node)
getGUIIndicator in class MMObjectBuildernode - Node from which to retrieve the dataString describing the content of the node
public java.lang.String getGUIIndicator(java.lang.String field,
MMObjectNode node)
getGUIIndicator in class MMObjectBuilderfield - The name of the field to retrievenode - Node from which to retrieve the dataString describing the content of the field
public java.util.Vector getList(scanpage sp,
StringTagger tagger,
java.util.StringTokenizer tok)
getList in class MMObjectBuilderorg.mmbase.module.core.MMObjectBuildersp - The scanpage (containing http and user info) that calls the functiontagger - a Hashtable of parameters (name-value pairs) for the commandtok - a list of strings that describe the (sub)command to executeVector containing the result values as a String
public boolean reldefCorrect(int n1,
int n2,
int r)
n1 - Number of the source noden2 - Number of the destination noder - Number of the relation definitionboolean indicating success when the relation exists, failure if it does not.
public java.util.Vector getAllowedRelationsNames(int number1,
int number2)
snum - The first objectnode type (the source)dnum - The second objectnode type (the destination)Enumeration of nodes containing the reldef (not typerel!) sname field
public boolean nodeRemoteChanged(java.lang.String machine,
java.lang.String number,
java.lang.String builder,
java.lang.String ctype)
MMObjectBuildernodeRemoteChanged in interface MMBaseObservernodeRemoteChanged in class MMObjectBuilderorg.mmbase.module.core.MMObjectBuildermachine - Name of the machine that changed the node.number - Number of the changed node as a Stringbuilder - type of the changed nodectype - command type, 'c'=changed, 'd'=deleted', 'r'=relations changed, 'n'=newtrue
public boolean nodeLocalChanged(java.lang.String machine,
java.lang.String number,
java.lang.String builder,
java.lang.String ctype)
MMObjectBuildernodeLocalChanged in interface MMBaseObservernodeLocalChanged in class MMObjectBuilderorg.mmbase.module.core.MMObjectBuildermachine - Name of the machine that changed the node.number - Number of the changed node as a Stringbuilder - type of the changed nodectype - command type, 'c'=changed, 'd'=deleted', 'r'=relations changed, 'n'=newtrue
public boolean nodeChanged(java.lang.String machine,
java.lang.String number,
java.lang.String builder,
java.lang.String ctype)
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||