Poseidon for UMLTM
  UMLdoc
 PREV  CLASSIFIER    NEXT  CLASSIFIER     FRAMES    NO FRAMES      
SUMMARY:   INNER | ATTR | ASSOC | CONSTR | METHOD     DETAIL:   INNER | ATTR | ASSOC | CONSTR | METHOD     DIAGRAMS:   COLLAB | SEQ | STATE | ACTIV

com.gentleware.poseidon.uml.model_management

Class Uml1SmAccessory

com.gentleware.poseidon.uml.model_management.Uml1SmAccessory
All known implemented Interfaces:
SmAccessory


public class Uml1SmAccessory



 Attribute Summary
private static String  GENTLEWARE_PREFIX
 
public static String  JAVADOG_TAG_ORIGINAL_TYPE
 
public static Set  PARAMETER_KINDS_IN_OUT
 
public static Set  PARAMETER_KINDS_RETURN
 
public static String  PORT_CLASS_PREFIX
 
public static String  STEREOTYPE_ACCESSOR
 
public static String  STEREOTYPE_ASSEMBLY_CONNECTOR
 
public static String  STEREOTYPE_CREATE
 
public static String  STEREOTYPE_DELEGATION_CONNECTOR
 
public static String  STEREOTYPE_DESTROY
 
public static String  STEREOTYPE_ENUMERATION
 
public static String  STEREOTYPE_IMPORT
 
public static String  STEREOTYPE_PORT
 
public static String  STEREOTYPE_PRIMARY_CLASS
 
public static String  STEREOTYPE_READ_ONLY
 
public static String  STEREOTYPE_REALIZE
 
public static String  STEREOTYPE_SINGLETON
 
public static String  STEREOTYPE_SOURCE_CODE_COMMENT
Stereotype to mark comment as a comment inside of an imported classifier  
public static String  STEREOTYPE_SOURCE_FILE_COMMENT
Stereotype to mark comment as a comment outside of an imported classifier (between classes)  
public static String  STEREOTYPE_TYPE_UNQUALIFIED
 
public static String  STEREOTYPE_USE
 
public static String  STEREOTYPE_UTILITY
 
private int  SUBTYPES
 
private int  SUPERTYPES
 
public static String  TAGGED_VALUE_IMPORTED_LINE_NUMBER
 
public static String  TAGGED_VALUE_IMPORTED_PACKAGE_STATEMENT_LINE_NUMBER
 
public static String  TAG_DEFINITION_INITIAL_VALUE
 
public static String  TAG_DEFINITION_IS_BEHAVIOR
 
public static String  TAG_DEFINITION_IS_SERVICE
 
public static String  TAG_DEFINITION_JAVA_SOURCECODE_COLLECTION_TYPE
 
public static String  TAG_DEFINITION_LOGICAL_SOURCEROOT
 
public static String  TAG_DEFINITION_NATIVE
 
public static String  TAG_DEFINITION_STRICTFP
 
private static Set  _hiddenStereotypeNames
 
private Map  _visitedAssocEndMap
 
private List  _visitedElements
 
public int  ctr
 
arrow_up
 

 Association Summary
private UmlProject  _project
 
public PreparedClassifier  preparedClassifier
 
arrow_up
 

 Constructor Summary
public   Uml1SmAccessory(UmlProject umlProject)
 
arrow_up
 

 Method Summary
private static void   __initializer()
 
public static boolean   addHiddenStereotypeName(String name)
 
public void   calculateDependentAssociations(Classifier cls, Collection associationsToBeRemoved, Collection associationEndsToBeRemoved)
Looks at the association-Ends of a classifier that is to be deleted, and puts the associations that have to be deleted completely into one collection, and the association-ENDS that have to be removed into another  
public void   checkExpressionIntegrity(Model model)
 
private boolean   checkInsertRule(RefObject modelElement, boolean includeNonNamespacedElements)
 
public void   clearVisits()
 
public SmId   createType(String desiredModelElementName, SmId createLocationSmId, MacroCommand accuCommand, Class desiredModelElementClass, SmId newCreatedElementSmId)
 
public SmId   createTypeFromProfile(RefObject classifier, MacroCommand accuCommand, SmId newCreatedElementSmId)
 
public boolean   doesConflict(Operation operationFromSubclass, Operation operationFromSuperclass)
 
public static DiagramElementImpl   findDiagramElementToAttachLinkTo(DiagramElementImpl diagramElement, Project project)
 
private Object   findFirstCommonObject(List objects1, List objects2)

Returns the first object which both lists have in common at the same index-position. 

public Collection   findLinkingAssociation(Classifier source, Classifier target)
 
public Transition   findLinkingTransition(StateVertex source, StateVertex target)
 
public SmId   findOrCreateType(String desiredModelElementName, SmId createLocationSmId, MacroCommand accuCommand, Class desiredModelElementClass, SmId newCreatedElementSmId)
 
public SmId   findOrCreateType(String desiredModelElementName, SmId createLocationSmId, MacroCommand accuCommand, Class desiredModelElementClass, Class onlyLookIn, SmId newCreatedElementSmId)
Finds a modelelement with the given name in the project. 
public StateMachine   findStateMachineForState(StateVertex state)
 
public RefObject   findTypeInAnyModel(String desiredClassifier, Class desiredType)
 
public RefObject   findTypeInAnyModel(String desiredClassifier, Class desiredType, Class onlyLookIn)
 
public ModelElement   findTypeInModel(String name, Model model, Class desiredType)
Find element of desired type in given model by searching only through namespaces. 
public ModelElement   findTypeInModel(String name, Model model, Class desiredType, Class onlyLookIn)
Find element of desired type in given model by searching only in specified elements. 
public RefObject   findTypeInProfile(String desiredElement, Class desiredType, String profileKey)
Find a classifier of a given type in a given profile. 
public ModelElement   findTypeInProfile(String desiredClassifier, Class desiredType, Profile profile)
 
public ModelElement   findTypeInProfiles(String desiredClassifier, Class desiredType)
 
public String   formatNameforCode(String elementName)
Replaces blanks, tabs, and line feeds with underscores; cuts away leading blanks. 
public String   generateFullyQualifiedJavaName(Classifier classifier)

Returns the fully qualified java name of the given classifier. 

public String   generateJavaPackageName(ModelElement me)
Produces the path to the element, excluding the model, and separating packages with dots. 
public String   generateJavaPackagePath(ModelElement me)
Produces the path to the element, excluding the model and excluding the element itself, and separating packages with dots. 
public String   generateOperationSignature(Operation op)
Generate methods' signature in shortened uml notation, used for tabConstraints. 
public static Collection   getAbstractions(Classifier cls)
Finds all abstraction (realization!) connections (egdes, not nodes!!) of this classifier to the implemented interfaces. 
public Collection   getActivityGraphs(ModelElement target)
 
public Collection   getAllArgumentsOfParameter(Parameter param)
Returns all arguments of the given parameter. 
public Collection   getAllClassesAndInterfaces(RefObject packageObject)
 
public Collection   getAllClassifierInState()
 
public static Collection   getAllClassifiers(Namespace namespace, boolean recursice)
Returns all classifiers of the namespace, including inner classifiers  
public Collection   getAllContainedElements(RefObject modelElement)
returns a collection of all modelelements that are somehow contained inside the modelelement, but only those that are "interesting" for the enterprise-edition, e.g. 
private void   getAllContainedElements(RefObject container, Collection elements)
 
