Click to Rate and Give Feedback
MSDN
MSDN Library
.NET Development
Microsoft Oslo
Oslo SDK
Microsoft.Uml2
Microsoft.Uml2
[This is prerelease documentation and is subject to change in future releases. Blank topics are included as placeholders.]

The Microsoft.Uml2 domain targets the Object Management Group’s Unified Modeling Language™ (UML) specification version 2.1.2; it is installed as the Microsoft.Uml2 SQL schema in the “Oslo” repository. The Unified Modeling Language™ (UML™) is a language and notation system used to specify, construct, visualize, and document the models of software systems. UML 2.1.2 model instances in the Object Management Group’s XML Metadata Interchange (XMI) version 2.1 file format can be imported into the code name “Oslo” repository with the UML loader (LoadUml.exe) that is included with code name “Oslo” modeling technologies. For more information, see  LoadUML.exe Command Line Reference. Use the models in this domain to load or examine UML across huge amounts of data to examine inheritance, dependencies, and so on, whether in SQL Server 2008 or in “Quadrant”.

Microsoft.Uml2 Overview

In this release, the Oslo UML domain consists of:

  • Model Schemas: The model schemas are defined using Microsoft code name “M” using OMG’s UML 2.1.2 Specification as a source. Even though you can preview the UML Activity, UML Use Case, and UML Sequence Model, the feature team’s primary focus was delivering UML Class and Profile model in this milestone.

  • Loader: An XML Metadata Interchange (XMI) UML Loader (Loaduml.exe) that reads XMI 2.1 files containing UML2 content that conforms to the OMG UML 2.1.2 specification and transforms them to “Oslo” repository content. Note that the loader supports loading only the UML Class and Profile models.

  • Microsoft code name “Quadrant”: You can browse UML content imported through the loader using the unconfigured experience in Microsoft code name “Quadrant” (in read-only mode). The only “Quadrant” extensions created for this domain are:

    • Property Sheet section configuration for Microsoft.Uml2.Packages, Microsoft.Uml2.Classes, and Microsoft.Uml2.Interfaces extents.

    • Preferred Viewers set to tree for many Microsoft.Uml2 extents, including Packages, Classes, Operations, Properties, and Interfaces.

Browsing the Microsoft.Uml2 Domain

To view the Microsoft.Uml2 domain models, start “Quadrant” by clicking the Start button, choosing All Programs, Microsoft Codename “Oslo” SDK, Tools, and then double-clicking Quadrant. In “Quadrant”, browse the target Repository catalog.

To browse the Microsoft.Uml2 domain
  1. Open the Repository database by selecting the View menu, choosing Explorer, and then Repository.

  2. Expand the Catalog item and locate Microsoft.Uml2.

    Dd857485.note(en-us,VS.85).gifNote:
    If you do not see Microsoft.Uml2 schema under the catalog, you can either completely re-install code name “Oslo” modeling technologies using OsloSetup.exe or use the following command on the command prompt in the installation directory (typically cd “c:\Program Files\Microsoft Oslo\1.0\bin”) to install the Microsoft.Uml2 model image (located in the %Program Files%\Microsoft Oslo\1.0\Sdk\Models\Microsoft.Uml2 directory) in the target repository using the following command:

    mx.exe install Microsoft.Uml212.mx /d:Repository /r:Repository.mx

  3. Expand Microsoft.Uml2 and explore the extents.

  4. Close the workpad.

Loading XMI Data

To load UML into the “Oslo” Repository
  1. Download the sample XMI file to a folder on your machine. For example, this procedure assumes: C:\OsloSamples\UML\XMI

  2. Load UML model instances into repository, following these steps:

    • Start a console.

    • Change the directory to the “Oslo” modeling technologies location. For example: cd “c:\Program Files\Microsoft Oslo\1.0\bin”

    • Run the UML Loader to populate the repository from the XMI file.

      LoadUml.exe c:\OsloSamples\UML\XMI\HiringSystem.xmi /f:Applications/HiringSystemSample /d:Repository /t:Repository

