Synergy Home Page

au.edu.swin.synergy.plugin.metamodeller
Class BMetaModel

java.lang.Object
  |
  +--au.edu.swin.synergy.plugin.metamodeller.BMetaModel

public class BMetaModel
extends Object
implements Serializable, BSaveable

class BMetaModel

Author:
Imron Alston, Shane Fitzgibbon
Copyright Belongs To:
 
See Also:
Serialized Form

Field Summary
static int kCircRefRuleViolation
           
static int kConnectionRuleViolation
           
protected static String kDefaultName
           
protected static String kKeyName
           
static int kMaxInRuleViolation
           
static int kMaxOutRuleViolation
           
static int kMaxRuleTypes
           
static int kNoRuleViolation
           
static int kStartRuleTypes
           
 
Constructor Summary
BMetaModel()
          Construct the vectors for the nodes/arcs and rules..
 
Method Summary
 void addMetaArc(BMetaElement theArc)
          Please complete the missing tags for addMetaArc
 void addMetaNode(BMetaElement theNode)
          Please complete the missing tags for addMetaNode
 void addMetaRule(BMetaElement theRule)
          Please complete the missing tags for addMetaRule
 boolean evalCirc(BMetaElement node)
          Evaluates wether circular referenceing for a node is allowed
 boolean evalConnection(BMetaElement arc, BMetaElement startNode, BMetaElement endNode)
          Evaluates wether a connection is allowed to exist
 boolean evalMaxIn(BMetaElement node, BMetaElement arc, int max)
          Evaluates wether the current number of connections coming into a node excedes the allowed maximum
 boolean evalMaxOut(BMetaElement node, BMetaElement arc, int max)
          Evaluates wether the current number of connections going out of a node excedes the allowed maximum
 boolean evalStartConnection(BMetaElement arc, BMetaElement startNode)
          Evaluates wether a connection is allowed to start..
 BMetaElement getMetaArc(String name)
          Please complete the missing tags for getMetaNodes
 int getMetaArcIndex(String name)
           
 Vector getMetaArcs()
          Please complete the missing tags for getMetaArcs
 BMetaElement getMetaNode(String name)
          Please complete the missing tags for getMetaNodes
 int getMetaNodeIndex(String name)
           
 Vector getMetaNodes()
          Please complete the missing tags for getMetaNodes
 BMetaElement getMetaRule(String name)
          Please complete the missing tags for getMetaNodes
 int getMetaRuleIndex(String name)
           
 Vector getMetaRules()
          Please complete the missing tags for getMetaRules
 String getName()
          gets the name of the Meta Model
 boolean load(BDataFile file)
           
 void removeArc(BMetaElement arc)
          Removes the meta arc that is passed in from the metamodel
 void removeNode(BMetaElement node)
          Removes the meta node that is passed in from the metamodel
 void removeRule(BMetaElement rule)
          Removes the meta rule that is passed in from the metamodel
 boolean save(BDataFile file)
           
 void setArc(BMetaElement oldArc, BMetaElement newArc)
          Sets the meta arc that contains the old arc with the new arc
 void setName(String theName)
          Please complete the missing tags for setName
 void setNode(BMetaElement newNode, BMetaElement oldNode)
          Sets the meta node that contains the old node with the new node
 void setRule(BMetaElement oldRule, BMetaElement newRule)
          Sets the meta rule that contains the old rule with the new rule
 void setupRules()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

kNoRuleViolation

public static final int kNoRuleViolation

kMaxInRuleViolation

public static final int kMaxInRuleViolation

kMaxOutRuleViolation

public static final int kMaxOutRuleViolation

kConnectionRuleViolation

public static final int kConnectionRuleViolation

kCircRefRuleViolation

public static final int kCircRefRuleViolation

kStartRuleTypes

public static final int kStartRuleTypes

kMaxRuleTypes

public static final int kMaxRuleTypes

kKeyName

protected static final String kKeyName

kDefaultName

protected static final String kDefaultName
Constructor Detail

BMetaModel

public BMetaModel()
Construct the vectors for the nodes/arcs and rules.. Please complete the missing tags for BMetaModel
Parameters:
-  
Method Detail

getMetaNodes

public Vector getMetaNodes()
Please complete the missing tags for getMetaNodes
Parameters:
-  
Returns:
 
Pre Condition:
 
Post Condition:
 

getMetaNode

public BMetaElement getMetaNode(String name)
Please complete the missing tags for getMetaNodes
Parameters:
-  
Returns:
 
Pre Condition:
 
Post Condition:
 

getMetaNodeIndex

public int getMetaNodeIndex(String name)