public static Collection   getAllElementsByType(Namespace namespace, Class classtype)
Returns a collection of all defined elements of a certain class (classtype: f.e. 
private Collection   getAllHierarchyTypes(Classifier cls, int which)
Internal method that is used by #getAllSupertypes(Classifier) and by #getAllSubtypes(Classifier) - depending on the which-parameter  
public Collection   getAllModels()
 
public static Collection   getAllModels(RefPackage m1Uml14Extent)
 
public Collection   getAllNamespaces()
 
public static Collection   getAllPackages(UmlPackage umlPackage, boolean recursive)
Returns all packages of the a package. 
public Collection   getAllPortsWithType(Classifier type)
 
public static Collection   getAllStereotypes(Namespace namespace)
Returns a collection of all defined collaborations in the given namespace and recursively all owned namespaces. 
public Collection   getAllSubtypes(Classifier cls)
 
public Collection   getAllSupertypes(Classifier cls)
This method returns all Classifiers of which this class is a direct or indirect subtype. 
public Collection   getAllSupertypesAndSpecifications(Classifier cls)
Returns all Classifiers of which this class is a direct or indirect subtype or specification. 
public Collection   getAnnotatedElement(Comment target)
 
public Argument   getArgumentOfParameter(Parameter parameter, Action targetAction)
Returns the actual argument of a parameter within the context of an action  
public Collection   getArguments(Binding bind)
Iterates through the template arguments of the binding and collects their model elements. 
public Namespace   getAsNamespace(DiagramElement diagramElement)
 
public List   getAssociateEnds(Classifier classifier)
This method returns all opposite AssociationEnds of a given Classifier  
public Collection   getAssociateEndsInh(Classifier classifier)
This method returns all opposite AssociationEnds of a given Classifier, including inherited. 
public Collection   getAssociation(Classifier target)
 
public Collection   getAssociationEndClassifiers(UmlAssociation assoc)
Returns a list of all classifiers that are connected with this association. 
public AssociationRole   getAssociationRole(AssociationEndRole target)
 
public List   getAssociations(Classifier target)
Builds a list containing all ASSOCIATIONS that connect this classifier. 
public static List   getAttributes(Classifier classifier)
This method returns all attributes of a given Classifier. 
public Collection   getAttributesInh(Classifier classifier)
This method returns all attributes of a given Classifier, including inherited. 
private Collection   getAttributesInhInternal(Classifier classifier, Set visitedClassifiers)
 
public AssociationEnd   getAvailableAssociationEnd(Classifier sourceClassifier, SmId targetSmId, Multicity multicity)
 
public Collection   getBehavior(ModelElement target)
Finds the StateMachines to a ModelElement. 
public Binding   getBindingOfArgument(Argument argument)
Returns the binding of an argument. 
public Binding   getBindingOfParameter(Parameter param)
Returns the binding of the given parameter. 
public Collection   getBindings(ModelElement element)
Returns the bindings for the given model element. 
public Collection   getCallAction(Operation target)
 
public Collection   getChildren(GeneralizableElement parent)
Returns all generalizable elements playing the child role, given the parent generalizable element  
public Collection   getClassifierInState(Classifier target)
 
public Collection   getClassifierRole(Classifier target)
 
public Collection   getClientDependency(ModelElement target)
 
public RefObject   getClosestCommonContainer(List modelElements, boolean includeNonNamespacedElements, boolean acceptSelf)

Finds the first container which contains all of the given model-elements. 

public ModelElement   getClosestOwnerExcept(ModelElement modelElement, Class excludeThisOwnerType)
This method returns the closest owner of a modelelement that is NOT of type excludeThisOwnerType. 
public ModelElement   getClosestOwnerOfType(ModelElement modelElement, Collection acceptableTypes)
Another nice helper method. 
public SmId   getClosestOwnerThatIsNotAClassifier(SmId diagramOwnerId)
Assures that the returned ID is the ID of a namespace that is not a classifier. 
public Collection   getCollaboration(Classifier target)
 
public String   getConstraintExpression(Constraint constraint)
 
public List   getContainedDiagrams(RefObject modelElement)
 
public Collection   getContext(Signal target)
 
public String   getDataValue(TaggedValue taggedValue)
Returns data value of tagged value, if there is exactly one data value. 
public static Collection   getDiElementsToLinkTo(Collection diElements, Project project)
 
public List   getDiIds(List xmiIds)
converts a xmiId-list to a local diId-list  
public Collection   getDiagrams(RefObject element)
Find all diagrams directly under the given model element. 
public Collection   getDiagrams(RefObject element, SimpleTypeInfo typeInfo)
Find all diagrams with the given type info directly under the given model element. 
public String   getDisplayProperty(ModelElement ns, String key)
Looks up a property recursively, going from a namespace up the namespace hierarchy to the top level model, and then to the tool (ie: the value set in Poseidon.properties). 
public String   getDisplayProperty(Project p, String key)
 
public String   getDisplayProperty(DiagramElement di, String key)
Looks up the di element for a property recursively, then the namespace of the dagram recursively if not found. 
public Collection   getElementImport(ModelElement target)
 
public Collection   getElementResidence(ModelElement target)
 
public Event   getEvent(Parameter target)
 
public RefObject   getExpressionOwner(Expression expression)
 
public Collection   getExtend(ExtensionPoint target)
 
public Collection   getExtendedModelElement(Stereotype stereotype)
 
public Collection   getExtender(UseCase useCase)
 
public static Stimulus   getFirstConformingStimulus(Message predecessorMessage)
 
public Message   getFirstPlayedRole(Stimulus stimulus)
 
public Stimulus   getFirstStimulus(Link link)
 
public Collection   getGeneralization(GeneralizableElement target)
 
public RefObject   getGroundedSmElement(DiagramElementImpl diagramElement)
 
public Collection   getImplementations(Classifier classifier)
This method returns all Classifiers that realize this classifier e.g.: ClassA implements InterfaceB. 
public Map   getImportDependencies(Classifier classifier)
Returns a map(SmId, Dependency) of import dependencies of the given classifier. 
public int   getImportedLineNumber(ModelElement modelElement)
Returns the imported line number of the specified model element. 
public Set   getImports(Classifier cls)
 
public Collection   getIncluder(UseCase useCase)
 
public Pseudostate   getInitialState(CompositeState compState)
Looks for a initial state in the given composite state. 
public String   getInitialValue(AssociationEnd associationEnd)
Returns the initial value of the given association end. 
public Namespace   getInnermostNamespace(ModelElement element)
Returns the innermost namespace seen from the given element, i.e. 
public Collection   getInstance(Classifier target)
 
public Class   getInterfaceClass(Class implementationClass)
This method looks up the JMI compliant interface class the given class builds upon. 
public RefPackage   getM1Extent()
This methods returns the root RefPackage of the Uml14 metamodel. 
protected String   getMergeNameForAssociationEnd(AssociationEnd assocEnd)
 
protected String   getMergeNameForClassifier(Classifier classifier)
 
protected String   getMergeNameForComment(Comment comment)
 
protected String   getMergeNameForDependency(Dependency dep)
 
protected String   getMergeNameForFeature(Feature feature)
 
protected String   getMergeNameForGeneralization(Generalization gen)
 
protected String   getMergeNameForInstance(Instance instance)
 
protected String   getMergeNameForLink(Link link)
 
public String   getMergeNameForModelElement(ModelElement element)
 
protected String   getMergeNameForParameter(Parameter param)
 
protected String   getMergeNameForStateMachine(StateMachine sm)
 
protected String   getMergeNameForStimulus(Stimulus stimulus)
 
protected String   getMergeNameForUmlAssociation(UmlAssociation assoc)
 
protected String   getMergeNameForUseCase(UseCase uc)
 
public Collection   getMessage(Action target)
 
public static Collection   getMethod(Operation target)
 
public Method   getMethod(Operation op, String language)
Returns null or the body that has an expression in the given language. 
public String   getMethodBody(Operation op, String language)
Returns "" or the method body for the given language. 
public Model   getModel(ModelElement element)
 
public static Multiplicity   getMultiplicity(RefObject multiplicityOwner)
 
public static RefObject   getMultiplicityOwner(Multiplicity multiplicity)
 
public Namespace   getNamespace(ModelElement element)
Returns the namespace of the given element or of the first owning element having a namespace. 
private Namespace   getNamespace(ModelElement element, boolean acceptImmediate, boolean firstcall)
 
public Namespace   getNamespace(Diagram diagram)
 
public Namespace   getNamespaceImmediate(ModelElement element)
returns the first namespace we can find for a element - e.g., for a state we get the class that contains the states' statemachine. 
public List   getNamespaces(ModelElement modelElement)
Returns a list of all namespaces beginning with the namespace of the related model element up to the top-most namespace of the model. 
public List   getNamespaces(ModelElement modelElement, boolean includeNonNamespacedElements, boolean acceptSelf)
 
public Collection   getNavigableAssociateEnds(Classifier classifier)
This method returns all opposite and navigable AssociationEnds of a given Classifier  
private int   getNumForVisibility(VisibilityKind visKind)
 
public Collection   getObjectFlowState(Classifier target)
 
public static List   getOperations(Classifier classifier)
This method returns all operations of a given Classifier  
public Collection   getOperationsInh(Classifier classifier)
This method returns all operations of a given Classifier, including inherited  
private Collection   getOperationsInhInternal(Classifier classifier, Set visitedClassifiers)
 
public AssociationEnd   getOppositeEnd(AssociationEnd thisAssocEnd)
 
public Stereotype   getOrCreateRealizationStereotype()
NOT to be used from a command!!  
public Stereotype   getOrCreateStereotype(String stereotypeName)
NOT to be used from a command!!!!  
public RefObject   getOwner(RefObject refObject)
 
public RefObject   getOwner(Diagram diagram)
 
public List   getOwnerElements(ModelElement modelElement)
 
public ModelElement   getOwnerModelElement(ModelElement element)
Get the container of a model element. 
public Collection   getParameter(Event target)
 
public Parameter   getParameter(RefObject modelElement, String name)
This method returns the first parameter of an operation with the given name. 
public Parameter[]   getParameters(Operation operation, Set parameterDirectionKinds)
 
public Collection   getParents(GeneralizableElement child)
 
public Collection   getPlayedRole(Stimulus stimulus)
 
public List   getPredecessorChain(Message message)
Returms all predecessor messages of the given message. 
public List   getPredecessorLinkChain(Message message)
Returms all predecessor links of the given message. 
public Dependency   getPrimaryClassDependency(Classifier secondaryClassifier)
 
public String   getQualifiedLookupName(ModelElement modelElement)
 
private static List   getRaisedException(BehavioralFeature behavioralFeature)
Workaround for the missing getRaisedSignals() in Operation, specialized to find the Exceptions  
public static Collection   getRaisedSignal(BehavioralFeature target)
 
public Dependency   getRealization(Classifier cls, Classifier realizedInterface)
This method returns the Realization (edges, not nodes!!) between this classifier and this interface. 
public Collection   getRealizations(Classifier cls)
This method returns all Realizations (edges, not nodes!!) for this classifier, e.g. 
public static Collection   getRealizationsToClassifiers(Classifier cls)
 
public Parameter   getReturnParameter(Operation operation)
this method finds all paramters of the given operation which have the ParamterDirectionType RETURN. 
public List   getSecondaryClasses(Classifier primaryClass)
Collects all secondary Classifiers to that class. 
public Collection   getSiblings(ModelElement element)
Similar to getcontainerElement, but differs for example with states and transitions  
public List   getSmIds(List xmiIds)
converts a xmiId-list to a local smId-list  
public List   getSourceStates(StateVertex state)
Returns all the states that have got transitions to the state passed as parameter  
public Collection   getSpecialization(GeneralizableElement target)
 
public static Collection   getSpecifications(Classifier cls)
This method returns all Classifiers of which this class is a realization. 
public Collection   getState(Event target)
 
public State   getState(Transition target)
 
public State   getState1(Action target)
 
public State   getState2(Action target)
 
public State   getState3(Action target)
 
public ModelElement   getStateContainerElement(StateVertex state)
If the state has a containing state, the container state is returned. 
public State   getStateForDoActivity(Action target)
 
public State   getStateForEntryAction(Action target)
 
public State   getStateForExitAction(Action target)
 
public Collection   getStateMachine(ModelElement target)
 
public List   getStates(Classifier cls)
Finds all states in the first StateMachine of the given class. 
public List   getStates(StateMachine sm)
Finds all states in the given StateMachine. 
public static Stereotype   getStereotypeByName(ModelElement element, String stereotypeName)
Returns the (first) stereotype with the given name appliad to the model-element. 
public static Collection   getStereotypes(ModelElement element)
Returns all stereotypes for the given model element. 
public List   getStereotypesToShow(ModelElement element)
Returns all stereotypes for the given model element. 
public Collection   getStimulus(Link target)
 
public Collection   getStimulus(Action target)
 
public Collection   getStimulus1(Instance target)
 
public Collection   getStimulus2(Instance target)
 
public Collection   getStimulus3(Instance target)
 
public Collection   getSubtypes(GeneralizableElement generalizable)
This method returns all generalizable elements of which this generalizable element is a direct supertype. 
public Collection   getSuccessor(Message message)
 
public Collection   getSupertypes(GeneralizableElement generalizable)
This method returns all generalizable elements of which this generalizable element is a direct subtype. 
public Collection   getSupplierDependency(ModelElement target)
 
public TagDefinition   getTagDefinition(String tagName, RefObject owner)
Returns the TagDefinition with the given name. 
public String   getTagName(TaggedValue taggedValue)
If you have a TV, get the key (=the name of the TV type) with this method. 
public String   getTaggedValue(ModelElement me, String tag)
Returns the first data value element of the first tagged value of given a model element that has the given tag. 
public String   getTaggedValueDataValue(ModelElement modelElement, String tagDefinitionName)
Gets the first datavalue of the first tagged value that has a tag definition with the given name. 
public Map   getTaggedValueLists(ModelElement element, Pattern keyPattern)
Return a Map of Lists of TaggedValues which keys matches a pattern. 
public Map   getTaggedValueLists(ModelElement element)
Gathers all tagged values of a model element in a map from key to value. 
public TaggedValue   getTaggedValueObject(ModelElement me, String tag)
 
public TaggedValue   getTaggedValueSingle(ModelElement modelElement, String tagDefinitionName)
Returns the first TV with the given name. 
public TaggedValue   getTaggedValueType(ModelElement me, String tag)
Returns the first tagged value of given a model element, that has the given tag. 
public Collection   getTaggedValues(ModelElement modelElement, String tagDefinitionName)
Retrieves all tagged values that have the given tag.type.name. 
public List   getTargetStates(StateVertex state)
returns all the states that the state passed as parameter has transitions to  
public Collection   getTemplateArgument(ModelElement element)
 
public static List   getThrownExceptions(BehavioralFeature behavioralFeature)
Retrieves the thrown exceptions. 
public Namespace   getTopLevelNamespace(ModelElement element)
Returns the top-level namepsace of the given element. 
public Collection   getTransition(Event target)
 
public Transition   getTransition(Action target)
 
public ModelElement   getTransitionContainerElement(Transition trans)
 
public Collection   getTypedFeature(Classifier target)
 
public Collection   getTypedValue(TagDefinition tagDefinition)
 
private Collection   getTypes(GeneralizableElement generalizable, int which)
Internal method that is used by getSubtypes() and by getSupertypes(); Depending on the which-parameter, the super- or subtypes are returned. 
public static Class   getUmlClass(Class sourceClass)
Add an import to the in/out Set 'imports' if it is necessary. 
public List   getUseDependenciesToInterfaces(Classifier cls)
 
public Dependency   getUseDependency(Classifier cls, Classifier useDependencInterface)
 
public List   getUseDependencyInterfaces(Classifier classifier)
 
public List   getXmiIds(List ids)
returns a list of xmiIds for SmId or DiIds  
private void   handleImportDependencySupplier(Iterator suppliers, Set imports)
 
public static boolean   hasStereotype(ModelElement element, String stereotypeName)
Checks if a ModelElement has a stereotype with the given name. 
public boolean   hideStereotype(GraphEdgeImpl dependencyGraphEdge, String hideTargetArrowStereotypeName)
 
public boolean   isClassifierSecondaryClass(Classifier classifier)
 
public boolean   isCollection(String type)
True iff the given type is the name of a well-known Java collection class like Collection, LinkedList etc. 
public boolean   isConstructor(Operation op)

Test, if the given operation is a constructor. 

public boolean   isDestructor(Operation op)

Test, if the given operation is a destructor. 

public boolean   isEqual(ModelElement element, ModelElement equalTo)
 
private boolean   isEqualParameter(Parameter p1, Parameter p2)
 
public boolean   isEqualTrigger(Event trigger1, Event trigger2)
 
public boolean   isEventPartOfInternalTransition(Event umlEvent)
This method takes an event, looks for its transition, and then checks wether the transition is an internal transition. 
public static boolean   isHiddenStereotypeName(String name)
 
public boolean   isImportDependency(Dependency dependency)
True if dependency with stereotype "import". 
private boolean   isInnerClassifier(Classifier currentClassifier, Classifier expectedInnerClassifier)
 
public static boolean   isJavaPrimitiveDataType(ModelElement type)
True if the type is a primitive like a char etc. 
public static boolean   isJavaPrimitiveDataTypeName(String name)
True if the parameter is a primitive type name like 'char' etc. 
public final boolean   isModelElementStillValid(RefObject element)
 
public boolean   isParentNamespace(ModelElement element, Namespace namespace)
Tests if the given namespace is among the parent namespaces of the given element. 
public boolean   isPort(RefObject modelElement)
 
public static boolean   isPrimaryClassDependency(Dependency dependency)
True if abstraction with stereotype "gentleware-primary-class". 
public static boolean   isRealization(Dependency dependency)
True if abstraction with stereotype "realize". 
public boolean   isResident(RefObject element, Component container)
Tests, if the given model element is resident for the given component. 
public boolean   isSelfAssociation(UmlAssociation association)
 
public boolean   isTopLevelModel(Namespace namespace)
Tests if the given namespace is the top-level model. 
public boolean   isValidConstraint(Constraint constr)
Tests if the constraint has a tagged value "isValid" that says true. 
public boolean   isValidNamespace(Diagram diagram, ModelElement testedElement)
 
public boolean   isValidOwner(Diagram diagram, RefObject testedElement)
 
public RefObject   lookup(Namespace parent, String searchedElementName, Class searchedElementClass)
Finds a model element by name in the given namespace. 
public RefObject   lookup(Namespace location, String wanted)
Finds a model element by name in the given namespace. 
public UmlAssociation   lookupAssociationRecursive(Namespace namespace, UmlAssociation assoc)
 
public Comment   lookupComment(Comment comment)
 
public Constraint   lookupConstraint(Constraint constraint)
 
public Dependency   lookupDependency(Dependency dependency)
 
public Generalization   lookupGeneralization(Generalization generalization)
 
public ModelElement   lookupInnerElementRecursive(Namespace topLocation, String wanted, Class elementClass)
Finds a ModelElement by recursively looking up in the contained namespaces, roughly depth-first. 
public ModelElement   lookupInnerElementRecursive(Namespace topLocation, String wanted, Class elementClass, boolean allowDuplicates)
 
public ModelElement   lookupRecursive(Namespace topLocation, String searchedElementName, Class searchedElementClass)
Finds a ModelElement by recursively looking up in the contained namespaces, roughly depth-first. 
private ModelElement   lookupRecursiveWithNamespaceInName(Namespace topLocation, String qualifiedName, int endIndexTopLevelNamespaceName, Class elementClass)
 
private ModelElement   lookupRecursiveWithPlainName(Namespace topLocation, String searchedElementName, Class searchedElementClass)
 
private ModelElement   lookupRecursiveWithPlainNameInSubNamespaces(List subNamespaces, String searchedElementName, Class searchedElementClass)
 
public TemplateArgument   lookupTemplateArgument(TemplateArgument templateArgument)
 
public static boolean   removeHiddenStereotypeName(String name)
 
private static void   selectElementsByType(Namespace namespace, Collection elems, Class classtype, boolean recursive)
 
public void   setDataValue(TaggedValue taggedValue, String value)
Sets data value of tagged value. 
public void   setExpression(RefObject owner, Expression expression)
Use this method to set an expression to an element. 
private void   setExpression(RefObject owner, Expression expression, boolean unsetting, Class expressionClass)
 
public static void   setMultiplicity(RefObject owner, Multiplicity multiplicity)
 
public boolean   signaturesMatch(Operation operation1, Operation operation2)
 
private boolean   testElementTypeAndName(String wanted, Class elementClass, ModelElement tested)
 
private boolean   testElementTypeAndName(String wanted, Class elementClass, RefObject tested, String testedName)
 
public void   unsetExpression(RefObject owner, Class expressionClass)
Use this method to unset the expression of an owner. 
arrow_up
 

Tagged Values
static false
gentleware-imported-line-number 57
gentleware-imported-package-statement-line-number 5
 

 Attribute Detail

GENTLEWARE_PREFIX

private static String GENTLEWARE_PREFIX

arrow_up


JAVADOG_TAG_ORIGINAL_TYPE

public static String JAVADOG_TAG_ORIGINAL_TYPE

arrow_up


PARAMETER_KINDS_IN_OUT

public static Set PARAMETER_KINDS_IN_OUT

arrow_up


PARAMETER_KINDS_RETURN

public static Set PARAMETER_KINDS_RETURN

arrow_up


PORT_CLASS_PREFIX

public static String PORT_CLASS_PREFIX

arrow_up


STEREOTYPE_ACCESSOR

public static String STEREOTYPE_ACCESSOR

arrow_up


STEREOTYPE_ASSEMBLY_CONNECTOR

public static String STEREOTYPE_ASSEMBLY_CONNECTOR

arrow_up


STEREOTYPE_CREATE

public static String STEREOTYPE_CREATE

arrow_up


STEREOTYPE_DELEGATION_CONNECTOR

public static String STEREOTYPE_DELEGATION_CONNECTOR

arrow_up


STEREOTYPE_DESTROY

public static String STEREOTYPE_DESTROY

arrow_up


STEREOTYPE_ENUMERATION

public static String STEREOTYPE_ENUMERATION

arrow_up


STEREOTYPE_IMPORT

public static String STEREOTYPE_IMPORT

arrow_up


STEREOTYPE_PORT

public static String STEREOTYPE_PORT

arrow_up


STEREOTYPE_PRIMARY_CLASS

public static String STEREOTYPE_PRIMARY_CLASS

arrow_up


STEREOTYPE_READ_ONLY

public static String STEREOTYPE_READ_ONLY

arrow_up


STEREOTYPE_REALIZE

public static String STEREOTYPE_REALIZE

arrow_up


STEREOTYPE_SINGLETON

public static String STEREOTYPE_SINGLETON

arrow_up


STEREOTYPE_SOURCE_CODE_COMMENT

public static String STEREOTYPE_SOURCE_CODE_COMMENT

Stereotype to mark comment as a comment inside of an imported classifier  
arrow_up


STEREOTYPE_SOURCE_FILE_COMMENT

public static String STEREOTYPE_SOURCE_FILE_COMMENT

Stereotype to mark comment as a comment outside of an imported classifier (between classes)  
arrow_up


STEREOTYPE_TYPE_UNQUALIFIED

public static String STEREOTYPE_TYPE_UNQUALIFIED

arrow_up


STEREOTYPE_USE

public static String STEREOTYPE_USE

arrow_up


STEREOTYPE_UTILITY

public static String STEREOTYPE_UTILITY

arrow_up


SUBTYPES

private int SUBTYPES

arrow_up


SUPERTYPES

private int SUPERTYPES

arrow_up


TAGGED_VALUE_IMPORTED_LINE_NUMBER

public static String TAGGED_VALUE_IMPORTED_LINE_NUMBER

arrow_up


TAGGED_VALUE_IMPORTED_PACKAGE_STATEMENT_LINE_NUMBER

public static String TAGGED_VALUE_IMPORTED_PACKAGE_STATEMENT_LINE_NUMBER

arrow_up


TAG_DEFINITION_INITIAL_VALUE

public static String TAG_DEFINITION_INITIAL_VALUE

arrow_up


TAG_DEFINITION_IS_BEHAVIOR

public static String TAG_DEFINITION_IS_BEHAVIOR

arrow_up


TAG_DEFINITION_IS_SERVICE

public static String TAG_DEFINITION_IS_SERVICE

arrow_up


TAG_DEFINITION_JAVA_SOURCECODE_COLLECTION_TYPE

public static String TAG_DEFINITION_JAVA_SOURCECODE_COLLECTION_TYPE

arrow_up


TAG_DEFINITION_LOGICAL_SOURCEROOT

public static String TAG_DEFINITION_LOGICAL_SOURCEROOT

arrow_up


TAG_DEFINITION_NATIVE

public static String TAG_DEFINITION_NATIVE

arrow_up


TAG_DEFINITION_STRICTFP

public static String TAG_DEFINITION_STRICTFP

arrow_up


_hiddenStereotypeNames

private static Set _hiddenStereotypeNames

arrow_up


_visitedAssocEndMap

private Map _visitedAssocEndMap

arrow_up


_visitedElements

private List _visitedElements

arrow_up


ctr

public int ctr

arrow_up
 Association Detail

_project

private UmlProject _project

arrow_up


preparedClassifier

public PreparedClassifier preparedClassifier

arrow_up
 Constructor Detail

Uml1SmAccessory

public com.gentleware.poseidon.uml.model_management.Uml1SmAccessory Uml1SmAccessory(UmlProject umlProject)

Parameters:
umlProject -
Returns:
arrow_up
 Method Detail

__initializer

private static void __initializer()

arrow_up


addHiddenStereotypeName

public static boolean addHiddenStereotypeName(String name)

Parameters:
name -
Returns:
arrow_up


calculateDependentAssociations

public void calculateDependentAssociations(Classifier cls, Collection associationsToBeRemoved, Collection associationEndsToBeRemoved)

Deprecated.
Seems to be used by tests only.

Looks at the association-Ends of a classifier that is to be deleted, and puts the associations that have to be deleted completely into one collection, and the association-ENDS that have to be removed into another  
Parameters:
cls - the classifier that is to be removed
associationsToBeRemoved - This collection will contain the associations that have to be removed
associationEndsToBeRemoved - his collection will contain the association-ENDS that have to be removed
arrow_up


checkExpressionIntegrity

public void checkExpressionIntegrity(Model model)

Parameters:
model -
arrow_up


checkInsertRule

private boolean checkInsertRule(RefObject modelElement, boolean includeNonNamespacedElements)

Parameters:
modelElement -
includeNonNamespacedElements -
Returns:
arrow_up


clearVisits

public void clearVisits()

arrow_up


createType

public SmId createType(String desiredModelElementName, SmId createLocationSmId, MacroCommand accuCommand, Class desiredModelElementClass, SmId newCreatedElementSmId)

Parameters:
desiredModelElementName -
createLocationSmId -
accuCommand -
desiredModelElementClass -
newCreatedElementSmId -
Returns:
arrow_up


createTypeFromProfile

public SmId createTypeFromProfile(RefObject classifier, MacroCommand accuCommand, SmId newCreatedElementSmId)

Parameters:
classifier -
accuCommand -
newCreatedElementSmId -
Returns:
arrow_up


doesConflict

public boolean doesConflict(Operation operationFromSubclass, Operation operationFromSuperclass)

Parameters:
operationFromSubclass -
operationFromSuperclass -
Returns:
arrow_up


findDiagramElementToAttachLinkTo

public static DiagramElementImpl findDiagramElementToAttachLinkTo(DiagramElementImpl diagramElement, Project project)

Parameters:
diagramElement -
project -
Returns:
arrow_up


findFirstCommonObject

private Object findFirstCommonObject(List objects1, List objects2)


Returns the first object which both lists have in common at the same index-position. {a, b, c} and {c, b, a} will return b as result while {a, b, c} and {a, c, b} will return null.

 
Parameters:
objects1 - first list of objects to compare
objects2 - second list of objects to compare
Returns:
first common object or null
Exceptions:
IllegalArgumentException if both lists differ in size
arrow_up


findLinkingAssociation

public Collection findLinkingAssociation(Classifier source, Classifier target)

Parameters:
source -
target -
Returns:
arrow_up


findLinkingTransition

public Transition findLinkingTransition(StateVertex source, StateVertex target)

Parameters:
source -
target -
Returns:
arrow_up


findOrCreateType

public SmId findOrCreateType(String desiredModelElementName, SmId createLocationSmId, MacroCommand accuCommand, Class desiredModelElementClass, SmId newCreatedElementSmId)

Parameters:
desiredModelElementName -
createLocationSmId -
accuCommand -
desiredModelElementClass -
newCreatedElementSmId -
Returns:
arrow_up


findOrCreateType

public SmId findOrCreateType(String desiredModelElementName, SmId createLocationSmId, MacroCommand accuCommand, Class desiredModelElementClass, Class onlyLookIn, SmId newCreatedElementSmId)


Finds a modelelement with the given name in the project. If the modelelement does not exist in any of the models in the project, it is cloned from one of the profiles, if it is found there. If not, it is created in the given location. todo: this is problematic, because we only pass a name here, but there may exist dozens of modelelments by the same name, so we should pass a uniquename (like generated by SmLookupHelper) instead.  
Parameters:
desiredModelElementName - The name of the classifier, without any prefixes.
createLocationSmId - If the classifier does not exist in the project, it is created here.
accuCommand - MacroCommand to insert newly created Command
desiredModelElementClass - Type of the element (UmlClass, Interface, Attribute,...)
onlyLookIn - Look for existing element only in elements of the given type. If null, then look in any element.
newCreatedElementSmId - A SmId that is used when the desired element must be created. Either this SMID is null, or it has been created from outside any command-execution/lazyiniting.
Returns:
A classifiers SMID that may be referenced from another element in this project.
arrow_up


findStateMachineForState

public StateMachine findStateMachineForState(StateVertex state)

Parameters:
state -
Returns:
arrow_up


findTypeInAnyModel

public RefObject findTypeInAnyModel(String desiredClassifier, Class desiredType)

Parameters:
desiredClassifier -
desiredType -
Returns:
arrow_up


findTypeInAnyModel

public RefObject findTypeInAnyModel(String desiredClassifier, Class desiredType, Class onlyLookIn)

Parameters:
desiredClassifier -
desiredType -
onlyLookIn -
Returns:
arrow_up


findTypeInModel

public ModelElement findTypeInModel(String name, Model model, Class desiredType)


Find element of desired type in given model by searching only through namespaces.  
Parameters:
name - Name of the element
model - Model to look in
desiredType - Type of the element
Returns:
Element of the given name and given type
arrow_up


findTypeInModel

public ModelElement findTypeInModel(String name, Model model, Class desiredType, Class onlyLookIn)


Find element of desired type in given model by searching only in specified elements.  
Parameters:
name - Name of the element
model - Model to look in
desiredType - Type of the element
onlyLookIn - Type of elements in which to look for desired element.
Returns:
Element of the given name and given type
arrow_up


findTypeInProfile

public RefObject findTypeInProfile(String desiredElement, Class desiredType, String profileKey)


Find a classifier of a given type in a given profile.  
Parameters:
desiredElement - The name of the element that should be looked up.
desiredType - The type of the element (to speed up search, and to distinguish elements further).
profileKey - The key under which the profile was registered.
Returns:
The element with the given name and the given type, or null if not found.
Exceptions:
IllegalArgumentException if the profile key is not used.
arrow_up


findTypeInProfile

public ModelElement findTypeInProfile(String desiredClassifier, Class desiredType, Profile profile)

Parameters:
desiredClassifier -
desiredType -
profile -
Returns:
arrow_up


findTypeInProfiles

public ModelElement findTypeInProfiles(String desiredClassifier, Class desiredType)

Parameters:
desiredClassifier -
desiredType -
Returns:
arrow_up


formatNameforCode

public String formatNameforCode(String elementName)


Replaces blanks, tabs, and line feeds with underscores; cuts away leading blanks.

Currently, this is an ugly duplication of PreparedElement.getNameAsString. To do it right, one would have to hand over the formatting method from the caller down to addImport().  

Parameters:
elementName -
Returns:
arrow_up


generateFullyQualifiedJavaName

public String generateFullyQualifiedJavaName(Classifier classifier)


Returns the fully qualified java name of the given classifier.

For example: Test, com.gentleware.test.Test  

Parameters:
classifier -
Returns:
arrow_up


generateJavaPackageName

public String generateJavaPackageName(ModelElement me)


Produces the path to the element, excluding the model, and separating packages with dots.  
Parameters:
me -
Returns:
A String signifying the Java path to the element. Never null, only "".
arrow_up


generateJavaPackagePath

public String generateJavaPackagePath(ModelElement me)


Produces the path to the element, excluding the model and excluding the element itself, and separating packages with dots.  
Parameters:
me -
Returns:
A String signifying the Java path to the element. Never null, only "".
arrow_up


generateOperationSignature

public String generateOperationSignature(Operation op)


Generate methods' signature in shortened uml notation, used for tabConstraints. Note that this method is not used for the diagrams. Eg, the visibility is missing.  
Parameters:
op -
Returns:
arrow_up


getAbstractions

public static Collection getAbstractions(Classifier cls)


Finds all abstraction (realization!) connections (egdes, not nodes!!) of this classifier to the implemented interfaces. e.g. if you give me a ClassA which realizes an InterfaceB, then you get the abstraction with the stereotype "realizes" which points from ClassA to InterfaceB Note: Opposite method is getRealizations()  
Parameters:
cls - The classifier you want to have the abstractions for.
Returns:
An empty collection or a collection of the Abstractions (type Abstraction).
Exceptions:
NullPointerException if cls is null
arrow_up


getActivityGraphs

public Collection getActivityGraphs(ModelElement target)

Parameters:
target -
Returns:
arrow_up


getAllArgumentsOfParameter

public Collection getAllArgumentsOfParameter(Parameter param)


Returns all arguments of the given parameter. A parameter is connected to a set of arguments over a binding, where it plays the supplier role  
Parameters:
param - The parameter
Returns:
The collection of all arguments. Could be an empty collection, but never null.
arrow_up


getAllClassesAndInterfaces

public Collection getAllClassesAndInterfaces(RefObject packageObject)

Parameters:
packageObject -
Returns:
arrow_up


getAllClassifierInState

public Collection getAllClassifierInState()

Returns:
arrow_up


getAllClassifiers

public static Collection getAllClassifiers(Namespace namespace, boolean recursice)


Returns all classifiers of the namespace, including inner classifiers  
Parameters:
namespace - the namespace you want to have the classifiers for
recursice -
Returns:
An empty collection or a collection of the found classifiers.
arrow_up


getAllContainedElements

public Collection getAllContainedElements(RefObject modelElement)


returns a collection of all modelelements that are somehow contained inside the modelelement, but only those that are "interesting" for the enterprise-edition, e.g. for locking. We are only interested in contained elements that have a node-like representation in the diagram or features, no edges, and not minor stuff. You may use this method if it suits your needs, but you may not change it!!  
Parameters:
modelElement -
Returns:
arrow_up


getAllContainedElements

private void getAllContainedElements(RefObject container, Collection elements)

Parameters:
container -
elements -
arrow_up


getAllElementsByType

public static Collection getAllElementsByType(Namespace namespace, Class classtype)


Returns a collection of all defined elements of a certain class (classtype: f.e. Collaborations, Stereotypes, Classifiers...) in the given namespace and recursively all owned namespaces.  
Parameters:
namespace -
classtype -
Returns:
arrow_up


getAllHierarchyTypes

private Collection getAllHierarchyTypes(Classifier cls, int which)


Internal method that is used by #getAllSupertypes(Classifier) and by #getAllSubtypes(Classifier) - depending on the which-parameter  
Parameters:
cls -
which -
Returns:
arrow_up


getAllModels

public Collection getAllModels()

Returns:
arrow_up


getAllModels

public static Collection getAllModels(RefPackage m1Uml14Extent)

Parameters:
m1Uml14Extent -
Returns:
arrow_up


getAllNamespaces

public Collection getAllNamespaces()

Returns:
arrow_up


getAllPackages

public static Collection getAllPackages(UmlPackage umlPackage, boolean recursive)


Returns all packages of the a package.  
Parameters:
umlPackage - container namespace
recursive - if true all packages are recursivly returned, if false only the directly contained packages are returned
Returns:
arrow_up


getAllPortsWithType

public Collection getAllPortsWithType(Classifier type)

Parameters:
type -
Returns:
arrow_up


getAllStereotypes

public static Collection getAllStereotypes(Namespace namespace)


Returns a collection of all defined collaborations in the given namespace and recursively all owned namespaces.  
Parameters:
namespace -
Returns:
arrow_up


getAllSubtypes

public Collection getAllSubtypes(Classifier cls)

Parameters:
cls -
Returns:
arrow_up


getAllSupertypes

public Collection getAllSupertypes(Classifier cls)


This method returns all Classifiers of which this class is a direct or indirect subtype.  
Parameters:
cls - the class you want to have the parents for
Returns:
a collection of the parents, each of which is a {@link GeneralizableElement}
arrow_up


getAllSupertypesAndSpecifications

public Collection getAllSupertypesAndSpecifications(Classifier cls)


Returns all Classifiers of which this class is a direct or indirect subtype or specification.  
Parameters:
cls - the class you want to have the parents for
Returns:
a collection of the parents, each of which is a {@link GeneralizableElement}
arrow_up


getAnnotatedElement

public Collection getAnnotatedElement(Comment target)

Parameters:
target -
Returns:
arrow_up


getArgumentOfParameter

public Argument getArgumentOfParameter(Parameter parameter, Action targetAction)


Returns the actual argument of a parameter within the context of an action  
Parameters:
parameter - The parameter
targetAction - The context
Returns:
The argument
arrow_up


getArguments

public Collection getArguments(Binding bind)


Iterates through the template arguments of the binding and collects their model elements.  
Parameters:
bind -
Returns:
A collection of ModelElements.
arrow_up


getAsNamespace

public Namespace getAsNamespace(DiagramElement diagramElement)

Parameters:
diagramElement -
Returns:
arrow_up


getAssociateEnds

public List getAssociateEnds(Classifier classifier)


This method returns all opposite AssociationEnds of a given Classifier  
Parameters:
classifier - the classifier you want to have the opposite association ends for
Returns:
a collection of the opposite associationends, never null.
arrow_up


getAssociateEndsInh

public Collection getAssociateEndsInh(Classifier classifier)


This method returns all opposite AssociationEnds of a given Classifier, including inherited.  
Parameters:
classifier - the classifier you want to have the opposite association ends for.
Returns:
a collection of the opposite associationends, or an empty collection.
arrow_up


getAssociation

public Collection getAssociation(Classifier target)

Parameters:
target -
Returns:
a collection containing the association-ENDS at this classifier.
arrow_up


getAssociationEndClassifiers

public Collection getAssociationEndClassifiers(UmlAssociation assoc)


Returns a list of all classifiers that are connected with this association. The return value is never null, only an empty collection.  
Parameters:
assoc -
Returns:
arrow_up


getAssociationRole

public AssociationRole getAssociationRole(AssociationEndRole target)

Parameters:
target -
Returns:
arrow_up


getAssociations

public List getAssociations(Classifier target)


Builds a list containing all ASSOCIATIONS that connect this classifier.  
Parameters:
target - The classifier.
Returns:
A list of the associations. Self-associations are twice in the list.
arrow_up


getAttributes

public static List getAttributes(Classifier classifier)


This method returns all attributes of a given Classifier.  
Parameters:
classifier - the classifier you want to have the attributes for
Returns:
a collection of the attributes
arrow_up


getAttributesInh

public Collection getAttributesInh(Classifier classifier)


This method returns all attributes of a given Classifier, including inherited. It does not check for private or package visibility- justs returns all of them!  
Parameters:
classifier - the classifier you want to have the attributes for
Returns:
a collection of the attributes
arrow_up


getAttributesInhInternal

private Collection getAttributesInhInternal(Classifier classifier, Set visitedClassifiers)

Parameters:
classifier -
visitedClassifiers -
Returns:
arrow_up


getAvailableAssociationEnd

public AssociationEnd getAvailableAssociationEnd(Classifier sourceClassifier, SmId targetSmId, Multicity multicity)

Parameters:
sourceClassifier -
targetSmId -
multicity -
Returns:
arrow_up


getBehavior

public Collection getBehavior(ModelElement target)


Finds the StateMachines to a ModelElement.  
Parameters:
target -
Returns:
arrow_up


getBindingOfArgument

public Binding getBindingOfArgument(Argument argument)


Returns the binding of an argument. The binding is the connection for an argument's action to a parameter. An argument has no or exactly one binding.  
Parameters:
argument - The argument
Returns:
The binding of the argument
arrow_up


getBindingOfParameter

public Binding getBindingOfParameter(Parameter param)

Deprecated.
Bindings are not used any more in Poseidon to connect parameters and arguments!

Returns the binding of the given parameter. The binding is the connection to the parameters' arguments A paramter can have a set of arguments in different actions.  
Parameters:
param - The parameter
Returns:
arrow_up


getBindings

public Collection getBindings(ModelElement element)


Returns the bindings for the given model element.  
Parameters:
element - The model element to examine.
Returns:
Collection of all the bindings for this element
arrow_up


getCallAction

public Collection getCallAction(Operation target)

Parameters:
target -
Returns:
all call actions of a given operation
arrow_up


getChildren

public Collection getChildren(GeneralizableElement parent)


Returns all generalizable elements playing the child role, given the parent generalizable element  
Parameters:
parent -
Returns:
arrow_up


getClassifierInState

public Collection getClassifierInState(Classifier target)

Parameters:
target -
Returns:
arrow_up


getClassifierRole

public Collection getClassifierRole(Classifier target)

Parameters:
target -
Returns:
arrow_up


getClientDependency

public Collection getClientDependency(ModelElement target)

Parameters:
target -
Returns:
arrow_up


getClosestCommonContainer

public RefObject getClosestCommonContainer(List modelElements, boolean includeNonNamespacedElements, boolean acceptSelf)


Finds the first container which contains all of the given model-elements.

 
Parameters:
modelElements - List of {@link ModelElement ModelElements}
includeNonNamespacedElements - true if non-namespace-elements should be included, otherwise false
acceptSelf - if the modelElements might be taken into account as possible containers by themselves
Returns:
the first container which containes all given elements, viewed from the perspective of the elements. The result might but should not be null, as all elements should have at least the model itself as common container
Exceptions:
ClassCastException if one of the elements is not a ModelElement
arrow_up


getClosestOwnerExcept

public ModelElement getClosestOwnerExcept(ModelElement modelElement, Class excludeThisOwnerType)


This method returns the closest owner of a modelelement that is NOT of type excludeThisOwnerType. So, if you want to know the closest package of an attribute that might be inside an inner class, you just pass the attribute and Classifier.class, and you can be sure that you will not get the inner class, nor the outer class, but really the package. see the test for this for details  
Parameters:
modelElement -
excludeThisOwnerType -
Returns:
arrow_up


getClosestOwnerOfType

public ModelElement getClosestOwnerOfType(ModelElement modelElement, Collection acceptableTypes)


Another nice helper method. Use this to find the clostest owner that is of a desired type. eg when you pass an attribute, and want to find out that attributes umlpackage, then just specify a list that contains the attribute and a list that contains UmlPackage.class, you will get the attributes classes package.  
Parameters:
modelElement - the element whose owner you want to know
acceptableTypes - a collection of classes (e.g. UmlClass.class, or UmlPackage.class). the owner of the modelelement has to be of this type to get returned
Returns:
arrow_up


getClosestOwnerThatIsNotAClassifier

public SmId getClosestOwnerThatIsNotAClassifier(SmId diagramOwnerId)


Assures that the returned ID is the ID of a namespace that is not a classifier.  
Parameters:
diagramOwnerId -
Returns:
arrow_up


getCollaboration

public Collection getCollaboration(Classifier target)

Parameters:
target -
Returns:
arrow_up


getConstraintExpression

public String getConstraintExpression(Constraint constraint)

Parameters:
constraint -
Returns:
arrow_up


getContainedDiagrams

public List getContainedDiagrams(RefObject modelElement)

Parameters:
modelElement -
Returns:
arrow_up


getContext

public Collection getContext(Signal target)

Parameters:
target -
Returns:
arrow_up


getDataValue

public String getDataValue(TaggedValue taggedValue)


Returns data value of tagged value, if there is exactly one data value.  
Parameters:
taggedValue -
Returns:
Null or the result String
arrow_up


getDiElementsToLinkTo

public static Collection getDiElementsToLinkTo(Collection diElements, Project project)

Parameters:
diElements -
project -
Returns:
arrow_up


getDiIds

public List getDiIds(List xmiIds)


converts a xmiId-list to a local diId-list  
Parameters:
xmiIds -
Returns:
arrow_up


getDiagrams

public Collection getDiagrams(RefObject element)


Find all diagrams directly under the given model element.  
Parameters:
element -
Returns:
arrow_up


getDiagrams

public Collection getDiagrams(RefObject element, SimpleTypeInfo typeInfo)


Find all diagrams with the given type info directly under the given model element.  
Parameters:
element -
typeInfo -
Returns:
arrow_up


getDisplayProperty

public String getDisplayProperty(ModelElement ns, String key)


Looks up a property recursively, going from a namespace up the namespace hierarchy to the top level model, and then to the tool (ie: the value set in Poseidon.properties).  
Parameters:
ns -
key - The desired property.
Returns:
The value of the property or "".
arrow_up


getDisplayProperty

public String getDisplayProperty(Project p, String key)

Parameters:
p -
key -
Returns:
the configuration setting for the given item.
arrow_up


getDisplayProperty

public String getDisplayProperty(DiagramElement di, String key)


Looks up the di element for a property recursively, then the namespace of the dagram recursively if not found.  
Parameters:
di - The Diagram Element.
key - The requested key.
Returns:
The property value of the node, or of its parents, or of its diagram, or of the diagram's namespaces, or of the tool settings. Or "".
arrow_up


getElementImport

public Collection getElementImport(ModelElement target)

Parameters:
target -
Returns:
arrow_up


getElementResidence

public Collection getElementResidence(ModelElement target)

Parameters:
target -
Returns:
arrow_up


getEvent

public Event getEvent(Parameter target)

Parameters:
target -
Returns:
arrow_up


getExpressionOwner

public RefObject getExpressionOwner(Expression expression)

Parameters:
expression -
Returns:
arrow_up


getExtend

public Collection getExtend(ExtensionPoint target)

Parameters:
target -
Returns:
the Extend instance that plays the extend role in the ExtensionPoint-Extend association, given the ExtensionPoint instance
arrow_up


getExtendedModelElement

public Collection getExtendedModelElement(Stereotype stereotype)

Parameters:
stereotype -
Returns:
arrow_up


getExtender

public Collection getExtender(UseCase useCase)

Parameters:
useCase -
Returns:
arrow_up


getFirstConformingStimulus

public static Stimulus getFirstConformingStimulus(Message predecessorMessage)

Parameters:
predecessorMessage -
Returns:
arrow_up


getFirstPlayedRole

public Message getFirstPlayedRole(Stimulus stimulus)

Parameters:
stimulus -
Returns:
arrow_up


getFirstStimulus

public Stimulus getFirstStimulus(Link link)

Parameters:
link -
Returns:
arrow_up


getGeneralization

public Collection getGeneralization(GeneralizableElement target)

Parameters:
target -
Returns:
arrow_up


getGroundedSmElement

public RefObject getGroundedSmElement(DiagramElementImpl diagramElement)

Parameters:
diagramElement -
Returns:
the closest (via DI container) model element that is reachable either by graph node's semantic model bridge or by the diagram's namespace bridge
arrow_up


getImplementations

public Collection getImplementations(Classifier classifier)


This method returns all Classifiers that realize this classifier e.g.: ClassA implements InterfaceB. You give me InterfaceB, and I return ClassA.  
Parameters:
classifier - The interface you want to have the classes for.
Returns:
A collection of the Classifiers, or an empty collection.
arrow_up


getImportDependencies

public Map getImportDependencies(Classifier classifier)


Returns a map(SmId, Dependency) of import dependencies of the given classifier.  
Parameters:
classifier -
Returns:
arrow_up


getImportedLineNumber

public int getImportedLineNumber(ModelElement modelElement)


Returns the imported line number of the specified model element.  
Parameters:
modelElement -
Returns:
line number from imported source or Integer.MAX_VALUE if no line number is stored
arrow_up


getImports

public Set getImports(Classifier cls)

Parameters:
cls -
Returns:
arrow_up


getIncluder

public Collection getIncluder(UseCase useCase)

Parameters:
useCase -
Returns:
arrow_up


getInitialState

public Pseudostate getInitialState(CompositeState compState)


Looks for a initial state in the given composite state. No recursive lookup in contained composite states.  
Parameters:
compState -
Returns:
the first initial state in the collection of subvertices. Returns null, if no initial state is found.
arrow_up


getInitialValue

public String getInitialValue(AssociationEnd associationEnd)


Returns the initial value of the given association end. The initial value of an association end is realized as a tagged value.  
Parameters:
associationEnd - association end of which the initial value is requested
Returns:
initial value
arrow_up


getInnermostNamespace

public Namespace getInnermostNamespace(ModelElement element)


Returns the innermost namespace seen from the given element, i.e. either the element itself or its own namespace.  
Parameters:
element - The element to find the innermost namespace for.
Returns:
The element, if it is a namespace, or the elements namespace.
arrow_up


getInstance

public Collection getInstance(Classifier target)

Parameters:
target -
Returns:
all instances of a classifier
arrow_up


getInterfaceClass

public Class getInterfaceClass(Class implementationClass)


This method looks up the JMI compliant interface class the given class builds upon.  
Parameters:
implementationClass - The implementation class to look the interface class up for.
Returns:
The interface class for the given implementation class or null if no interface class is found.
Since:
2.0
arrow_up


getM1Extent

public RefPackage getM1Extent()


This methods returns the root RefPackage of the Uml14 metamodel. It is an instance of the class 'org.omg.uml.UmlPackage. It is called m2Rootpackgae or ToplevelMetamodelPackage in other places of the code (the names have to be refactored). This RefPackage is an accessory for all other RefPackages of the Uml14 metamodel (like (CorePackage, UseCasePackage etc.)  
Returns:
arrow_up


getMergeNameForAssociationEnd

protected String getMergeNameForAssociationEnd(AssociationEnd assocEnd)

Parameters:
assocEnd -
Returns:
arrow_up


getMergeNameForClassifier

protected String getMergeNameForClassifier(Classifier classifier)

Parameters:
classifier -
Returns:
arrow_up


getMergeNameForComment

protected String getMergeNameForComment(Comment comment)

Parameters:
comment -
Returns:
arrow_up


getMergeNameForDependency

protected String getMergeNameForDependency(Dependency dep)

Parameters:
dep -
Returns:
arrow_up


getMergeNameForFeature

protected String getMergeNameForFeature(Feature feature)

Parameters:
feature -
Returns:
arrow_up


getMergeNameForGeneralization

protected String getMergeNameForGeneralization(Generalization gen)

Parameters:
gen -
Returns:
arrow_up


getMergeNameForInstance

protected String getMergeNameForInstance(Instance instance)

Parameters:
instance -
Returns:
arrow_up


getMergeNameForLink

protected String getMergeNameForLink(Link link)

Parameters:
link -
Returns:
arrow_up


getMergeNameForModelElement

public String getMergeNameForModelElement(ModelElement element)

Parameters:
element -
Returns:
arrow_up


getMergeNameForParameter

protected String getMergeNameForParameter(Parameter param)

Parameters:
param -
Returns:
arrow_up


getMergeNameForStateMachine

protected String getMergeNameForStateMachine(StateMachine sm)

Parameters:
sm -
Returns:
arrow_up


getMergeNameForStimulus

protected String getMergeNameForStimulus(Stimulus stimulus)

Parameters:
stimulus -
Returns:
arrow_up


getMergeNameForUmlAssociation

protected String getMergeNameForUmlAssociation(UmlAssociation assoc)

Parameters:
assoc -
Returns:
arrow_up


getMergeNameForUseCase

protected String getMergeNameForUseCase(UseCase uc)

Parameters:
uc -
Returns:
arrow_up


getMessage

public Collection getMessage(Action target)

Parameters:
target -
Returns:
arrow_up


getMethod

public static Collection getMethod(Operation target)

Parameters:
target -
Returns:
arrow_up


getMethod

public Method getMethod(Operation op, String language)


Returns null or the body that has an expression in the given language.  
Parameters:
op - May not be null.
language - May not be null.
Returns:
arrow_up


getMethodBody

public String getMethodBody(Operation op, String language)


Returns "" or the method body for the given language.  
Parameters:
op -
language -
Returns:
arrow_up


getModel

public Model getModel(ModelElement element)

Parameters:
element -
Returns:
the model that owns the element, or null.
arrow_up


getMultiplicity

public static Multiplicity getMultiplicity(RefObject multiplicityOwner)

Parameters:
multiplicityOwner -
Returns:
arrow_up


getMultiplicityOwner

public static RefObject getMultiplicityOwner(Multiplicity multiplicity)

Parameters:
multiplicity -
Returns:
arrow_up


getNamespace

public Namespace getNamespace(ModelElement element)


Returns the namespace of the given element or of the first owning element having a namespace.  
Parameters:
element - The element to look the namespace up for.
Returns:
The namespace of the element or of its owner.
Since:
1.6
arrow_up


getNamespace

private Namespace getNamespace(ModelElement element, boolean acceptImmediate, boolean firstcall)

Parameters:
element -
acceptImmediate -
firstcall -
Returns:
arrow_up


getNamespace

public Namespace getNamespace(Diagram diagram)

Parameters:
diagram -
Returns:
arrow_up


getNamespaceImmediate

public Namespace getNamespaceImmediate(ModelElement element)


returns the first namespace we can find for a element - e.g., for a state we get the class that contains the states' statemachine. this is not the same as in getNamespace, as there we would get the classes namespace.  
Parameters:
element -
Returns:
arrow_up


getNamespaces

public List getNamespaces(ModelElement modelElement)


Returns a list of all namespaces beginning with the namespace of the related model element up to the top-most namespace of the model. This method will not return namespaces for elements that have no namespace at all, like states. use boolean, with second parameter==true to get namespaces also of states etc}  
Parameters:
modelElement - The model element, this list should be created for.
Returns:
A List of all namespaces from the related model element to the top-level model but only if modelelement itself has an element
arrow_up


