Skip to main content

%iKnow.Domain

deprecated persistent class %iKnow.Domain extends %Library.Persistent [ Final ]

SQL Table Name: %iKnow.Domain

The InterSystems IRIS NLP iKnow technology is now deprecated. Please see the product documentationOpens in a new tab for more detail.

For details on using this class, see NLP DomainsOpens in a new tab.

This class represents a domain registered in this namespace.

When creating a domain, you should pass a value for Name to its %New() method.

Property Inventory

Method Inventory

Properties

property DefinitionClass as %String [ Calculated , ReadOnly ];
The name of the Domain Definition class managing this domain, if any. See also %iKnow.DomainDefinition.
Property methods: DefinitionClassCompute(), DefinitionClassDisplayToLogical(), DefinitionClassGet(), DefinitionClassIsValid(), DefinitionClassLogicalToDisplay(), DefinitionClassLogicalToOdbc(), DefinitionClassNormalize(), DefinitionClassSQLCompute()
property Id as %Integer [ Required , ReadOnly ];
The automatically generated ID for this domain, which is unique across namespaces
Property methods: IdDisplayToLogical(), IdGet(), IdIsValid(), IdLogicalToDisplay(), IdNormalize()
property Name as %String [ ReadOnly ];
The name of this domain, which should be unique within the namespace (case-insensitive)
Property methods: NameDisplayToLogical(), NameGet(), NameIsValid(), NameLogicalToDisplay(), NameLogicalToOdbc(), NameNormalize()
property Version as %String [ InitialExpression = $$$IKCURRENTVERSION , ReadOnly ];
Stores the iKnow data structure version number for this domain.
Property methods: VersionDisplayToLogical(), VersionGet(), VersionIsValid(), VersionLogicalToDisplay(), VersionLogicalToOdbc(), VersionNormalize()

Methods

method %ConstructClone(deep As %Boolean = 0, ByRef cloned As %String, location As %String) as %RegisteredObject
Inherited description: Clone the current object to a new object. If deep is 1 then this does a deep copy which will also copy any subobjects and if deep is 0 then it will create another reference to any subobjects and increment the reference count appropriately. It returns the new cloned object.

Note that even if deep=0 when you clone a parent object in a parent child relationship or a one object of a one to many relationship then it will construct clones of all the child/many objects. This is because a child/many object can only point at a single parent and so if we did not create a clone of these then you would have a relationship with zero items in it. If you really just want to clone the object without these child/many objects then pass deep=-1 to this method.

After the clone is constructed it will call %OnConstructClone(object,deep,.cloned) on the clone if it is defined so that you can perform any additional steps e.g. taking out a lock. This works just the same way as %OnNew() does.

The object is the oref of the original object that was cloned. The cloned array is just used internally when doing a deep clone to prevent recursive loops, do not pass anything in at all for this parameter on the initial call. If you write a %OnConstructClone and from here you wish to call %ConstructClone on another object pass in the cloned array, e.g. 'Do oref.%ConstructClone(1,.cloned)' so that it can prevent recursive loops.

The location is used internally to pass the new location for stream objects.

classmethod %DeleteExtent(concurrency As %Library.Integer = -1, ByRef deletecount As %Library.String, ByRef instancecount As %Library.String, pInitializeExtent As %Library.Integer = 1, Output errorLog As %Library.Status) as %Status
Inherited description: Delete all instances of this class from its extent. On exit instancecount contains the original number of instances while deletecount contains the number of instances actually deleted.

Internally, %DeleteExtent() iterates over the set of instances in the collection and invokes the %Delete() method.
Refer to Object Concurrency Options for more details on the optional concurrency argument.
The option pInitializeExtent argument allows the user to override the default behavior of calling %KillExtent() when all instances are successfully deleted. %KillExtent() is called by default when the extent is empty so that empty globals can be killed. If %KillExtent() is not called then some empty globals can remain as well as the ID counter if it exists. The default value for pInitializeExtent is 1. Unless the caller specifies a false value for pInitializeExtent the globals used by the extent will be killed. If the process' GlobalKillDisabled flag is enabled and not the default of false the process' GlobalKillDisabled flag will be changed temporarily to false to allow the operation to complete without a possible error. In some cases, the globals used by the extent are not used exclusively by the extent. In those cases it is possible that some globals will still be defined even when pInitializeExtent is true. By default this call to %KillExtent() will not delete default stream storage global, but if you pass '2' in pInitializeExtent and if the entire extent was deleted we will call %KillExtent passing the 'killstreams' flag to ask it to remove kill the default storage global.

