%iKnow.Domain
Class %iKnow.Domain Extends %Persistent [ Deprecated, Final, StorageStrategy = iKnowStorage, System = 4 ]
The InterSystems IRIS NLP iKnow technology is now deprecated. Please see the product documentation for more detail.
For details on using this class, see NLP Domains.
This class represents a domain registered in this namespace.
When creating a domain, you should pass a value for Name to its %New method.
Properties
Id
Property Id As %Integer [ ReadOnly ];
The automatically generated ID for this domain, which is unique across namespaces
Name
Property Name As %String [ ReadOnly ];
The name of this domain, which should be unique within the namespace (case-insensitive)
Version
Property Version As %String [ InitialExpression = {$$$IKCURRENTVERSION}, ReadOnly ];
Stores the iKnow data structure version number for this domain.
BuildFlags
Property BuildFlags As %String [ Internal, ReadOnly ];
Describes which data structures are built and maintained when adding data to the domain. This propery is for internal use only.
DefinitionClass
Property DefinitionClass As %String [ Calculated, ReadOnly, SqlComputeCode = { set {*} = ##class(%iKnow.Domain).%OpenId({Id}).GetParameter($$$IKPDEFINITIONCLASS)}, SqlComputed ];
The name of the Domain Definition class managing this domain, if any. See also %iKnow.DomainDefinition.
Methods
GetOrCreateId
ClassMethod GetOrCreateId(name As %String, sortField As %Integer = {$$$SORTBYFREQUENCY}, Output sc As %Status = {$$$OK}) As %Integer [ Deprecated ]
Shorthand method to get the domain ID for a specific domain name, creating it if it does not yet exist in this namespace.
Deprecated: use regular %New and %Save methods instead.
Create
ClassMethod Create(name As %String, sortField As %Integer = -1, Output sc As %Status = {$$$OK}, buildFlags As %String = "") As %iKnow.Domain [ Deprecated ]
Creates a domain with the specified domain name in the given namespace. If no value is supplied for sortField, it will assume the system-wide defaults. buildFlags is either of "ALL" or "MINIMAL". An empty value will assume the system default.
Deprecated: use %New instead (supplying only the name parameter)
Open
ClassMethod Open(name As %String, Output sc As %Status = {$$$OK}) As %iKnow.Domain [ Deprecated ]
Opens a domain object with the specified name
Deprecated: use NameIndexOpen instead
OpenId
ClassMethod OpenId(id As %Integer, Output sc As %Status = {$$$OK}) As %iKnow.Domain [ Deprecated ]
Opens a domain object with the specified ID
Deprecated: use %OpenId instead
Exists
ClassMethod Exists(name As %String) As %Boolean [ Deprecated ]
Checks whether a domain with the given name already exists within the namespace
Deprecated: use NameIndexExists instead
%OnNew
Method %OnNew(pName As %String, pBuildFlags As %String = "") As %Status [ Private, ServerOnly = 1 ]
Instantiates a new Domain object iwth the given domain name. pBuildFlags is either of "ALL" or "MINIMAL". An emtpy value will result in the system default being used.
%OnBeforeSave
Method %OnBeforeSave(insert As %Boolean) As %Status [ Private, ServerOnly = 1 ]
%OnAfterSave
Method %OnAfterSave(insert As %Boolean) As %Status [ Private, ServerOnly = 1 ]
DropData
Method DropData(dropMetadataDefinitions As %Boolean = 0, dropDictionaries As %Boolean = 0, dropTempGlobals As %Boolean = 1, dropSkipLists As %Boolean = 1, dropMetricDefinitions As %Boolean = 0) As %Status
This method will drop all sources and subsequent indexes from this domain.
Note that it is recommended to call this method separately, before dropping the domain through %Delete or %DeleteId.
Delete
ClassMethod Delete(domainName As %String) As %Status [ Deprecated ]
Utility method to delete a domain from the system, including its data, settings and system global entries.
Deprecated: use %DeleteId instead (accepts domain ID)
DeleteId
ClassMethod DeleteId(domainId As %Integer) As %Status [ Deprecated ]
Utility method to delete a domain from the system, including its data, settings and system global entries.
Deprecated: use %DeleteId instead
%OnDelete
ClassMethod %OnDelete(oid As %ObjectIdentity) As %Status [ Private, ServerOnly = 1 ]
GetSystemParameter
ClassMethod GetSystemParameter(paramName As %String) As %String
Returns the current namespace-wide value for a domain parameter if there is one registered. See GetParameter for more details on how to fetch the current APPLICABLE parameter for a domain, as this method does not take any domain-specific settings or hardcoded defaults into account.
UnsetSystemParameter
ClassMethod UnsetSystemParameter(paramName As %String) As %Status
Removes a namespace-level default parameter value for the given parameter name.
SetSystemParameter
ClassMethod SetSystemParameter(paramName As %String, paramValue As %String) As %Status
Registers a domain parameter at the namespace level, for all domains in the current namespace. If there is already a value registered, call UnsetSystemParameter first to explicitly clear the current value.
CheckParameterValue
ClassMethod CheckParameterValue(paramName As %String, paramValue As %String, domain As %iKnow.Domain = "") As %Status [ Internal, Private ]
SetParameter
Method SetParameter(paramName As %String, paramValue As %String) As %Status
Sets a domain-specific parameter, overriding the system default
UnsetParameter
Method UnsetParameter(paramName As %String) As %Status
Unsets a domain-specific parameter, so it will use the system default again
GetParameter
Method GetParameter(paramName As %String, Output definedAt As %String = "DOMAIN") As %String
Returns the value used for parameter paramName for this domain. This can be a domain-specific override (definedAt = "DOMAIN"), a namespace-wide default (definedAt = "NAMESPACE") or the hardcoded default (definedat = "DEFAULT")
GetAllDomainsExecute
ClassMethod GetAllDomainsExecute(ByRef qHandle As %Binary, pCurrentNamespaceOnly As %Boolean = 0, pIncludeRemote As %Boolean = 0) As %Status [ Internal ]
Utility query to retrieve a list of all registered Domains
Deprecated: Please use normal SQL queries to approach this class.
GetAllDomainsClose
ClassMethod GetAllDomainsClose(ByRef qHandle As %Binary) As %Status [ Internal, PlaceAfter = GetAllDomainsExecute ]
GetAllDomainsFetch
ClassMethod GetAllDomainsFetch(ByRef qHandle As %Binary, ByRef Row As %List, ByRef AtEnd As %Integer = 0) As %Status [ Internal, PlaceAfter = GetAllDomainsExecute ]
RegisterImportedDomain
ClassMethod RegisterImportedDomain(domainId As %Integer) As %Status [ Deprecated ]
This method has been deprecated. There is no need for "registering" or otherwise marking domains that have been imported from globals or data files.
IsEmpty
Method IsEmpty() As %Boolean
Returns whether or not a domain is empty. If there are any entities or remnants of (virtual) sources, this method will return false.
Rename
ClassMethod Rename(pFrom As %String, pTo As %String) As %Status
This method renames an existing domain named pFrom to pTo, if there isn't already a domain with that name in this namespace. The domain ID does not change.
GetParameters
Method GetParameters(Output pParams) As %Status
Returns an array pParams containing all the domain parameters registered for this instance in the form: pParams(paramName) = paramValue.
NOTE: this might include parameters that cannot be modified by end users, but will not include values defined at the namespace level.
GetCurrentSystemVersion
ClassMethod GetCurrentSystemVersion() As %String
Returns the current version of this InterSystems IRIS instance, which is the version of any newly created domain in this instance. Domains already created in this instance before it was last upgraded or which were imported from other instances through other means, may have earlier versions. To check the version of a particular domain, use the Version property of a %iKnow.Domain instance.
GetIKnowGlobals
ClassMethod GetIKnowGlobals(Output list) As %Status [ Internal ]
Internal method to retrieve all raw ^IRIS.IK* global names to avoid having to list them dynamically. This excludes the global names that include domain/temp IDs and process IDs managed entirely within the domain build process and tracked through ^IRIS.IKS.Globals / ^IRIS.IKT.Globals
%DispatchGetProperty
Method %DispatchGetProperty(Property As %String) [ ServerOnly = 1 ]
Is used to get the value of an unknown property, redirecting to the domain parameter.
%DispatchSetProperty
Method %DispatchSetProperty(Property As %String, Val) [ ServerOnly = 1 ]
is used to set the value of an unknown property, redirecting to the domain parameter.
%ConstructClone
Method %ConstructClone(deep As %Boolean = 0, ByRef cloned As %String, location As %String) As %RegisteredObject [ ServerOnly = 0 ]
%DeleteExtent
ClassMethod %DeleteExtent(concurrency As %Integer = -1, ByRef deletecount, ByRef instancecount, pInitializeExtent As %Integer = 1) As %Status [ ServerOnly = 0 ]
%KillExtentData
ClassMethod %KillExtentData(killstreams As %Boolean = 0) As %Status [ Private, ServerOnly = 1 ]
AssignId
Method AssignId(pDomainId As %Integer) As %Status [ Internal ]
This method assigns pDomainId as this domain's desired Id property, if no value has been set so far. If the value is already taken when calling this method, an error will be returned. If the value has already been taken by the time this domain object is saved, the next available ID value will be assigned.