getNamespaces

public List getNamespaces(ModelElement modelElement, boolean includeNonNamespacedElements, boolean acceptSelf)

Parameters:
modelElement -
includeNonNamespacedElements - if this is set to true, then we also get namespaces for elements that do not have a real namespace, like states - for these elements, the contexts namespace is taken, like a states statemachines classifier
acceptSelf -
Returns:
the namespaces in reverted order, i. e. the first element will be either the element itself or its container-element
arrow_up


getNavigableAssociateEnds

public Collection getNavigableAssociateEnds(Classifier classifier)


This method returns all opposite and navigable AssociationEnds of a given Classifier  
Parameters:
classifier - the classifier you want to have the opposite association ends for
Returns:
a collection of the opposite navigable associationends, never null.
arrow_up


getNumForVisibility

private int getNumForVisibility(VisibilityKind visKind)

Parameters:
visKind -
Returns:
arrow_up


getObjectFlowState

public Collection getObjectFlowState(Classifier target)

Parameters:
target -
Returns:
arrow_up


getOperations

public static List getOperations(Classifier classifier)


This method returns all operations of a given Classifier  
Parameters:
classifier - the classifier you want to have the operations for
Returns:
a collection of the operations
arrow_up


getOperationsInh

public Collection getOperationsInh(Classifier classifier)


