%iKnow.Utils.CopyUtils
deprecated class %iKnow.Utils.CopyUtils extends %Library.RegisteredObject
This utility class groups a few methods to easily copy the contents of a domain into another one (which doens't necessarily have to be empty).
Please note any domain elements copied will be created using the version of the target domain, regardless of the source domain's version number.
Method Inventory
- CopyDictionaries()
- CopyDictionary()
- CopyDomain()
- CopyMatchingProfile()
- CopyMetadataFields()
- CopyMetric()
- CopyMetrics()
- CopySkipLists()
Methods
Copies any dictionaries and matching profiles (if pCopyProfiles is true) from the domain identified by ID pFromDomainId into domain pToDomainId. If a dictionary, item or profile with the same name already exists, pIgnoreDuplicates=0 will cause an error to be thrown, whereas pIgnoreDuplicates=1 will mean the element in the target domain will be left as is, but extended with the items and terms of the element in the source domain.
Copies a single dictionary (identified by pDictionaryId from the domain identified by ID pFromDomainId into domain pToDomainId. If a dictionary or item with the same name already exists, pIgnoreDuplicates=0 will cause an error to be thrown, whereas pIgnoreDuplicates=1 will mean the element in the target domain will be left as is, but extended (in the case of a dictionary or item) with the items and terms of the element in the source domain.
An array of matching profile IDs can be passed in through pProfileMap to map any default matching profiles from the source domain to IDs of the corresponding profiles in the target domain.
Copies all contents from the domain named pFromDomain into the domain pToDomain. If pToDomain does not yet exist, it will be created automatically. The copy flags represent the following domain elements:
- pCopySources includes regular source content as well as metadata (if the corresponding metadata fields exist in pToDomain or are created through pCopySettings. See also %iKnow.Source.Domain.Lister
- pCopySettings includes domain parameters, metadata, LOVs and SkipLists
- pCopyDictionaries includes dictionaries, their items and terms and any domain-specific matching profiles. If pMatchCopy is 1 as well, all sources in the target domain will be matched against all dictionaries.
- pCopySettings includes domain parameters, metadata and SkipLists
- if pCopyMetrics>0, all metric definitions are copied and if pCopyMetrics>1, all metric values are copied along
This method relies on the other class methods in this class and uses a value of 1 for pIgnoreDuplciates when calling these methods.
If required, a specific iKnow Configuration name (cf %iKnow.Configuration) can be supplied through pUseConfiguration to use while re-indexing the data. If this parameter is left blank (default), the default configuration of the original domain (configured using the $$$IKPDEFAULTCONFIG domain parameter) or $$$DEFAULTCONFIG will be used.
Note: if pCopySettings is true, only domain parameters a user is allowed to modify will be copied!!
Copies a single Matching Profile (identified by pProfileId) from the domain identified by ID pFromDomainId into domain pToDomainId. If a profile with the same name already exists in the target domain, pIgnoreDuplicates=0 will cause an error to be thrown, whereas pIgnoreDuplicates=1 will mean the metadata field in the target domain will be left as is.
Copies any metadata field definitions and List of Values from the domain identified by ID pFromDomainId into domain pToDomainId. If a field with the same name already exists in the target domain, pIgnoreDuplicates=0 will cause an error to be thrown, whereas pIgnoreDuplicates=1 will mean the metadata field in the target domain will be left as is.
Copies all metric definitions from one domain to another, optionally including their values.
WARNING: only Entity-, CRC-, CC- and source-based metric data can be copied from one domain to another. Use the metrics' builder class to (re-)generate metric values for path- or sentence-based metrics.
Copies any SkipList definitions and their contents from the domain identified by ID pFromDomainId into domain pToDomainId. If a SkipList with the same name already exists in the target domain, pIgnoreDuplicates=0 will cause an error to be thrown, whereas pIgnoreDuplicates=1 will mean the SkipList in the target domain will be extended with the strings in the SkipList from the source domain.
Inherited Members
Inherited Methods
- %AddToSaveSet()
- %ClassIsLatestVersion()
- %ClassName()
- %ConstructClone()
- %DispatchClassMethod()
- %DispatchGetModified()
- %DispatchGetProperty()
- %DispatchMethod()
- %DispatchSetModified()
- %DispatchSetMultidimProperty()
- %DispatchSetProperty()
- %Extends()
- %GetParameter()
- %IsA()
- %IsModified()
- %New()
- %NormalizeObject()
- %ObjectModified()
- %OriginalNamespace()
- %PackageName()
- %RemoveFromSaveSet()
- %SerializeObject()
- %SetModified()
- %ValidateObject()