Returns a %Status value indicating success or failure.

method %DispatchGetProperty(Property As %String)
Is used to get the value of an unknown property, redirecting to the domain parameter.
method %DispatchSetProperty(Property As %String, Val)
is used to set the value of an unknown property, redirecting to the domain parameter.
deprecated classmethod Create(name As %String, sortField As %Integer = -1, Output sc As %Status = $$$OK, buildFlags As %String = "") as %iKnow.Domain
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)

deprecated classmethod Delete(domainName As %String) as %Status
Utility method to delete a domain from the system, including its data, settings and system global entries.

Deprecated: use %DeleteId() instead (accepts domain ID)

deprecated classmethod DeleteId(domainId As %Integer) as %Status
Utility method to delete a domain from the system, including its data, settings and system global entries.

Deprecated: use %DeleteId() instead

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().

deprecated classmethod Exists(name As %String) as %Boolean
Checks whether a domain with the given name already exists within the namespace

Deprecated: use NameIndexExists() instead

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.

deprecated classmethod GetOrCreateId(name As %String, sortField As %Integer = $$$SORTBYFREQUENCY, Output sc As %Status = $$$OK) as %Integer

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.

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")
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.
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.
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.
deprecated classmethod Open(name As %String, Output sc As %Status = $$$OK) as %iKnow.Domain
Opens a domain object with the specified name

Deprecated: use NameIndexOpen() instead

deprecated classmethod OpenId(id As %Integer, Output sc As %Status = $$$OK) as %iKnow.Domain
Opens a domain object with the specified ID

Deprecated: use %OpenId() instead

deprecated classmethod RegisterImportedDomain(domainId As %Integer) as %Status
This method has been deprecated. There is no need for "registering" or otherwise marking domains that have been imported from globals or data files.
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.
method SetParameter(paramName As %String, paramValue As %String) as %Status
Sets a domain-specific parameter, overriding the system default
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.
method UnsetParameter(paramName As %String) as %Status
Unsets a domain-specific parameter, so it will use the system default again
classmethod UnsetSystemParameter(paramName As %String) as %Status
Removes a namespace-level default parameter value for the given parameter name.

Queries

deprecated query GetAllDomains(pCurrentNamespaceOnly As %Boolean = 0, pIncludeRemote As %Boolean = 0)
Selects domainId As %Integer, domainName As %String, namespace As %String, version As %String
Utility query to retrieve a list of all registered Domains

Deprecated: Please use normal SQL queries to approach this class.

Indexes

index (NameIndex on Name) [Unique];
Index methods: NameIndexCheck(), NameIndexCheckUnique(), NameIndexDelete(), NameIndexExists(), NameIndexOpen(), NameIndexSQLCheckUnique(), NameIndexSQLExists(), NameIndexSQLFindPKeyByConstraint(), NameIndexSQLFindRowIDByConstraint()
index (PKINDEX on Id) [IdKey, PrimaryKey, Type = key, Unique];
Index methods: PKINDEXCheck(), PKINDEXDelete(), PKINDEXExists(), PKINDEXOpen(), PKINDEXSQLCheckUnique(), PKINDEXSQLExists(), PKINDEXSQLFindPKeyByConstraint(), PKINDEXSQLFindRowIDByConstraint()

Inherited Members

Inherited Methods

Storage

Storage Model: SQLStorage

Maps: 2

  • Map number 1 is named MainMap

    thismap.Global: ^IRIS.IK.Sys.DomainD

  • Map number 2 is named NameIndex

    thismap.Global: ^IRIS.IK.Sys.DomainI

  • ^IRIS.IK.Sys.DomainD({Id})
    =
    Node Delimiter Piece Name
    1 Name
    3 Version
    4 BuildFlags
    ^IRIS.IK.Sys.DomainI($$$UPPER({Name}))
    =
    Node Delimiter Piece Name
    Id
FeedbackOpens in a new tab