This method returns all operations of a given Classifier, including inherited  
Parameters:
classifier - the classifier you want to have the operations for
Returns:
a collection of the operations
arrow_up


getOperationsInhInternal

private Collection getOperationsInhInternal(Classifier classifier, Set visitedClassifiers)

Parameters:
classifier -
visitedClassifiers -
Returns:
arrow_up


getOppositeEnd

public AssociationEnd getOppositeEnd(AssociationEnd thisAssocEnd)

Parameters:
thisAssocEnd -
Returns:
arrow_up


getOrCreateRealizationStereotype

public Stereotype getOrCreateRealizationStereotype()


NOT to be used from a command!!  
Returns:
arrow_up


getOrCreateStereotype

public Stereotype getOrCreateStereotype(String stereotypeName)


NOT to be used from a command!!!!  
Parameters:
stereotypeName -
Returns:
arrow_up


getOwner

public RefObject getOwner(RefObject refObject)

Parameters:
refObject -
Returns:
arrow_up


getOwner

public RefObject getOwner(Diagram diagram)

Parameters:
diagram -
Returns:
arrow_up


getOwnerElements

public List getOwnerElements(ModelElement modelElement)

Parameters:
modelElement -
Returns:
arrow_up


getOwnerModelElement

public ModelElement getOwnerModelElement(ModelElement element)