getMetaArcs

public Vector getMetaArcs()
Please complete the missing tags for getMetaArcs
Parameters:
-  
Returns:
 
Pre Condition:
 
Post Condition:
 

getMetaArc

public BMetaElement getMetaArc(String name)
Please complete the missing tags for getMetaNodes
Parameters:
-  
Returns:
 
Pre Condition:
 
Post Condition:
 

getMetaArcIndex

public int getMetaArcIndex(String name)

getMetaRules

public Vector getMetaRules()
Please complete the missing tags for getMetaRules
Parameters:
-  
Returns:
 
Pre Condition:
 
Post Condition:
 

getMetaRule

public BMetaElement getMetaRule(String name)
Please complete the missing tags for getMetaNodes
Parameters:
-  
Returns:
 
Pre Condition:
 
Post Condition:
 

getMetaRuleIndex

public int getMetaRuleIndex(String name)

setName

public void setName(String theName)
Please complete the missing tags for setName
Parameters:
-  
Returns:
 
Pre Condition:
 
Post Condition:
 

addMetaNode

public void addMetaNode(BMetaElement theNode)
Please complete the missing tags for addMetaNode
Parameters:
-  
Returns:
 
Pre Condition:
 
Post Condition:
 

addMetaArc

public void addMetaArc(BMetaElement theArc)
Please complete the missing tags for addMetaArc
Parameters:
-  
Returns:
 
Pre Condition:
 
Post Condition:
 

addMetaRule

public void addMetaRule(BMetaElement theRule)
Please complete the missing tags for addMetaRule
Parameters:
-  
Returns:
 
Pre Condition:
 
Post Condition:
 

getName

public String getName()
gets the name of the Meta Model
Returns:
the meta-model name

setNode

public void setNode(BMetaElement newNode,
                    BMetaElement oldNode)
Sets the meta node that contains the old node with the new node
Parameters:
newNode - The node that is to replace the old node
oldNode - The node that is currently in the meta model
Returns:
void
Pre Condition:
The old node must be part of the meta model

setArc

public void setArc(BMetaElement oldArc,
                   BMetaElement newArc)
Sets the meta arc that contains the old arc with the new arc
Parameters:
oldArc - The arc that is currently in the meta model
newArc - The node that is to replace the old node
Returns:
void
Pre Condition:
The old arc must be part of the meta model

setRule

public void setRule(BMetaElement oldRule,
                    BMetaElement newRule)
Sets the meta rule that contains the old rule with the new rule
Parameters:
oldRule - The rule that is currently in the meta model
newRule - The rule that is to replace the old rule
Returns:
void
Pre Condition:
The old rule must be part of the meta model

removeNode

public void removeNode(BMetaElement node)
Removes the meta node that is passed in from the metamodel
Parameters:
the - meta element to be removed form the metamodel

removeArc

public void removeArc(BMetaElement arc)
Removes the meta arc that is passed in from the metamodel
Parameters:
the - meta element to be removed form the metamodel

removeRule

public void removeRule(BMetaElement rule)
Removes the meta rule that is passed in from the metamodel
Parameters:
the - meta element to be removed form the metamodel

load

public boolean load(BDataFile file)
Specified by:
load in interface BSaveable

save

public boolean save(BDataFile file)
Specified by:
save in interface BSaveable

setupRules

public void setupRules()

evalMaxIn

public boolean evalMaxIn(BMetaElement node,
                         BMetaElement arc,
                         int max)
Evaluates wether the current number of connections coming into a node excedes the allowed maximum
Parameters:
node - the node who's connections are being validated
max - the number of connections currently coming into the node

evalMaxOut

public boolean evalMaxOut(BMetaElement node,
                          BMetaElement arc,
                          int max)
Evaluates wether the current number of connections going out of a node excedes the allowed maximum
Parameters:
node - the node who's connections are being validated
max - the number of connections currently going out of the node

evalConnection

public boolean evalConnection(BMetaElement arc,
                              BMetaElement startNode,
                              BMetaElement endNode)
Evaluates wether a connection is allowed to exist
Parameters:
arc - the type of arc that the connection is
startNode - the node that the arc connects from
endNode - the node that the arc connects to

evalStartConnection

public boolean evalStartConnection(BMetaElement arc,
                                   BMetaElement startNode)
Evaluates wether a connection is allowed to start..
Parameters:
arc - the type of arc that the connection is
startNode - the node that the arc connects from

evalCirc

public boolean evalCirc(BMetaElement node)
Evaluates wether circular referenceing for a node is allowed
Parameters:
node - the node to evaulate

Synergy Home Page