DocBook|Search
Class Reference
%iKnow.Queries.PathAPI
   
Server:basexml
Instance:SOAXML
User:UnknownUser
 
-
  [BASEXML] >  [%iKnow] >  [Queries] >  [PathAPI]
Private  Storage  

class %iKnow.Queries.PathAPI extends %iKnow.Queries.AbstractAPI

This is the main Query class to retrieve Paths as identified by the engine. Paths are sequences of concepts and relations that form a meaningful sub-section of a sentence.

Inventory

Parameters Properties Methods Queries Indices ForeignKeys Triggers
5 16


Summary

Methods
%%OIDGet %AddToSaveSet %ClassIsLatestVersion %ClassName
%ConstructClone %DispatchClassMethod %DispatchGetModified %DispatchGetProperty
%DispatchMethod %DispatchSetModified %DispatchSetMultidimProperty %DispatchSetProperty
%Extends %GetParameter %IsA %IsModified
%New %NormalizeObject %ObjectModified %OriginalNamespace
%PackageName %RemoveFromSaveSet %SerializeObject %SetModified
%ValidateObject GetByEntities GetByEntityIds GetBySource
GetCountByDomain GetCountByEntities GetCountByEntityIds GetCountBySource
GetEntities GetId GetSentenceId GetSourceId
GetValue


Parameters

• parameter GetByEntitiesRT = "pathId:%Integer,entIds:%List";
• parameter GetByEntityIdsRT = "pathId:%Integer,entIds:%List";
• parameter GetBySourceRT = "pathId:%Integer,entIds:%List";
• parameter GetEntitiesRT = "position:%Integer,entOccId:%Integer,entUniId:%Integer,entityValue:%String,literal:%String,role:%Integer";

Methods

• classmethod GetByEntities(ByRef result, domainid As %Integer, entitylist As %List, page As %Integer = 1, pagesize As %Integer = 10, filter As %iKnow.Filters.Filter = "", setop As %Integer = $$$UNION) as %Status

This method will return a list of all Paths containing any (if setop = $$$UNION) or all (if setop = $$$INTERSECT) of the entities in the supplied entitylist.

The scope of this query can be limited through supplying a %iKnow.Filters.Filter object for the filter parameter to restrict the result to those Paths occurring in any source satisfying the filter criteria.

Results are sorted by decreasing path ID.

• classmethod GetByEntityIds(ByRef result, domainid As %Integer, entityidlist As %List, page As %Integer = 1, pagesize As %Integer = 10, filter As %iKnow.Filters.Filter = "", setop As %Integer = $$$UNION) as %Status

Retrieves paths based on entity IDs.

See also GetByEntities for a description of the parameters.

• classmethod GetBySource(ByRef result, domainid As %Integer, sourceidlist As %List, page As %Integer = 1, pagesize As %Integer = 10) as %Status

Retrieves the paths appearing in any of the sources supplied through sourceidlist.

To get the paths of a virtual source, only a single virtual source can be supplied using its negative ID value (otherwise, -1 is returned).

• classmethod GetCountByDomain(domainid As %Integer, filter As %iKnow.Filters.Filter = "", Output sc As %Status = $$$OK) as %Integer

Returns the number of paths in a domain, optionally restricted to those appearing in a source satisfying the %iKnow.Filters.Filter object supplied through filter.

• classmethod GetCountByEntities(domainid As %Integer, entitylist As %List, filter As %iKnow.Filters.Filter = "", setop As %Integer = $$$UNION, Output sc As %Status = $$$OK) as %Integer

Retrieves the number of paths containing the specified entities.

See also GetByEntities for a description of the parameters.

• classmethod GetCountByEntityIds(domainid As %Integer, entityidlist As %List, filter As %iKnow.Filters.Filter = "", setop As %Integer = $$$UNION, Output sc As %Status = $$$OK) as %Integer

Retrieves the number of paths containing the specified entity IDs.

See also GetByEntities for a description of the parameters.

• classmethod GetCountBySource(domainid As %Integer, sourceidlist As %List, Output sc As %Status = $$$OK) as %Integer

Returns the total number of paths in the sources specified through sourceidlist. Use negative source IDs to refer to virtual sources.

• classmethod GetEntities(ByRef result, domainId As %Integer, pathId As %Integer, vSrcId As %Integer = 0) as %Status
• classmethod GetId(domainid As %Integer, entityList As %List, vSrcId As %Integer = 0) as %Integer

This method will try to find a path corresponding to the supplied list of entities in the specified order. If no path is found, "" is returned.

When specifying a Virtual Source ID, it will treat the path as a virtual one, in the context of that vSrcId.

• classmethod GetSentenceId(domainId As %Integer, pathId As %Integer) as %Integer
Returns the sentence ID in which the supplied path ID occurs
• classmethod GetSourceId(domainId As %Integer, pathId As %Integer) as %Integer
Returns the source ID in which the supplied path ID occurs
• classmethod GetValue(domainid As %Integer, pathid As %Integer, vSrcId As %Integer = 0) as %List

Returns the sequence of entity values corresponding to the specified path as a %List.

When specifying a Virtual Source ID, it will treat the pathId as a virtual one, in the context of that vSrcId.