Get the container of a model element. Per default, this is the namespace of a modelelement For some elements specific container elements are used. parent element is returned.  
Parameters:
element -
Returns:
arrow_up


getParameter

public Collection getParameter(Event target)

Parameters:
target -
Returns:
arrow_up


getParameter

public Parameter getParameter(RefObject modelElement, String name)


This method returns the first parameter of an operation with the given name.  
Parameters:
modelElement - If this is not an operation null is return.
name - the name of the parameter
Returns:
the expected parameter or null if no parameter with the given name exists
arrow_up


getParameters

public Parameter[] getParameters(Operation operation, Set parameterDirectionKinds)

Parameters:
operation -
parameterDirectionKinds -
Returns:
arrow_up


getParents

public Collection getParents(GeneralizableElement child)

Parameters:
child -
Returns:
arrow_up


getPlayedRole

public Collection getPlayedRole(Stimulus stimulus)

Parameters:
stimulus -
Returns:
arrow_up


getPredecessorChain

public List getPredecessorChain(Message message)


Returms all predecessor messages of the given message.  
Parameters:
message -
Returns:
list of Messages
arrow_up


getPredecessorLinkChain

public List getPredecessorLinkChain(Message message)


Returms all predecessor links of the given message.  
Parameters:
message -
Returns:
list of links
arrow_up


