Home > Class Reference > SAMPLES namespace > Aviation.Utils

Aviation.Utils

class Aviation.Utils extends %Library.RegisteredObject

This class groups code for setting up two demos:

The classes in this package represent events involving aircraft as registered by the National Transportation Safety Board.

Note on the data: The dataset provided in this sample demo is only a lightweight subset of the full NTSB dataset, which is available from http://www.ntsb.gov. This data is supplied here for demonstration purposes only and neither intended nor warranted to be accurate.
Courtesy: National Transportation Safety Board

Method Inventory

Parameters

parameter CUBENAME = AviationEvents;
parameter MEASURENAME = Report;

Methods

classmethod CreateTermLists() as %Status
Creates the Term Lists used for matching in the DeepSee Aviation demo.
classmethod LoadFromNTSB(pDSN As %String = "AviationAccess", pMaxRecords As %Integer = 1200, pClearFirst As %Boolean = 1, pVerbose As %Boolean = 1, pSkipWhenEmpty As %List = {$lb($lb("NarrativeFull", "LocationCoordsLongitude", "InjuriesHighest", "MidAir", "SkyConditionNonCeiling"), $lb("Damage", "AircraftCategory", "FlightType"))}, pWhereClause As %String = "", pPrefList As %List = {$lb("20020611X00850", "20030728X01207", "20010123X00341")}) as %Status

Loads pMaxRecords aviation event records from the official NTSB database, which can be downloaded as a Microsoft Access file from www.ntsb.gov. The Access file needs to be exposed through ODBC using a DSN named pDSN. Any existing information for a given event will be overwritten, so loading from the "update" databases on ntsb.gov will just append to your existing database.

Set pMaxRecords to 0 to load all events from the database and use pClearFirst to specify whether existing events should be erased prior to the load. Using pPrefList, and pWhereClause, you can list specific events which need to be selected, as records are selected randomly from the full database. With pSkipWhenEmpty, a list of properties of the event, aircraft and crew records can be supplied which needs to be non-null for the record to be selected.

classmethod SetupCube() as %Status
Utility method to load all relevant data and build the Aviation.Accidents cube for the DeepSee Aviation demo.
classmethod SetupStandalone(pDomainName As %String = "", pMetaFields As %String = "", pLoadTermLists As %Boolean = 1, pVerbose As %Boolean = 1) as %Status

Sets up a regular iKnow domain and loads the Aviation demo dataset into it by calling the Aviation.ReportDomain %Build() method after enabling it and configuring CSP access to %iKnow UI classes for the SAMPLES web application.

Note that the pDomainName, pMetaFields, pLoadTermLists arguments are now deprecated.

Inherited Members

Inherited Methods