Package org.omg.uml.foundation.core

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


    private void createIdentifier(
        final String name,
        final String type,
        final String visibility)
    {
        final Classifier classifier = (Classifier)this.metaObject;

        // if we auto-create entity identifiers it will only be on hierarchy roots,
        // problems would arise when calls to #checkForAndAddForeignIdentifiers()
        // navigate over associated entities, effectively initializing their facade instances:
        // this results in subclasses having an identifier generated before their ancestors
        // ideally the method mentioned above would not make use of facades but meta-classes only,
        // if one is to refactor it that way this comment may be removed together with the line of code under it
        //
        // notice how the next line of code does not make use of facades, this is done on purpose in order
        // to avoid using uninitialized facades
        //
        // (Wouter, Sept. 20 2006) also see other UML implementations
        if (!classifier.getGeneralization().isEmpty()) return;

        // only create the identifier if an identifer with the name doesn't
        // 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


                // do NOT add foreign key columns as attributes (since
                // they are placed on association ends)
                if (!this.hasForeignKey(tableName, columnName))
                {
                    Classifier typeClass = null;

                    // first we try to find a mapping that maps to the
                    // database proprietary type
                    String type =
                        Schema2XMIUtils.constructTypeName(
View Full Code Here

                    this.createMultiplicity(
                        corePackage.getDataTypes(),
                        foreignLower,
                        1),
                    ChangeableKindEnum.CK_CHANGEABLE);
            final Classifier foreignParticipant = (Classifier)this.classes.get(foreignTableName);
            if (foreignParticipant == null)
            {
                throw new SchemaTransformerException(
                    "The associated table '" + foreignTableName +
                    "' must be available in order to create the association");
View Full Code Here

TOP

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

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.