getPrimaryClassDependency

public Dependency getPrimaryClassDependency(Classifier secondaryClassifier)

Parameters:
secondaryClassifier -
Returns:
arrow_up


getQualifiedLookupName

public String getQualifiedLookupName(ModelElement modelElement)

Parameters:
modelElement -
Returns:
arrow_up


getRaisedException

private static List getRaisedException(BehavioralFeature behavioralFeature)


Workaround for the missing getRaisedSignals() in Operation, specialized to find the Exceptions  
Parameters:
behavioralFeature -
Returns:
arrow_up


getRaisedSignal

public static Collection getRaisedSignal(BehavioralFeature target)

Parameters:
target -
Returns:
arrow_up


getRealization

public Dependency getRealization(Classifier cls, Classifier realizedInterface)


This method returns the Realization (edges, not nodes!!) between this classifier and this interface.  
Parameters:
cls - the classifier you want to have the realization for
realizedInterface - interface that should be realized
Returns:
if exists the realization
arrow_up


getRealizations

public Collection getRealizations(Classifier cls)


This method returns all Realizations (edges, not nodes!!) for this classifier, e.g. the (abstractions with stereotype "realizes") that connect the given interface directly with (realizing classes below that interface) NOTE: The opposite method is getSpecifications(Classifier cls)  
Parameters:
cls - the classifier (usually interface) you want to have the realizations for
Returns:
a collection of the Realizations
arrow_up


getRealizationsToClassifiers

public static Collection getRealizationsToClassifiers(Classifier cls)

Parameters:
cls -
Returns:
arrow_up


getReturnParameter

public Parameter getReturnParameter(Operation operation)


this method finds all paramters of the given operation which have the ParamterDirectionType RETURN. If it is only one, it is returned. In case there are no return parameters, null is returned. If there is more than one return parameter, the first of them is returned, but a message is written to log.debug  
Parameters:
operation - the operation you want to find the return parameter for
Returns:
If this operation has one or more parameter with Kind: RETURN, this is it, otherwise null
arrow_up


getSecondaryClasses

public List getSecondaryClasses(Classifier primaryClass)


Collects all secondary Classifiers to that class.  
Parameters:
primaryClass -
Returns:
by classifier name sorted list of all secondary classes of this class OR empty list if no secondary class exists
arrow_up


getSiblings

public Collection getSiblings(ModelElement element)


Similar to getcontainerElement, but differs for example with states and transitions  
Parameters:
element -
Returns:
arrow_up


getSmIds

public List getSmIds(List xmiIds)


converts a xmiId-list to a local smId-list  
Parameters:
xmiIds -
Returns:
arrow_up


getSourceStates

public List getSourceStates(StateVertex state)


Returns all the states that have got transitions to the state passed as parameter  
Parameters:
state -
Returns:
arrow_up


getSpecialization

public Collection getSpecialization(GeneralizableElement target)

Parameters:
target -
Returns:
arrow_up


getSpecifications

public static Collection getSpecifications(Classifier cls)


This method returns all Classifiers of which this class is a realization. e.g.: ClassA implements InterfaceB. You give me ClassA, and I give you InterfaceB Note: opposite method would be getImplementations, not existant yet  
Parameters:
cls - The class you want to have the interfaces for.
Returns:
A collection of the Classifiers, or an empty collection.
Exceptions:
NullPointerException if cls is null
arrow_up


