Package org.andromda.metafacades.uml

Examples of org.andromda.metafacades.uml.AssociationEndFacade


        if (!present)
        {
            final Collection associationEnds = this.getAssociationEnds();
            for (final Iterator iterator = associationEnds.iterator(); iterator.hasNext() && !present;)
            {
                final AssociationEndFacade associationEnd = (AssociationEndFacade)iterator.next();
                final ClassifierFacade classifier = associationEnd.getOtherEnd().getType();
                present = classifier instanceof FrontEndUseCase;
            }

            // - a generalized role is still a role, and therefore is associated with the FrontEndUseCase
            if (!present)
View Full Code Here


                            attribute.getGetterName(),
                            attribute.getDocumentation(indendation));
                }
                else
                {
                    final AssociationEndFacade association = (AssociationEndFacade)property;
                    method =
                        new MethodData(
                            fullyQualifiedName,
                            methodVisibility,
                            false,
                            association.getGetterSetterTypeName(),
                            association.getGetterName(),
                            association.getDocumentation(indendation));
                }
                final String declaration = method.buildMethodDeclaration(true);

                // don't add the new method data if we already have the
                // declaration from a previous generalization.
View Full Code Here

        class NavigableFilter
            implements Predicate
        {
            public boolean evaluate(Object object)
            {
                AssociationEndFacade end = (AssociationEndFacade)object;

                return end.isNavigable() || (end.getOtherEnd().isChild() && isForeignHibernateGeneratorClass());
            }
        }
        CollectionUtils.filter(
            connectingEnds,
            new NavigableFilter());
