Difference between revisions of "PrF UG projects including a project"

From Protege Wiki
Jump to: navigation, search
(Automated import of articles)
 
 
(3 intermediate revisions by the same user not shown)
Line 2: Line 2:
 
== Including a Project ==
 
== Including a Project ==
  
{{PrF_UG_TOC_projects}}<div id='prf_ug'>
+
<noinclude>{{PrF_UG_TOC_projects}}<div id='prf_ug'></noinclude>
  
 
You can <i>include</i> an existing project in your current {{#var:PrF}} project.
 
You can <i>include</i> an existing project in your current {{#var:PrF}} project.
 
An included project stays as a separate project which you can open and edit separately;
 
An included project stays as a separate project which you can open and edit separately;
edits made in the file for the included project will appear in the including project the next time it is loaded.
+
edits made in the file for the included project
 +
will appear in the including project the next time it is loaded.
 
This allows you to build a single large project from one or more smaller projects.
 
This allows you to build a single large project from one or more smaller projects.
  
Line 19: Line 20:
 
     <li><p>
 
     <li><p>
 
       view and refer to the frames of the included project,
 
       view and refer to the frames of the included project,
       e.g.,
+
       e.g., you can create a subclass of an included class
      you can create a subclass of an included class or associate an included slot to a class
+
      or associate an included slot to a class
 
       </p>
 
       </p>
 
    
 
    
 
     <li><p>
 
     <li><p>
       edit instances from the included project and create new instances for included classes
+
       edit instances from the included project
 +
      and create new instances for included classes
 
       </p>
 
       </p>
 
    
 
    
Line 43: Line 45:
 
     <li><p>
 
     <li><p>
 
       make edits that would affect classes in the included project,
 
       make edits that would affect classes in the included project,
       e.g.,
+
       e.g., you cannot edit or delete an included class
      you cannot edit or delete an included class
 
 
       </p>
 
       </p>
 
   </ul>
 
   </ul>
Line 56: Line 57:
 
   <li><p>
 
   <li><p>
 
     Select <b>Manage Included Projects</b> from the <b>Project</b> menu.
 
     Select <b>Manage Included Projects</b> from the <b>Project</b> menu.
     The current project,
+
     The current project, and its included projects, if any,
    and its included projects,
 
    if any,
 
 
     will be shown in a project hierarchy.
 
     will be shown in a project hierarchy.
 
     </p>
 
     </p>
Line 64: Line 63:
 
   <li><p>
 
   <li><p>
 
     Click the <b>Add Project</b>
 
     Click the <b>Add Project</b>
     [[Image:PrF_UG_projects_project.add.gif|projects_project.add]]
+
     ([[Image:PrF_UG_projects_project.add.gif|projects_project.add]]) button,
    button,
 
 
     at the top right of the <b>Manage Included Projects</b> dialog box.
 
     at the top right of the <b>Manage Included Projects</b> dialog box.
 
     </p>
 
     </p>
Line 71: Line 69:
 
   <li><p>
 
   <li><p>
 
     In the <b>Select Project</b> dialog box,
 
     In the <b>Select Project</b> dialog box,
     browse to the location of the project you want to include and select the <b>.pprj</b> file of the desired project.
+
     browse to the location of the project you want to include
 +
    and select the <b>.pprj</b> file of the desired project.
 
     </p>
 
     </p>
  
Line 80: Line 79:
 
   <li><p>
 
   <li><p>
 
     The included project will be shown in the dialog box,
 
     The included project will be shown in the dialog box,
     with "(not loaded)" after it to indicate that the actual inclusion process has not yet taken place.
+
     with "(not loaded)" after it to indicate
 +
    that the actual inclusion process has not yet taken place.
 
     If the included project already includes any other projects,
 
     If the included project already includes any other projects,
 
     they will also be added to the hierarchy.
 
     they will also be added to the hierarchy.
   
 
    </p><p> <div>[[Image:PrF_UG_projects_included_add.png|projects_included_add]]</div>
 
 
     </p>
 
     </p>
 +
    <div>[[Image:PrF_UG_projects_included_add.png|frame|none|
 +
          Manage Included Projects dialog]]</div>
  
 
   <li><p>
 
   <li><p>
     To include additional projects,
+
     To include additional projects, repeat steps 2-6.
    repeat steps 2-6.
 
 
     </p>
 
     </p>
  
Line 95: Line 94:
 
     Click <b>OK</b>.
 
     Click <b>OK</b>.
 
     You will see a warning:
 
     You will see a warning:
   
 
    </p><p> <div>[[Image:PrF_UG_projects_included_reload_warn.png|projects_included_reload_warn]]</div>
 
 
     </p>
 
     </p>
 +
    <div>[[Image:PrF_UG_projects_included_reload_warn.png|frame|none|
 +
          save/reload warning dialog]]</div>
  
 
   <li><p>
 
   <li><p>
Line 106: Line 105:
 
     If there are any classes that are duplicated in your project,
 
     If there are any classes that are duplicated in your project,
 
     you will see a warning:
 
     you will see a warning:
   
 
    </p><p> <div>[[Image:PrF_UG_projects_include_duplicate_errors.png|projects_include_duplicate_errors]]</div>
 
 
     </p>
 
     </p>
 +
    <div>[[Image:PrF_UG_projects_include_duplicate_errors.png|frame|none|
 +
          duplicated class warning dialog]]</div>
  
 
   <li><p>
 
   <li><p>
     Click <b>Close</b> to continue. {{#var:PrF}} will include your files at this time.
+
     Click <b>Close</b> to continue.
 +
    {{#var:PrF}} will include your files at this time.
 
     </p>
 
     </p>
 
</ol>
 
</ol>
  
 
The project is included into your current project.
 
The project is included into your current project.
Frames in the included project appear with pale icons to show they cannot be edited.
+
Frames in the included project appear with pale icons
For example:
+
(e.g., [[Image:PrF_UG_classes_class.pale.gif|classes_class.pale]],
[[Image:PrF_UG_classes_class.pale.gif|classes_class.pale]],
+
[[Image:PrF_UG_classes_class.abstract.pale.gif|classes_class.abstract.pale]])
[[Image:PrF_UG_classes_class.abstract.pale.gif|classes_class.abstract.pale]],
+
to show they cannot be edited.
etc.
 
  
 
=== Included Projects and Duplicate Class Names ===
 
=== Included Projects and Duplicate Class Names ===
  
If an included project defines a class that is already defined in the including project (i.e.,
+
If an included project defines a class that is already defined in the including project
has the same name),
+
(i.e., has the same name),
 
then one of the duplicate class definitions is ignored.
 
then one of the duplicate class definitions is ignored.
(Usually the included definition is used,
+
(Usually the included definition is used, but there is no hard rule about this.)
but there is no hard rule about this.)
+
A warning is given at load time (Duplicate class definition was ignored")
A warning is given at load time
 
(Duplicate class definition was ignored")
 
 
and the project is loaded.
 
and the project is loaded.
 
All references to the class work from both projects,
 
All references to the class work from both projects,
 
because the reference mechanism uses the class name.
 
because the reference mechanism uses the class name.
  
This feature allows you to exchange the included project - for example,
+
This feature allows you to exchange the included project -
with a different version.
+
for example, with a different version.
Ignoring duplicate classes also allows for the situation where one project
+
Ignoring duplicate classes also allows for the situation where one project (A)
(A)
 
 
is included in two separate projects (B and C),
 
is included in two separate projects (B and C),
 
which in turn are included in a final larger project (D):
 
which in turn are included in a final larger project (D):
  
<div>[[Image:PrF_UG_projects_inclusion_diagram.png|projects_inclusion_diagram]]</div>
+
<div>[[Image:PrF_UG_projects_inclusion_diagram.png|frame|none|
 +
        multiple inclusion diagram]]</div>
  
</div>
+
 
 +
<noinclude></div></noinclude>

Latest revision as of 17:33, November 13, 2008

Including a Project


Protege-Frames User's Guide
Projects
Creating a Project
Opening a Project
Importing a Project
Saving a Project
Converting a Project's Type
Exporting a Project
Renaming a Project
Setting Preferences
Archiving a Project
Reverting to an Archived Project
Including a Project
Activating an Included Project
Removing an Included Project
Merging an Included Project
Configuring a Project
Project Metrics
Using Undo
Glossary, Editing Help

You can include an existing project in your current Protege-Frames project. An included project stays as a separate project which you can open and edit separately; edits made in the file for the included project will appear in the including project the next time it is loaded. This allows you to build a single large project from one or more smaller projects.

With an included project:

  • you can

    • view and refer to the frames of the included project, e.g., you can create a subclass of an included class or associate an included slot to a class

    • edit instances from the included project and create new instances for included classes

    • edit included forms

    • edit and override included slots

  • you cannot

    • make edits that would affect classes in the included project, e.g., you cannot edit or delete an included class

Including a project

To include a project into an existing Protege-Frames project:

  1. Select Manage Included Projects from the Project menu. The current project, and its included projects, if any, will be shown in a project hierarchy.

  2. Click the Add Project (projects_project.add) button, at the top right of the Manage Included Projects dialog box.

  3. In the Select Project dialog box, browse to the location of the project you want to include and select the .pprj file of the desired project.

  4. Click Open.

  5. The included project will be shown in the dialog box, with "(not loaded)" after it to indicate that the actual inclusion process has not yet taken place. If the included project already includes any other projects, they will also be added to the hierarchy.

    Manage Included Projects dialog
  6. To include additional projects, repeat steps 2-6.

  7. Click OK. You will see a warning:

    save/reload warning dialog
  8. Click OK.

  9. If there are any classes that are duplicated in your project, you will see a warning:

    duplicated class warning dialog
  10. Click Close to continue. Protege-Frames will include your files at this time.

The project is included into your current project. Frames in the included project appear with pale icons (e.g., classes_class.pale, classes_class.abstract.pale) to show they cannot be edited.

Included Projects and Duplicate Class Names

If an included project defines a class that is already defined in the including project (i.e., has the same name), then one of the duplicate class definitions is ignored. (Usually the included definition is used, but there is no hard rule about this.) A warning is given at load time (Duplicate class definition was ignored") and the project is loaded. All references to the class work from both projects, because the reference mechanism uses the class name.

This feature allows you to exchange the included project - for example, with a different version. Ignoring duplicate classes also allows for the situation where one project (A) is included in two separate projects (B and C), which in turn are included in a final larger project (D):

multiple inclusion diagram