Browsing the UML Data in “Quadrant”

This section explains how to examine the test data you have installed in the Microsoft.Uml2 domain in the “Oslo” repository.

To browse from the root UML package
  1. Open “Quadrant”.

  2. Open the “Oslo” repository database by opening the View menu and choosing Explorer and then Repository.

  3. Select the Applications folder.

  4. Refresh this folder by opening the View menu and selecting Refresh.

  5. Expand Applications and select HiringSystemSample.

  6. Scroll slowly through the items on the right until you find the UML package called Hiring System Root Package, select the small icon preceding the name, and drag it into an empty space in the workspace and drop it to create a new workpad for that package. Note that this package contains two other packages called Unknown Externals and HiringSystem. You can open these packages separately in the same manner.

  7. In the Packages – Hiring System Root Package workpad you created, click the UML Package Properties text on the right of the title bar, and switch the view of the root package to Tree Master/Detail.

  8. Still in the right-hand tree view pane of the Packages – Hiring System Root Package workpad you created, expand Packages(1), then Hiring System Root Package, then Packages_OwningPackage(2), then HiringSystem, then Classes (6), and finally select the Employee class. Notice that the class properties are shown in the right-hand pane of the Tree Master/Detail view.

  9. You can continue to examine further to see all the related UML model elements. To close all the open workpads on the “Quadrant” workspace, select the Home menu and click Close All Workpads.

Querying the UML Data in “Quadrant”

This procedure shows how to query the test data and view the result in “Quadrant”.

To query the test data and view the result in “Quadrant”
  1. Create a new empty workpad by selecting New Workpad in the Home menu.

  2. Type in a VB LINQ query in the empty text box (called the query bar). Most queries are reasonably long, so you might want to expand the workpad horizontally to see more of your query. Cut and paste the following query into the query bar to find all the UML packages that contain a name “Hiring”.

    from aPackage in Database.Microsoft_Uml2_Packages _
    select aPackage _
    where aPackage.Name.Contains("Hiring")
  3. Execute the query by hitting Enter.

  4. Reuse the query bar to exercise various filtering queries. Here are some sample queries for you to try; copy and paste these queries into the workpad query bar and hit Enter.

    Dd857485.note(en-us,VS.85).gifNote:
    The query capability in “Quadrant” is still evolving and has very limited support in this release.

    • Select all packages that are root packages.

      from aPackage in Database.Microsoft_Uml2_Packages _
      Order By aPackage.Name ascending _
      where aPackage.OwningPackage Is Nothing _
      select aPackage
    • Show packages that contain 5 classes or more.

      from aPackage in Database.Microsoft_Uml2_Packages _
      Order By aPackage.Name descending _
      where aPackage.Classes.Count() > 1 _
      select aPackage
    • Show all classes that inherit from another class.

      from g in Database.Microsoft_Uml2_Generalizations _
      from c in Database.Microsoft_Uml2_Classes _
      from p in Database.Microsoft_Uml2_Packages _
      where g.SpecificClass.Id.Equals(c.Id) _
      Select g.SpecificClass
    • Show all classes that have other classes inheriting from it.

      from g in Database.Microsoft_Uml2_Generalizations _
      from c in Database.Microsoft_Uml2_Classes _
      from p in Database.Microsoft_Uml2_Packages _
      where g.SpecificClass.Id.Equals(c.Id) _
      Select g.GeneralClass
    • Show the number of classes that have more than 10 operations.

      Aggregate aClass In Database.Microsoft_Uml2_Classes _
      Where aClass.Operations.Count() > 10 _
      Into Count()
    • Show all the classes that have no operations.

      From c in Database.Microsoft_Uml2_Classes _
      Where not c.Operations.Any()

See Also

Fill out a survey about this topic for Microsoft.
Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Processing
© 2009 Microsoft Corporation. All rights reserved. Terms of Use | Trademarks | Privacy Statement | Site Feedback
Page view tracker