Difference between revisions of "PrF UG inst copy instance"

From Protege Wiki
Jump to: navigation, search
(Automated import of articles)
 
 
(3 intermediate revisions by the same user not shown)
Line 2: Line 2:
 
== Copying an Instance ==
 
== Copying an Instance ==
  
{{PrF_UG_TOC_inst}}<div id='prf_ug'>
+
<noinclude>{{PrF_UG_TOC_inst}}<div id='prf_ug'></noinclude>
  
 
You can copy an existing instance,
 
You can copy an existing instance,
 
using the <b>Copy Instance</b>
 
using the <b>Copy Instance</b>
<div>[[Image:PrF_UG_inst_instance.copy.gif|instances_instance.copy]]</div>
+
([[Image:PrF_UG_inst_instance.copy.gif|instances_instance.copy]]) button.
button.
+
Copying an instance is useful when you want to create multiple instances
Copying an instance is useful when you want to create multiple instances that share some field values.
+
that share some field values.
You can create the first instance,
+
You can create the first instance, fill out the shared values,
fill out the shared values,
 
 
then copy the instance and fill out or change the remaining values.
 
then copy the instance and fill out or change the remaining values.
  
Line 25: Line 24:
 
<ol class='a'>
 
<ol class='a'>
 
   <li><p>
 
   <li><p>
     At the Instances Tab,
+
     At the Instances tab,
 
     select the instance that you want to copy.
 
     select the instance that you want to copy.
 
     </p>
 
     </p>
Line 31: Line 30:
 
   <li><p>
 
   <li><p>
 
     Click the <b>Copy Instance</b>
 
     Click the <b>Copy Instance</b>
     [[Image:PrF_UG_inst_instance.copy.gif|instances_instance.copy]]
+
     ([[Image:PrF_UG_inst_instance.copy.gif|instances_instance.copy]]) button.
    button.
 
 
     </p>
 
     </p>
  
Line 38: Line 36:
 
     In the Copy Frames dialog box,
 
     In the Copy Frames dialog box,
 
     enter the number of copies that you want to make.
 
     enter the number of copies that you want to make.
   
 
    </p><p> <div>[[Image:PrF_UG_inst_copy_instance.png|instances_copy_instance]]</div>
 
 
     </p>
 
     </p>
 +
    <div>[[Image:PrF_UG_inst_copy_instance.png|frame|none|
 +
          Copy Frames dialog]]</div>
  
 
   <li><p>
 
   <li><p>
Line 46: Line 44:
 
     select the deep copy option.
 
     select the deep copy option.
 
     This is described more fully below.
 
     This is described more fully below.
     Otherwise,
+
     Otherwise, the instance is duplicated with identical field values;
    the instance is duplicated with identical field values;
 
 
     only the instance name is changed.
 
     only the instance name is changed.
 
     </p>
 
     </p>
Line 63: Line 60:
  
 
   <li><p>
 
   <li><p>
     any instance that appears as a value for an
+
     any instance that appears as a value
    [[PrF_UG_inst_entry_field_instance|Instance entry field]]
+
    for an [[PrF_UG_inst_entry_field_instance|Instance entry field]]
 
     in any copied instance
 
     in any copied instance
 
     </p>
 
     </p>
Line 80: Line 77:
 
   <li><p>
 
   <li><p>
 
     It is possible for an instance to appear more than once in the chain.
 
     It is possible for an instance to appear more than once in the chain.
     If this happens,
+
     If this happens, only one copy is created.
    only one copy is created.
 
 
     </p>
 
     </p>
  
Line 89: Line 85:
 
</ul>
 
</ul>
  
For example,
+
For example, if you deep copy the instance M137 for the class <b>Personals_Ad</b>,
if you deep copy the instance M137 for the class <b>Personals_Ad</b>,
 
 
then all of the following are copied:
 
then all of the following are copied:
  
Line 99: Line 94:
  
 
   <li><p>
 
   <li><p>
     all the instances which appear as instance values for M137,
+
     all the instances which appear as instance values for M137, specifically:
    specifically:
 
 
     </p>
 
     </p>
  
Line 138: Line 132:
 
</ul>
 
</ul>
  
None of these instances have any instance fields,
+
None of these instances have any instance fields, so the copy stops here.
so the copy stops here.
 
  
 
<ul class='a'>
 
<ul class='a'>
 
   <li><p>
 
   <li><p>
 
     M137 appears again as an instance of 08/19/97.
 
     M137 appears again as an instance of 08/19/97.
     However,
+
     However, as it has already been copied,
    as it has already been copied,
 
 
     no additional copy is created.
 
     no additional copy is created.
 
     </p>
 
     </p>
Line 156: Line 148:
  
  
</div>
+
<noinclude></div></noinclude>

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

Copying an Instance


Protege-Frames User's Guide
Instances
Instances Tab
Class Browser at Instances Tab
Instance Browser
Instances Window
Instance Buttons
Instance Menu
Types Pane
Instance Editor
Standard Field Types
Fields with Multiple Cardinality
Boolean Fields
Class Fields
Float Fields
Instance Fields
Integer Fields
String Fields
Symbol Fields
Creating an Instance
Creating Multiple Instances
Displaying the Instance Editor
Setting the Display Slot
Showing Subclass Instances
Editing an Instance
Copying an Instance
Deleting an Instance
Finding an Instance
Changing an Instance's Class
Working with Instance Types
Instance Icons
Glossary, Editing Help

You can copy an existing instance, using the Copy Instance (instances_instance.copy) button. Copying an instance is useful when you want to create multiple instances that share some field values. You can create the first instance, fill out the shared values, then copy the instance and fill out or change the remaining values.

Unless you select Deep Copy, copying an instance duplicates the instance with identical field values. Only the internal name stored by Protege is changed. If you are working with deep copies, you may want to temporarily clear the display slot, so that it displays the internal name.

Making Copies

  1. At the Instances tab, select the instance that you want to copy.

  2. Click the Copy Instance (instances_instance.copy) button.

  3. In the Copy Frames dialog box, enter the number of copies that you want to make.

    Copy Frames dialog
  4. To have Protege-Frames perform a "deep copy", select the deep copy option. This is described more fully below. Otherwise, the instance is duplicated with identical field values; only the instance name is changed.

What is a Deep Copy?

You can select to "deep copy" an instance. A deep copy is a recursive copy that creates a copy of:

  • the selected instance

  • any instance that appears as a value for an Instance entry field in any copied instance

Note the following:

  • The copy is recursive. As long as a new instance appears as a value for a copied instance, a copy of it is created.

  • It is possible for an instance to appear more than once in the chain. If this happens, only one copy is created.

  • Other referenced instances do not get copied.

For example, if you deep copy the instance M137 for the class Personals_Ad, then all of the following are copied:

  • the instance M137 (class = Personals_Ad)

  • all the instances which appear as instance values for M137, specifically:

    • the instance 08/19/97 (class = Newspaper), which appears as the value for the Published In field of M137

  • all the uncopied instances which appear as values for 08/19/97, specifically:

    • Tuesday (class = Prototype_Newspaper), which appears as the value for the Prototype field

  • all the instances which appear as values for Tuesday:

    • Weekday Ads (class = Billing_Chart) in the Prototype Billing Chart field

    • Lifestyle, Local News, Magazine, Science, Sports, and World News (class = Section) in the Sections field

None of these instances have any instance fields, so the copy stops here.

  • M137 appears again as an instance of 08/19/97. However, as it has already been copied, no additional copy is created.

  • M137 appears as a value for San Jose Mercury News (class = Library). This is not copied.