View Full Code Here

        class NavigableFilter
            implements Predicate
        {
            public boolean evaluate(Object object)
            {
                AssociationEndFacade end = (AssociationEndFacade)object;

                return end.isNavigable() || (end.getOtherEnd().isChild() && isForeignHibernateGeneratorClass());
            }
View Full Code Here

    {
        final Collection usersList = new ArrayList();
        final Collection associationEnds = this.getAssociationEnds();
        for (final Iterator iterator = associationEnds.iterator(); iterator.hasNext();)
        {
            final AssociationEndFacade associationEnd = (AssociationEndFacade)iterator.next();
            final ClassifierFacade classifier = associationEnd.getOtherEnd().getType();
            if (classifier instanceof Role)
            {
                usersList.add(classifier);
            }
        }
View Full Code Here

    {
        final Collection usersList = new ArrayList();
        final Collection associationEnds = getAssociationEnds();
        for (final Iterator iterator = associationEnds.iterator(); iterator.hasNext();)
        {
            final AssociationEndFacade associationEnd = (AssociationEndFacade)iterator.next();
            final ClassifierFacade classifier = associationEnd.getOtherEnd().getType();
            if (classifier instanceof Role)
            {
                usersList.add(classifier);
            }
        }
View Full Code Here

    {
        String tableName = null;
        final Collection ends = this.getAssociationEnds();
        if (ends != null && !ends.isEmpty())
        {
            final AssociationEndFacade end = (AssociationEndFacade)ends.iterator().next();
            final ClassifierFacade type = end.getType();
            if (type != null && end.isMany2Many())
            {
                // - prevent ClassCastException if the association isn't an
                // Entity
                if (type instanceof Entity)
                {
View Full Code Here

    private ClassifierFacade getClassifier(final Object element)
    {
        ClassifierFacade type = null;
        if (element instanceof AssociationEndFacade)
        {
            AssociationEndFacade end = (AssociationEndFacade)element;
            if (end.isMany())
            {
                type = ((AssociationEndFacade)element).getType();
            }
        }
        else if (element instanceof AttributeFacade)
View Full Code Here

                            final Collection associationEnds = parameter.getNavigableAssociationEnds();
                            if (!associationEnds.isEmpty())
                            {
                                for (final Iterator iterator = associationEnds.iterator(); iterator.hasNext();)
                                {
                                    final AssociationEndFacade end = (AssociationEndFacade)iterator.next();
                                    final ClassifierFacade type = end.getType();
                                    if (type != null)
                                    {
                                        final Collection typeAttributes = type.getAttributes();
                                        if (!attributes.isEmpty())
                                        {
                                            for (final Iterator attributeIterator = typeAttributes.iterator();
                                                attributeIterator.hasNext();)
                                            {
                                                final JSFAttribute attribute = (JSFAttribute)attributeIterator.next();
                                                messages.put(
                                                    attribute.getMessageKey(),
                                                    attribute.getMessageValue());
                                            }
                                        }
                                    }
                                }
                            }
                            messages.put(
                                parameter.getMessageKey(),
                                parameter.getMessageValue());
   
                            // - table
                            if (parameter.isTable())
                            {
                                final Collection columnNames = parameter.getTableColumnNames();
                                for (final Iterator columnNameIterator = columnNames.iterator();
                                    columnNameIterator.hasNext();)
                                {
                                    final String columnName = (String)columnNameIterator.next();
                                    messages.put(
                                        parameter.getTableColumnMessageKey(columnName),
                                        parameter.getTableColumnMessageValue(columnName));
                                }
                            }
                        }
                    }

                    final List actions = useCase.getActions();
                    for (int ctr3 = 0; ctr3 < actions.size(); ctr3++)
                    {
                        // - action
                        final JSFAction action = (JSFAction)actions.get(ctr3);

                        // - event/trigger
                        final Object trigger = action.getTrigger();
                        if (trigger instanceof JSFEvent)
                        {
                            final JSFEvent event = (JSFEvent)trigger;
                            if (event != null)
                            {
                                // only add these when a trigger is present, otherwise it's no use having them
                                messages.put(
                                    action.getDocumentationKey(),
                                    action.getDocumentationValue());
   
                                // the regular trigger messages
                                messages.put(
                                    event.getResetMessageKey(),
                                    event.getResetMessageValue());
   
                                // this one is the same as doing: action.getMessageKey()
                                messages.put(
                                    event.getMessageKey(),
                                    event.getMessageValue());
   
                                // - IMAGE LINK
   
                                /*if (action.isImageLink())
                                {
                                    messages.put(
                                        action.getImageMessageKey(),
                                        action.getImagePath());
                                }*/
                            }
                        }

                        // - forwards

                        final List transitions = action.getTransitions();
                        for (final Iterator iterator = transitions.iterator(); iterator.hasNext();)
                        {
                            final Object transition = iterator.next();
                            if (transition instanceof JSFForward)
                            {
                                final JSFForward forwardTransition = (JSFForward)transition;   
                                messages.putAll(forwardTransition.getSuccessMessages());
                                messages.putAll(forwardTransition.getWarningMessages());
                            }
                            else
                            {
                                final JSFAction actionTransition = (JSFAction)transition;   
                                messages.putAll(actionTransition.getSuccessMessages());
                                messages.putAll(actionTransition.getWarningMessages());                               
                            }

                        }

                        // - action parameters
                        final List parameters = action.getParameters();
                        for (int l = 0; l < parameters.size(); l++)
                        {
                            final Object object = parameters.get(l);
                            if (object instanceof JSFParameter)
                            {
                                final JSFParameter parameter = (JSFParameter)object;
                                final Collection attributes = parameter.getAttributes();
                                if (!attributes.isEmpty())
                                {
                                    for (final Iterator iterator = attributes.iterator(); iterator.hasNext();)
                                    {
                                        final JSFAttribute attribute = (JSFAttribute)iterator.next();
                                        messages.put(
                                            attribute.getMessageKey(),
                                            attribute.getMessageValue());
                                    }
                                }
                                final Collection associationEnds = parameter.getNavigableAssociationEnds();
                                if (!associationEnds.isEmpty())
                                {
                                    for (final Iterator iterator = associationEnds.iterator(); iterator.hasNext();)
                                    {
                                        final AssociationEndFacade end = (AssociationEndFacade)iterator.next();
                                        final ClassifierFacade type = end.getType();
                                        if (type != null)
                                        {
                                            final Collection typeAttributes = type.getAttributes();
                                            if (!attributes.isEmpty())
                                            {
View Full Code Here

       
        List associationEnds = clazz.getAssociationEnds();
       
        for ( Iterator iterator = associationEnds.iterator(); iterator.hasNext(); )
        {
            AssociationEndFacade pageEnd = ( AssociationEndFacade ) iterator.next();
            AssociationEndFacade pageOtherEnd = pageEnd.getOtherEnd();

            if ( pageOtherEnd.getType().hasStereotype( "View" ) && pageOtherEnd.isNavigable() )
            {
                map.putAll( getViewViewCtrlUseCaseMap(pageOtherEnd.getType()) );
            }     
        }
        return map;
    }
View Full Code Here

TOP

Related Classes of org.andromda.metafacades.uml.AssociationEndFacade

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.