%iKnow.Metrics.MetricBuilder
deprecated abstract class %iKnow.Metrics.MetricBuilder extends %Library.RegisteredObject
The
Subclasses of this class should implement at least one of the Calculate***Metrics() methods in this interface to support calculating custom metrics for the corresponding target and type. Supported metrics should then register this subclass as their "builder class" in their definition (see %iKnow.Metrics.MetricDefinition).
Metric Builder implementations are invoked through their Build() or BuildAll() methods and will then start building all applicable metrics, forwarding the actual metric calculations to the Calculate***Metrics() implementations (for example, CalculateEntUniMetrics() for target $$$IKMTRENTITY and type $$$IKMTRTYPEDOMAIN). Instances of these implementations will be running in parallel if SUPPORTSMULTIPROCESS is set to 1 (default = 1), or will run single-threaded otherwise.
Note: When Calculate***Metrics() methods don't return any values for a particular target element, the existing metric value is retained (if any). Returning "" for a value will overwrite (erase) the existing value.
Property Inventory
- CurrentFieldId
- CurrentFieldName
- CurrentFieldValue
- CurrentFieldValueId
- CurrentSrcId
- DomainId
- SrcFilter
- Target
- Type
Method Inventory
- Build()
- BuildAll()
- BuildIndex()
- CalculateCcUniMetrics()
- CalculateCrcUniMetrics()
- CalculateEntUniMetrics()
- CalculatePathMetrics()
- CalculateSentenceMetrics()
- CalculateSourceMetrics()
- OnAfterBuildMetrics()
- OnAfterBuildMetricsBatch()
- OnAfterBuildMetricsForGroup()
- OnAfterBuildMetricsForSource()
- OnBeforeBuildMetrics()
- OnBeforeBuildMetricsBatch()
- OnBeforeBuildMetricsForGroup()
- OnBeforeBuildMetricsForSource()
Parameters
Properties
Methods
Builds all the metrics referring this class in their BuilderClass property. See also BuildAll().
This is the main method to be invoked to build all the Metrics for a given domain, optionally limited to a number of metrics specified by ID through pMetrics. It will build a list of all MetricBuilder implementations referred by registered metrics and then run through all targets and types. For each target, it will first invoke all MetricBuilder implementations NOT supporting parallel processing (with SUPPORTSMULTIPROCESS=0) and then spawn a number of jobs to take care of the ones that can run in parallel. These spawned processes will reserve batches of the target element (for example a batch of entities) and then let all MetricBuilder implementations that support metrics for that target run through them and calculate any metric values using the different Calculate***Metrics() methods.
Note: metrics can only be calculated in a domain in which they are already registered. See the Register() method in the %iKnow.Metrics.MetricDefinition class for more details.
This method builds an index for a particular Metric and Target.
Note: no indices will be built for metrics of type $$$IKMTRTYPESOURCE, as these intra-source entries will be sorted on the fly when calling any applicable sorted queries.
This is the main method a custom MetricBuilder should implement to support metrics targeting CCs. Depending on the value of Type, the properties CurrentSrcId (for $$$IKMTRTYPESOURCE), CurrentFieldName and CurrentFieldValue (for $$$IKMTRTYPEGROUP) or neither of these (for $$$IKMTRTYPEDOMAIN) will define the scope for which metrics should be calculated.
For a given unique CC pCcUniId, this method should calculate all metrics it knows about and return them through pValues in an array indexed by metric name: pValues(metricName) = value
This is the main method a custom MetricBuilder should implement to support metrics targeting CRCs. Depending on the value of Type, the properties CurrentSrcId (for $$$IKMTRTYPESOURCE), CurrentFieldName and CurrentFieldValue (for $$$IKMTRTYPEGROUP) or neither of these (for $$$IKMTRTYPEDOMAIN) will define the scope for which metrics should be calculated.
For a given unique CRC pCrcUniId, this method should calculate all metrics it knows about and return them through pValues in an array indexed by metric name: pValues(metricName) = value
This is the main method a custom MetricBuilder should implement to support metrics targeting entities. Depending on the value of Type, the properties CurrentSrcId (for $$$IKMTRTYPESOURCE), CurrentFieldName and CurrentFieldValue (for $$$IKMTRTYPEGROUP) or neither of these (for $$$IKMTRTYPEDOMAIN) will define the scope for which metrics should be calculated.
For a given unique entity pEntUniId, this method should calculate all metrics it knows about and return them through pValues in an array indexed by metric name: pValues(metricName) = value
This is the main method a custom MetricBuilder should implement to support metrics targeting Paths. Depending on the value of Type, the properties CurrentSrcId (for $$$IKMTRTYPESOURCE), CurrentFieldName and CurrentFieldValue (for $$$IKMTRTYPEGROUP) or neither of these (for $$$IKMTRTYPEDOMAIN) will define the scope for which metrics should be calculated.
For a given path pPathId, this method should calculate all metrics it knows about and return them through pValues in an array indexed by metric name: pValues(metricName) = value
This is the main method a custom MetricBuilder should implement to support metrics targeting sentences. Depending on the value of Type, the properties CurrentSrcId (for $$$IKMTRTYPESOURCE), CurrentFieldName and CurrentFieldValue (for $$$IKMTRTYPEGROUP) or neither of these (for $$$IKMTRTYPEDOMAIN) will define the scope for which metrics should be calculated.
For a given sentence pSentenceId, this method should calculate all metrics it knows about and return them through pValues in an array indexed by metric name: pValues(metricName) = value
This is the main method a custom MetricBuilder should implement to support metrics targeting sources. Depending on the value of Type, the properties CurrentSrcId (for $$$IKMTRTYPESOURCE), CurrentFieldName and CurrentFieldValue (for $$$IKMTRTYPEGROUP) or neither of these (for $$$IKMTRTYPEDOMAIN) will define the scope for which metrics should be calculated.
For a given source pSourceId in the context of a given source pSrcId, this method should calculate all metrics it knows about and return them through pValues in an array indexed by metric name: pValues(metricName) = value
Utility method called after a MetricBuilder instance starts building any metrics, in which custom code can be executed to clean up any auxiliary objects or data structures.
Note: depending on the value of SUPPORTSMULTIPROCESS, multiple MetricBuilder instances can be running alongside one another
Utility method called after a MetricBuilder starts building any metrics for a batch of elements, for metrics of type $$$IKMTRTYPEDOMAIN
Utility method called after a MetricBuilder instance finishes building any metrics for the group identified by CurrentFieldName and CurrentFieldValue, for metrics of type $$$IKMTRTYPEGROUP.
Utility method called after a MetricBuilder starts building any metrics for the source identified by pSrcId, for metrics of type $$$IKMTRTYPESOURCE.
Utility method called before a MetricBuilder instance starts building any metrics, in which custom code can be executed to set up any auxiliary objects or data structures.
Note: depending on the value of SUPPORTSMULTIPROCESS, multiple MetricBuilder instances can be running alongside one another
Utility method called before a MetricBuilder starts building any metrics for a batch of elements, for metrics of type $$$IKMTRTYPEDOMAIN
Utility method called before a MetricBuilder instance starts building any metrics for the group identified by CurrentFieldName and CurrentFieldValue, for metrics of type $$$IKMTRTYPEGROUP.
Utility method called before a MetricBuilder instance starts building any metrics for the source identified by pSrcId, for metrics of type $$$IKMTRTYPESOURCE.
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()