getState

public Collection getState(Event target)

Parameters:
target -
Returns:
arrow_up


getState

public State getState(Transition target)

Parameters:
target -
Returns:
the state in which the transition is an internal transition
arrow_up


getState1

public State getState1(Action target)

Parameters:
target -
Returns:
the opposite end of an entry action.
arrow_up


getState2

public State getState2(Action target)

Parameters:
target -
Returns:
the opposite end of an exit action.
arrow_up


getState3

public State getState3(Action target)

Parameters:
target -
Returns:
the opposite end of a do action.
arrow_up


getStateContainerElement

public ModelElement getStateContainerElement(StateVertex state)


If the state has a containing state, the container state is returned. If the state is toplevel, it only has a hidden composite state. Then the context classifier is returned as the container.  
Parameters:
state -
Returns:
arrow_up


getStateForDoActivity

public State getStateForDoActivity(Action target)

Parameters:
target -
Returns:
arrow_up


getStateForEntryAction

public State getStateForEntryAction(Action target)

Parameters:
target -
Returns:
arrow_up


getStateForExitAction

public State getStateForExitAction(Action target)

Parameters:
target -
Returns:
arrow_up


getStateMachine

public Collection getStateMachine(ModelElement target)

Parameters:
target -
Returns:
arrow_up


getStates

public List getStates(Classifier cls)


Finds all states in the first StateMachine of the given class.  
Parameters:
cls -
Returns:
A Collection of State, or an empty collection.
arrow_up


getStates

public List getStates(StateMachine sm)


Finds all states in the given StateMachine. This works only if all states take part in at least one transition.  
Parameters:
sm -
Returns:
A Collection of State, or an empty collection.
arrow_up


getStereotypeByName

public static Stereotype getStereotypeByName(ModelElement element, String stereotypeName)


