com.ashridgetech.jamda.uml
Class ModelPackage

java.lang.Object
  |
  +--com.ashridgetech.jamda.uml.ModelElement
        |
        +--com.ashridgetech.jamda.uml.ModelPackage

public class ModelPackage
extends ModelElement

A UML Package, which may contain other packages.

Version:
1.0
Author:
paulb

Nested Class Summary
 
Nested classes inherited from class com.ashridgetech.jamda.uml.ModelElement
ModelElement.DuplicateElementException, ModelElement.ElementListStore, ModelElement.ElementNameListStore, ModelElement.ElementNameStore, ModelElement.ElementStore, ModelElement.TaggedValue, ModelElement.UnknownElementException
 
Field Summary
 
Fields inherited from class com.ashridgetech.jamda.uml.ModelElement
DUMMY_STORE
 
Constructor Summary
  ModelPackage(ModelPackage parentPackage, java.lang.String name)
          Creates new ModelPackage belonging to another ModelPackage.
  ModelPackage(Model parentModel, java.lang.String name)
          Creates new ModelPackage belonging to a Model.
protected ModelPackage(ru.novosoft.uml.model_management.MPackage mp, Model parentModel)
          Creates new ModelPackage during loading.
protected ModelPackage(ru.novosoft.uml.model_management.MPackage mp, ModelPackage parentPackage)
          Creates new ModelPackage during loading.
 
Method Summary
 void checkValid()
          Check whether this object is valid.
 ClassType getClass(java.lang.String name)
          Get the ClassType defined directly within this ModelPackage with a given name
 java.util.Collection getClasses()
          Get the ClassTypes which are defined directly within this ModelPackage.
 DataType getDataType(java.lang.String name)
          Get the DataType defined within this ModelPackage with a given name
 java.util.Collection getDataTypes()
          Get the DataTypes which are defined within this ModelPackage.
 InterfaceType getInterface(java.lang.String name)
          Get the InterfaceType defined directly within this ModelPackage with a given name
 java.util.Collection getInterfaces()
          Get the InterfaceTypes which are defined directly within this ModelPackage.
 Model getParentModel()
          Get the Model which directly contains this one, if this Package is not contained by another Package.
 ModelPackage getParentPackage()
          Get the Package which contains this one, if any.
protected  ModelElement.ElementStore getSubElementStore(java.lang.Class meClass)
          Overridden to return the sub-element ModelElement.ElementStore into which an object of the class meClass should be stored.
 ModelPackage getSubPackage(java.lang.String name)
          Get the subpackage of this ModelPackage with a given name
 java.util.Collection getSubPackages()
          Get the ModelPackages which are subpackages of this one.
 
Methods inherited from class com.ashridgetech.jamda.uml.ModelElement
add, addStereotype, addTaggedValue, addTaggedValue, addTaggedValues, addTaggedValuesInternal, checkInitialised, checkState, findTaggedValueCollection, getBooleanTaggedValue, getChildElements, getComment, getDescription, getDirectSource, getElement, getElementType, getFullName, getId, getModel, getName, getNsElement, getOriginalSource, getParentElement, getProperties, getStereotypes, getStringTaggedValue, getTaggedValue, getTaggedValues, getXpathContext, hasStereotype, hasTaggedValue, init, initLoad, isInitialised, load, load, load, loadElement, logChange, logger, logger, logLoad, logLoadWarning, logNew, logWarning, removeTaggedValue, select, setComment, setDirectSource, setTaggedValue, setTaggedValue, setTaggedValue, setTaggedValues, stereotype, tag, tagError, toString, type, type, type, xpath, xpathList
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ModelPackage

public ModelPackage(Model parentModel,
                    java.lang.String name)
Creates new ModelPackage belonging to a Model.


ModelPackage

public ModelPackage(ModelPackage parentPackage,
                    java.lang.String name)
Creates new ModelPackage belonging to another ModelPackage.


ModelPackage

protected ModelPackage(ru.novosoft.uml.model_management.MPackage mp,
                       Model parentModel)
Creates new ModelPackage during loading.


ModelPackage

protected ModelPackage(ru.novosoft.uml.model_management.MPackage mp,
                       ModelPackage parentPackage)
Creates new ModelPackage during loading.

Method Detail

getParentPackage

public ModelPackage getParentPackage()
Get the Package which contains this one, if any.

Returns:
the Package, or null if there is no containing Package
See Also:
getParentModel()

getParentModel

public Model getParentModel()
Get the Model which directly contains this one, if this Package is not contained by another Package.

See Also:
#getModel

getSubPackages

public java.util.Collection getSubPackages()
Get the ModelPackages which are subpackages of this one.

Returns:
an unmodifiable list of ModelPackage objects

getSubPackage

public ModelPackage getSubPackage(java.lang.String name)
Get the subpackage of this ModelPackage with a given name

Parameters:
name - the name of the required ModelPackage
Returns:
the ModelPackage whose name is name, or null if there is no such object

getDataTypes

public java.util.Collection getDataTypes()
Get the DataTypes which are defined within this ModelPackage.

Returns:
an unmodifiable list of DataType objects

getDataType

public DataType getDataType(java.lang.String name)
Get the DataType defined within this ModelPackage with a given name

Parameters:
name - the name of the required DataType
Returns:
the DataType whose name is name, or null if there is no such object

getClasses

public java.util.Collection getClasses()
Get the ClassTypes which are defined directly within this ModelPackage.

Returns:
an unmodifiable list of ClassType objects

getClass

public ClassType getClass(java.lang.String name)
Get the ClassType defined directly within this ModelPackage with a given name

Parameters:
name - the name of the required ClassType
Returns:
the ClassType whose name is name, or null if there is no such object

getInterfaces

public java.util.Collection getInterfaces()
Get the InterfaceTypes which are defined directly within this ModelPackage.

Returns:
an unmodifiable list of InterfaceType objects

getInterface

public InterfaceType getInterface(java.lang.String name)
Get the InterfaceType defined directly within this ModelPackage with a given name

Parameters:
name - the name of the required InterfaceType
Returns:
the InterfaceType whose name is name, or null if there is no such object

checkValid

public void checkValid()
                throws java.lang.IllegalStateException
Check whether this object is valid. Subclasses should call the superclass method if they override this method.

Overrides:
checkValid in class ModelElement
Throws:
java.lang.IllegalStateException - if a problem is found

getSubElementStore

protected ModelElement.ElementStore getSubElementStore(java.lang.Class meClass)
Overridden to return the sub-element ModelElement.ElementStore into which an object of the class meClass should be stored.

Overrides:
getSubElementStore in class ModelElement
Returns:
the store to use, or the superclass implementation if the class of the object is not stored by this class.


Copyright © 2003 Ashridge Technologies Ltd. All Rights Reserved.