The general RepositoryLocalObject.Copy
API (with associated CopyEventArgs
) is intended to copy Repository Local Objects in general (incl. Keywords) within an Organizational Item or to another Organizational Item.
However, the Organizational Item of a Keyword is always a Category; a Taxonomy of Keywords looks like a containment tree in the GUI but is technically speaking just a tree representation of a Directed Acyclic Graph formed by Parent-Child associations between Keywords.
For example: if you have the following Taxonomy:
Location (Category)
USA (Keyword)
Orlando (Keyword)
Then the Organizational Item (Keyword.OrganizationalItem
) of both Keywords is the Category "Location"; the fact that Keyword "Orlando" is under "USA" in the taxonomy tree representation is because Keyword "Orlando" has Keyword "USA" as a Parent Keyword (Keyword.ParentKeywords
).
Long story short: the general Copy API can copy a Keyword to another Category, but not to another location in a taxonomy of Keywords.
However, there is another API for that purpose: Keyword.CopyToKeyword
(with associated CopyToKeywordEventArgs
).
Likewise, for moving a Keyword to another location in a Taxonomy, there is a separate Keyword.MoveToKeyword
API (with associated MoveToKeywordEventArgs
)