wt.tools.metamodel
Class ModelElement

java.lang.Object
  extended bywt.tools.metamodel.ModelElement
All Implemented Interfaces:
Cloneable
Direct Known Subclasses:
Association, ClassClass, ClassMember, Key, PackageClass, PackageDependency, Parameter, Relationship

public abstract class ModelElement
extends Object
implements Cloneable


Field Summary
protected  Store customizations
           
protected static boolean DEBUG
           
private  boolean deferredLoadNeeded
           
protected  String documentation
           
static String LINE_SEPARATOR
           
protected  String name
           
protected static long nextID
           
protected  Properties properties
           
(package private) static String RESOURCE
           
protected  ModelElement source
           
protected  String stereotype
           
protected  Store store
           
protected  SupportedAPIKind supportedAPI
           
protected static boolean TRACE
           
private static Store transientStore
           
protected  String uid
           
 
Constructor Summary
protected ModelElement()
           
protected ModelElement(String theUid)
           
 
Method Summary
protected  void ensureDeferredLoaded()
           
 boolean getBoolean(String item)
           
 boolean getBoolean(String item, boolean defaultValue)
           
 String getCustomization(String item)
           
 String getCustomization(String item, String defaultValue)
           
protected  Store getCustomizations()
           
 String getDocumentation()
           
protected abstract  String getElementCode()
           
 String getName()
           
 ModelElement getOriginalSource()
           
 String getProperty(String item)
           
 String getProperty(String item, boolean ignoreDefaults)
           
 String getProperty(String item, String defaultValue)
           
 String getProperty(String item, String defaultValue, boolean ignoreDefaults)
           
 ModelElement getSource()
           
 String getSourceId()
           
 String getStereotype()
           
 SupportedAPIKind getSupportedAPI()
           
 String getUid()
           
protected  void initialize()
           
protected  void initialize(String theUid)
           
 boolean isDeprecated()
           
protected  void loadCustomizations()
           
protected  void loadFromStore()
           
protected  void loadFromStoreDeferred()
           
 void setBoolean(String item, boolean value)
           
protected  void setDefaults()
           
 void setDocumentation(String newDoc)
           
 void setName(String newName)
           
 void setProperty(String item, String value)
           
 void setSource(ModelElement theSource)
           
 void setStereotype(String newStereotype)
           
(package private)  void setStore(Store newStore)
           
 void setSupportedAPI(SupportedAPIKind supportedAPIKind)
           
 void setUid(String newUid)
           
protected  Store store()
           
protected static Store storeForPackage(String packageName)
           
 String toString()
           
protected  void transferProperty(String name, ModelElement source)
           
protected  void writeToStore()
           
protected  void writeToStore(Enumeration collection, String propertyName)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

RESOURCE

static final String RESOURCE
See Also:
Constant Field Values

DEBUG

protected static final boolean DEBUG

TRACE

protected static final boolean TRACE

LINE_SEPARATOR

public static final String LINE_SEPARATOR

nextID

protected static long nextID

uid

protected String uid

name

protected String name

stereotype

protected String stereotype

documentation

protected String documentation

source

protected ModelElement source

properties

protected Properties properties

store

protected Store store

customizations

protected Store customizations

supportedAPI

protected SupportedAPIKind supportedAPI

transientStore

private static Store transientStore

deferredLoadNeeded

private boolean deferredLoadNeeded
Constructor Detail

ModelElement

protected ModelElement()

ModelElement

protected ModelElement(String theUid)
Method Detail

ensureDeferredLoaded

protected void ensureDeferredLoaded()

getBoolean

public boolean getBoolean(String item)

getBoolean

public boolean getBoolean(String item,
                          boolean defaultValue)

getCustomization

public String getCustomization(String item)

getCustomization

public String getCustomization(String item,
                               String defaultValue)

getCustomizations

protected Store getCustomizations()

getDocumentation

public String getDocumentation()

getElementCode

protected abstract String getElementCode()

getName

public String getName()

getOriginalSource

public ModelElement getOriginalSource()

getProperty

public String getProperty(String item)

getProperty

public String getProperty(String item,
                          String defaultValue)

getProperty

public String getProperty(String item,
                          String defaultValue,
                          boolean ignoreDefaults)

getProperty

public String getProperty(String item,
                          boolean ignoreDefaults)

getSource

public ModelElement getSource()

getSourceId

public String getSourceId()

getStereotype

public String getStereotype()

getSupportedAPI

public SupportedAPIKind getSupportedAPI()

getUid

public String getUid()

initialize

protected void initialize()

initialize

protected void initialize(String theUid)

loadCustomizations

protected void loadCustomizations()
                           throws WTException
Throws:
WTException

loadFromStore

protected void loadFromStore()
                      throws WTException
Throws:
WTException

loadFromStoreDeferred

protected void loadFromStoreDeferred()

setBoolean

public void setBoolean(String item,
                       boolean value)

setDefaults

protected void setDefaults()

setDocumentation

public void setDocumentation(String newDoc)

setName

public void setName(String newName)

setProperty

public void setProperty(String item,
                        String value)

setSource

public void setSource(ModelElement theSource)

setStereotype

public void setStereotype(String newStereotype)

setStore

void setStore(Store newStore)

setSupportedAPI

public void setSupportedAPI(SupportedAPIKind supportedAPIKind)

setUid

public void setUid(String newUid)

store

protected Store store()

storeForPackage

protected static Store storeForPackage(String packageName)
                                throws FileNotFoundException,
                                       IOException
Throws:
FileNotFoundException
IOException

isDeprecated

public boolean isDeprecated()

toString

public String toString()

transferProperty

protected void transferProperty(String name,
                                ModelElement source)

writeToStore

protected void writeToStore()

writeToStore

protected void writeToStore(Enumeration collection,
                            String propertyName)