Returns the (first) stereotype with the given name appliad to the model-element.  
Parameters:
element - the ModelElement to check for the given stereotype-name; must not be null
stereotypeName - the name of the stereotype (will be compared with {@link String#equals(Object)}); value null will always return null
Returns:
the first {@link Stereotype} found with the given stereotype-name
Exceptions:
NullPointerException if element is null
arrow_up


getStereotypes

public static Collection getStereotypes(ModelElement element)


Returns all stereotypes for the given model element.  
Parameters:
element - The model element to examine.
Returns:
All stereotypes for the given model element OR NULL IF IT DOES NOT HAVE ANY STEREOTYPES.
arrow_up


getStereotypesToShow

public List getStereotypesToShow(ModelElement element)


Returns all stereotypes for the given model element.  
Parameters:
element - The model element to examine. Must not be null.
Returns:
All stereotypes for the given model element that should be shown to the poseidon user
arrow_up


getStimulus

public Collection getStimulus(Link target)

Parameters:
target -
Returns:
arrow_up


getStimulus

public Collection getStimulus(Action target)

Parameters:
target -
Returns:
arrow_up


getStimulus1

public Collection getStimulus1(Instance target)

Parameters:
target - The instance playing the argument role
Returns:
the stimuli of the instance-stimulus association where instance playing the argument role
arrow_up


getStimulus2

public Collection getStimulus2(Instance target)

Parameters:
target - The instance playing the sender role
Returns:
the stimuli of the instance-stimulus association, instance playing the sender role
arrow_up


getStimulus3

public Collection getStimulus3(Instance target)

Parameters:
target - The instance playing the receiver role
Returns:
the stimulus of the instance-stimulus association, instance playing the receiver role
arrow_up


getSubtypes

public Collection getSubtypes(GeneralizableElement generalizable)


This method returns all generalizable elements of which this generalizable element is a direct supertype.  
Parameters:
generalizable - The class you want to have the children for.
Returns:
Exceptions:
NullPointerException if generalizable is null
arrow_up


getSuccessor

public Collection getSuccessor(Message message)

Parameters:
message -
Returns:
arrow_up


getSupertypes

public Collection getSupertypes(GeneralizableElement generalizable)


This method returns all generalizable elements of which this generalizable element is a direct subtype.  
Parameters:
generalizable - The class you want to have the parents for.
Returns:
Nevernull. A collection of the parents, each of which is a {@link GeneralizableElement}
Exceptions:
NullPointerException if generalizable is null
arrow_up


getSupplierDependency

public Collection getSupplierDependency(ModelElement target)

Parameters:
target -
Returns:
arrow_up


getTagDefinition

public TagDefinition getTagDefinition(String tagName, RefObject owner)


Returns the TagDefinition with the given name. The name is looked up in the list of existing TagDefinitions only.  
Parameters:
tagName - The name to look a TagDefinition up for.
owner -
Returns:
The registered TagDefinition or null if no TagDefinition with the given name is registered.
arrow_up


getTagName

public String getTagName(TaggedValue taggedValue)


If you have a TV, get the key (=the name of the TV type) with this method.  
Parameters:
taggedValue -
Returns:
the name of the tag, may be null.
arrow_up


getTaggedValue

public String getTaggedValue(ModelElement me, String tag)


Returns the first data value element of the first tagged value of given a model element that has the given tag.  
Parameters:
me -
tag - the TagDefinition with the given name.
Returns:
Null or the first data value as String.
arrow_up


getTaggedValueDataValue

public String getTaggedValueDataValue(ModelElement modelElement, String tagDefinitionName)

Deprecated.
Seems to be not used anymore. Verify and then remove.

Gets the first datavalue of the first tagged value that has a tag definition with the given name.

This is probably the method you will want to use most often, as it returns a value string when a key string is given.  

Parameters:
modelElement - The element.
tagDefinitionName - The tag (aka the key).
Returns:
The value stored under the given key, or null. the empty String "" is only returned if someone has stored the empty string under the given key.
arrow_up


getTaggedValueLists

public Map getTaggedValueLists(ModelElement element, Pattern keyPattern)


Return a Map of Lists of TaggedValues which keys matches a pattern. The elements of the lists are assigned TaggedValues for the keys.  
Parameters:
element - only TaggedValues for this modelelement are included.
keyPattern - optional pattern for the key string. Can be null.
Returns:
a Map of Lists of TaggedValues for keys which matches the pattern.
arrow_up


getTaggedValueLists

public Map getTaggedValueLists(ModelElement element)


Gathers all tagged values of a model element in a map from key to value. Uses this method when there are may be more than one TaggedValue for a key  
Parameters:
element -
Returns:
A map with the TaggedDefinition name as key and lists as values. Every entry in a list is a value as String for the key
Since:
2.0
arrow_up


getTaggedValueObject

public TaggedValue getTaggedValueObject(ModelElement me, String tag)

Parameters:
me -
tag -
Returns:
arrow_up


getTaggedValueSingle

public TaggedValue getTaggedValueSingle(ModelElement modelElement, String tagDefinitionName)


Returns the first TV with the given name. Theoretically, the user can create multiple TVs with the same tag(=key), but it is not very wise semantically.  
Parameters:
modelElement - The element.
tagDefinitionName - The tag (aka the key) of the tagged value.
Returns:
Null or the first TV with the given key. TVs are not ordered, so it can be any one if several have the same key.
arrow_up


getTaggedValueType

public TaggedValue getTaggedValueType(ModelElement me, String tag)


Returns the first tagged value of given a model element, that has the given tag. A tag is the tagName of the associated TagDefinition.  
Parameters:
me -
tag - The name of the type of the TV.
Returns:
Null or the correct TaggedValue.
arrow_up


getTaggedValues

public Collection getTaggedValues(ModelElement modelElement, String tagDefinitionName)

Deprecated.
Seems to be not used anymore and if I (mm) remember right, this method does not even work

Retrieves all tagged values that have the given tag.type.name.  
Parameters:
modelElement - The element owning the TVs.
tagDefinitionName - The String that serves as the name of the type of the TV.
Returns:
A Collection of TaggedValues. Probably with only one entry.
arrow_up


getTargetStates

public List getTargetStates(StateVertex state)


returns all the states that the state passed as parameter has transitions to  
Parameters:
state -
Returns:
arrow_up


getTemplateArgument

public Collection getTemplateArgument(ModelElement element)

Parameters:
element -
Returns:
arrow_up


getThrownExceptions

public static List getThrownExceptions(BehavioralFeature behavioralFeature)


Retrieves the thrown exceptions.  
Parameters:
behavioralFeature -
Returns:
a List of UmlExceptions, or null.
arrow_up


getTopLevelNamespace

public Namespace getTopLevelNamespace(ModelElement element)


Returns the top-level namepsace of the given element. Usually, the top-level namespace is the model itself.  
Parameters:
element - The element the top-level namespace is looked for.
Returns:
The top-level namespace or null, if no top-level namespace is found.
arrow_up


getTransition

public Collection getTransition(Event target)

Parameters:
target -
Returns:
arrow_up


getTransition

public Transition getTransition(Action target)

Parameters:
target -
Returns:
arrow_up


getTransitionContainerElement

public ModelElement getTransitionContainerElement(Transition trans)

Parameters:
trans -
Returns:
arrow_up


getTypedFeature

public Collection getTypedFeature(Classifier target)

Parameters:
target -
Returns:
arrow_up


getTypedValue

public Collection getTypedValue(TagDefinition tagDefinition)

Parameters:
tagDefinition -
Returns:
arrow_up


getTypes

private Collection getTypes(GeneralizableElement generalizable, int which)


Internal method that is used by getSubtypes() and by getSupertypes(); Depending on the which-parameter, the super- or subtypes are returned. do no call from outside!!  
Parameters:
generalizable -
which -
Returns:
Exceptions:
NullPointerException if generalizable is null
arrow_up


getUmlClass

public static Class getUmlClass(Class sourceClass)


Add an import to the in/out Set 'imports' if it is necessary.

This method is java-specific.  

Parameters:
sourceClass -
Returns:
arrow_up


getUseDependenciesToInterfaces

public List getUseDependenciesToInterfaces(Classifier cls)

Parameters:
cls -
Returns:
arrow_up


getUseDependency

public Dependency getUseDependency(Classifier cls, Classifier useDependencInterface)

Parameters:
cls -
useDependencInterface -
Returns:
arrow_up


getUseDependencyInterfaces

public List getUseDependencyInterfaces(Classifier classifier)

Parameters:
classifier -
Returns:
arrow_up


getXmiIds

public List getXmiIds(List ids)


returns a list of xmiIds for SmId or DiIds  
Parameters:
ids -
Returns:
arrow_up


handleImportDependencySupplier

private void handleImportDependencySupplier(Iterator suppliers, Set imports)

Parameters:
suppliers -
imports -
arrow_up


hasStereotype

public static boolean hasStereotype(ModelElement element, String stereotypeName)


Checks if a ModelElement has a stereotype with the given name.  
Parameters:
element - Any model element.
stereotypeName - Name of a stereotype.
Returns:
True if the element has a stereotype with the given name (case-sensitive).
arrow_up


hideStereotype

public boolean hideStereotype(GraphEdgeImpl dependencyGraphEdge, String hideTargetArrowStereotypeName)

Parameters:
dependencyGraphEdge - any edge
hideTargetArrowStereotypeName - the stereotype that should be hidden
Returns:
true if the edge has a stereotype that should be hidden if the edge is connected to a ball/socket
arrow_up


isClassifierSecondaryClass

public boolean isClassifierSecondaryClass(Classifier classifier)

Parameters:
classifier -
Returns:
arrow_up


isCollection

public boolean isCollection(String type)

Deprecated.
Seems to be not used anymore (btw: state2java/Util implements the same method, unused, too). Especially verify that it is not used by reverse-engineering and remove the method and its tests otherwise.

True iff the given type is the name of a well-known Java collection class like Collection, LinkedList etc.  
Parameters:
type -
Returns:
arrow_up


isConstructor

public boolean isConstructor(Operation op)


Test, if the given operation is a constructor. An operation is a constructor, either if the <<create>>-stereotype is set, or if the java-naming-convention is true, i. e. the name of the operation must be equal to its owning classifier and one of the following rules must apply:

  1. no return-type defined or
  2. the returned value has the same type as the owning classifer
 
Parameters:
op - The operation to check if it is a constructor
Returns:
true if one of the rules above apply, false otherwise
arrow_up


isDestructor

public boolean isDestructor(Operation op)


Test, if the given operation is a destructor. An operation is a destructor iff. the <<destroy>>-stereotype is set.

 
Parameters:
op - The operation to check if it is a destructor
Returns:
true if one of the rules above apply, false otherwise
See also:
Uml1SmAccessory#STEREOTYPE_DESTROY
arrow_up


isEqual

public boolean isEqual(ModelElement element, ModelElement equalTo)

Parameters:
element -
equalTo -
Returns:
arrow_up


isEqualParameter

private boolean isEqualParameter(Parameter p1, Parameter p2)

Parameters:
p1 -
p2 -
Returns:
arrow_up


isEqualTrigger

public boolean isEqualTrigger(Event trigger1, Event trigger2)

Parameters:
trigger1 -
trigger2 -
Returns:
arrow_up


isEventPartOfInternalTransition

public boolean isEventPartOfInternalTransition(Event umlEvent)


This method takes an event, looks for its transition, and then checks wether the transition is an internal transition. If so, then return true, otherwise false;  
Parameters:
umlEvent -
Returns:
arrow_up


isHiddenStereotypeName

public static boolean isHiddenStereotypeName(String name)

Parameters:
name -
Returns:
arrow_up


isImportDependency

public boolean isImportDependency(Dependency dependency)


True if dependency with stereotype "import".  
Parameters:
dependency -
Returns:
arrow_up


isInnerClassifier

private boolean isInnerClassifier(Classifier currentClassifier, Classifier expectedInnerClassifier)

Parameters:
currentClassifier -
expectedInnerClassifier -
Returns:
arrow_up


isJavaPrimitiveDataType

public static boolean isJavaPrimitiveDataType(ModelElement type)


True if the type is a primitive like a char etc.  
Parameters:
type -
Returns:
arrow_up


isJavaPrimitiveDataTypeName

public static boolean isJavaPrimitiveDataTypeName(String name)


True if the parameter is a primitive type name like 'char' etc.  
Parameters:
name -
Returns:
arrow_up


isModelElementStillValid

public final boolean isModelElementStillValid(RefObject element)

Parameters:
element -
Returns:
arrow_up


isParentNamespace

public boolean isParentNamespace(ModelElement element, Namespace namespace)


Tests if the given namespace is among the parent namespaces of the given element. That is, if 'namespace' is deleted, would 'element' also be deleted?  
Parameters:
element - Any element.
namespace - A possible parent namespace.
Returns:
True if namespace is a namespace of element (even transitively), otherwise false. Note that 'false' is also returned if namespace == element!
arrow_up


isPort

public boolean isPort(RefObject modelElement)

Parameters:
modelElement -
Returns:
arrow_up


isPrimaryClassDependency

public static boolean isPrimaryClassDependency(Dependency dependency)


True if abstraction with stereotype "gentleware-primary-class".  
Parameters:
dependency -
Returns:
arrow_up


isRealization

public static boolean isRealization(Dependency dependency)


True if abstraction with stereotype "realize".  
Parameters:
dependency -
Returns:
arrow_up


isResident

public boolean isResident(RefObject element, Component container)


Tests, if the given model element is resident for the given component.  
Parameters:
element - The model element to test.
container - The component to look the residence up for.
Returns:
True, if the model element is resident for the component, otherwise false.
arrow_up


isSelfAssociation

public boolean isSelfAssociation(UmlAssociation association)

Parameters:
association -
Returns:
arrow_up


isTopLevelModel

public boolean isTopLevelModel(Namespace namespace)


Tests if the given namespace is the top-level model.  
Parameters:
namespace - The namespace to be tested.
Returns:
True if the namespace is the top-level model, otherwise false. Especially, returns false if parameter is null.
arrow_up


isValidConstraint

public boolean isValidConstraint(Constraint constr)


Tests if the constraint has a tagged value "isValid" that says true.  
Parameters:
constr -
Returns:
arrow_up


isValidNamespace

public boolean isValidNamespace(Diagram diagram, ModelElement testedElement)

Parameters:
diagram -
testedElement -
Returns:
arrow_up


isValidOwner

public boolean isValidOwner(Diagram diagram, RefObject testedElement)

Parameters:
diagram -
testedElement -
Returns:
arrow_up


lookup

public RefObject lookup(Namespace parent, String searchedElementName, Class searchedElementClass)


Finds a model element by name in the given namespace. If a searchedElementClass is supplied, only those model elements that are instances of the class are inspected and returned. This can save a lot of time when using this method often.  
Parameters:
parent -
searchedElementName -
searchedElementClass -
Returns:
null if not found, the first ModelElement with the given name and type otherwise.
arrow_up


lookup

public RefObject lookup(Namespace location, String wanted)


Finds a model element by name in the given namespace.  
Parameters:
location -
wanted -
Returns:
null if not found, the first ModelElement with the given name otherwise.
arrow_up


lookupAssociationRecursive

public UmlAssociation lookupAssociationRecursive(Namespace namespace, UmlAssociation assoc)

Parameters:
namespace -
assoc -
Returns:
arrow_up


lookupComment

public Comment lookupComment(Comment comment)

Parameters:
comment -
Returns:
arrow_up


lookupConstraint

public Constraint lookupConstraint(Constraint constraint)

Parameters:
constraint -
Returns:
arrow_up


lookupDependency

public Dependency lookupDependency(Dependency dependency)

Parameters:
dependency -
Returns:
arrow_up


lookupGeneralization

public Generalization lookupGeneralization(Generalization generalization)

Parameters:
generalization -
Returns:
arrow_up


lookupInnerElementRecursive

public ModelElement lookupInnerElementRecursive(Namespace topLocation, String wanted, Class elementClass)


Finds a ModelElement by recursively looking up in the contained namespaces, roughly depth-first. First, package-qualification is resolved. lookupRecursive for pack1::Foo means: lookup Foo recursively, starting in pack1 that is in topLocation. Then, the namespace, the first state machine, the list of features and (in case of a use case) the list of extension points are inspected. If there is an element matching the name, it is returned. Then, depth-first recursion of all namespaces in the current namespace begins, in the same manner.

In the long run, this implementation should be replaced by something searching along the metamodel associations.  

Parameters:
topLocation - The namespace where the search starts.
wanted - The name of the desired ModelElement. You may give something like pack1::pack2::MyClassifier.
elementClass -
Returns:
The found ModelElement or null.
arrow_up


lookupInnerElementRecursive

public ModelElement lookupInnerElementRecursive(Namespace topLocation, String wanted, Class elementClass, boolean allowDuplicates)

Parameters:
topLocation -
wanted -
elementClass -
allowDuplicates -
Returns:
arrow_up


lookupRecursive

public ModelElement lookupRecursive(Namespace topLocation, String searchedElementName, Class searchedElementClass)


Finds a ModelElement by recursively looking up in the contained namespaces, roughly depth-first. First, package-qualification is resolved. lookupRecursive for pack1::Foo means: lookup Foo recursively, starting in pack1 that is in topLocation. Then, the namespace is inspected. If there is an element matching the name, it is returned. Then, depth-first recursion of all namespaces in the current namespace begins, in the same manner.  
Parameters:
topLocation - The namespace where the search starts.
searchedElementName - The name of the desired ModelElement. You may give something like pack1::pack2::MyClassifier.
searchedElementClass -
Returns:
The found ModelElement or null.
arrow_up


lookupRecursiveWithNamespaceInName

private ModelElement lookupRecursiveWithNamespaceInName(Namespace topLocation, String qualifiedName, int endIndexTopLevelNamespaceName, Class elementClass)

Parameters:
topLocation -
qualifiedName -
endIndexTopLevelNamespaceName -
elementClass -
Returns:
arrow_up


lookupRecursiveWithPlainName

private ModelElement lookupRecursiveWithPlainName(Namespace topLocation, String searchedElementName, Class searchedElementClass)

Parameters:
topLocation -
searchedElementName -
searchedElementClass -
Returns:
arrow_up


lookupRecursiveWithPlainNameInSubNamespaces

private ModelElement lookupRecursiveWithPlainNameInSubNamespaces(List subNamespaces, String searchedElementName, Class searchedElementClass)

Parameters:
subNamespaces -
searchedElementName -
searchedElementClass -
Returns:
arrow_up


lookupTemplateArgument

public TemplateArgument lookupTemplateArgument(TemplateArgument templateArgument)

Parameters:
templateArgument -
Returns:
arrow_up


removeHiddenStereotypeName

public static boolean removeHiddenStereotypeName(String name)

Parameters:
name -
Returns:
arrow_up


selectElementsByType

private static void selectElementsByType(Namespace namespace, Collection elems, Class classtype, boolean recursive)

Parameters:
namespace -
elems -
classtype -
recursive -
arrow_up


setDataValue

public void setDataValue(TaggedValue taggedValue, String value)


Sets data value of tagged value.  
Parameters:
taggedValue -
value -
arrow_up


setExpression

public void setExpression(RefObject owner, Expression expression)


Use this method to set an expression to an element. DO NOT USE for setting an expression to null in an owner, use unsetExpression instead.  
Parameters:
owner - The owner element that will get a new expression
expression - The expression that you want to set.
arrow_up


setExpression

private void setExpression(RefObject owner, Expression expression, boolean unsetting, Class expressionClass)

Parameters:
owner -
expression -
unsetting -
expressionClass -
arrow_up


setMultiplicity

public static void setMultiplicity(RefObject owner, Multiplicity multiplicity)

Parameters:
owner -
multiplicity -
arrow_up


signaturesMatch

public boolean signaturesMatch(Operation operation1, Operation operation2)

Parameters:
operation1 -
operation2 -
Returns:
arrow_up


testElementTypeAndName

private boolean testElementTypeAndName(String wanted, Class elementClass, ModelElement tested)

Parameters:
wanted -
elementClass -
tested -
Returns:
arrow_up


testElementTypeAndName

private boolean testElementTypeAndName(String wanted, Class elementClass, RefObject tested, String testedName)

Parameters:
wanted -
elementClass -
tested -
testedName -
Returns:
arrow_up


unsetExpression

public void unsetExpression(RefObject owner, Class expressionClass)


Use this method to unset the expression of an owner.  
Parameters:
owner -
expressionClass -
arrow_up
Created  2004 - 12 - 1

    Poseidon for UMLTM
  UMLdoc
 PREV  CLASSIFIER    NEXT  CLASSIFIER     FRAMES    NO FRAMES      
SUMMARY:   INNER | ATTR | ASSOC | CONSTR | METHOD     DETAIL:   INNER | ATTR | ASSOC | CONSTR | METHOD     DIAGRAMS:   COLLAB | SEQ | STATE | ACTIV

Generated with Poseidon for UMLTM.
Poseidon is a registered trademark of Gentleware AG in Germany, USA and other countries. Copyright 2003-2004 Gentleware AG, Schanzenstr. 70, 20357 Hamburg, Germany. All Rights Reserved.

UML is a trademark or registered trademark of Object Management Group, Inc. in the U.S. and other countries.