Package org.andromda.metafacades.uml

Examples of org.andromda.metafacades.uml.ClassifierFacade


        // make sure that any service parameter exists here too
        final Collection serviceParameters = serviceOperation.getParameters();
        for (final Iterator iterator = serviceParameters.iterator(); iterator.hasNext() && matches;)
        {
            final ParameterFacade serviceParameter = (ParameterFacade)iterator.next();
            final ClassifierFacade controllerParameterType = (ClassifierFacade)parameterMap.get(
                serviceParameter.getName());
            matches = (controllerParameterType != null) && controllerParameterType.equals(serviceParameter.getType());
        }

        return matches;
    }
View Full Code Here


        boolean abstractImplementation = !this.getOperations().isEmpty();
        if (!abstractImplementation)
        {
            for (final Iterator iterator = this.getAllGeneralizations().iterator(); iterator.hasNext();)
            {
                final ClassifierFacade classifier = (ClassifierFacade)iterator.next();
                abstractImplementation = !classifier.getOperations().isEmpty();
                if (abstractImplementation)
                {
                    break;
                }
            }
View Full Code Here

            }

            if (this.contextElement != null && this.operation != null &&
                    ClassifierFacade.class.isAssignableFrom(contextElement.getClass()))
            {
                ClassifierFacade type = (ClassifierFacade)this.contextElement;
                Collection operations = type.getOperations();
                this.contextElement = CollectionUtils.find(operations, new OperationFinder());
                if (this.contextElement == null)
                {
                    throw new ContextElementFinderException("No operation matching '" + operation +
                            "' could be found on element --> '" + contextElementName + "', please check your model");
View Full Code Here

     */
    protected java.lang.String handleGetMessageKey()
    {
        final StringBuffer messageKeyBuffer = new StringBuffer();

        final ClassifierFacade ownerType = this.getOtherEnd().getType();
        if (ownerType instanceof ManageableEntity)
        {
            messageKeyBuffer.append(ownerType.getName());
        }
        else
        {
            messageKeyBuffer.append(ownerType.getName());
        }

        messageKeyBuffer.append('.');
        messageKeyBuffer.append(this.getName());

View Full Code Here

     */
    protected java.lang.String handleGetMessageValue()
    {
        String messageValue = null;

        final ClassifierFacade type = this.getType();
        if (type instanceof Entity)
        {
            messageValue = this.getName();
        }

View Full Code Here

     * @see org.andromda.metafacades.uml.AttributeFacade#getDefaultValue()
     */
    public String getDefaultValue()
    {
        String defaultValue = super.getDefaultValue();
        final ClassifierFacade type = this.getType();
        if (type != null)
        {
            final String fullyQualifiedName = StringUtils.trimToEmpty(type.getFullyQualifiedName());
            if ("java.lang.String".equals(fullyQualifiedName))
            {
                defaultValue = "\"" + defaultValue + "\"";
            }
            else if (fullyQualifiedName.startsWith("java.lang"))
            {
                defaultValue = fullyQualifiedName + ".valueOf(" + defaultValue + ")";
            }
            else if (type.isEnumeration())
            {
                final String mask = (String)this.getConfiguredProperty(UMLMetafacadeProperties.ENUMERATION_LITERAL_NAME_MASK);
                defaultValue = type.getFullyQualifiedName() + '.' + NameMasker.mask(defaultValue, mask);
            }
        }
        return defaultValue;
    }
View Full Code Here

     * @see org.andromda.metafacades.uml.FrontEndParameter#isTable()
     */
    protected boolean handleIsTable()
    {
        boolean isTable = false;
        final ClassifierFacade type = this.getType();
        if (type != null)
        {
            isTable = type.isCollectionType() || type.isArrayType();
            if (isTable)
            {
                final String tableTaggedValue = ObjectUtils.toString(this.findTaggedValue(UMLProfile.TAGGEDVALUE_PRESENTATION_IS_TABLE));
                isTable =
                    StringUtils.isNotBlank(tableTaggedValue) ? Boolean.valueOf(tableTaggedValue.trim()).booleanValue() : true;
View Full Code Here

     * @return the collection of attributes.
     */
    private Collection getNonArrayAttributes()
    {
        final Collection nonArrayAttributes = new ArrayList();
        final ClassifierFacade type = this.getType();
        if (type != null && type.isArrayType())
        {
            final ClassifierFacade nonArrayType = type.getNonArray();
            if (nonArrayType != null)
            {
                nonArrayAttributes.addAll(nonArrayType.getAttributes(true));
            }
        }
        return nonArrayAttributes;
    }
View Full Code Here

        String name = super.handleGetName();

        // if name is empty, then get the name from the type
        if (StringUtils.isEmpty(name))
        {
            final ClassifierFacade type = this.getType();
            if (type != null)
            {
                name = StringUtils.uncapitalize(StringUtils.trimToEmpty(type.getName()));
            }
            if (this.isMany() && this.isPluralizeAssociationEndNames())
            {
                name = StringUtilsHelper.pluralize(name);
            }
View Full Code Here

     *
     * @see org.andromda.metafacades.emf.uml2.ModelElementFacadeLogic#handleGetPackageName()
     */
    public String handleGetPackageName()
    {
        final ClassifierFacade owner = this.getOwner();
        return owner != null ? owner.getPackageName() : "";
    }
View Full Code Here

TOP

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

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.