Package org.omg.uml

Examples of org.omg.uml.UmlPackage


    {
        repository.readModel(
            new String[] {modelURL.toString()},
            null);
        final ModelAccessFacade modelFacade = repository.getModel();
        UmlPackage umlPackage = (UmlPackage)modelFacade.getModel();
        ModelManagementPackage modelManagementPackage = umlPackage.getModelManagement();

        // A given XMI file can contain multiptle models.
        // Use the first model in the XMI file
        Model model = (Model)(modelManagementPackage.getModel().refAllOfType().iterator().next());

        // look for a class with the name 'org.EntityBean'
        String[] fullyQualifiedName = {"org", "andromda", "ClassA"};

        UmlClass umlClass = (UmlClass)getModelElement(
                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

TOP

Related Classes of org.omg.uml.UmlPackage

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.