Synergy Home Page

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

java.lang.Object
  |
  +--au.edu.swin.synergy.plugin.metamodeller.BMetaElement
Direct Known Subclasses:
BMetaArc, BMetaNode, BMetaRule

public class BMetaElement
extends Object
implements Serializable, BSaveable

class BMetaElement

Author:
Imron Alston
Copyright Belongs To:
 
See Also:
Serialized Form

Field Summary
protected static String kDefaultName
           
protected static String kKeyName
           
protected static String kKeyProperty
           
protected  String name
          the name/identifier of this metaelement *
protected  Vector properties
          the list of properties (string ids only) belonging to this meta-element *
 
Constructor Summary
BMetaElement()
          Construct the metaelement..
 
Method Summary
 void addProperty(String theProperty)
          Removes the property from the elements list of properties.
 boolean equals(Object target)
          This will determine whether the given BMetaElement is the same as this meta element.
 String getName()
          Gets the name of the meta-element
 Vector getProperties()
          This will provide access to the properties of this meta element
 void insertPropertyAt(String theProperty, int index)
          Inserts the given property in the list at the index specified.
 boolean load(BDataFile file)
           
 void removeProperty(String theProperty)
          Removes the property from the elements list of properties.
 void removePropertyAt(int propertyIndex)
          Removes the property from the elements list of properties at the given index.
 void resetProperties()
          Resets the Meta Element.
 boolean save(BDataFile file)
           
 void setName(String theName)
          Sets the name of the meta-element Please complete the missing tags for setName
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

name

protected String name
the name/identifier of this metaelement *

properties

protected Vector properties
the list of properties (string ids only) belonging to this meta-element *

kKeyName

protected static final String kKeyName

kDefaultName

protected static final String kDefaultName

kKeyProperty

protected static final String kKeyProperty
Constructor Detail

BMetaElement

public BMetaElement()
Construct the metaelement.. Please complete the missing tags for BMetaElement
Parameters:
-  
Method Detail

setName

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

getName

public String getName()
Gets the name of the meta-element
Returns:
The name of this meta element

toString

public String toString()
Overrides:
toString in class Object

addProperty

public void addProperty(String theProperty)
Removes the property from the elements list of properties.
Parameters:
The - property to remove
Pre Condition:
 
Post Condition:
 

resetProperties

public void resetProperties()
Resets the Meta Element. It clears all the properties

insertPropertyAt

public void insertPropertyAt(String theProperty,
                             int index)
Inserts the given property in the list at the index specified.
Parameters:
theProperty - The property to remove
index - The index to insert the property at
Pre Condition:
 
Post Condition:
 

removePropertyAt

public void removePropertyAt(int propertyIndex)
Removes the property from the elements list of properties at the given index.
Parameters:
propertyIndex - The index of the property to remove
Pre Condition:
 
Post Condition:
 

removeProperty

public void removeProperty(String theProperty)
Removes the property from the elements list of properties.
Parameters:
theProperty - The property to remove
Pre Condition:
 
Post Condition:
 

getProperties

public Vector getProperties()
This will provide access to the properties of this meta element
Returns:
Vector of string ids???

equals

public boolean equals(Object target)
This will determine whether the given BMetaElement is the same as this meta element. This based on the name of the meta element as well as the properties it contains.

This is not limited to referential comparisons, that is, one meta element may be created based on one file and another from a different file, (ie. they are two separate instances in memory), yet will still be treated as equal if their members match.

Parameters:
target - The target element to compare
Overrides:
equals in class Object

load

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

save

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

Synergy Home Page