Package org.omg.uml.foundation.core

Examples of org.omg.uml.foundation.core.Attribute


        // already exist
        if (!UML14MetafacadeUtils.attributeExists(
                classifier,
                name))
        {
            final Attribute identifier =
                UML14MetafacadeUtils.createAttribute(
                    name,
                    type,
                    visibility,
                    MetafacadeConstants.NAMESPACE_SCOPE_OPERATOR);

            identifier.getStereotype().add(
                UML14MetafacadeUtils.findOrCreateStereotype(UMLProfile.STEREOTYPE_IDENTIFIER));

            classifier.getFeature().add(identifier);
        }
    }
View Full Code Here


                        }
                    }

                    boolean required = !this.isColumnNullable(metadata, tableName, columnName);

                    Attribute attribute =
                        corePackage.getAttribute().createAttribute(
                            attributeName,
                            VisibilityKindEnum.VK_PUBLIC,
                            false,
                            ScopeKindEnum.SK_INSTANCE,
                            this.createAttributeMultiplicity(
                                corePackage.getDataTypes(),
                                required),
                            ChangeableKindEnum.CK_CHANGEABLE,
                            ScopeKindEnum.SK_CLASSIFIER,
                            OrderingKindEnum.OK_UNORDERED,
                            null);
                    attribute.setType(typeClass);

                    if (StringUtils.isNotEmpty(this.columnTaggedValue))
                    {
                        // add the tagged value for the column name
                        TaggedValue taggedValue =
                            this.createTaggedValue(corePackage, this.columnTaggedValue, columnName);
                        if (taggedValue != null)
                        {
                            attribute.getTaggedValue().add(taggedValue);
                        }
                    }
                    if (primaryKeyColumns.contains(columnName))
                    {
                        attribute.getStereotype().addAll(
                            this.getOrCreateStereotypes(corePackage, this.identifierStereotypes, "Attribute"));
                    }
                    attributes.add(attribute);
                }
            }
View Full Code Here

                model,
                fullyQualifiedName,
                0);

        // create an attribute
        Attribute attribute = umlPackage.getCore().getAttribute().createAttribute();
        attribute.setName("attributeAA");

        // assign the attribute to the class
        attribute.setOwner(umlClass);
    }
View Full Code Here

     * @param separator the separator used for qualifying the name.
     * @return the new Attribute.
     */
    static Attribute createAttribute(String name, String fullyQualifiedTypeName, String visibility, String separator)
    {
        Attribute attribute = UML14MetafacadeUtils.getCorePackage().getAttribute().createAttribute();
        attribute.setName(name);
        attribute.setVisibility(UML14MetafacadeUtils.getVisibilityKind(visibility));
        Object type = UML14MetafacadeUtils.findByFullyQualifiedName(fullyQualifiedTypeName, separator, false);
        if (type != null && Classifier.class.isAssignableFrom(type.getClass()))
        {
            attribute.setType((Classifier)type);
        }
        return attribute;
    }
View Full Code Here

TOP

Related Classes of org.omg.uml.foundation.core.Attribute

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.