Difference between revisions of "PrF UG inst copy instance"
(Automated import of articles) |
|||
Line 6: | Line 6: | ||
You can copy an existing instance, | You can copy an existing instance, | ||
using the <b>Copy Instance</b> | using the <b>Copy Instance</b> | ||
− | + | [[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 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. |
− | |||
</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> | ||
<li><p> | <li><p> | ||
Line 46: | Line 43: | ||
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; |
− | |||
only the instance name is changed. | only the instance name is changed. | ||
</p> | </p> | ||
Line 63: | Line 59: | ||
<li><p> | <li><p> | ||
− | any instance that appears as a value for an | + | any instance that appears as a value |
− | + | for an [[PrF_UG_inst_entry_field_instance|Instance entry field]] | |
in any copied instance | in any copied instance | ||
</p> | </p> | ||
Line 80: | Line 76: | ||
<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. |
− | |||
</p> | </p> | ||
Line 89: | Line 84: | ||
</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 93: | ||
<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: |
− | |||
</p> | </p> | ||
Line 138: | Line 131: | ||
</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, |
− | |||
no additional copy is created. | no additional copy is created. | ||
</p> | </p> |
Revision as of 14:53, October 15, 2008
Copying an Instance
You can copy an existing instance, using the Copy Instance 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
At the Instances Tab, select the instance that you want to copy.
In the Copy Frames dialog box, enter the number of copies that you want to make.
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.