From 4aefeeefb47e3c5acbbf329fd43cef2aa078645b Mon Sep 17 00:00:00 2001 From: ovatsus Date: Sat, 14 Feb 2015 23:22:45 +0000 Subject: [PATCH] So Long, and Thanks for All the Fish, Freebase --- .travis.yml | 1 - CONTRIBUTING.md | 5 +- FSharp.Data.Tests.sln | 2 - README.md | 2 +- RELEASE_NOTES.md | 1 + appveyor.yml | 2 - build.fsx | 8 +- docs/content/index.md | 6 +- docs/content/ja/library/Freebase.fsx | 257 -- docs/content/library/Freebase.fsx | 291 --- docs/tools/generate.fsx | 2 +- docs/tools/templates/ja/template.cshtml | 4 - docs/tools/templates/template.cshtml | 1 - src/FSharp.Data.DesignTime.fsproj | 5 - src/FSharp.Data.Portable47.fsproj | 4 - src/FSharp.Data.Portable7.fsproj | 4 - src/FSharp.Data.fsproj | 4 - src/Freebase/FreebaseOperators.fs | 41 - src/Freebase/FreebaseProvider.fs | 591 ----- src/Freebase/FreebaseRequests.fs | 233 -- src/Freebase/FreebaseRuntime.fs | 947 ------- src/Freebase/FreebaseSchema.fs | 721 ------ src/TypeProviderInstantiation.fs | 43 +- teamcity.cmd | 1 - .../SignatureTestCases.config | 1 - .../SignatureTests.fs | 2 +- .../expected/Freebase,5,True,True.expected | 2279 ----------------- .../FSharp.Data.Tests.fsproj | 1 - tests/FSharp.Data.Tests/FreebaseProvider.fs | 241 -- 29 files changed, 12 insertions(+), 5688 deletions(-) delete mode 100644 docs/content/ja/library/Freebase.fsx delete mode 100644 docs/content/library/Freebase.fsx delete mode 100644 src/Freebase/FreebaseOperators.fs delete mode 100644 src/Freebase/FreebaseProvider.fs delete mode 100644 src/Freebase/FreebaseRequests.fs delete mode 100644 src/Freebase/FreebaseRuntime.fs delete mode 100644 src/Freebase/FreebaseSchema.fs delete mode 100644 tests/FSharp.Data.DesignTime.Tests/expected/Freebase,5,True,True.expected delete mode 100644 tests/FSharp.Data.Tests/FreebaseProvider.fs diff --git a/.travis.yml b/.travis.yml index 8ff610679..66a7f74e5 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,7 +2,6 @@ language: objective-c env: global: - - FREEBASE_API_KEY=AIzaSyBTcOKmU7L7gFB4AdyAz75JRmdHixdLYjY - MONO_VERSION=3.10.0 install: diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 73783996b..9f1830b1b 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -95,9 +95,8 @@ of files, typically like this: * `JsonProvider.fs` - entry point that defines static properties of the type provider, registers the provided types etc. -The WorldBank and Freebase providers are different. They do not need inference, but -they still distinguish between _runtime_ and _design-time_ components, so you'll find at least -two files (and possibly some additional helpers). +The WorldBank provider is different. It doesn't need inference, but it still distinguishes +between _runtime_ and _design-time_ components, so you'll find at least two files (and possibly some additional helpers). ## Source code diff --git a/FSharp.Data.Tests.sln b/FSharp.Data.Tests.sln index 8136eecb3..3f8165558 100755 --- a/FSharp.Data.Tests.sln +++ b/FSharp.Data.Tests.sln @@ -34,7 +34,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "library", "library", "{5F82 ProjectSection(SolutionItems) = preProject docs\content\library\CsvFile.fsx = docs\content\library\CsvFile.fsx docs\content\library\CsvProvider.fsx = docs\content\library\CsvProvider.fsx - docs\content\library\Freebase.fsx = docs\content\library\Freebase.fsx docs\content\library\HtmlParser.fsx = docs\content\library\HtmlParser.fsx docs\content\library\HtmlProvider.fsx = docs\content\library\HtmlProvider.fsx docs\content\library\Http.fsx = docs\content\library\Http.fsx @@ -66,7 +65,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "library", "library", "{DF51 ProjectSection(SolutionItems) = preProject docs\content\ja\library\CsvFile.fsx = docs\content\ja\library\CsvFile.fsx docs\content\ja\library\CsvProvider.fsx = docs\content\ja\library\CsvProvider.fsx - docs\content\ja\library\Freebase.fsx = docs\content\ja\library\Freebase.fsx docs\content\ja\library\Http.fsx = docs\content\ja\library\Http.fsx docs\content\ja\library\JsonProvider.fsx = docs\content\ja\library\JsonProvider.fsx docs\content\ja\library\JsonValue.fsx = docs\content\ja\library\JsonValue.fsx diff --git a/README.md b/README.md index 018fa824d..6a8e54e47 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ The F# Data library (`FSharp.Data.dll`) implements everything you need to access data in your F# applications and scripts. It implements F# type providers for working with structured file formats (CSV, HTML, JSON and XML) and -for accessing the WorldBank and Freebase services. It also includes helpers for parsing CSV, HTML and JSON files and for sending HTTP requests. +for accessing the WorldBank data. It also includes helpers for parsing CSV, HTML and JSON files and for sending HTTP requests. We're open to contributions from anyone. If you want to help out but don't know where to start, you can take one of the [Up-For-Grabs](https://github.com/fsharp/FSharp.Data/issues?labels=up-for-grabs&state=open) issues, or help to improve the [documentation][3]. diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md index 8b31e1ca4..f1e4870b8 100644 --- a/RELEASE_NOTES.md +++ b/RELEASE_NOTES.md @@ -3,6 +3,7 @@ * Added fix for `thead` element without nested `tr` element. * Improved global inference in XmlProvider. * Write API for CsvProvider. +* Remove Freebase provider. #### 2.1.1 - December 24 2014 * Add SkipRows parameter to CsvProvider. diff --git a/appveyor.yml b/appveyor.yml index 81a61d4ba..67b2ad2aa 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -9,8 +9,6 @@ build_script: test: off artifacts: - path: bin\*.nupkg -environment: - FREEBASE_API_KEY: AIzaSyBTcOKmU7L7gFB4AdyAz75JRmdHixdLYjY branches: except: - gh-pages diff --git a/build.fsx b/build.fsx index b16d18be0..5a073ffc1 100644 --- a/build.fsx +++ b/build.fsx @@ -29,9 +29,9 @@ let summary = "Library of F# type providers and data access tools" let description = """ The F# Data library (FSharp.Data.dll) implements everything you need to access data in your F# applications and scripts. It implements F# type providers for working with - structured file formats (CSV, HTML, JSON and XML) and for accessing the WorldBank and Freebase - data. It also includes helpers for parsing CSV, HTML and JSON files and for sending HTTP requests.""" -let tags = "F# fsharp data typeprovider WorldBank Freebase CSV HTML JSON XML HTTP" + structured file formats (CSV, HTML, JSON and XML) and for accessing the WorldBank data. + It also includes helpers for parsing CSV, HTML and JSON files and for sending HTTP requests.""" +let tags = "F# fsharp data typeprovider WorldBank CSV HTML JSON XML HTTP" let gitHome = "https://github.com/fsharp" let gitName = "FSharp.Data" @@ -87,8 +87,6 @@ let internetCacheFolder = Environment.GetFolderPath(Environment.SpecialFolder.In Target "CleanInternetCaches" <| fun () -> CleanDirs [internetCacheFolder @@ "DesignTimeURIs" - internetCacheFolder @@ "FreebaseSchema" - internetCacheFolder @@ "FreebaseRuntime" internetCacheFolder @@ "WorldBankSchema" internetCacheFolder @@ "WorldBankRuntime"] diff --git a/docs/content/index.md b/docs/content/index.md index 1cae000cd..5ddf061fd 100644 --- a/docs/content/index.md +++ b/docs/content/index.md @@ -4,7 +4,7 @@ F# Data: Library for Data Access The F# Data library implements everything you need to access data in your F# applications and scripts. It contains F# type providers for working with structured file formats (CSV, HTML, JSON and XML) -and for accessing the WorldBank and Freebase services. It also includes helpers for parsing +and for accessing the WorldBank data. It also includes helpers for parsing CSV, HTML and JSON files and for sending HTTP requests. This library focuses on providing a simple, mostly read-only, access to the structured documents @@ -60,7 +60,7 @@ The type providers for structured file formats infer the structure of a sample document (or a document containing multiple samples). The structure is then used to provide easy to use type-safe access to documents that follow the same structure. The library also implements a type provider for accessing data from -[the WorldBank](http://data.worldbank.org/) and [Freebase graph database](http://www.freebase.com/). +[the WorldBank](http://data.worldbank.org/). * [CSV Type Provider](library/CsvProvider.html) - discusses the `CsvProvider<..>` type @@ -69,8 +69,6 @@ The library also implements a type provider for accessing data from * [XML Type Provider](library/XmlProvider.html) - discusses the `XmlProvider<..>` type * [WorldBank Provider](library/WorldBank.html) - discusses the `WorldBankData` type and the `WorldBankDataProvider<..>` type - * [Freebase Provider](library/Freebase.html) - discusses the `FreebaseData` type - and the `FreebaseDataProvider<..>` type ### Data access tools diff --git a/docs/content/ja/library/Freebase.fsx b/docs/content/ja/library/Freebase.fsx deleted file mode 100644 index d33e77f0f..000000000 --- a/docs/content/ja/library/Freebase.fsx +++ /dev/null @@ -1,257 +0,0 @@ -(** -# F# Data: Freebase プロバイダー - -[Freebase グラフデータベース](http://www.freebase.com) には -2,300万件以上の情報が格納されています。 -この中からは書籍や映画、歴史的人物や出来事、化学元素など、 -ありとあらゆる情報が互いに関連を持った形で見つけられます。 - -Freebase 型プロバイダーを使うと、こういった情報を手軽に取ってきて、 -厳密に型付けされた状態でデータの山から宝物を見つけ出すことができます。 - -この型プロバイダーは [Try F#](http://www.tryfsharp.org) の -サイトにある「Data Science」のチュートリアルでも使われています。 -そのためそちらも是非参考にしてみてください。 -Visual Studio F#チームのブログではこの型プロバイダーについて -4つの記事が -[こちら](http://blogs.msdn.com/b/fsharpteam/archive/2012/09/21/the-f-3-0-freebase-type-provider-sample-integrating-internet-scale-data-sources-into-a-strongly-typed-language.aspx) -に掲載されています。 -また、Don Syme氏による動画デモが -[こちら](http://skillsmatter.com/podcast/scala/an-informal-deep-dive-with-don-syme-the-freebase-type-provider) -で見られます。 - -## プロバイダーの基本 - -以下のコードでは `FSharp.Data.dll` ライブラリを(F# Interactive上で)読み込み、 -`GetDataContext` メソッドを使ってFreebaseへの接続を初期化しています: -*) - -#r "../../../../bin/FSharp.Data.dll" -open FSharp.Data - -let data = FreebaseData.GetDataContext() - -(** - -### Freebaseデータの探索 - -さてこれで `data.` と入力して表示される自動コンプリートの -リストをチェックするとFreebaseのデータスキーマを探索することができます。 -たとえば以下のコードでは化学元素(Chemical Elements)のデータを取得して -水素(Hydrogen)の詳細情報を表示させています: -*) - -let elements = data.``Science and Technology``.Chemistry.``Chemical Elements`` - -let all = elements |> Seq.toList -printfn "見つかった元素の数: %d" (Seq.length all) - -let hydrogen = elements.Individuals.Hydrogen -printfn "原子番号: %A" hydrogen.``Atomic number`` - -(** - -### テストケースの生成 - -Freebaseには非常に多様なデータがあるため、 -ありとあらゆる用途にこのデータベースを利用できます。 -以下のコードではデータベース上の婚姻データを使って -それらしい名前をテスト用に生成しています。 -まず2つの配列を用意します。 -1つは(婚姻データを元にした)100件の名、そしてもう1つは -(Freebaseに登録されている名字リストを元にした)100件の姓を含んでいます: -*) - -let firstnames = - data.Society.Celebrities.Celebrities - |> Seq.truncate 100 - |> Seq.map (fun celeb -> celeb.Name.Split(' ').[0]) - |> Array.ofSeq - -let surnames = - data.Society.People.``Family names`` - |> Seq.truncate 100 - |> Seq.map (fun name -> name.Name) - |> Array.ofSeq - -(** -それらしいテストケース用のデータを生成するためには -これらの配列からランダムに要素を抽出するヘルパ関数を用意して、 -ランダム取り出した名と姓を連結します: -*) - -let randomElement = - let random = new System.Random() - fun (arr : string[]) -> arr.[random.Next(arr.Length)] - -for i in 0 .. 10 do - let name = - (randomElement firstnames) + " " + - (randomElement surnames) - printfn "%s" name - -(** -## Freebaseのデータにクエリを投げる - -先ほどの例ではFreebase 型プロバイダーから返されたコレクションを処理するために -`Seq` 関数を使っていました。 -単純な場合にはこれでいいのですが、そうではなくデータをフィルタしたり -クエリを投げたりする必要がある場合にはこのままではうまくいきません。 - -そこでFreebase プロバイダーにはクエリをサポートするための機能が用意されています。 -F# 3.0のLINQシンタックスで記述されたクエリは -(Freebaseで使われているクエリ言語である)MQLに変換されます。 -これはつまりF# 3.0であれば自動補完のサポートも有効で、 -厳密に型付けされた方法でクエリを作成できる上に、 -少なくともMQLへと変換されたクエリはFreebaseのサーバー上で -効率的に処理されるというわけです。 - -以下では地球からの距離とあわせて恒星の名前を取得しています -(距離が不定のデータは除きます): -*) - -let astronomy = data.``Science and Technology``.Astronomy - -query { for e in astronomy.Stars do - where e.Distance.HasValue - select (e.Name, e.Distance) } - |> Seq.toList - -(** -例では簡単のために、まず恒星に関するデータを `astronomy` という名前で定義しています。 -また、クエリを実際に実行するために、最後に `Seq.toList` を呼び出す必要もあります。 - -以下のクエリは距離が分かっていて、地球に近い恒星のデータを返します: -*) - -query { for e in astronomy.Stars do - where (e.Distance.Value < 4.011384e+18<_>) - select e } - |> Seq.toList - -(** -クエリ言語では単純な `where` や `select` 以外にも、 -様々な演算子がサポートされています。 -たとえば地球からの距離でソートした後、近い距離にある恒星を -上位10個取得することもできます: -*) - -query { for e in astronomy.Stars do - sortBy e.Distance.Value - take 10 - select e } - |> Seq.toList - -(** - -### Freebase クエリ演算子 - -F# 3.0のクエリ演算子の他に、 -`FSharp.Data.FreebaseOperators` 名前空間には -`ApproximatelyMatches` `ApproximatelyOneOf` `ApproximateCount` `Count` -といったFreebase固有の演算子が定義されています。 -これらはそれぞれ固有のMQL演算子に変換されます。 - -たとえば以下のコードでは `Count` と `ApproximateCount` を使って -歴代のアメリカ大統領の人数を数えています -(今回の場合、正確な人数を数えれば十分なので `ApproximateCount` は -あまり有効ではありません): -*) - -open FSharp.Data.FreebaseOperators - -data.Society.Government.``US Presidents``.Count() -data.Society.Government.``US Presidents``.ApproximateCount() - -(** -たとえば文字列を扱う場合には `ApproximatelyMatches` を使うとよいでしょう。 -以下では特定の文字列に **およそ一致する** 書籍を検索しています: -*) - -let topBooksWithNameContaining (s:string) = - query { for book in data.``Arts and Entertainment``.Books.Books do - where (book.Name.ApproximatelyMatches s) - take 10 - select book.Name } - -topBooksWithNameContaining "1984" |> Seq.toList - -(** - -## プロバイダーの詳細機能 - -Freebase 型プロバイダーには非常に多くの機能があるため、 -それらのすべてをここで紹介することはできません。 -一部の機能については既に紹介しましたが、より詳しいドキュメントについては -このページからリンクしてある記事を参照してください。 -簡単に紹介すると以下のような機能があります: - -* 多くのクエリは効率よくMQL言語へと変換されます。 - これらはデフォルトではクライアントサイドでは実行できません。 -* 特定のサンプルについては `Individuals` 以下にあるオブジェクトの - 各コレクションから取得できます。 - この機能を使うとたとえば `Hydrogen` (水素)や `Bob Dylan` といった - 厳密な名前をつかって特定のデータをプログラム上で取得することができます。 -* Freebase上のデータに対して大まかな数を計算したり、 - 文字列を大まかに一致させるための独自の演算子がサポートされています。 -* 画像のURLは `GetImages()` メソッドで取得できます。 - また、1番目の画像は `MainImage` プロパティで取得できます。 -* Freebaseの日付によるスナップショットをサポートしています。 - つまり特定の日付におけるFreebaseデータベースの状態を参照できます - (また、スキーマが変更されない限りはアプリケーションが - 壊れないということでもあります)。 -* スキーマ情報をクライアントサイドでキャッシュするというオプションの機能を - 使うことによって、型を迅速かつ効果的にチェックできます。 -* 測定単位をサポートします。 - たとえば化学元素の `Atomic mass` (原子質量)プロパティは自動的にSI単位である - キログラムへと変換されます。 - この情報は測定単位を使ってF#の型システム上で静的に伝搬されます。 -* 大量のFreebaseデータに対してクエリを投げたい場合、 - Googleで登録した後にカスタムAPIキーを取得します。 - このキーは型プロバイダーのstatic引数で指定できます。 - -### APIキーを指定する - -FreebaseのAPIにはリクエスト数の制限があり、 -当初はデバッグ用にある程度の割り当て分しか使うことが出来ません。 -もしも(403) Forbiddenエラーが出たのであれば、それはつまり -リクエスト数の上限に達したということです。 -Freebaseサービスを有効化するためにはAPIキーが必要です。 -そうすれば1日あたり100,000件のリクエストを送信できるようになります。 -F# Data ライブラリには `FreebaseDataProvider` という型があり、 -この型にはAPIキーなど、いくつかのstatic引数を指定することができます: -*) - -[] -let FreebaseApiKey = "" - -//type FreebaseDataWithKey = FreebaseDataProvider -//let dataWithKey = FreebaseDataWithKey.GetDataContext() - -(** -### MQLクエリのデバッグ - -Freebase 型プロバイダーの仕組みを知りたい場合、 -あるいはパフォーマンスの問題をデバッグしたい場合には -プロバイダーがFreebaseに送信するリクエストを確認するとよいでしょう。 -そのためには `SendingRequest` イベントに登録します: -*) - -data.DataContext.SendingRequest.Add (fun e -> - printfn "request: %A" e.RequestUri) - -data.``Science and Technology``.Chemistry. - ``Chemical Elements``.Individuals.Hydrogen.``Atomic mass``.Mass - -(** -## 関連する記事 - - * [Try F#: Data Science](http://www.tryfsharp.org/Learn/data-science) - - Try F# の Data Science チュートリアルにはFreebase 型プロバイダーを使った - 様々な例があります。 - * [Visual F# Team Blog: Integrating Internet-Scale Data Sources into a Strongly Typed Language](http://blogs.msdn.com/b/fsharpteam/archive/2012/09/21/the-f-3-0-freebase-type-provider-sample-integrating-internet-scale-data-sources-into-a-strongly-typed-language.aspx) - Freebase 型プロバイダーの基本に関する4つのシリーズ記事です - * [Don Syme氏によるデモ](http://skillsmatter.com/podcast/scala/an-informal-deep-dive-with-don-syme-the-freebase-type-provider) - An Informal Deep Dive With Don Syme: The Freebase Type Provider - * [API リファレンス: FreebaseDataProvider 型プロバイダー](../../reference/fsharp-data-freebasedataprovider.html) - * [API リファレンス: FreebaseOperators モジュール](../../reference/fsharp-data-freebaseoperators.html) - -*) diff --git a/docs/content/library/Freebase.fsx b/docs/content/library/Freebase.fsx deleted file mode 100644 index 7b58e673b..000000000 --- a/docs/content/library/Freebase.fsx +++ /dev/null @@ -1,291 +0,0 @@ -(** -# F# Data: Freebase Provider - -The [Freebase graph database](http://www.freebase.com) contains information on over -23 million entities, with information on a wide variety of subjects ranging from books -and movies to historical figures and events to chemical elements, as well as rich -interconnections between the entities. - -The Freebase type provider puts this information at your fingertips, giving you strongly-typed -access to a treasure trove of data. This article provides a brief introduction showing -some of the features. - -This type provider is also used on the [Try F#](http://www.tryfsharp.org) web site in the -"Data Science" tutorial, so you can find more examples there. The Visual Studio F# Team -Blog also has a series of 4 blog posts about it [here](http://blogs.msdn.com/b/fsharpteam/archive/2012/09/21/the-f-3-0-freebase-type-provider-sample-integrating-internet-scale-data-sources-into-a-strongly-typed-language.aspx) -and you can watch a recorded demo by Don Syme [here](http://skillsmatter.com/podcast/scala/an-informal-deep-dive-with-don-syme-the-freebase-type-provider). - -## Introducing the provider - -The following example loads the `FSharp.Data.dll` library (in F# Interactive), -initializes a connection to Freebase using the `GetDataContext` method: -*) - -#r "../../../bin/FSharp.Data.dll" -open FSharp.Data - -let data = FreebaseData.GetDataContext() - -(** - -### Exploring Freebase data - -Now you can explore the Freebase data schema by typing `data.` and exploring the -available data sources using autocomplete. For example, the following snippet -retrieves the Chemical Elements and then looks at the details of Hydrogen: -*) - -let elements = data.``Science and Technology``.Chemistry.``Chemical Elements`` - -let all = elements |> Seq.toList -printfn "Elements found: %d" (Seq.length all) - -let hydrogen = elements.Individuals.Hydrogen -printfn "Atominc number: %A" hydrogen.``Atomic number`` - -(** - -### Generating test cases - -There is a lot of different data available on Freebase, and you can use it for all -kinds of purposes. The following snippet uses the database of celebrities to generate -realistic names for testing purposes. First, we obtain two arrays - one containing -100 first names (based on names of celebrities) and another obtaining 100 surnames -(from a Freebase list of last names): -*) - -let firstnames = - data.Society.Celebrities.Celebrities - |> Seq.truncate 100 - |> Seq.map (fun celeb -> celeb.Name.Split(' ').[0]) - |> Array.ofSeq - -let surnames = - data.Society.People.``Family names`` - |> Seq.truncate 100 - |> Seq.map (fun name -> name.Name) - |> Array.ofSeq - -(** -To generate realistic test case data, we now write a helper function that picks a -random element from the array and then concatenate a random first name with a -random surname: -*) - -let randomElement = - let random = new System.Random() - fun (arr : string[]) -> arr.[random.Next(arr.Length)] - -for i in 0 .. 10 do - let name = - (randomElement firstnames) + " " + - (randomElement surnames) - printfn "%s" name - -(** -## Querying Freebase data - -In the previous examples, we used `Seq` functions to work with the collections returned by -Freebase type provider. This works in simple cases, but it is inefficient if we need to -filter the data or perform other querying tasks. - -However, the Freebase provider includes support for querying. Queries written using the -F# 3.0 LINQ syntax are translated to MQL (a querying language used by Freebase). This means -you can write queries in F# 3.0 with auto-completion and strong typing, and still execute -efficiently on the server, at least for the queries translated to MQL. - -The following example returns stars, together with their distance from Earth (stars -without known distance are skipped): -*) - -let astronomy = data.``Science and Technology``.Astronomy - -query { for e in astronomy.Stars do - where e.Distance.HasValue - select (e.Name, e.Distance) } - |> Seq.toList - -(** -To make the example shorter, we first defined a variable `astronomy` that represents the -domain of astronomical data. We also need to add `Seq.toList` to the end to actually -execute the query and get results back in a list. - -The following query returns stars that have a known distance and are close to Earth: -*) - -query { for e in astronomy.Stars do - where (e.Distance.Value < 4.011384e+18<_>) - select e } - |> Seq.toList - -(** -The query language supports a number of advanced operators in addition to simple -`where` and `select`. For example, we can sort the stars by distance from Earth and -then select 10 closest stars: -*) - -query { for e in astronomy.Stars do - sortBy e.Distance.Value - take 10 - select e } - |> Seq.toList - -(** - -### Freebase query operators - -In addition to the standard F# 3.0 query operators, the namespace `FSharp.Data.FreebaseOperators` -defines a couple more Freebase specific operators such as `ApproximatelyMatches`, `ApproximatelyOneOf`, -`ApproximateCount` and `Count`. These are translated to specific MQL operations. - -For example, the following snippet uses `Count` and `ApproximateCount` to count the number -of US presidents (in this case, `ApproximateCount` is not very useful, because counting the -exact number is efficient enough): -*) - -open FSharp.Data.FreebaseOperators - -data.Society.Government.``US Presidents``.Count() -data.Society.Government.``US Presidents``.ApproximateCount() - -(** -The `ApproximatelyMatches` operator can be used, for example, when working with strings. -The following snippet searches for books that have a name _approximately matching_ the -specified string: -*) - -let topBooksWithNameContaining (s:string) = - query { for book in data.``Arts and Entertainment``.Books.Books do - where (book.Name.ApproximatelyMatches s) - take 10 - select book.Name } - -topBooksWithNameContaining "1984" |> Seq.toList - -(** - -### Units of Measure - -Units of measure are supported. For example, the `Atomic mass` property of chemical elements -is automatically converted to SI units and exposed in Kilograms. This is statically -tracked in the F# type system using units of measure. - -Here is an example from data about cyclones and hurricanes: -*) - -open Microsoft.FSharp.Data.UnitSystems.SI.UnitNames -open Microsoft.FSharp.Data.UnitSystems.SI.UnitSymbols - -let cyclones = data.``Science and Technology``.Meteorology.``Tropical Cyclones`` - -// The type here is float, since the Freebase project uses normalized SI units -let topWind = cyclones.Individuals10.``Hurricane Sandy``.``Highest winds`` - -(** -We can convert this figure into 185 km/h like this: -*) - -let distanceTravelledByWindInAnHour : float = topWind * 3600.0 / 1000.0 - -(** - -## Advanced provider features - -The Freebase type provider has a number of features and it is beyond the scope of this -introduction to discuss all of them. Some of the aspects were already demonstrated and more -documentation can be found in the articles linked in the introduction. To give a brief -summary, here is a list of features: - -* Many queries are translated efficiently into the MQL language. Those that can't are - executed on the client side by default. -* A selection of sample individuals is given under the `Individuals` entry for each collection - of objects. This allows you to program against strongly named individual such as - `Hydrogen` or `Bob Dylan`. -* Custom Freebase operators such as approximate counts and approximate string matching are supported. -* Image URLs are provided via the `GetImages()` method, and the first image is provided using the - `MainImage` property -* Snapshot dates for Freebase are supported. This means that you can view the state of the - Freebase database on a specific date (also meaning that your application will not break - when the schema changes). -* Optional client-side caching of schema information makes type checking quick and efficient. -* If you want to query larger amount of Freebase data, you can register at Google and - obtain a custom API key. The key can be passed as a static parameter to the type provider. - -### Providing an API key - -The Freebase API is rate limited, and initially you are using some quota available for debugging purposes. -If you get the (403) Forbidden error, then this shows you are hitting rate limitations. -You will need an API key with the Freebase service enabled. This gives you 100,000 requests/day. -The F# Data Library also provides the `FreebaseDataProvider` type which allows you to specify several -static parameters, including the API key: -*) - -[] -let FreebaseApiKey = "" - -//type FreebaseDataWithKey = FreebaseDataProvider -//let dataWithKey = FreebaseDataWithKey.GetDataContext() - -(** In alternative, you can also set the `FREEBASE_API_KEY` environment variable, which will be used if you don't specify the Key parameter. *) - -(** -### Further Individuals - -As you saw above, individual entities can be addressed through the ``Individuals`` property. -By default the first 1,000 individuals are returned by Freebase. Three other versions of individuals exist - -``Individuals10`` (containing 10,000 individuals), ``Individuals100`` (containing 100,000 individuals) and -``IndividualsAZ`` (containing individuals bucketed by first letter of their name, with each bucket containing -up to 10,000 individuals). Together these help provide alternative, more stable ways of scaling to larger tables, -but where navigation may be slower. *) - -data.``Science and Technology``.Astronomy.Stars.Individuals10.``Alpha Centauri A`` - -data.``Science and Technology``.Astronomy.Stars.IndividualsAZ.A.``Alpha Centauri A`` - -(** -For example, there are at least 3,921,979 books in Freebase: -*) - -data.``Arts and Entertainment``.Books.Books.ApproximateCount() - -(** -Listing the first 100,000 reveals the Bible but is very, very slow: -*) -// data.``Arts and Entertainment``.Books.Books.Individuals100.``The Bible`` - -(** - This provides a stable but more efficient way of address that specific book: -*) - -data.``Arts and Entertainment``.Books.Books.IndividualsAZ.T.``The Bible`` - -(** -### Debugging MQL queries - -If you want to understand how the Freebase type provider works, or if you want to debug a -performance issue, it might be useful to see the requests that the provider sends to -Freebase. This can be done by subscribing to the `SendingQuery` and `SendingRequest` events. -The former triggers for overall Freebase MQL queries and can be run in the [Freebase query editor](http://www.freebase.com/query). -The latter triggers for individual REST requests including cursor-advancing requests and documentation requests. -*) - -data.DataContext.SendingQuery.Add (fun e -> - printfn "query: %A" e.QueryText) - -data.DataContext.SendingRequest.Add (fun e -> - printfn "request: %A" e.RequestUri) - -data.``Science and Technology``.Chemistry. - ``Chemical Elements``.Individuals.Hydrogen.``Atomic mass``.Mass - -(** -## Related articles - - * [Try F#: Data Science](http://www.tryfsharp.org/Learn/data-science) - The Data Science - tutorial on Try F# uses the Freebase type provider in numerous examples. - * [Visual F# Team Blog: Integrating Internet-Scale Data Sources into a Strongly Typed Language](http://blogs.msdn.com/b/fsharpteam/archive/2012/09/21/the-f-3-0-freebase-type-provider-sample-integrating-internet-scale-data-sources-into-a-strongly-typed-language.aspx) - A series of 4 blog posts introducing the Freebase type provider - * [Demo by Don Syme](http://skillsmatter.com/podcast/scala/an-informal-deep-dive-with-don-syme-the-freebase-type-provider) - An Informal Deep Dive With Don Syme: The Freebase Type Provider - * [API Reference: FreebaseDataProvider type provider](../reference/fsharp-data-freebasedataprovider.html) - * [API Reference: FreebaseOperators module](../reference/fsharp-data-freebaseoperators.html) - -*) diff --git a/docs/tools/generate.fsx b/docs/tools/generate.fsx index 310a99fb3..8febc62d6 100644 --- a/docs/tools/generate.fsx +++ b/docs/tools/generate.fsx @@ -13,7 +13,7 @@ let website = "/FSharp.Data" let info = [ "project-name", "F# Data" "project-author", "Tomas Petricek; Gustavo Guerra" - "project-summary", "The F# Data library implements type providers for working with structured file formats (CSV, HTML, JSON and XML) and for accessing the WorldBank and Freebase services. It also includes helpers for parsing CSV, HTML and JSON files, and for sending HTTP requests." + "project-summary", "The F# Data library implements type providers for working with structured file formats (CSV, HTML, JSON and XML) and for accessing the WorldBank data. It also includes helpers for parsing CSV, HTML and JSON files, and for sending HTTP requests." "project-github", "http://github.com/fsharp/FSharp.Data" "project-nuget", "https://nuget.org/packages/FSharp.Data" ] diff --git a/docs/tools/templates/ja/template.cshtml b/docs/tools/templates/ja/template.cshtml index a58c7e59a..ea100d4aa 100644 --- a/docs/tools/templates/ja/template.cshtml +++ b/docs/tools/templates/ja/template.cshtml @@ -81,10 +81,6 @@ WorldBank プロバイダー (En) -
  • - Freebase プロバイダー - (En) -
  • HTTP ユーティリティ diff --git a/docs/tools/templates/template.cshtml b/docs/tools/templates/template.cshtml index af50b68f1..d8a3f6c2e 100644 --- a/docs/tools/templates/template.cshtml +++ b/docs/tools/templates/template.cshtml @@ -70,7 +70,6 @@
  • JSON Type Provider
  • XML Type Provider
  • WorldBank Provider
  • -
  • Freebase Provider
  • diff --git a/src/FSharp.Data.DesignTime.fsproj b/src/FSharp.Data.DesignTime.fsproj index f2d3fe40c..e8d14cc20 100644 --- a/src/FSharp.Data.DesignTime.fsproj +++ b/src/FSharp.Data.DesignTime.fsproj @@ -79,11 +79,6 @@ - - - - - diff --git a/src/FSharp.Data.Portable47.fsproj b/src/FSharp.Data.Portable47.fsproj index c6bb7e215..00dee3fa6 100644 --- a/src/FSharp.Data.Portable47.fsproj +++ b/src/FSharp.Data.Portable47.fsproj @@ -62,10 +62,6 @@ - - - - diff --git a/src/FSharp.Data.Portable7.fsproj b/src/FSharp.Data.Portable7.fsproj index ab028533d..0d5f723c3 100644 --- a/src/FSharp.Data.Portable7.fsproj +++ b/src/FSharp.Data.Portable7.fsproj @@ -63,10 +63,6 @@ - - - - diff --git a/src/FSharp.Data.fsproj b/src/FSharp.Data.fsproj index f8b95b877..87b7ae656 100644 --- a/src/FSharp.Data.fsproj +++ b/src/FSharp.Data.fsproj @@ -61,10 +61,6 @@ - - - - diff --git a/src/Freebase/FreebaseOperators.fs b/src/Freebase/FreebaseOperators.fs deleted file mode 100644 index 9949934ef..000000000 --- a/src/Freebase/FreebaseOperators.fs +++ /dev/null @@ -1,41 +0,0 @@ -// -------------------------------------------------------------------------------------- -// Copyright (c) Microsoft Corporation 2005-2012. -// This sample code is provided "as is" without warranty of any kind. -// We disclaim all warranties, either express or implied, including the -// warranties of merchantability and fitness for a particular purpose. -// -------------------------------------------------------------------------------------- - -/// Extension members for operations permitted in queries of the Freebase service -module FSharp.Data.FreebaseOperators - -open System - -type System.String with - /// A Freebase query operation that represents a perl-style match of a string, e.g. "book club", "book*", "*book", "*book*", "^book", "book$", "* book *", "book-club", "book\-club". See http://www.freebase.com/docs/mql/ch03.html#directives. - [] - member s.ApproximatelyMatches(_pat:string) : bool = failwith "'ApproximatelyMatches' may only be used in a query executed on the Freebase server." - - /// A Freebase query operation that represents approximately matching one of the given strings. See http://www.freebase.com/docs/mql/ch03.html#directives. - [] - member s.ApproximatelyOneOf([] args:string[]) : bool = - if args.Length = 0 then false - else failwith "'ApproximatelyOneOf' may only be used in a query executed on the server. It must be given at least one value." - -type System.Linq.IQueryable<'T> with - /// A Freebase query operation returning an approximate count of the items satisfying a query. - [] - member s.ApproximateCount() : int = - // Uses the standard LINQ technique to fold the operator into the query - let m = match <@ Unchecked.defaultof>.ApproximateCount() @> with Quotations.Patterns.Call(None, mb, _) -> mb | _ -> failwith "unexpected" - let expr = System.Linq.Expressions.Expression.Call(null,m,[| s.Expression |]) - s.Provider.Execute(expr) - - /// Synonym for LINQ's Count - /// Included so you don't have to open System.LINQ to use the queries - [] - member s.Count() : int = System.Linq.Queryable.Count(s) - - /// Synonym for LINQ's Where - /// Included so you don't have to open System.LINQ to use the queries - [] - member s.Where(p:System.Linq.Expressions.Expression>) = System.Linq.Queryable.Where(s,p) diff --git a/src/Freebase/FreebaseProvider.fs b/src/Freebase/FreebaseProvider.fs deleted file mode 100644 index f37b407a8..000000000 --- a/src/Freebase/FreebaseProvider.fs +++ /dev/null @@ -1,591 +0,0 @@ -// Copyright (c) Microsoft Corporation 2005-2012. -// This sample code is provided "as is" without warranty of any kind. -// We disclaim all warranties, either express or implied, including the -// warranties of merchantability and fitness for a particular purpose. - -/// Provides Freebase schema and data as provided types, properties and methods -namespace ProviderImplementation - -open System -open System.Collections.Generic -open System.Globalization -open System.Reflection -open System.Linq -open Microsoft.FSharp.Core.CompilerServices -open Microsoft.FSharp.Quotations -open ProviderImplementation -open ProviderImplementation.ProvidedTypes -open FSharp.Data -open FSharp.Data.Runtime -open FSharp.Data.Runtime.Caching -open FSharp.Data.Runtime.Freebase -open FSharp.Data.Runtime.Freebase.FreebaseRequests -open FSharp.Data.Runtime.Freebase.FreebaseSchema - -type RFreebaseDomain = FSharp.Data.Runtime.Freebase.FreebaseDomain -type RFreebaseDomainCategory = FSharp.Data.Runtime.Freebase.FreebaseDomainCategory - -module List = - /// Split a non-empty list into a pair consisting of - /// its head and its tail - let headAndTail l = - match l with - | [] -> invalidArg "l" "empty list" - | head::tail -> (head, tail) - - /// Split a non-empty list into a list with all elements - /// except for the last one and the last element - let frontAndBack l = - let rec loop acc l = - match l with - | [] -> invalidArg "l" "empty list" - | [singleton] -> List.rev acc, singleton - | head::tail -> loop (head::acc) tail - loop [] l - -/// Find the handles in the Freebase type provider runtime DLL. -type internal FreebaseRuntimeInfo (config : TypeProviderConfig) = - - let asm, version, replacer = AssemblyResolver.init config - - member val FreebaseDataContextType = typeof |> replacer.ToRuntime - member val IFreebaseDataContextType = typeof |> replacer.ToRuntime - member val FreebaseIndividualsType = typeof |> replacer.ToRuntime - member val IFreebaseIndividualsType = typeof |> replacer.ToRuntime - member val IFreebaseObjectType = typeof |> replacer.ToRuntime - member val FreebaseDomainType = typeof |> replacer.ToRuntime - member val IFreebaseDomainType = typeof |> replacer.ToRuntime - member val FreebaseDomainCategoryType = typeof |> replacer.ToRuntime - member val IFreebaseDomainCategoryType = typeof |> replacer.ToRuntime - - member this.RuntimeAssembly = asm - member this.RuntimeVersion = version - -type internal DomainId = KnownDomain of FreebaseId | UnknownDomain - -/// This is the Freebase type provider. -[] -type public FreebaseTypeProvider(config : TypeProviderConfig) as this = - inherit DisposableTypeProviderForNamespaces() - - let fbRuntimeInfo = FreebaseRuntimeInfo(config) - - /// Root namespace of Freebase types - let rootNamespace = "FSharp.Data" - let createTypes(apiKey, serviceUrl, rootTypeName, numIndividuals, useUnits, usePluralize, snapshotDate, useLocalCache, allowQueryEvaluateOnClientSide, useRefinedTypesForItems) = - - ProviderHelpers.getOrCreateProvidedType this rootTypeName fbRuntimeInfo.RuntimeVersion FreebaseRequests.cacheDuration <| fun () -> - - let fb = new FreebaseQueries(apiKey, serviceUrl, "FreebaseSchema", snapshotDate, useLocalCache) - let fbSchema = new FreebaseSchemaConnection(fb) - let tidyName(value:string) = value.Replace("&","&") - //fb.SendingRequest.Add(fun arg -> printfn "MD: %s" arg.AbsoluteUri) - - let firstCap (s:string) = s.[0..0].ToUpperInvariant() + s.[1..] - - let typeNameForDomainObjects(domainName:string) = - // If the domain already contains spaces then we might as well make its type have a space before Domain since quoting will be required anyway. - (if domainName.Contains(" ") then domainName+" Domain" else domainName+"Domain") |> tidyName - - #if FX_NO_SECURITY_ELEMENT_ESCAPE - let xmlDoc (text:string) = "" + text + "" - #else - let xmlDoc text = "" + System.Security.SecurityElement.Escape text + "" - #endif - - let blurbOfId id = fbSchema.GetBlurbById id |> String.concat " " - let blurbOfMachineId id = fbSchema.GetBlurbByMachineId id |> String.concat " " - - let createDataContext = fbRuntimeInfo.FreebaseDataContextType.GetMethod "_Create" - let getDomainCategoryById = fbRuntimeInfo.IFreebaseDataContextType.GetMethod "GetDomainCategoryById" - let getDomainById = fbRuntimeInfo.IFreebaseDomainCategoryType.GetMethod "GetDomainById" - let getObjectsOfTypeId = fbRuntimeInfo.IFreebaseDomainType.GetMethod "GetObjectsOfTypeId" - let getIndividualsObject = fbRuntimeInfo.FreebaseIndividualsType.GetMethod "_GetIndividualsObject" - let getIndividualById = fbRuntimeInfo.IFreebaseIndividualsType.GetMethod "GetIndividualById" - - let domains = - lazy - [ for nsk in fbSchema.GetDomainStructure().NamespaceKeys do - if nsk.Namespace.Hidden <> "true" then - if nsk.Namespace.NamespaceKinds |> Array.exists (fun s -> s = "/type/domain") then - yield nsk.Namespace ] - |> Seq.distinctBy (fun nsp -> (nsp.DomainId.Id, nsp.DomainName)) - - let domainCategories = lazy fbSchema.GetDomainCategories() - - let domainTypes = - lazy - let allRealDomains = - [ for domain in domains.Force() do - if not (String.IsNullOrWhiteSpace domain.DomainId.Id) then - yield (KnownDomain domain.DomainId, lazy (fbSchema.GetAllTypesInDomainSansProperties(domain.DomainId)) ) ] - dict - [ yield! allRealDomains - yield (UnknownDomain, - lazy - let hashSet = HashSet() - for (_, lazyTypesInDomain) in allRealDomains do - for ty in lazyTypesInDomain.Force() do - hashSet.Add ty.TypeId |> ignore - [ for ty in fbSchema.GetAllTypesInAllDomainsSansProperties() do - if not (hashSet.Contains ty.TypeId) then - yield ty ] :> seq<_>) ] - - let getDomains() = domains.Force() - let getDomainCategories() = domainCategories.Force() - let getTypesOfDomain(domainId) = domainTypes.Force().[domainId].Force() - - let theServiceTypesClass = ProvidedTypeDefinition("ServiceTypes",baseType=Some typeof,HideObjectMethods=true) - theServiceTypesClass.AddXmlDoc (xmlDoc "Contains the types defined in the web data store") - - let pluralize = if usePluralize then NameUtils.pluralize else id - - let containerTypeNameForDomainTypes (fbDomainIdOpt:DomainId) = - match fbDomainIdOpt with - | UnknownDomain -> "Uncategorized" - | KnownDomain fbDomainId -> fbDomainId.Id.TrimStart('/').Replace('/',' ') |> firstCap - - let pathToTypeForFreebaseTypeId (fbDomainId:FreebaseId, fbTypeId:FreebaseId) = - let domainPath = [containerTypeNameForDomainTypes (match fbDomainId.Id with null | "" -> UnknownDomain | _ -> KnownDomain fbDomainId)] - let path, final = fbTypeId.Id.Split '/' |> List.ofArray |> List.frontAndBack - match path with - | [] -> failwith "Unexpected 9078543" - | [_hd] -> failwith "Unexpected 0984509" - | _empty::path -> List.map firstCap domainPath @ List.map firstCap path @ [firstCap final + "Data"] - - /// Given a description of a Freebase type, return the path where the corresponding provided type lives - /// under FreebaseData.DataTypes. - let pathToTypeForFreebaseType (fbType:FreebaseType) = - pathToTypeForFreebaseTypeId (fbType.Domain, fbType.TypeId) - - /// Given a description of a Freebase type, find the corresponding provided type that lives - /// under FreebaseData.DataTypes. - let tryFindTypeForFreebaseType (root:System.Type, path:string list) = - // The first fragment has theServiceTypesClass as parent - (Some root, path) ||> List.fold (fun parent name -> - match parent with - | None -> None - | Some parent -> - match parent.GetNestedType (name, BindingFlags.Public ||| BindingFlags.NonPublic) with - | :? ProvidedTypeDefinition as p -> Some (p :> System.Type) - | _ -> None ) - - let tryFindRefinedTypeForFreebaseType fbType = - let path = pathToTypeForFreebaseType fbType - tryFindTypeForFreebaseType (theServiceTypesClass , path) - - let tryFindRefinedTypeForFreebaseTypeId fbTypeId = - let path = pathToTypeForFreebaseTypeId fbTypeId - tryFindTypeForFreebaseType (theServiceTypesClass , path) - - let tryFindRefinedCollectionTypeForFreebaseType fbType = - let path = pathToTypeForFreebaseType fbType - let f,b = List.frontAndBack path - let path = f @ [b + "Collection"] - tryFindTypeForFreebaseType (theServiceTypesClass, path) - - // PARAMETER: Unit normalization - let refinedFSharpTypeOfFreebaseProperty (fp: FreebaseProperty) = - // NOTE: if you alter this mapping, see GetProperty in FreebaseRuntime.fs - match fp.ExpectedTypeId.Id with - | "/type/float" -> - match fp.UnitOfMeasureId.Id with - | u when useUnits && units.ContainsKey u -> - let (measureAnnotation,_multipler,_offset) = units.[u] - let rec trans u = - match u with - | SI s -> ProvidedMeasureBuilder.Default.SI s - | Prod(u1,u2) -> ProvidedMeasureBuilder.Default.Product (trans u1, trans u2) - | Div(u1,u2) -> ProvidedMeasureBuilder.Default.Ratio (trans u1, trans u2) - | One -> ProvidedMeasureBuilder.Default.One - let floatWithMeasureAnnotation = ProvidedMeasureBuilder.Default.AnnotateType(typeof,[trans measureAnnotation]) - Some (floatWithMeasureAnnotation, false) - | _ -> - Some (typeof, false) - | _ -> None - let makeDesignTimeNullableTy (ty:Type) = ProvidedTypeBuilder.MakeGenericType(typedefof>, [ ty ]) - let makeDesignTimeSeqTy (ty:Type) = ProvidedTypeBuilder.MakeGenericType(typedefof>, [ ty ]) - let makeDesignTimeQueryableTy (ty:Type) = ProvidedTypeBuilder.MakeGenericType(typedefof>, [ ty ]) - - let makeMemberForFreebaseProperty (typeWithProperties: FreebaseType, property: FreebaseProperty, alwaysThere: bool) = - [ if not (String.IsNullOrEmpty property.PropertyName) then - let staticPropertyType = property.FSharpPropertyType(fbSchema, refinedFSharpTypeOfFreebaseProperty, tryFindRefinedTypeForFreebaseType, makeDesignTimeNullableTy, makeDesignTimeSeqTy, alwaysThere) - let runtimePropertyType = property.FSharpPropertyRuntimeType(fbSchema, fbRuntimeInfo.IFreebaseObjectType,alwaysThere) - let (?) = QuotationBuilder.(?) - let p = ProvidedProperty(property.PropertyName, staticPropertyType, - GetterCode = - ((fun args -> - if alwaysThere then - fbRuntimeInfo.IFreebaseObjectType?GetRequiredPropertyByIdTyped (runtimePropertyType) - (args.[0], typeWithProperties.TypeId.Id, property.PropertyId.Id) - else - fbRuntimeInfo.IFreebaseObjectType?GetPropertyByIdTyped (runtimePropertyType) - (args.[0], typeWithProperties.TypeId.Id, property.PropertyId.Id)))) - p.AddXmlDocDelayed(fun () -> blurbOfId property.PropertyId |> xmlDoc) - yield p - ] - - /// Given a description of a Freebase type, make the members for the corresponding provided type that lives - /// under FreebaseData.DataTypes. - let makeMembersForFreebaseType (fbType: FreebaseType) = - [ let typeWithProperties = fbSchema.GetTypeByTypeId fbType.TypeId - match typeWithProperties with - | None -> () - | Some typeWithProperties -> - for property in typeWithProperties.Properties do - yield! makeMemberForFreebaseProperty(typeWithProperties, property, false) ] - - let getRefinedTypeOfItem (itemName, itemType, fbObj: FreebaseObjectId, placeToPutType: ProvidedTypeDefinition) = - if useRefinedTypesForItems then - // This is a bit cheeky as the item type is added after the "ServiceTypes" collection may have been iterated. - // TODO: add the type using a delayed structure and dereference/link to the type here, rather than creating it here. - let itemRefinedType = ProvidedTypeDefinition(itemName + " Item",baseType = Some (itemType :> Type), HideObjectMethods = true) - itemRefinedType.AddXmlDocDelayed(fun () -> "The type representing the refined view of item '" + itemName + "'") - - let allTypesForItemLazy = lazy fbSchema.GetAllTypesOfObject(fbObj.MachineId).TypesSupportedByObject - // Make this object inherit from all types that this specific object supports - itemRefinedType.AddInterfaceImplementationsDelayed(fun () -> - let allTypesForItem = allTypesForItemLazy.Force() - [ for ity in allTypesForItem do - match tryFindRefinedTypeForFreebaseTypeId (ity.DomainId, ity.TypeId) with - | Some i -> yield i - | None -> - //System.Diagnostics.Debug.Assert(false,"included type not found") - () ]) - - // Add obsolete members for all the properties which are not available for this item. This hides them - // and gives a warning if they are used. - itemRefinedType.AddMembersDelayed(fun () -> - // Get all the types supported by the item - let allTypesForItem = allTypesForItemLazy.Force() - let allTypeIdsForitem = - [ for oneTypeForItem in allTypesForItem do - match fbSchema.GetTypeByTypeId(oneTypeForItem.TypeId) with - | None -> () // If getting the type failed for some reason then don't supply its properties - | Some fbOneTypeForItem -> - match tryFindRefinedTypeForFreebaseTypeId (oneTypeForItem.DomainId, oneTypeForItem.TypeId) with - | None -> () // If the type for the item doesn't exist in our view of the world, then don't supply its properties - | Some _ -> - yield fbOneTypeForItem ] - let fbObjData = fbSchema.GetDataExistenceForSpecificObject(allTypeIdsForitem, fbObj.MachineId) - [ for (fbOneTypeForItem, fbProps) in fbObjData do - for (fbProp, hasData) in fbProps do - // Make the properties based on strong knowlege of the presence of data - for p in makeMemberForFreebaseProperty (fbOneTypeForItem, fbProp, true) do - //printfn "property %s of type %s, hasData = %b" fbProp.PropertyName fbOneTypeForItem.TypeName hasData - if not hasData then - p.AddObsoleteAttribute("The property '" + fbProp.PropertyName + "' is not available for the item '" + itemName + "'", isError=true) - yield p ]) - - - placeToPutType.AddMember itemRefinedType - itemRefinedType - else - itemType - - let insertFreebaseTypesForOneDomain (theDataTypesClassForDomain,domainId) = - - //printfn "FreebaseProvider: inserting types for domain '%+A'" domainId - let allTypesForDomainSansProperties = getTypesOfDomain domainId - // Collect up the immediate nested types for the domain type - let theNestedTypesForTheDataTypesClassForDomain = ResizeArray<_>() - /// Holds all enclosing type definitions we've created so far in this domain. - let enclosingTypeHash = Dictionary<(ProvidedTypeDefinition * string),ProvidedTypeDefinition>(HashIdentity.Structural) - - /// Find an enclosing type on the path through the type space, create it if it is not created yet - let findOrCreateEnclosingType (parentType:ProvidedTypeDefinition) name = - let key = (parentType,name) - match enclosingTypeHash.TryGetValue key with - | false,_ -> - let t = ProvidedTypeDefinition(name, baseType=Some typeof,HideObjectMethods=true) - t.HideObjectMethods <- true - t.AddXmlDoc (xmlDoc "Contains a subset of the types defined in the web data store") - enclosingTypeHash.Add(key, t) - if Object.ReferenceEquals(parentType, theDataTypesClassForDomain) then - theNestedTypesForTheDataTypesClassForDomain.Add t - else - parentType.AddMember t - t - | _,t -> - t - - for fbType in allTypesForDomainSansProperties do - let fullPath = pathToTypeForFreebaseType fbType - let path, typeName = List.frontAndBack fullPath - let _domain, path = List.headAndTail path - let declaringType = (theDataTypesClassForDomain, path) ||> List.fold findOrCreateEnclosingType - //printfn "FreebaseProvider: creating item type, typeName='%A', fullPath='%A', domainId '%+A', declaringType.Name = '%s'" typeName fullPath domainId declaringType.Name - let itemType = - let t = ProvidedTypeDefinition(typeName, baseType=Some fbRuntimeInfo.IFreebaseObjectType, HideObjectMethods=true) - t.SetAttributes (TypeAttributes.Public ||| TypeAttributes.Interface ||| enum (int32 TypeProviderTypeAttributes.IsErased)) - t.AddInterfaceImplementationsDelayed(fun () -> [fbRuntimeInfo.IFreebaseObjectType]) - t.AddMembersDelayed (fun () -> makeMembersForFreebaseType fbType) - t.AddInterfaceImplementationsDelayed(fun () -> - [ for ity in fbType.IncludedTypes do - match tryFindRefinedTypeForFreebaseTypeId (ity.DomainId, ity.TypeId) with - | Some i -> yield i - | None -> - //System.Diagnostics.Debug.Assert(false,"included type not found") - () ]) - - t.AddXmlDocDelayed (fun () -> blurbOfId fbType.TypeId |> xmlDoc) - t - - //printfn "FreebaseProvider: creating individuals type, typeName='%A', fullPath='%A', domainId '%+A', declaringType.Name = '%s'" typeName fullPath domainId declaringType.Name - let individualsTypeOpt = - let membersForIndividuals(t, n, prefix) = - - [ for fbObj in fbSchema.GetAllObjectsOfType(fbType, n, prefix) |> Seq.distinctBy (fun x -> x.ObjectName) do - let itemName = fbObj.ObjectName - let itemRefinedType = getRefinedTypeOfItem (itemName, itemType, fbObj, t) - let p = ProvidedProperty(itemName, itemRefinedType, - GetterCode = (fun args -> Expr.Call(args.[0], getIndividualById,[Expr.Value fbType.TypeId.Id;Expr.Value fbObj.MachineId.MId]))) - p.AddXmlDocDelayed(fun () -> blurbOfMachineId fbObj.MachineId |> xmlDoc) - yield (p :> MemberInfo) ] - - if numIndividuals > 0 then - - let t1 = ProvidedTypeDefinition(itemType.Name + "Individuals", baseType=Some fbRuntimeInfo.FreebaseIndividualsType,HideObjectMethods=true) - t1.AddXmlDoc (xmlDoc (sprintf "Represents a sample set of specific named individuals of type '%s' in the web data store" fbType.TypeName)) - t1.AddMembersDelayed(fun () -> membersForIndividuals(t1, numIndividuals, None)) - - let tAZ = ProvidedTypeDefinition(itemType.Name + "IndividualsAZ", baseType=Some fbRuntimeInfo.FreebaseIndividualsType,HideObjectMethods=true) - tAZ.AddXmlDoc (xmlDoc (sprintf "Represents an indexing of specific named individuals of type '%s' in the web data store" fbType.TypeName)) - - // Also provide an index - // .IndividualsIndexed.A - // ... - // .IndividualsIndexed.Z - // - // where each list contains 5x as many entries - tAZ.AddMembersDelayed(fun () -> - - // Make the types for the A-Z properties - let tCs = - [ for c in [ for c1 in 'A' .. 'Z' do - yield string c1 ] (* @ [ for c in '0' .. '9' -> string c ] @ [ "Other" ] *) do - let tC = ProvidedTypeDefinition(itemType.Name + "IndividualsIndexed" + c, baseType=Some fbRuntimeInfo.FreebaseIndividualsType,HideObjectMethods=true) - tC.AddXmlDoc (xmlDoc (sprintf "Represents an indexing of specific named individuals of type '%s' in the web data store" fbType.TypeName)) - tC.AddMembersDelayed(fun () -> membersForIndividuals(tC, numIndividuals*10, Some c)) - yield (c, tC) - ] - [ for (c,tC) in tCs do - let pC = ProvidedProperty(c, tC, GetterCode = (fun args -> args.[0])) - pC.AddXmlDoc (xmlDoc (sprintf "An indexing of specific named individuals of type '%s' in the web data store" fbType.TypeName)) - yield (pC :> MemberInfo) - yield (tC :> MemberInfo) ]) - - let t10 = ProvidedTypeDefinition(itemType.Name + "Individuals10", baseType=Some fbRuntimeInfo.FreebaseIndividualsType,HideObjectMethods=true) - t10.AddXmlDoc (xmlDoc (sprintf "Represents a 10x larger sample of specific named individuals of type '%s' in the web data store" fbType.TypeName)) - t10.AddMembersDelayed(fun () -> membersForIndividuals(t10, numIndividuals*10, None)) - - let t100 = ProvidedTypeDefinition(itemType.Name + "Individuals100", baseType=Some fbRuntimeInfo.FreebaseIndividualsType,HideObjectMethods=true) - t100.AddXmlDoc (xmlDoc (sprintf "Represents a 100x larger sample of specific named individuals of type '%s' in the web data store" fbType.TypeName)) - t100.AddMembersDelayed(fun () -> membersForIndividuals(t100, numIndividuals*100, None)) - - Some (t1, tAZ, t10, t100) - else - None - - //printfn "FreebaseProvider: creating collection type, typeName='%A', fullPath='%A', domainId '%+A', declaringType.Name = '%s'" typeName fullPath domainId declaringType.Name - let collectionsType = - let t = ProvidedTypeDefinition(itemType.Name + "Collection", baseType=Some typeof,HideObjectMethods=true) - t.HideObjectMethods <- true - t.AddInterfaceImplementationsDelayed (fun () -> [ makeDesignTimeQueryableTy itemType ]) - t.AddXmlDoc (xmlDoc (sprintf "Represents the collection of all individuals of type '%s' in the web data store" fbType.TypeName)) - t.AddMembersDelayed(fun () -> - - [ match individualsTypeOpt with - | None -> () - | Some (t1, tAZ, t10, t100) -> - let pIndividuals = ProvidedProperty("Individuals", t1, GetterCode = (fun args -> Expr.Call(getIndividualsObject, [ Expr.Coerce(args.[0], typeof) ]))) - pIndividuals.AddXmlDocDelayed(fun () -> sprintf "A sample set of named individuals (up to %d in size) of type '%s' in the web data store" numIndividuals fbType.TypeName |> xmlDoc) - yield pIndividuals - - let pIndividualsAZ = ProvidedProperty("IndividualsAZ", tAZ, GetterCode = (fun args -> Expr.Call(getIndividualsObject, [ Expr.Coerce(args.[0], typeof) ]))) - pIndividualsAZ.AddXmlDocDelayed(fun () -> sprintf "A sample of named individuals of type '%s', (bucketed by first character with each bucket up to %d in size). The buckets may be slow to explore" fbType.TypeName (numIndividuals*10) |> xmlDoc) - yield pIndividualsAZ - - let pIndividuals10 = ProvidedProperty("Individuals10", t10, GetterCode = (fun args -> Expr.Call(getIndividualsObject, [ Expr.Coerce(args.[0], typeof) ]))) - pIndividuals10.AddXmlDocDelayed(fun () -> sprintf "A 10x larger sample set of named individuals of type '%s' in the web data store. This property may be slower to explore" fbType.TypeName |> xmlDoc) - yield pIndividuals10 - - let pIndividuals100 = ProvidedProperty("Individuals100", t100, GetterCode = (fun args -> Expr.Call(getIndividualsObject, [ Expr.Coerce(args.[0], typeof) ]))) - pIndividuals100.AddXmlDocDelayed(fun () -> sprintf "A 100x larger sample set of named individuals of type '%s' in the web data store. This property may be very slow to explore" fbType.TypeName |> xmlDoc) - yield pIndividuals100] - ) - t - - //printfn "FreebaseProvider: adding types as members, typeName='%A', fullPath='%A', domainId '%+A', declaringType.Name = '%s'" typeName fullPath domainId declaringType.Name - declaringType.AddMember itemType - match individualsTypeOpt with - | None -> () - | Some (t1, tAZ, t10, t100) -> - declaringType.AddMember t1 - declaringType.AddMember tAZ - declaringType.AddMember t10 - declaringType.AddMember t100 - declaringType.AddMember collectionsType - - //printfn "FreebaseProvider: done inserting types for domain '%+A'" domainId - theNestedTypesForTheDataTypesClassForDomain |> Seq.toArray - - /// Lazily populate all the entries under FreebaseData.ServiceTypes. - do theServiceTypesClass.AddMembersDelayed (fun () -> - - let makeTypeForFreebaseDomainTypes(domainId:DomainId, domainName:string) = - let domainTypeName = containerTypeNameForDomainTypes domainId - let theDataTypesClassForDomain = ProvidedTypeDefinition(domainTypeName,baseType=Some typeof,HideObjectMethods=true) - theDataTypesClassForDomain.AddXmlDoc (xmlDoc "Contains the types defined in the web data store for domain '" + domainName + "'") - theDataTypesClassForDomain.AddMembersDelayed(fun () -> insertFreebaseTypesForOneDomain (theDataTypesClassForDomain,domainId) |> Array.toList) - theDataTypesClassForDomain - - try - [ for domain in getDomains() do - yield makeTypeForFreebaseDomainTypes (KnownDomain domain.DomainId, domain.DomainName) - yield makeTypeForFreebaseDomainTypes (UnknownDomain, "Uncategorized") ] - with _ -> []) - - /// Make the type that corresponds to a Freebase domain. The type lives under DomainObjects. Under FreebaseData you will - /// also find a single property whose type is this domain type. - let makeTypeForFreebaseDomainObjects(domainInfo: FreebaseDomain) = - - let domainTypeName = typeNameForDomainObjects domainInfo.DomainName - - let t = ProvidedTypeDefinition(domainTypeName,baseType=Some fbRuntimeInfo.FreebaseDomainType,HideObjectMethods=true) - t.AddXmlDocDelayed (fun () -> blurbOfId domainInfo.DomainId |> xmlDoc) - t.HideObjectMethods <- true - - t.AddMembersDelayed(fun () -> - - [ for childType in getTypesOfDomain (KnownDomain domainInfo.DomainId) do - // Note, don't include mediator types in the all-objects-categorized-by-type presentation - if not(String.IsNullOrEmpty(childType.TypeName)) && childType.Mediator <> "true" then - match tryFindRefinedCollectionTypeForFreebaseType childType with - | None -> () - | Some collectionType -> - - let p = ProvidedProperty(pluralize childType.TypeName, collectionType, - GetterCode = (fun args -> Expr.Call(args.[0],getObjectsOfTypeId,[Expr.Value childType.TypeId.Id]))) - if childType.Deprecated="true" then - p.AddObsoleteAttribute "This type is marked 'deprecated' in the data store" - p.AddXmlDocDelayed (fun () -> blurbOfId childType.TypeId |> xmlDoc) - yield p ]) - - t - - /// Make the class that holds all the nested classes that hold all the objects in different Freebase domains categorized by type. - let theDomainObjectsClass = - let t = ProvidedTypeDefinition("DomainObjects",baseType=Some typeof,HideObjectMethods=true) - t.AddXmlDoc (xmlDoc "Contains the domains of the domain categories defined in the web data store") - t.AddMembersDelayed(fun () -> - [ for domainInfo in getDomains() do - yield makeTypeForFreebaseDomainObjects domainInfo ]) - t - - let theServiceType = ProvidedTypeDefinition("FreebaseService",baseType=Some fbRuntimeInfo.FreebaseDataContextType, HideObjectMethods=true) - do theServiceType.AddXmlDoc "Represents the information available in the web data store. See www.freebase.com for terms and conditions." - - /// Populate the root type (FreebaseData) with properties, one for each Freebase domain. Also include the DomainObjects - /// and DataTypes classes. - do theServiceType.AddMembersDelayed (fun () -> - let domainCategories = getDomainCategories() - try - [ for domainCategory in domainCategories do - if domainCategory.Domains |> Array.exists (fun c -> not c.DomainHidden) then - if not (domainCategory.DomainCategoryId.Id.StartsWith("/user/")) && - not (domainCategory.Domains |> Array.forall (fun c -> c.DomainId.Id.StartsWith("/user/"))) then - let domainCategoryName = domainCategory.Name.Replace("&", "and") - let t = ProvidedTypeDefinition(domainCategoryName,baseType=Some fbRuntimeInfo.FreebaseDomainCategoryType,HideObjectMethods=true) - t.AddXmlDoc (xmlDoc (sprintf "Represents the objects of the domain category '%s' defined in the web data store organized by type" domainCategory.Name)) - t.AddMembersDelayed(fun () -> - [ for domainInfo in domainCategory.Domains do - if not domainInfo.DomainHidden then - let domainName = domainInfo.DomainName - let domainTypeName = typeNameForDomainObjects domainName - let domainType = theDomainObjectsClass.GetNestedType (domainTypeName, BindingFlags.Public ||| BindingFlags.NonPublic) - if domainType <> null then - let propertyName = tidyName domainName - let pi = ProvidedProperty(propertyName, domainType, IsStatic=false, - GetterCode = (fun args -> Expr.Call(args.[0], getDomainById,[Expr.Value(domainInfo.DomainId.Id)]))) - pi.AddXmlDocDelayed (fun () -> blurbOfId domainInfo.DomainId |> xmlDoc) - yield pi]) - theDomainObjectsClass.AddMember t - let p = ProvidedProperty(domainCategoryName, t, IsStatic=false, - GetterCode = (fun args -> Expr.Call(args.[0], getDomainCategoryById,[Expr.Value(domainCategory.DomainCategoryId.Id)]))) - p.AddXmlDocDelayed (fun () -> xmlDoc (sprintf "Contains the objects of the domain category '%s' defined in the web data store organized by type" domainCategory.Name)) - yield p ] - with e -> - let errorMessage = e.Message - let propertyName = - match e with - | :? FreebaseWebException as e when e.Domain = "usageLimits" && e.Reason = "keyInvalid" -> "Invalid API Key" - | _ -> "Error" - let errorProp = ProvidedProperty(propertyName, typeof, GetterCode = (fun _ -> <@@ failwith errorMessage @@>)) - errorProp.AddXmlDoc errorMessage - [errorProp] ) - - theServiceTypesClass.AddMembers [theServiceType; theDomainObjectsClass ] - - let theRootType = ProvidedTypeDefinition(fbRuntimeInfo.RuntimeAssembly,rootNamespace,rootTypeName,baseType=Some typeof, HideObjectMethods=true) - theRootType.AddXmlDoc "Typed representation of Freebase data. See http://www.freebase.com for terms and conditions." - theRootType.AddMembers [ theServiceTypesClass ] - theRootType.AddMembersDelayed (fun () -> - [ yield ProvidedMethod ("GetDataContext", [], theServiceType, IsStaticMethod=true, - InvokeCode = (fun _args -> Expr.Call(createDataContext, [ Expr.Value apiKey; Expr.Value serviceUrl; Expr.Value useUnits; Expr.Value snapshotDate; Expr.Value useLocalCache; Expr.Value allowQueryEvaluateOnClientSide ]))) - ]) - - theRootType - - let defaultNumIndividuals = 1000 - let defaultUseUnits = true - let defaultPluralize = true - let defaultSnapshotDate = "none" - let defaultServiceUrl = FreebaseQueries.DefaultServiceUrl - let defaultLocalSchemaCache = true - let defaultApiKey = "none" - let defaultAllowQueryEvaluateOnClientSide = true - let defaultUseRefinedTypesForItems = true - let freebaseType = createTypes(defaultApiKey, defaultServiceUrl, "FreebaseData", defaultNumIndividuals, defaultUseUnits,defaultPluralize, defaultSnapshotDate, defaultLocalSchemaCache, defaultAllowQueryEvaluateOnClientSide, defaultUseRefinedTypesForItems) - let paramFreebaseType = ProvidedTypeDefinition(fbRuntimeInfo.RuntimeAssembly, rootNamespace, "FreebaseDataProvider", Some(typeof), HideObjectMethods = true) - let apiKeyParam = ProvidedStaticParameter("Key", typeof, defaultApiKey) - let serviceUrlParam = ProvidedStaticParameter("ServiceUrl", typeof, defaultServiceUrl) - let numIndividualsParam = ProvidedStaticParameter("NumIndividuals", typeof, defaultNumIndividuals) - let useUnitsParam = ProvidedStaticParameter("UseUnitsOfMeasure", typeof,defaultUseUnits) - let pluralizeParam = ProvidedStaticParameter("Pluralize", typeof,defaultPluralize) - let snapshotDateParam = ProvidedStaticParameter("SnapshotDate", typeof, defaultSnapshotDate) - let localCacheParam = ProvidedStaticParameter("LocalCache", typeof, defaultLocalSchemaCache) - let allowQueryEvaluateOnClientSideParam = ProvidedStaticParameter("AllowLocalQueryEvaluation", typeof, defaultAllowQueryEvaluateOnClientSide) - let useRefinedTypesForItemsParam = ProvidedStaticParameter("UseRefinedTypes", typeof, defaultUseRefinedTypesForItems) - - let helpText = "Typed representation of Freebase data with additional configuration parameters. See http://www.freebase.com for terms and conditions. - The API key for the MQL metadata service. - The service URL for the MQL metadata service (default: `" + defaultServiceUrl + "`). - The maximum number of sample individuals for each Freebase type (default: `" + string defaultNumIndividuals + "`). - Use the unit-of-measure annotations from the data source metadata (default: " + sprintf "%b" defaultUseUnits + "). - Use adhoc rules to pluralize the names of types when forming names of collections (default: " + sprintf "%b" defaultPluralize + "). - Use a snapshot of the web data store at the given date and/or time in ISO8601 format, e.g., 2012-01-18, 2012-09-15T21:11:32. A value of `now` indicates the compile time of the code. (default: no snapshot). - Use a persistent local cache for schema requests. Also provides the default for whether a persistent local cache is used at runtime. A per-session cache is always used for schema data but it will not persist if this is set to false (default: true). - Allow local evalution of some parts of a query. If false, then an exception will be raised if a query can't be evaluated fully on the server. If true, data sets may be implicitly brought to the client for processing (default: " + (sprintf "%b" defaultAllowQueryEvaluateOnClientSide) + "). - Use refined types for individual entities (default: " + (sprintf "%b" defaultUseRefinedTypesForItems) + ")." - do paramFreebaseType.AddXmlDoc(helpText) - do paramFreebaseType.DefineStaticParameters([apiKeyParam;serviceUrlParam;numIndividualsParam;useUnitsParam;pluralizeParam;snapshotDateParam;localCacheParam;allowQueryEvaluateOnClientSideParam;useRefinedTypesForItemsParam], fun typeName providerArgs -> - let apiKey = (providerArgs.[0] :?> string) - let serviceUrl = (providerArgs.[1] :?> string) - let numIndividuals = (providerArgs.[2] :?> int) - let useUnits = (providerArgs.[3] :?> bool) - let usePluralize = (providerArgs.[4] :?> bool) - let snapshotDate = (providerArgs.[5] :?> string) - let snapshotDate = - match snapshotDate with - | "now" -> DateTime.UtcNow.ToString("yyyy-MM-ddTHH:mm:ss") - | null | "" | "none" -> snapshotDate - | _ -> try ignore(DateTime.Parse(snapshotDate, CultureInfo.InvariantCulture, DateTimeStyles.None)); snapshotDate with e -> failwith ("invalid snapshot date" + e.Message) - - let useLocalCache = (providerArgs.[6] :?> bool) - let allowQueryEvaluateOnClientSide = (providerArgs.[7] :?> bool) - let useRefinedTypesForItems = (providerArgs.[8] :?> bool) - createTypes(apiKey, serviceUrl, typeName, numIndividuals, useUnits, usePluralize, snapshotDate, useLocalCache, allowQueryEvaluateOnClientSide, useRefinedTypesForItems)) - do - this.AddNamespace(rootNamespace, [ freebaseType ]) - this.AddNamespace(rootNamespace, [ paramFreebaseType ]) \ No newline at end of file diff --git a/src/Freebase/FreebaseRequests.fs b/src/Freebase/FreebaseRequests.fs deleted file mode 100644 index 8feac118b..000000000 --- a/src/Freebase/FreebaseRequests.fs +++ /dev/null @@ -1,233 +0,0 @@ -// -------------------------------------------------------------------------------------- -// Freebase type provider -// -------------------------------------------------------------------------------------- -// This file contains functions to help perform basic REST and JSON -// query accesses to the Freebase MQL data service. -// -------------------------------------------------------------------------------------- -// Copyright (c) Microsoft Corporation 2005-2012. -// This sample code is provided "as is" without warranty of any kind. -// We disclaim all warranties, either express or implied, including the -// warranties of merchantability and fitness for a particular purpose. -// -------------------------------------------------------------------------------------- - -module internal FSharp.Data.Runtime.Freebase.FreebaseRequests - -open System -open System.Diagnostics -open System.IO -open System.Net -open System.Collections.Generic -open FSharp.Data -open FSharp.Data.HttpRequestHeaders -open FSharp.Data.JsonExtensions -open FSharp.Data.Runtime.Caching - -[] -module Utilities = - - type JsonValue with - - member this.GetString(s, ?dflt) = - let strOption = this.TryGetProperty(s) |> Option.map (fun j -> j.AsString()) - defaultArg strOption (defaultArg dflt "") - - member this.GetArray s = - let arrayOption = this.TryGetProperty(s) |> Option.map (fun j -> j.AsArray()) - defaultArg arrayOption [| |] - - static member GetArrayVal f (j:JsonValue) = - j.AsArray() |> Array.map f - -type FreebaseResult<'TResult> = - { Code:string - Cursor:string - Result:'TResult - Message:string } - static member FromJson f (fbr:JsonValue) = - { Code = fbr.GetString "code" - Cursor = fbr.GetString("cursor", "false") - Result = f fbr?result - Message = fbr.GetString "message" } - -type FreebaseWebException(e:WebException, domain, reason, message, extendedHelp) = - inherit WebException( - (if String.IsNullOrEmpty extendedHelp then - sprintf "%s (Domain='%s' Reason='%s')" message domain reason - else - sprintf "%s (Domain='%s' Reason='%s' ExtendedHelp='%s')" message domain reason extendedHelp), - e, - e.Status, - e.Response) - member __.Domain = domain - member __.Reason = reason - member __.FreebaseMessage = message - member __.ExtendedHelp = extendedHelp - -let isStringNone s = String.IsNullOrEmpty s || s = "none" - -let cacheDuration = TimeSpan.FromDays 30.0 - -type FreebaseQueries(apiKey: string, serviceUrl:string, localCacheName: string, snapshotDate:string, useLocalCache) = - let snapshotDate = if isStringNone snapshotDate then None else Some snapshotDate - let sendingRequest = Event() - let sendingQuery = Event() - let localCache, localCacheLocation = createInternetFileCache localCacheName cacheDuration - let noLocalCache = createNonCachingCache() - let mutable useLocalCache = useLocalCache - let mutable serviceUrl = serviceUrl - let getCache() = if useLocalCache then localCache else noLocalCache - let freebaseV0 = match serviceUrl with | "http://freebaseread.com/api" -> true | _ -> false -#if FX_NO_ENVIRONMENT_VARIABLES -#else - let apiKey = - match Environment.GetEnvironmentVariable("FREEBASE_API_KEY") with - | x when not <| String.IsNullOrWhiteSpace x && isStringNone apiKey -> x - | _ -> apiKey -#endif - - /// Create a query url from the given query string. - let createQueryUrl(query:string,cursor:string option) : string = - let query = query.Replace("'","\"") - if freebaseV0 then // old freebase API - // add the cursor - let cursor = - match cursor with - | None -> "" - | Some "" -> "\"cursor\":true," - | Some cursor -> "\"cursor\":\"" + cursor + "\"," - // add the query - let url = serviceUrl + "/service/mqlread?query={"+cursor+"\"query\":"+query+"}" - // api key not supported in old API - url - else - // add the cursor - let cursor = - match cursor with - | None -> "" - | Some "" -> "&cursor" - | Some cursor -> "&cursor=" + cursor - // add the query - let url = serviceUrl + "/mqlread?query="+query+cursor - // add the apikey - let url = if isStringNone apiKey then url else url + "&key=" + apiKey - url - - /// Get a web response object for the given query. - let queryRawText (url:string) = - //printfn "request: %s" url - sendingRequest.Trigger(System.Uri(url)) - let url = - match snapshotDate with - | None -> url - | Some d -> url + "&as_of_time=" + d - match getCache().TryRetrieve url with - | Some resultText -> resultText - | None -> - let getResultText() = - if url.Length > 1500 && url.Contains "?" then - let idx = url.IndexOf '?' - let content = url.[idx + 1 .. ] - let shortUrl = url.[0.. idx - 1] - //printfn "post, shortUrl = '%s'" shortUrl - //printfn "post, content = '%s'" content - Http.RequestString(shortUrl, - headers = [ XHTTPMethodOverride HttpMethod.Get - ContentType HttpContentTypes.FormValues - UserAgent "F# Data Freebase Type Provider" - HttpRequestHeaders.Accept HttpContentTypes.Json ], - body = TextRequest content) - else - Http.RequestString(url, headers = [ UserAgent "F# Data Freebase Type Provider" - HttpRequestHeaders.Accept HttpContentTypes.Json ]) - try - let resultText = - try - getResultText() - with _ -> - //try a second time - getResultText() - getCache().Set(url, resultText) - resultText - with - | :? WebException as exn -> - let msg = exn.Message - let pos = msg.IndexOf '\n' - if pos = -1 then reraise() - let msg = msg.Substring (pos+1) - let pos = msg.IndexOf '\n' - if pos = -1 then reraise() - let msg = msg.Substring (pos+1) - let freebaseExn = - try - let json = JsonValue.Parse msg - let error = json?error.GetArray("errors").[0] - let domain = error.GetString("domain") - let reason = error.GetString("reason") - let message = error.GetString("message") - let extendedHelp = error.GetString("extendedHelp") - Some <| FreebaseWebException(exn, domain, reason, message, extendedHelp) - with _ -> None - match freebaseExn with - | Some e -> raise e - | None -> reraise() - - let queryString(queryUrl, fromJson) : FreebaseResult<'T> = - let resultText = queryRawText queryUrl - let fbr = JsonValue.Parse resultText - let result = FreebaseResult<'T>.FromJson fromJson fbr - if freebaseV0 && result.Code <> "/api/status/ok" then - raise (InvalidOperationException(sprintf "failed query, error: '%s': \n----\n%s\n----" result.Message queryUrl)) - result - - // By default we use the freebaseread API, as this supports cross-domain access - //static member defaultServiceUrl = "http://freebaseread.com/api" - static member DefaultServiceUrl = "https://www.googleapis.com/freebase/v1" - - member __.LocalCacheLocation = localCacheLocation - member __.SendingRequest = sendingRequest.Publish - member __.SendingQuery = sendingQuery.Publish - member __.UseLocalCache with get() = useLocalCache and set v = useLocalCache <- v - member __.ServiceUrl with get() = serviceUrl and set v = serviceUrl <- v - member __.SnapshotDate = snapshotDate - member __.ApiKey = - match apiKey with - | k when isStringNone(k) -> None - | x -> Some x - - member __.Query<'T>(query:string, fromJson) : 'T = - sendingQuery.Trigger query - let queryUrl = createQueryUrl(query,None) - queryString(queryUrl, fromJson).Result - - member __.GetImageUrl(imageId) = - if freebaseV0 then "http://freebaseread.com/api/trans/raw/"+imageId - else - let url = "https://usercontent.googleapis.com/freebase/v1/image"+imageId - let url = if isStringNone apiKey then url else url + "?key=" + apiKey - url - - member __.QuerySequence<'T>(query:string, fromJson, explicitLimit) : 'T seq = - seq { sendingQuery.Trigger query - let cursor = ref (Some "") - let complete = ref false - let count = ref 0 - while not !complete && (match explicitLimit with None -> true | Some -1 -> true | Some lim -> !count < lim) do - let queryUrl = createQueryUrl(query,!cursor) - let response = queryString(queryUrl, JsonValue.GetArrayVal fromJson) - count := !count + response.Result.Length - yield! response.Result - match response.Cursor with - | "false" | "False" -> complete := true - | continuation -> cursor := Some continuation } - - member fb.GetBlurbByArticleId (articleId:string) = - let queryUrl = - if freebaseV0 then serviceUrl + "/trans/blurb" + articleId + "?maxlength=1200" - else serviceUrl + "/text" + articleId + "?maxlength=1200&format=plain" - try - let resultText = queryRawText queryUrl - let fbr = JsonValue.Parse resultText - let result = fbr |> FreebaseResult.FromJson (fun j -> j.AsString()) - Some result.Result - with e -> None - diff --git a/src/Freebase/FreebaseRuntime.fs b/src/Freebase/FreebaseRuntime.fs deleted file mode 100644 index faf549def..000000000 --- a/src/Freebase/FreebaseRuntime.fs +++ /dev/null @@ -1,947 +0,0 @@ -// -------------------------------------------------------------------------------------- -// Freebase type provider - runtime components -// -------------------------------------------------------------------------------------- -// Copyright (c) Microsoft Corporation 2005-2012. -// This sample code is provided "as is" without warranty of any kind. -// We disclaim all warranties, either express or implied, including the -// warranties of merchantability and fitness for a particular purpose. -// -------------------------------------------------------------------------------------- - -namespace FSharp.Data.Runtime.Freebase - -open System -open System.Linq -open System.Text -open System.Collections.Generic -open Microsoft.FSharp.Core.CompilerServices -open FSharp.Data -open FSharp.Data.JsonExtensions -open FSharp.Data.Runtime.Freebase.FreebaseSchema -open FSharp.Data.Runtime.Freebase.FreebaseRequests - -/// Represents data for a single object -type internal FreebasePropertyBag(dict : IDictionary) = - - member s.Dictionary = dict - member s.Item - with get id = - if not (dict.ContainsKey id) then failwith (sprintf "property '%s' not found in object property bag, keys = %s" id (String.concat "," [ for k in dict.Keys -> "'" + k + "'"])) - dict.[id] - -/// Represents a data connection to Freebase -type internal FreebaseDataConnection (fb:FreebaseQueries, fbSchema: FreebaseSchemaConnection, useUnits:bool, allowQueryEvaluateOnClientSide: bool) = - - static let getLimitText objectLimit queryConstraints = - match queryConstraints |> List.tryPick (fun (k,v) -> if k = "limit" then Some v else None) with - | Some lim -> "",Some (int32 lim) - | _ when objectLimit = -1 -> "",Some -1 - | _ -> sprintf ", 'limit': %d" objectLimit, None - - // A look aside table for computing schema information for properties. - let propsById = Dictionary<(FreebaseId * FreebaseId),FreebaseProperty>(HashIdentity.Structural) - let defaultObjectLimit = 500 - - member internal __.Connection = fb - member internal __.Schema = fbSchema - member val internal Limit = defaultObjectLimit with get, set - member internal __.UseUnits = useUnits - member internal __.AllowQueryEvaluateOnClientSide = allowQueryEvaluateOnClientSide - - /// Get the FreebaseProperty object that gives schema information for a particular property of a particular type. - member internal __.TryGetPropertyById(typeId, propId) = - match propsById.TryGetValue((typeId, propId)) with - | true, res -> Some res - | _ -> - match fbSchema.GetTypeByTypeId typeId with - | None -> None - | Some fbType -> - for p in fbType.Properties do propsById.[(typeId,p.PropertyId)] <- p - match propsById.TryGetValue((typeId, propId)) with - | true, res -> Some res - | _ -> None - - member __.QueryFragmentsOfPropertiesOfAllIncludedTypes(typeId:FreebaseId, queryConstraints ) = - [ for p in fbSchema.GetAllPropertiesOfAllIncludedTypesOfTypeId typeId do - if not (queryConstraints |> List.exists (fun (k,_v) -> k = p.PropertyId.Id)) then - match p.BasicSystemType, p.IsUnique with - // Compund, non-unique: not eagerly loaded - | Some _, false -> yield sprintf ", '%s' : []" p.PropertyId.Id - // Could add this for unique objects with BasicSystemType.IsNone?? - //| None, true -> sprintf ", '%s' : [{ '/type/object/type' : null, '/type/object/mid' : null, '/type/object/name' : null, 'limit':1 }]" p.Id - // Compund, unique: not eagerly loaded - | Some _, true -> yield sprintf ", '%s' : null" p.PropertyId.Id - // Non-compund: eagerly loaded as field - | None, _ -> () ] - |> String.Concat - - member __.GetInitialDataForObjects (query, explicitLimit) = - seq { for obj in fb.QuerySequence >(query, dictionaryFromJson, explicitLimit) do - yield FreebasePropertyBag(obj) } - - /// Get property bags for all the objects of the given type, at the given type - member fbDataConn.GetInitialDataForObjectsFromQueryText(queryConstraints:(string * string) list, typeId:FreebaseId, objectLimit) = - let fields = fbDataConn.QueryFragmentsOfPropertiesOfAllIncludedTypes (typeId, queryConstraints) - let queryText = queryConstraints |> List.map (fun (k,v) -> sprintf ", '%s' : %s" k (match v with null -> "null" | s -> s)) |> String.Concat - let limitText, explicitLimit = getLimitText objectLimit queryConstraints - let query = sprintf "[{ '/type/object/type' : '%s' %s %s , '/type/object/mid' : null, '/type/object/name' : null %s}]" typeId.Id queryText fields limitText - fbDataConn.GetInitialDataForObjects (query, explicitLimit) - - member fbDataConn.GetInitialDataForSpecificObject(fbTypeId:FreebaseId, fbObjId:FreebaseMachineId) = - let fields = fbDataConn.QueryFragmentsOfPropertiesOfAllIncludedTypes (fbTypeId, []) - let query = sprintf "[{ '/type/object/type' : '%s', '/type/object/mid' : '%s', '/type/object/name' : null %s }]" fbTypeId.Id fbObjId.MId fields - match fbDataConn.GetInitialDataForObjects (query, None) |> Seq.toArray with - | [| obj |] -> obj - | _ -> failwith (sprintf "object mid '%s' not available" fbObjId.MId) - - /// Get a property bag for a specific object, giving values for the properties of the given type - member fbDataConn.GetInitialDataForSpecificObjectOfType(fbTypeId:FreebaseId, fbObjId: FreebaseMachineId) = - let fields = fbDataConn.QueryFragmentsOfPropertiesOfAllIncludedTypes (fbTypeId, []) - let query = sprintf "[{ '/type/object/type' '%s', '/type/object/mid' : '%s', '/type/object/name' : null %s }]" fbTypeId.Id fbObjId.MId fields - match fbDataConn.GetInitialDataForObjects (query, None) |> Seq.toArray with - | [| obj |] -> obj - | _ -> failwith (sprintf "object mid '%s' not available" fbObjId.MId) - - /// Get property bags for all the objects in the specific property relation to a given object, giving values for the properties of the given property type - member fbDataConn.GetInitialDataForAllObjectsForPropertyOfObject(declaringObjectId:FreebaseMachineId,declaringTypeId:FreebaseId,property:FreebaseProperty,fbTypeId:FreebaseId,objectLimit) = - let fields = fbDataConn.QueryFragmentsOfPropertiesOfAllIncludedTypes (fbTypeId, []) - let limitText, explicitLimit = getLimitText objectLimit [] - let query = - "[{'/type/object/mid':null, '/type/object/name':null " + - fields + ", " + - "'optional':true, '/type/object/type':'" + property.ExpectedTypeId.Id + "'," + - "'!" + property.PropertyId.Id + "': [{'/type/object/mid':'" + declaringObjectId.MId + "','/type/object/type':'" + declaringTypeId.Id + "' " + - limitText + "}]}]" - fbDataConn.GetInitialDataForObjects (query, explicitLimit) - - -[] -/// [omit] -/// Represents a single object drawn from Freebase. -type public IFreebaseObject = - abstract MachineId: string - /// The name of this item - abstract Name: string - /// The main image associated with this item - abstract MainImage : string - /// The Blurb text for this item, if any - abstract Blurb : string list - /// Images associated with this item. - abstract GetImages : unit -> seq - /// Get a property by identifier, with a strong type - abstract GetPropertyByIdTyped<'T> : declaringTypeId: string * propertyId:string -> 'T - /// Get a property by identifier - abstract GetPropertyById : declaringTypeId: string * propertyId:string -> obj - /// Get a property by identifier, with a strong type, where the property is known to be populated - abstract GetRequiredPropertyByIdTyped<'T> : declaringTypeId: string * propertyId:string -> 'T - /// Get a property by identifier, where the property is known to be populated - abstract GetRequiredPropertyById : declaringTypeId: string * propertyId:string -> obj - -module private RuntimeConversion = - // The handwritten JSON deserializer uses 'JsonValue.N of decimal | JsonValue.D of double' for numbers, but the schema typing expects 'double | Nullable' - // - convJsonPrimValue has converted this to (null | boxed-decimal | boxed-double) - let convertUnits (useUnits:bool) (isIncoming:bool) (fbProp: FreebaseProperty) (fv:double) = - let u = fbProp.UnitOfMeasureId - if useUnits && units.ContainsKey u.Id then - let (_measureAnnotation,conversionFactor,offset) = units.[u.Id] - let offset = match offset with Some x -> x | None -> 0.0 - if isIncoming then (fv + offset) * conversionFactor - else (fv / conversionFactor) - offset - else - fv - - let convertOne (useUnits:bool) (isIncoming:bool) (rawResult:obj) (targetType: Type) (fbProp: FreebaseProperty) = - let v = - match rawResult with - | null when targetType = typeof -> false |> box - | null when targetType = typeof -> 0 |> box - | null when targetType = typeof -> 0.0 |> box - | :? bool when targetType = typeof -> rawResult - | :? decimal as x when targetType = typeof -> int x |> box - | :? decimal as x when targetType = typeof -> double x |> box - | :? double as x when targetType = typeof -> x |> box - | null when targetType = typeof> -> Nullable() |> box - | null when targetType = typeof> -> Nullable() |> box - | null when targetType = typeof> -> Nullable() |> box - | :? bool as x when targetType = typeof> -> Nullable(x) |> box - | :? decimal as x when targetType = typeof> -> Nullable(int x) |> box - | :? decimal as x when targetType = typeof> -> Nullable(double x) |> box - | :? double as x when targetType = typeof> -> Nullable(x) |> box - | v -> v - // convert unit at runtime - let v = - match v with - | (:? Nullable as d) when d.HasValue -> Nullable(convertUnits useUnits isIncoming fbProp d.Value) |> box - | (:? double as d) -> convertUnits useUnits isIncoming fbProp d |> box - | _ -> v - v - - -/// Represents a single object drawn from Freebase. -// -// Note: A Freebase object may have multiple types. In this (somewhat awkward) implementation, the object -// is biased towards one of these types ('firstType'). This is typically the static type for the object related to the -// program point where the object is created. The non-compound properties of the object are eagerly fetched and expanded -// in 'objProps'. Other properties, including all compound properties and simple properties on other types (e.g. base types) are fetched on-demand. -// This bias also extends to how the object is presented via ToString and the ICustomTypeDescriptor -// property descriptions, since only the properties from 'firstType' are returned. -[] -type FreebaseObject internal (fb:FreebaseDataConnection, objProps:FreebasePropertyBag, firstTypeId:FreebaseId) = - // Some properties are computed on-demand. This is a lookaside table for those properties. - let objPropsOnDemand = Dictionary(HashIdentity.Structural) - - let rawResultToStringSequence (rawResult: obj) = - seq { match rawResult with - | null -> () - | :? System.Collections.IEnumerable as e -> for o in e do yield (string o) - | _ -> invalidArg "rawResult" "not a sequence" } - - // This is the public entry point - member internal fbo.GetPropertyByIdTyped<'T>(declaringTypeId: FreebaseId, propertyId:FreebaseId) : 'T = - fbo.GetPropertyById (declaringTypeId, propertyId, false) |> unbox - - member internal fbo.GetRequiredPropertyByIdTyped<'T>(declaringTypeId: FreebaseId, propertyId:FreebaseId) : 'T = - fbo.GetPropertyById (declaringTypeId, propertyId, true) |> unbox - - // Get a non-compund property. If it is eagerly populated then we fetch from 'objProps' - // directly. Otherwise, the property must be populated on-demand. - member internal this.GetSimplePropertyById(declaringTypeId:FreebaseId, propertyId:FreebaseId) : obj = - let extractPrimValue v = - match v with - // Some constraints cause Freebase primitives to be extracted to { 'value' : 3 } - | JsonValue.Record properties -> - match properties with - | [| "value", v |] -> convJsonPrimValue v - | _ -> convJsonPrimValue v - | v -> convJsonPrimValue v - - if objProps.Dictionary.ContainsKey propertyId.Id then - extractPrimValue objProps.[propertyId.Id] - else - match objPropsOnDemand.TryGetValue(propertyId.Id) with - | true, res -> res - | _ -> - //printf "lazily populating properties for type '%s' for object '%s'" declaringTypeId this.Id - match fb.Schema.GetTypeByTypeId declaringTypeId with - | None -> null - | Some fbDeclaringType -> - let obj = fb.GetInitialDataForSpecificObjectOfType(fbDeclaringType.TypeId, this.MachineId) - for KeyValue(k,v) in obj.Dictionary do - objPropsOnDemand.[k] <- extractPrimValue v - match objPropsOnDemand.TryGetValue(propertyId.Id) with - | true, res -> res - | _ -> failwith (sprintf "could not lazily populate property '%s' for type '%s' for object mid '%s', keys = %s" propertyId.Id declaringTypeId.Id this.MachineId.MId (String.concat "," [ for k in obj.Dictionary.Keys -> "'" + k + "'"])) - - member internal this.GetPropertyById(declaringTypeId:FreebaseId, propertyId:FreebaseId, alwaysThere: bool) : obj = - if propertyId.Id = "/type/object/mid" then box objProps.["/type/object/mid"] - elif propertyId.Id = "/type/object/name" then box objProps.["/type/object/name"] - else - let fbPropOpt = fb.TryGetPropertyById((declaringTypeId, propertyId)) - match fbPropOpt with - | None -> failwith (sprintf "couldn't find information for property '%s' of type '%s'" propertyId.Id declaringTypeId.Id) - | Some fbProp -> - let isUnique = fbProp.IsUnique - match fbProp.BasicSystemType with - // Unique or sequence of compound type: no basic system type - | None -> - let propTypeOpt = fb.Schema.GetTypeByTypeId fbProp.ExpectedTypeId - match propTypeOpt with - | Some propType -> - memoizeLookup objPropsOnDemand propertyId.Id (fun _propertyId -> - let results = - seq { for objData in fb.GetInitialDataForAllObjectsForPropertyOfObject(this.MachineId,declaringTypeId,fbProp,propType.TypeId,fb.Limit) do - yield FreebaseObject(fb,objData,propType.TypeId) } - if fbProp.IsUnique then - match results |> Seq.toList with - | objData :: _ -> objData |> box - | [ ] -> null - else - box results) - | _ -> - let raw = this.GetSimplePropertyById(declaringTypeId, propertyId) - if fbProp.IsUnique then - // Unpublished types get a string - raw - else - // Unpublished types get a string sequence - raw |> rawResultToStringSequence |> box - - // Unique or sequence of primitve results: create array, apply unit transformations - | Some (basicType,supportsNull) -> - - let rawResult = this.GetSimplePropertyById(declaringTypeId, propertyId) - if isUnique then - let targetType = if supportsNull || alwaysThere then basicType else makeRuntimeNullableTy basicType - RuntimeConversion.convertOne fb.UseUnits true rawResult targetType fbProp - elif basicType=typeof then - this.GetSimplePropertyById(declaringTypeId, propertyId) - |> rawResultToStringSequence - |> box - else - let rawResult = this.GetSimplePropertyById(declaringTypeId, propertyId) - let rawResults = rawResult :?> obj[] - let arr = System.Array.CreateInstance(basicType, rawResults.Length) - for i in 0 .. rawResults.Length - 1 do - arr.SetValue(RuntimeConversion.convertOne fb.UseUnits true rawResults.[i] basicType fbProp, i) - arr |> box - - - /// Images associated with this item. - member this.GetImages() = FreebaseImageInformation.GetImages(fb.Connection,this.MachineId) - - /// The ID of this item - member this.Id = - match objProps.["/type/object/mid"] with - | JsonValue.String s -> s - | _ -> failwith "id was not a string" - - /// The machine ID of this item - member internal this.MachineId = FreebaseMachineId(this.Id) - - /// The Name of this item - member this.Name = match objProps.["/type/object/name"] with JsonValue.String s -> s | JsonValue.Null -> null | _ -> failwith "name was not a string" - - /// The Blurb text for this item, if any - member this.Blurb = fb.Schema.GetBlurbByMachineId this.MachineId - - /// The main image associated with this item, if any - // It seems like there's not a good way at bind-time to pick the first out of the Images array. - // Randomly choosing the first one. - member this.MainImage = this.GetImages().FirstOrDefault() - - interface IFreebaseObject with - member x.MachineId = x.MachineId.MId - member x.Name = x.Name - member x.MainImage = x.MainImage - member x.Blurb = x.Blurb - member x.GetImages() = x.GetImages() - member x.GetPropertyByIdTyped<'T>(declaringTypeId, propertyId) = x.GetPropertyByIdTyped<'T>(FreebaseId declaringTypeId, FreebaseId propertyId) - member x.GetPropertyById(declaringTypeId, propertyId) = x.GetPropertyById(FreebaseId declaringTypeId, FreebaseId propertyId, false) - member x.GetRequiredPropertyByIdTyped<'T>(declaringTypeId, propertyId) = x.GetRequiredPropertyByIdTyped<'T>(FreebaseId declaringTypeId, FreebaseId propertyId) - member x.GetRequiredPropertyById(declaringTypeId, propertyId) = x.GetRequiredPropertyByIdTyped(FreebaseId declaringTypeId, FreebaseId propertyId) - - member this.DisplayText = this.ToString() - override this.ToString() = - match box dict with - | null -> "null:" + firstTypeId.Id - | _ -> - match this.Name with - | null -> this.MachineId.MId + ":" + firstTypeId.Id - | nm -> nm -#if FX_NO_CUSTOMTYPEDESCRIPTOR -#else - interface System.ComponentModel.ICustomTypeDescriptor with - member this.GetAttributes() = System.ComponentModel.AttributeCollection.Empty - member this.GetClassName() = null - member this.GetComponentName() = null - member this.GetConverter() = new System.ComponentModel.TypeConverter() - member this.GetDefaultEvent() = null - member this.GetDefaultProperty() = null - member this.GetEditor _ = null - member this.GetEvents() = System.ComponentModel.EventDescriptorCollection.Empty - member this.GetEvents _ = System.ComponentModel.EventDescriptorCollection.Empty - // None of our properties have attributes - member this.GetProperties _ = System.ComponentModel.PropertyDescriptorCollection.Empty - member this.GetPropertyOwner _p = this :> obj - member this.GetProperties() = - let mangle (s : string) = - new String( - [| let prevSpace = ref false - for c in s do - match c with - | ' ' -> prevSpace := true - | c when !prevSpace -> prevSpace := false; yield Char.ToUpperInvariant(c) - | _ -> yield c |]) - let props = - System.ComponentModel.PropertyDescriptorCollection( - [| match fb.Schema.GetTypeByTypeId firstTypeId with - | Some firstType -> - for p in firstType.Properties do - // mangling the property name to make properties available for WPF data binding - let propName = p.PropertyName |> mangle - // Compute the erased type - let typ = p.FSharpPropertyRuntimeType(fb.Schema,typeof,alwaysThere=false) - yield - { new System.ComponentModel.PropertyDescriptor(propName, [||]) with - override __.IsReadOnly = true - override __.ComponentType = typeof - override __.PropertyType = typ - override __.CanResetValue _ = false - override __.GetValue o = (o :?> FreebaseObject).GetPropertyById(firstType.TypeId,p.PropertyId,false) - override __.ResetValue _ = failwith "Not implemented" - override __.SetValue(_,_) = failwith "Not implemented" - override __.ShouldSerializeValue _ = false } - | None -> () |], true) - props -#endif - -module internal QueryImplementation = - open System.Linq - open System.Linq.Expressions - open System.Reflection - - /// TODO: make this a parameter - let evaluateOnClientSideWhereNecessary = true - let (|MethodWithName|_|) (s:string) (m:MethodInfo) = if s = m.Name then Some () else None - let (|PropertyWithName|_|) (s:string) (m:PropertyInfo) = if s = m.Name then Some () else None - - let (|MethodCall|_|) (e:Expression) = - match e.NodeType, e with - | ExpressionType.Call, (:? MethodCallExpression as e) -> - Some ((match e.Object with null -> None | obj -> Some obj), e.Method, Seq.toList e.Arguments) - | _ -> None - - let (|AsType|_|) (e:Expression) = - match e.NodeType, e with - | ExpressionType.TypeAs, (:? UnaryExpression as e) -> Some (e.Operand, e.Type) - | _ -> None - - let (|NewArray|_|) (e:Expression) = - match e.NodeType, e with - | ExpressionType.NewArrayInit, (:? NewArrayExpression as e) -> Some (Seq.toList e.Expressions) - | _ -> None - - let (|PropertyGet|_|) (e:Expression) = - match e.NodeType, e with - | ExpressionType.MemberAccess, ( :? MemberExpression as e) -> - match e.Member with - | :? PropertyInfo as p -> - Some ((match e.Expression with null -> None | obj -> Some obj), p) - | _ -> None - | _ -> None - - let (|Constant|_|) (e:Expression) = - match e.NodeType, e with - | ExpressionType.Constant, (:? ConstantExpression as ce) -> Some (ce.Value, ce.Type) - | _ -> None - - let (|String|_|) = function | Constant((:? string as s),_) -> Some s | _ -> None - let (|Int32|_|) = function | Constant((:? int as s),_) -> Some s | _ -> None - let (|Null|_|) = function Constant(null,_) -> Some () | _ -> None - let (|Double|_|) = function Constant((:? double as s),_) -> Some s | _ -> None - let (|Decimal|_|) = function Constant((:? decimal as s),_) -> Some s | _ -> None - - let (|Convert|_|) (e:Expression) = - match e.NodeType, e with - | ExpressionType.Convert, (:? UnaryExpression as ce) -> Some (ce.Operand, ce.Type) - | _ -> None - - let (|Var|_|) (e:Expression) = - match e.NodeType, e with - | ExpressionType.Parameter, (:? ParameterExpression as ce) -> Some ce - | _ -> None - - let (|Lambda|_|) (e:Expression) = - match e.NodeType, e with - | ExpressionType.Lambda, (:? LambdaExpression as ce) -> Some (Seq.toList ce.Parameters, ce.Body) - | _ -> None - - let (|LetExpr|_|) (e:System.Linq.Expressions.Expression) = - match e with - | MethodCall(Some (Lambda([v],body)), m, [arg]) when m.Name = "Invoke" -> Some(v,arg,body) - | _ -> None - - let (|OptionalQuote|) (e:Expression) = - match e.NodeType, e with - | ExpressionType.Quote, (:? UnaryExpression as ce) -> ce.Operand - | _ -> e - - let (|FreebaseRelOp|_|) (e:Expression) = - match e.NodeType, e with - | ExpressionType.Equal, (:? BinaryExpression as ce) -> Some ("=", ce.Left, ce.Right) - | ExpressionType.LessThan, (:? BinaryExpression as ce) -> Some ("<", ce.Left, ce.Right) - | ExpressionType.LessThanOrEqual, (:? BinaryExpression as ce) -> Some ("<=", ce.Left, ce.Right) - | ExpressionType.GreaterThan, (:? BinaryExpression as ce) -> Some (">", ce.Left, ce.Right) - | ExpressionType.GreaterThanOrEqual, (:? BinaryExpression as ce) -> Some (">=", ce.Left, ce.Right) - | ExpressionType.NotEqual, (:? BinaryExpression as ce) -> Some ("<>", ce.Left, ce.Right) - | _, MethodCall(_,MethodWithName "ApproximatelyMatches",[l;r]) -> Some ("~=", l, r) - | _ -> None - - let (|FreebaseConstant|_|) (e:Expression) = - match e with - | String s -> box s |> Some - | Convert(Int32 i, _) -> box (Nullable(i)) |> Some - | Convert(Double i, _) -> box (Nullable(i)) |> Some - | Convert(Decimal i, _) -> box (Nullable(i)) |> Some - | Int32 i -> box i |> Some - | Double i -> box i |> Some - | Decimal i -> box i |> Some - | _ -> None //failwithf "unrecognized query constant '%A'" e - - let (|FreebaseConstants|_|) (es:Expression list) = - let es2 = es |> List.map (|FreebaseConstant|_|) - if List.forall Option.isSome es2 then Some (List.map Option.get es2) else None - - let (|FreebaseApproximatelyOneOfOp|_|) (e:Expression) = - match e with - | MethodCall(_,MethodWithName "ApproximatelyOneOf",[arg; NewArray (FreebaseConstants args)]) -> Some (arg, args) - | _ -> None - - let rec (|FreebasePropertyGet|_|) e = - match e with - | AsType(FreebasePropertyGet(v),_) -> Some v //look through 'Coerce' nodes - | MethodCall(Some e, (MethodWithName "GetPropertyByIdTyped"), [String typeId; String propId]) -> Some (e, typeId, propId) - | PropertyGet(Some e, PropertyWithName "Name") -> Some(e, "/type/object", "/type/object/name") - | PropertyGet(Some e, PropertyWithName "Id") -> Some(e, "/type/object", "/type/object/mid") - | LetExpr(v,e,FreebasePropertyGet(Var v2, typeId, propId)) when v = v2 -> Some (e, typeId, propId) - | _ -> None - - // A fetch of 'Value' on a Nullable value can be looked through - let rec (|FreebasePropertyGetWithPossibleNullableValueFetch|_|) e = - match e with - | FreebasePropertyGet (e,typeId,propId) -> Some (e,typeId,propId) - | PropertyGet(Some (FreebasePropertyGet (e,typeId,propId)), PropertyWithName "Value") -> Some (e, typeId, propId) - | LetExpr(v,FreebasePropertyGet (e,typeId,propId),PropertyGet(Some (Var v2), PropertyWithName "Value")) when v = v2 -> Some (e, typeId, propId) - | _ -> None - - // Detect a series of gets, e.g. - // isotope.``Isotope of``.``Atomic number``.Value - - let (|FreebasePropertyGets|_|) e = - match e with - | FreebasePropertyGetWithPossibleNullableValueFetch(e, typeId, propId) -> - let rec more e = - match e with - | FreebasePropertyGetWithPossibleNullableValueFetch(e, typeId, propId) -> - let (e,vs) = more e - (e,(typeId, propId)::vs) - | _ -> (e,[]) - let (e,vs) = more e - Some(e,List.rev ((typeId, propId)::vs)) - | _ -> None - - let rec (|FreebaseUniquePropertyGets|_|) (conn: FreebaseDataConnection) e = - match e with - | FreebasePropertyGets(e,props) -> - let (typeId, propId) = List.head (List.rev props) - match conn.TryGetPropertyById(FreebaseId(typeId), FreebaseId(propId)) with - | Some prop when prop.IsUnique -> Some (e, props, prop) - | _ -> None - | _ -> None - - /// The algebra of different supported qualifications - type FreebasePropAccess = (string * string) list - - type FreebaseQueryQualification = - | UniquePropertyNotNull of FreebasePropAccess * bool - | UniquePropertyNull of FreebasePropAccess * bool - | PropertyOpConstant of FreebasePropAccess * string * obj - | PropertyOpConstants of FreebasePropAccess * string * obj list - - type FreebaseQueryData = - | Base of FreebaseId - | TailSelect of FreebaseQueryData * (obj -> obj) - | Filter of FreebaseQueryData * FreebaseQueryQualification - | Take of FreebaseQueryData * int - | Sort of FreebaseQueryData * (string * FreebasePropAccess) list - - let nonTailSelect() = failwith "only one select or yield operation is allowed, at the end of a query" - let badQueryOperation (methName:string) = failwith (sprintf "Unrecognized operation '%s' in Freebase query. Supported operations are 'for', 'select', 'where', 'sortBy', 'sortByDescending', 'thenBy', 'thenByDescending', 'take'" methName) - let quote s = "'" + s + "'" - - let formatQueryConstant (fb:FreebaseDataConnection) (fbPropOpt:FreebaseProperty option) (qc:obj) = - // Reverse-convert unitized values sent back to Freebase - let convert (v:double) = - match fbPropOpt with - | None -> v - | Some fbProp -> RuntimeConversion.convertUnits fb.UseUnits false fbProp v - match qc with - | null -> null - | :? string as s -> quote s - | :? Nullable as i -> if i.HasValue then string i.Value else null - | :? int as i -> string i - | :? Nullable as i -> if i.HasValue then string i.Value else null - | :? decimal as i -> string i - | :? Nullable as i -> if i.HasValue then string (convert i.Value) else null - | :? double as i -> string (convert i) - | qc -> failwithf "unexpected constant %A" qc - - // - // Nested accesses become nested queries expanding the returned data - // e.g. - // isotope.``Isotope of``.``Atomic number``.Value <= 4 - // becomes: - // "/chemistry/isotope/isotope_of": { "/chemistry/chemical_element/atomic_number<=": 4 + ... } - /// with all the non-compound fields filled in. - // - // The data is used to populate probed compund field of the object - let rec formatPropAccessCx (fbDataConn:FreebaseDataConnection) ps op constraintText = - match ps with - | [(_typeId, propId)] -> propId + op, constraintText - | (_typeId1, propId1) :: rest -> - //let fields1 = fbDataConn.QueryFragmentsOfPropertiesOfAllIncludedTypes (typeId1, []) - let subPropId,subCx = formatPropAccessCx fbDataConn rest op constraintText - propId1, "{ '" + subPropId + "': " + subCx + ", 'limit':1 }" - | _ -> failwith "unreachable" - - // In sorts, property access just uses the '.' notation - let formatPropAccessSort ps = String.concat "." (List.map snd ps) - - let formatQueryCondition (fbDataConn:FreebaseDataConnection) qc = - match qc with - | UniquePropertyNotNull (propAccess,isCompound) -> - let constraintText = - if isCompound then - "{ '/type/object/mid':null, 'limit':1 }" - else - "{ 'value':null, 'limit':1 }" - formatPropAccessCx fbDataConn propAccess "" constraintText - | UniquePropertyNull (propAccess,isCompound) -> - let constraintText = - if isCompound then - "{ '/type/object/mid': null, 'optional':'forbidden', 'limit':1 }" - else - "{ 'value':null, 'optional':'forbidden', 'limit':1 }" - formatPropAccessCx fbDataConn propAccess "" constraintText - | PropertyOpConstant (propAccess, op, o) -> - let (typeId, propId) = List.head (List.rev propAccess) - let fbPropOpt = fbDataConn.TryGetPropertyById(FreebaseId(typeId), FreebaseId(propId)) - (formatPropAccessCx fbDataConn propAccess (if op = "=" then "" else op) (formatQueryConstant fbDataConn fbPropOpt o)) - | PropertyOpConstants (propAccess, op, objs) -> - let (typeId, propId) = List.head (List.rev propAccess) - let fbPropOpt = fbDataConn.TryGetPropertyById(FreebaseId(typeId), FreebaseId(propId)) - (formatPropAccessCx fbDataConn propAccess (if op = "=" then "" else op) ("[" + (objs |> List.map (formatQueryConstant fbDataConn fbPropOpt) |> String.concat ",") + "]" )) - - /// Format as query text for MQL - let rec formatQueryData fbDataConn q = - match q with - | Base typeId -> [("type", quote typeId.Id)] - | Filter (xs,q) -> formatQueryData fbDataConn xs @ [ formatQueryCondition fbDataConn q ] - | Take (xs,n) -> formatQueryData fbDataConn xs @ [ ("limit", string n) ] - | Sort (xs,[(direction,propIds)]) -> - let rest = formatQueryData fbDataConn xs - // Skip 'sort' when counting - rest @ [ (formatPropAccessSort propIds, null); ("sort", quote (direction + formatPropAccessSort propIds)) ] - | Sort (xs,propIds) -> - let rest = formatQueryData fbDataConn xs - // Skip 'sort' when counting - rest - @ (propIds |> List.map (fun (_,propAccess) -> (formatPropAccessSort propAccess, null))) - @ [ ("sort", sprintf "[%s]" (propIds |> List.map (fun (direction,propAccess) -> quote (direction + formatPropAccessSort propAccess)) |> String.concat ",")) ] - | TailSelect _ -> nonTailSelect() - - let getBaseTypeId queryData = - let rec loop = function Base info -> info | Filter (xs,_) | Take (xs,_) | Sort(xs,_) -> loop xs | TailSelect _ -> nonTailSelect() - loop queryData - - let rec queryDataAsEnumerable (fbDataConn:FreebaseDataConnection) (queryData:FreebaseQueryData) = - match queryData with - | TailSelect (preQuery,f) -> preQuery |> queryDataAsEnumerable fbDataConn |> Seq.map f - | _ -> - let queryConstraints = formatQueryData fbDataConn queryData - let typeId = getBaseTypeId queryData - seq { for objData in fbDataConn.GetInitialDataForObjectsFromQueryText(queryConstraints,typeId,fbDataConn.Limit) do - yield FreebaseObject(fbDataConn,objData,typeId) :> obj } - - type IWithFreebaseQueryData = - abstract FreebaseQueryData : FreebaseQueryData - abstract FreebaseDataConnection : FreebaseDataConnection - - let (|SourceWithQueryData|_|) (source:Expression) = - match source with - | Constant ((:? IWithFreebaseQueryData as bd), _) -> Some bd - | _ -> None - -#if FX_NET_CORE_REFLECTION - let isNullableTy (ty:Type) = ty.IsConstructedGenericType && ty.GetGenericTypeDefinition() = typedefof> -#else - let isNullableTy (ty:Type) = ty.IsGenericType && ty.GetGenericTypeDefinition() = typedefof> -#endif - let whenAllElseFails (e:Expression) : 'TResult = - match e with - | MethodCall(None, meth, (SourceWithQueryData sourceData :: args)) when evaluateOnClientSideWhereNecessary -> - let sourceExpr = -#if FX_NET_CORE_REFLECTION - if typeof<'TResult>.IsConstructedGenericType && typeof<'TResult>.GetGenericTypeDefinition() = typedefof> then -#else - if typeof<'TResult>.IsGenericType && typeof<'TResult>.GetGenericTypeDefinition() = typedefof> then -#endif - let sourceObj = ((queryDataAsEnumerable sourceData.FreebaseDataConnection sourceData.FreebaseQueryData) |> Seq.cast).AsQueryable() - - Expression.Constant(sourceObj, typeof>) :> Expression - else - let sourceObj = ((queryDataAsEnumerable sourceData.FreebaseDataConnection sourceData.FreebaseQueryData) |> Seq.cast<'TResult>).AsQueryable() - Expression.Constant(sourceObj, typeof>) :> Expression - let replacementExpr = Expression.Call(null, meth, [| yield sourceExpr; yield! args |]) - let fDelegate = (Expression.Lambda(replacementExpr,[| |])).Compile() - try fDelegate.DynamicInvoke() :?> 'TResult with :? TargetInvocationException as e -> raise e - | MethodCall(_, meth, _) -> badQueryOperation meth.Name - | _ -> failwithf "Unrecognized operation '%A' in web data query" e - - type FreebaseQueryable<'T>(fbDataConn, data:FreebaseQueryData) = - - static member Create(typeId, fbDataConn) = - FreebaseQueryable<'T>(fbDataConn, Base typeId) :> IQueryable<'T> - - static member Constructor(fbDataConn, data) = FreebaseQueryable<'T>(fbDataConn, data) - - interface IQueryable<'T> - interface IQueryable with - member x.Provider = FreebaseQueryableStatics.Provider - member x.Expression = Expression.Constant(x,typeof>) :> Expression - member x.ElementType = typeof<'T> - interface seq<'T> with - member x.GetEnumerator() = (Seq.cast<'T> (queryDataAsEnumerable fbDataConn data)).GetEnumerator() - interface System.Collections.IEnumerable with - member x.GetEnumerator() = (x :> seq<'T>).GetEnumerator() :> System.Collections.IEnumerator - interface IWithFreebaseQueryData with - member x.FreebaseQueryData = data - member x.FreebaseDataConnection = fbDataConn - - and FreebaseOrderedQueryable<'T>(fbDataConn, data:FreebaseQueryData) = - - static member Constructor(fbDataConn, data) = FreebaseOrderedQueryable<'T>(fbDataConn, data) - - interface IOrderedQueryable<'T> - interface IQueryable<'T> - interface IQueryable with - member x.Provider = FreebaseQueryableStatics.Provider - member x.Expression = Expression.Constant(x,typeof>) :> Expression - member x.ElementType = typeof<'T> - interface seq<'T> with member x.GetEnumerator() = (Seq.cast<'T> (queryDataAsEnumerable fbDataConn data)).GetEnumerator() - interface System.Collections.IEnumerable with member x.GetEnumerator() = (x :> seq<'T>).GetEnumerator() :> System.Collections.IEnumerator - interface IWithFreebaseQueryData with - member x.FreebaseQueryData = data - member x.FreebaseDataConnection = fbDataConn - - and FreebaseQueryableStatics() = - - static let createQueryable(isOrdered,fbDataConn,data:FreebaseQueryData,ty:System.Type) : obj = - let qty = (if isOrdered then typedefof> else typedefof>).MakeGenericType [| ty |] -#if FX_NET_CORE_REFLECTION - qty.GetRuntimeMethods().Where(fun x -> x.Name = "Constructor").Single().Invoke(null, [| fbDataConn; data |]) -#else - qty.GetConstructors().Single().Invoke [|fbDataConn;data|] -#endif - - static let translationFailure (fb: FreebaseDataConnection) msg = - if fb.AllowQueryEvaluateOnClientSide then None else failwith msg - - static member val Provider = - { new System.Linq.IQueryProvider with - member provider.CreateQuery(e:Expression) : IQueryable = failwithf "CreateQuery, e = %A" e - - /// This member is called by LINQ's .Where, .Select, etc. - member provider.CreateQuery<'T>(e:Expression) : IQueryable<'T> = - let resultsOpt = - match e with - | MethodCall(None, (MethodWithName "Where" as meth), [ SourceWithQueryData source; OptionalQuote qual ]) -> - - // Convert the qualification - let dataOpt = - match qual with - - // Detect the compiled version of "where (freebaseObject.FreebaseProperty = constant)" - | Lambda([ v1 ], FreebaseRelOp(op,FreebasePropertyGets(Var v2, propAccess), FreebaseConstant qc)) when v1 = v2 -> - Some (FreebaseQueryData.Filter(source.FreebaseQueryData, FreebaseQueryQualification.PropertyOpConstant (propAccess, op, qc))) - - // Detect the compiled version of "where (freebaseObject.FreebaseProperty <> null )" - // Becomes 'prop : { ... "limit":1}' - // This currently only works for unique compound properties like dated_money_value, e.g. /meteorology/tropical_cyclone/damages - | Lambda([ v1 ], FreebaseRelOp("<>",FreebaseUniquePropertyGets source.FreebaseDataConnection (Var v2, propAccess, prop), Null)) - when v1 = v2 -> - let isCompound = prop.BasicSystemType.IsNone - Some (FreebaseQueryData.Filter(source.FreebaseQueryData, FreebaseQueryQualification.UniquePropertyNotNull (propAccess, isCompound))) - - // Detect the compiled version of "where (freebaseObject.FreebaseProperty = null )" - | Lambda([ v1 ], FreebaseRelOp("=",FreebaseUniquePropertyGets source.FreebaseDataConnection (Var v2, propAccess, prop), Null)) - when v1 = v2 -> - let isCompound = prop.BasicSystemType.IsNone - Some (FreebaseQueryData.Filter(source.FreebaseQueryData, FreebaseQueryQualification.UniquePropertyNull (propAccess, isCompound))) - - // Detect the compiled version of "where (freebaseObject.FreebaseProperty.HasValue)" - | Lambda([ v1 ], PropertyGet(Some (FreebaseUniquePropertyGets source.FreebaseDataConnection (Var v2, propAccess, prop)), hasValueProp)) - when v1 = v2 && hasValueProp.Name = "HasValue" -> - let isCompound = prop.BasicSystemType.IsNone - Some (FreebaseQueryData.Filter(source.FreebaseQueryData, FreebaseQueryQualification.UniquePropertyNotNull (propAccess, isCompound))) - - // Detect the compiled version of "where (freebaseObject.FreebaseProperty.ApproximatelyOneOf(constant1, constant2, ...)" - | Lambda([ v1 ], FreebaseApproximatelyOneOfOp(FreebasePropertyGets(Var v2, propAccess), qcs)) when qcs.Length > 0 && v1 = v2 -> - Some (FreebaseQueryData.Filter(source.FreebaseQueryData, FreebaseQueryQualification.PropertyOpConstants (propAccess, "|=", qcs))) - - | _ -> - translationFailure source.FreebaseDataConnection (sprintf "unknown qualification - not a lambda - %A, %A, %A" qual qual.NodeType (qual :? LambdaExpression)) - - match dataOpt with - | Some data -> - let argTy = meth.GetGenericArguments().[0] - Some (source.FreebaseDataConnection, false, data, argTy) - | None -> None - - // Take(n) - | MethodCall(None, (MethodWithName "Take" as meth), [ SourceWithQueryData source; OptionalQuote (Int32 n) ]) -> - let argTy = meth.GetGenericArguments().[0] - let data = FreebaseQueryData.Take(source.FreebaseQueryData, n) - Some (source.FreebaseDataConnection, false, data, argTy) - - // "sort":"name" - | MethodCall(None, ((MethodWithName "OrderBy" | MethodWithName "OrderByDescending") as meth), [ SourceWithQueryData source; OptionalQuote qual ]) -> - let dataOpt = - match qual with - // Detect the compiled version of "(fun v -> v.FreebaseProperty)" - | Lambda([ v1 ], FreebasePropertyGets(Var v2, propAccess)) when v1 = v2 -> - let direction = if meth.Name = "OrderBy" then "" else "-" - Some (FreebaseQueryData.Sort(source.FreebaseQueryData, [(direction, propAccess)])) - | _ -> - translationFailure source.FreebaseDataConnection (sprintf "unknown qualification - not a lambda - %A, %A, %A" qual qual.NodeType (qual :? LambdaExpression)) - match dataOpt with - | Some data -> - let argTy = meth.GetGenericArguments().[0] - Some (source.FreebaseDataConnection, true, data, argTy) - | None -> None - - | MethodCall(None, ((MethodWithName "ThenBy" | MethodWithName "ThenByDescending") as meth), [ SourceWithQueryData source; OptionalQuote qual ]) -> - let dataOpt = - match qual with - // Detect the compiled version of "(fun v -> v.FreebaseProperty)" - | Lambda([ v1 ], FreebasePropertyGets(Var v2, propId)) when v1 = v2 -> - let direction = if meth.Name = "ThenBy" then "" else "-" - match source.FreebaseQueryData with - | FreebaseQueryData.Sort(sourceDataOrig, propIds) -> Some (FreebaseQueryData.Sort(sourceDataOrig, propIds @ [(direction,propId)])) - | _ -> translationFailure source.FreebaseDataConnection (sprintf "'thenBy' operations must come immediately after a 'sortBy' operation in a query") - | _ -> translationFailure source.FreebaseDataConnection (sprintf "unknown qualification - not a lambda - %A, %A, %A" qual qual.NodeType (qual :? LambdaExpression)) - - match dataOpt with - | Some data -> - let argTy = meth.GetGenericArguments().[0] - Some (source.FreebaseDataConnection, true, data, argTy) - | None -> None - - // Select(fun x -> ...) - | MethodCall(None, (MethodWithName "Select" as meth), [ SourceWithQueryData source; OptionalQuote (Lambda([ v1 ], e) as lambda) ]) -> - let argTy = meth.GetGenericArguments().[1] - match e with - | Var v2 when v1 = v2 -> - Some (source.FreebaseDataConnection, false, source.FreebaseQueryData, argTy) - | _ -> - // TODO: consider sanitizing the "e" to check that only non-server-query operations - // are used, i.e. simple property projections, to present cascading queries - let fDelegate = (lambda :?> LambdaExpression).Compile() - let f (x:obj) = try fDelegate.DynamicInvoke(x) with :? TargetInvocationException as e -> raise e - Some (source.FreebaseDataConnection, false, FreebaseQueryData.TailSelect (source.FreebaseQueryData, f), argTy) - | _ -> None - - match resultsOpt with - | Some (fbDataConn, isOrdered, newQueryData, newQueryTy) -> - let combinedObj = createQueryable (isOrdered, fbDataConn, newQueryData, newQueryTy) - (combinedObj :?> IQueryable<'T>) - | None -> - whenAllElseFails e - - member provider.Execute(e:Expression) : obj = failwith "Execute, untyped: nyi" - member provider.Execute<'T>(e:Expression) : 'T = - match e with - | MethodCall(None, ((MethodWithName "Count" | MethodWithName "ApproximateCount") as meth), [ SourceWithQueryData source ]) -> - //printfn "count/estimate-count" - let queryData = source.FreebaseQueryData - let extraConstraint = [ ("return", quote (if meth.Name = "Count" then "count" else "estimate-count")) ] - let queryConstraints = formatQueryData source.FreebaseDataConnection queryData @ extraConstraint - let queryText = queryConstraints |> List.map (fun (k,v) -> sprintf ", '%s' : %s" k (match v with null -> "null" | s -> s)) |> String.Concat - let typeId = getBaseTypeId queryData - let query = sprintf "{ '/type/object/type' : '%s' %s }" typeId.Id queryText - let count = source.FreebaseDataConnection.Connection.Query(query, fun j -> j.AsInteger()) - box count :?> 'T - | _ -> - whenAllElseFails e } - -/// [omit] -type IFreebaseDomain = - abstract Id : string - abstract GetObjectsOfTypeId : typeId:string -> IQueryable - -/// Represents the contents of a Freebase namespace -/// [omit] -type public FreebaseDomain internal (fbDataConn,domainId:string) = - interface IFreebaseDomain with - member __.Id = domainId - /// Get all the Freebase objects which have the given Freebase type id. - member __.GetObjectsOfTypeId typeId = - QueryImplementation.FreebaseQueryable.Create (FreebaseId(typeId), fbDataConn) - -/// [omit] -type IFreebaseDomainCategory = - abstract Id : string - abstract GetDomainById : domainId:string -> FreebaseDomain - -/// Represents the contents of a Freebase namespace -/// [omit] -type public FreebaseDomainCategory internal (fbDataConn, domainCategoryId) = - interface IFreebaseDomainCategory with - /// Get all the Freebase objects which have the given Freebase type id. - /// Get the object which represents the Freebase domain with the given object id. - member __.GetDomainById domainId = FreebaseDomain(fbDataConn, domainId) - member __.Id = domainCategoryId - -/// [omit] -type IFreebaseIndividuals = - abstract GetIndividualById : typeId:string * objId:string -> IFreebaseObject - -/// [omit] -type FreebaseIndividuals internal (fbDataConn: FreebaseDataConnection) = - /// Get all the Freebase objects which have the given type id and object id. - interface IFreebaseIndividuals with - member __.GetIndividualById (typeId, objId) = - let objData = fbDataConn.GetInitialDataForSpecificObject(FreebaseId typeId, FreebaseMachineId objId) - FreebaseObject(fbDataConn,objData,FreebaseId typeId) :> _ - - /// Get all the Freebase objects which have the given Freebase type id. - static member public _GetIndividualsObject (collectionObj:obj) = - match collectionObj with - | :? QueryImplementation.IWithFreebaseQueryData as qd -> FreebaseIndividuals(qd.FreebaseDataConnection) - | _ -> failwith "expected query information on collection" - -/// Arguments of the DataContext.SendingRequest event -type FreebaseSendingRequestArgs(uri: System.Uri) = - member x.RequestUri = uri - -/// Arguments of the DataContext.SendingQuery event -type FreebaseSendingQueryArgs(queryText: string) = - member x.QueryText = queryText - -/// [omit] -type IFreebaseDataContext = - abstract GetDomainCategoryById : domainCategoryId:string -> FreebaseDomainCategory - -/// Contains public entry points called by provided code. -/// [omit] -type public FreebaseDataContext internal (apiKey:string, serviceUrl:string, useUnits:bool, snapshotDate:string, useLocalCache: bool, allowQueryEvaluateOnClientSide: bool) = - let localCacheName = "FreebaseRuntime" - let fbQueries = new FreebaseQueries(apiKey, serviceUrl, localCacheName, snapshotDate, useLocalCache) - let fbSchema = new FreebaseSchemaConnection(fbQueries) - let fbDataConn = new FreebaseDataConnection(fbQueries, fbSchema, useUnits, allowQueryEvaluateOnClientSide) - let settings = FreebaseDataContextSettings (fbQueries,fbDataConn) - member __.DataContext = settings - /// Create a data context - static member _Create(apiKey, serviceUrl, useUnits, snapshotDate, useLocalCache, allowQueryEvaluateOnClientSide) = - FreebaseDataContext(apiKey, serviceUrl, useUnits, snapshotDate, useLocalCache, allowQueryEvaluateOnClientSide) - /// Get the object which represents the Freebase domain with the given object id. - interface IFreebaseDataContext with member __.GetDomainCategoryById(domainCategoryId) = FreebaseDomainCategory(fbDataConn, domainCategoryId) - -/// [omit] -and FreebaseDataContextSettings internal (fbQueries,fbDataConn) = - let sendingRequest = fbQueries.SendingRequest |> Event.map (fun uri -> FreebaseSendingRequestArgs(uri)) - let sendingQuery = fbQueries.SendingQuery |> Event.map (fun queryText -> FreebaseSendingQueryArgs(queryText)) - - [] - member __.SendingQuery = sendingQuery - [] - member __.SendingRequest = sendingRequest - member __.ServiceUrl with get() = fbQueries.ServiceUrl and set v = fbQueries.ServiceUrl <- v - member __.Limit with get() = fbDataConn.Limit and set v = fbDataConn.Limit <- v - member __.LocalCacheLocation = fbQueries.LocalCacheLocation - member __.UseLocalCache with get() = fbQueries.UseLocalCache and set v = fbQueries.UseLocalCache <- v - member __.ApiKey = fbQueries.ApiKey - -#if NO_FSHARP_CORE_TYPE_PROVIDER_ASSEMBLY_ATTRIBUTE -// Attach the TypeProviderAssemblyAttribute to the runtime assembly -namespace Microsoft.FSharp.Core.CompilerServices - -open System -open System.Reflection - -[] -type internal TypeProviderAssemblyAttribute(assemblyName : string) = - inherit System.Attribute() - new () = TypeProviderAssemblyAttribute(null) - member __.AssemblyName = assemblyName - -#endif diff --git a/src/Freebase/FreebaseSchema.fs b/src/Freebase/FreebaseSchema.fs deleted file mode 100644 index f0ab56a5e..000000000 --- a/src/Freebase/FreebaseSchema.fs +++ /dev/null @@ -1,721 +0,0 @@ -// -------------------------------------------------------------------------------------- -// Freebase type provider -// -------------------------------------------------------------------------------------- -// This file contains an object model for Freebase schema information -// -// This file contains a table of data of units of measure -// downloaded from www.freebase.com itself. See www.freebase.com -// for terms and conditions of use. -// -------------------------------------------------------------------------------------- -// Copyright (c) Microsoft Corporation 2005-2012. -// This sample code is provided "as is" without warranty of any kind. -// We disclaim all warranties, either express or implied, including the -// warranties of merchantability and fitness for a particular purpose. -// -------------------------------------------------------------------------------------- - -module internal FSharp.Data.Runtime.Freebase.FreebaseSchema - -open FSharp.Data.Runtime.Freebase.FreebaseRequests -open System -open System.Collections.Generic -open System.Text -open FSharp.Data -open FSharp.Data.JsonExtensions - -[] -module Utilities = - - let memoizeLookup (d : Dictionary<_,_>) key f = - let mutable res = Unchecked.defaultof<'T> - let ok = d.TryGetValue(key,&res) - if ok then res else let v = f key in d.[key] <- v; v - - let memoize f = let t = Dictionary<_,_>() in fun key -> memoizeLookup t key f - - let rec convJsonPrimValue jsonValue = - match jsonValue with - | JsonValue.String s -> s :> obj - | JsonValue.Null -> null - | JsonValue.Boolean b -> b :> obj - | JsonValue.Number n -> n :> obj - | JsonValue.Float n -> n :> obj - | JsonValue.Array a -> Array.map convJsonPrimValue a :> obj - | _ -> failwith (sprintf "unexpected structured JSON value %+A" jsonValue) - - /// Represents one object's values for all the properties of one type id. - let dictionaryFromJson (jsonValue:JsonValue) = jsonValue.Properties |> dict - -type FreebaseId = - | FreebaseId of string - member x.Id = (match x with FreebaseId(v) -> v) - -type FreebaseMachineId = - | FreebaseMachineId of string - member x.MId = (match x with FreebaseMachineId(v) -> v) - - -type FreebaseDomainId = - { DomainId:FreebaseId - DomainHidden: bool - DomainName:string } - static member FromJson(fbr:JsonValue) = - { DomainId = FreebaseId(fbr.GetString("/type/object/id")) - DomainHidden = (fbr.GetString("/freebase/domain_profile/hidden") = "true") - DomainName = fbr.GetString("/type/object/name") } - override x.ToString() = x.DomainName - -type FreebaseProperty = - { PropertyId:FreebaseId - MachineId:string - PropertyName:string - ExpectedTypeId:FreebaseId - //MasterProperty:string - /// Name of the enumeration type. Like /authority/gnis - EnumerationId:FreebaseId - Delegated:string - /// The unit of measure for the property, if any. e.g. /en/kilometer - UnitOfMeasureId:FreebaseId - Unique:string } - static member FromJson(fbr:JsonValue) = - { PropertyId = FreebaseId(fbr.GetString("/type/object/id")) - MachineId = fbr.GetString("/type/object/mid") - PropertyName = fbr.GetString("/type/object/name") - ExpectedTypeId = FreebaseId(fbr.GetString("/type/property/expected_type")) - //MasterProperty = fbr.GetString("/type/property/master_property") - EnumerationId = FreebaseId(fbr.GetString("/type/property/enumeration")) - Delegated = fbr.GetString("/type/property/delegated") - UnitOfMeasureId = FreebaseId(fbr.GetString("/type/property/unit")) - Unique = fbr.GetString("/type/property/unique") } - member fp.IsUnique = match fp.Unique with "true" | "True" -> true | _ -> false - member fp.IsEnum = not(String.IsNullOrEmpty fp.EnumerationId.Id) - member fp.BasicSystemType = - match fp.ExpectedTypeId.Id with - | "/type/enumeration" -> Some (typeof, true) - | "/type/rawstring" -> Some (typeof, true) - | "/type/text" -> Some (typeof, true) - | "/type/uri" -> Some (typeof, true) - | "/type/float" -> Some (typeof, false) - | "/type/int" -> Some (typeof, false) - | "/type/datetime" -> Some(typeof, true) // Not System.DateTime because, for example, "1776" is a freebase DateTime, as is 9000BC. - | "" -> Some(typeof, true) // Tolerate null and treat as string. We can't really do anything else. - | _ -> None - override x.ToString() = x.PropertyName - -type FreebaseArticle = - { ArticleId:FreebaseId } - static member FromJson(fbr:JsonValue) = - { ArticleId = FreebaseId(fbr.GetString("/type/object/id")) } - -type FreebaseTypeId = - { TypeId:FreebaseId - DomainId:FreebaseId } - static member FromJson(fbr:JsonValue) = - { TypeId = FreebaseId(fbr.GetString("/type/object/id")) ; - DomainId = FreebaseId(fbr.GetString("/type/type/domain")) ;} - -type FreebaseObjectId = - { MachineId:FreebaseMachineId - ObjectName:string } - static member FromJson(fbr:JsonValue) = - { MachineId = FreebaseMachineId (fbr.GetString("/type/object/mid")) ; - ObjectName = fbr.GetString("/type/object/name") ;} - -type FreebaseTypesSupportedByObject = - { TypesSupportedByObject:FreebaseTypeId[] } - static member FromJson(fbr:JsonValue) = - { TypesSupportedByObject = fbr.GetArray("/type/object/type") |> Array.map FreebaseTypeId.FromJson } - -type FreebaseImageInformation = - { ImageId:FreebaseId } - static member FromJson(fbr:JsonValue) = - { ImageId = FreebaseId(fbr.GetString("/type/object/id")) } - static member GetImages(fb:FreebaseQueries, objectId:FreebaseMachineId) = - let query = @"[{'/type/object/id':null,'/type/object/type':'/common/image','!/common/topic/image': [{'/type/object/mid':'" + objectId.MId + "'}]}]" - fb.Query(query, JsonValue.GetArrayVal FreebaseImageInformation.FromJson) - |> Seq.map (fun image -> fb.GetImageUrl image.ImageId.Id) - -type FreebaseType = - { TypeId:FreebaseId - TypeName:string - Mediator:string - Deprecated:string - Domain:FreebaseId - IncludedTypes: FreebaseTypeId[] - Properties:FreebaseProperty[] } - static member FromJson(fbr:JsonValue) = - { TypeId = FreebaseId(fbr.GetString("/type/object/id")) - TypeName = fbr.GetString("/type/object/name") - Mediator = fbr.GetString("/freebase/type_hints/mediator") - Deprecated = fbr.GetString("/freebase/type_hints/deprecated") - Domain = FreebaseId(fbr.GetString("/type/type/domain")) - IncludedTypes = fbr.GetArray("/freebase/type_hints/included_types") |> Array.map FreebaseTypeId.FromJson - Properties = fbr.GetArray("/type/type/properties") |> Array.map FreebaseProperty.FromJson } - override x.ToString() = x.TypeName - -type FreebaseDomain = - { DomainId:FreebaseId - DomainName:string - NamespaceKinds:string[] - Hidden:string } - static member FromJson(fbr:JsonValue) = - { DomainId = FreebaseId(fbr.GetString("/type/object/id")) - DomainName = fbr.GetString("/type/object/name") - NamespaceKinds = fbr.GetArray("/type/object/type") |> Array.map (fun j -> j.AsString()) - Hidden = fbr.GetString("/freebase/domain_profile/hidden") } - override x.ToString() = x.DomainName - -type FreebaseNamespaceKey = - { Value:string - Namespace:FreebaseDomain } - static member FromJson(fbr:JsonValue) = - { Value = fbr.GetString("value") - Namespace = fbr?``namespace`` |> FreebaseDomain.FromJson } - override x.ToString() = x.Namespace.ToString() - -/// The element type returned by GetDomainStructure. -type FreebaseDomainStructure = - { NamespaceKeys:FreebaseNamespaceKey[] } - static member FromJson(fbr:JsonValue) = - { NamespaceKeys = fbr.GetArray("/type/namespace/keys") |> Array.map FreebaseNamespaceKey.FromJson } - -/// The element type returned by GetDomainCategories -type FreebaseDomainCategory = - { DomainCategoryId:FreebaseId - Name:string - Domains:FreebaseDomainId[] } - static member FromJson(fbr:JsonValue) = - { DomainCategoryId = FreebaseId(fbr.GetString("/type/object/id")) - Name = fbr.GetString("/type/object/name") - Domains = fbr.GetArray("/freebase/domain_category/domains") |> Array.map FreebaseDomainId.FromJson } - override x.ToString() = x.Name - -type FreebaseDocumentation = - { Articles: FreebaseArticle[] - Tip:string } - static member FromJson(fbr:JsonValue) = - { Articles = fbr.GetArray("/common/topic/article") |> Array.map FreebaseArticle.FromJson - Tip = fbr.GetString("/freebase/documented_object/tip") } - - static member GetDocs (fb: FreebaseQueries, query:string) = - let fbDoc = fb.Query(query, FreebaseDocumentation.FromJson) - [ match fbDoc.Articles with - | null -> () - | articles -> - for a in articles do - match fb.GetBlurbByArticleId a.ArticleId.Id with - | Some v -> yield v - | None -> () - - match fbDoc.Tip with - | null -> () - | tip -> yield tip ] - - static member GetBlurbById (fb: FreebaseQueries, objectId: FreebaseId) = - let query = "{ '/type/object/id' : '" + objectId.Id + "', '/common/topic/article' : [{ '/type/object/id' : null, 'optional' : true}], '/freebase/documented_object/tip' : null}" - FreebaseDocumentation.GetDocs(fb, query) - - static member GetBlurbByMachineId (fb: FreebaseQueries, objectId: FreebaseMachineId) : string list = - let query = "{ '/type/object/mid' : '" + objectId.MId + "', '/common/topic/article' : [{ '/type/object/id' : null, 'optional' : true}], '/freebase/documented_object/tip' : null}" - FreebaseDocumentation.GetDocs(fb, query) - -type FreebaseSchemaConnection(fb:FreebaseQueries) = - let getTypeQuery(typeId:string,typeName:string,domainId:string,includeProperties) = - let properties = @"[{ '/type/object/id': null, '/type/object/mid': null, '/type/object/name': null, '/type/property/expected_type': null, '/type/property/master_property': null, '/type/property/enumeration': null, '/type/property/delegated': null, '/type/property/unit': null, '/type/property/unique': null, 'optional':true}]" - let properties = if includeProperties then "'/type/type/properties':"+properties+"," else "" - sprintf @"[{'/type/object/type':'/type/type', '/type/object/id':%s, '/type/object/name':%s, '/type/type/domain':%s, '/freebase/type_hints/deprecated' : null, '/freebase/type_hints/mediator' : null, '/freebase/type_hints/included_types' : [ {'/type/object/id':null,'/type/type/domain':null,'optional':true } ], %s '/freebase/type_profile/instance_count': null, 'limit':10000 }]" typeId typeName domainId properties - - /// Cache policy for type properties. This will be used at runtime. - let typeIdToType = Dictionary() - let quote s = "'"+s+"'" - - /// Get the types that correspond to type id. The properties of the type are filled in. - let getTypeByTypeId typeId = - match typeIdToType.TryGetValue typeId with - | true, res -> res - | _ -> - let query = getTypeQuery(quote typeId.Id, "null", "null", true) - let result = fb.Query(query, JsonValue.GetArrayVal FreebaseType.FromJson) - let fbType = match result with [|ft|] -> Some ft | _ -> None - typeIdToType.[typeId] <- fbType - fbType - - let rec allIncludedTypesOfTypeId (typeId:FreebaseId) = - seq { match getTypeByTypeId typeId with - | Some ty -> yield ty; for ity in ty.IncludedTypes do yield! allIncludedTypesOfTypeId ity.TypeId - | None -> () } - - let getAllIncludedTypesOfTypeId = memoize (allIncludedTypesOfTypeId >> Seq.distinct >> Seq.toArray) - let getProperties (fbType:FreebaseType) = match fbType.Properties with | null -> [| |] | props -> props - let getAllPropertiesOfAllIncludedTypesOfTypeId = memoize (getAllIncludedTypesOfTypeId >> Array.collect getProperties) - - member __.GetAllPropertiesOfType(fbType:FreebaseType) = getProperties fbType - member __.GetAllPropertiesOfAllIncludedTypesOfTypeId typeId = getAllPropertiesOfAllIncludedTypesOfTypeId typeId - member __.QueryConnection = fb - /// Query the structure of common domains and all the type types in that domain. Design-time only. - member __.GetDomainStructure () = fb.Query(@"{ '/type/object/id': '/', '/type/namespace/keys': [{ 'value': null, 'namespace': { '/type/object/id': null, '/type/object/name': null, '/type/object/type': [], '/freebase/domain_profile/hidden': null }, 'optional':true, 'limit':20000 }] }", FreebaseDomainStructure.FromJson) - - /// Query the structure of common domains and all the type types in that domain. - member __.GetDomainCategories () = fb.QuerySequence(@"[{ '/type/object/type': '/freebase/domain_category', '/type/object/id': null, '/type/object/name': null, '/freebase/domain_category/domains': [{ '/type/object/id': null, '/type/object/name': null, '/freebase/domain_profile/hidden': null, 'optional':true, 'limit':20000 }] }]", FreebaseDomainCategory.FromJson, None) - - /// Return all typesin a domain. Design-time only. - member __.GetAllTypesInDomainSansProperties(domainId:FreebaseId) = - fb.QuerySequence(getTypeQuery("null","null",quote domainId.Id,false), FreebaseType.FromJson, None) - - /// Return all types. Design-time only. - member __.GetAllTypesInAllDomainsSansProperties() = fb.QuerySequence(getTypeQuery("null","null","null",false), FreebaseType.FromJson, None) - - /// Get the types that correspond to type id. The properties of the type are filled in. - member __.GetTypeByTypeId typeId = getTypeByTypeId typeId - - /// Get the 'blurb' text for this topic ID - member __.GetBlurbById objectId = FreebaseDocumentation.GetBlurbById(fb, objectId) - - /// Get the 'blurb' text for this topic ID - member __.GetBlurbByMachineId objectId = FreebaseDocumentation.GetBlurbByMachineId(fb, objectId) - - /// Get property bags for all the objects of the given type, at the given type - member __.GetAllObjectsOfType(fbType:FreebaseType, limit:int, prefixName) = - let nameCx = - match prefixName with - | None -> "'/type/object/name' : null" - | Some s -> "'/type/object/name' : null, '/type/object/name~=' : '^" + s + "*'" - - let query = - "[{ '/type/object/type' : '" + fbType.TypeId.Id + - "', '/type/object/mid' : null, " + - nameCx + - ", 'limit': " + string limit + - " }]" - fb.QuerySequence(query, FreebaseObjectId.FromJson, Some limit) - - member __.GetAllTypesOfObject(fbObjId:FreebaseMachineId) = - let query = "{ '/type/object/type' : [{ '/type/object/id': null, '/type/type/domain': null }], '/type/object/mid' : '" + fbObjId.MId + "' }" - fb.Query(query, FreebaseTypesSupportedByObject.FromJson) - - // Perform one query to determine the existence of data in the properties of a specific object - member fbSchema.GetDataExistenceForSpecificObject(fbTypes, fbObjId:FreebaseMachineId) = - let fbProps = - [ for fbType in fbTypes do - yield (fbType, getProperties fbType) ] - - let fields = - [ for (_fbType, props) in fbProps do - for p in props do - match p.IsUnique, p.BasicSystemType with - | true, Some _ -> yield ", '" + p.PropertyId.Id + "' : null" - | _ -> - yield ", '" + p.PropertyId.Id + "' : [ ]" ] - //yield ", '" + p.Id + "' : [ { 'type': [], 'limit': 1 } ]" ] - |> String.Concat - - let query = sprintf "{ '/type/object/mid' : '" + fbObjId.MId + "' " + fields + " }" - - let data = fb.Query >(query, dictionaryFromJson) - - [ for (fbType, props) in fbProps do - let ps = - [ for fbProp in props do - let hasData = - match data.TryGetValue(fbProp.PropertyId.Id) with - | true, JsonValue.Array [| |] -> false - | true, JsonValue.Null -> false - | true, _ -> true - | false, _ -> false - yield (fbProp, hasData) ] - yield (fbType, ps) ] - -let makeRuntimeNullableTy (ty:Type) = typedefof>.MakeGenericType [|ty|] -let makeRuntimeSeqTy (ty:Type) = typedefof>.MakeGenericType [|ty|] - -type FreebaseProperty with - /// Compute the provided or erased runtime type corresponding to the Freebase property. - /// 'typeReprFunction' indicates if erasure is happening or not. - member property.FSharpPropertyElementType(fb:FreebaseSchemaConnection, propertyReprFunction, tryTypeReprFunction) = - match propertyReprFunction property with - | Some elementType -> elementType - | None -> - match property.BasicSystemType with - | Some elementType -> elementType - | None -> - let fbtype = fb.GetTypeByTypeId(property.ExpectedTypeId) - match fbtype with - | Some fbtype -> - match tryTypeReprFunction fbtype with - | Some ty -> ty, true - | None -> typeof, true - | None -> - // The expected type was unknown to freebase. Tolerate by treating as string. - (typeof, true) - - /// Compute the provided or erased runtime type corresponding to the Freebase property. - /// 'typeReprFunction' indicates if erasure is happening or not. - member property.FSharpPropertyType(fb:FreebaseSchemaConnection, propertyReprFunction, tryTypeReprFunction, makeNullable, makeSeq, alwaysThere) = - let elementType, supportsNull = property.FSharpPropertyElementType(fb, propertyReprFunction, tryTypeReprFunction) - match property.IsUnique with - | true -> if supportsNull || alwaysThere then elementType else makeNullable elementType - | false -> makeSeq elementType - - member property.FSharpPropertyRuntimeType(fb:FreebaseSchemaConnection, fbCompoundObjTy, alwaysThere) = - property.FSharpPropertyType(fb,(fun _ -> None), (fun _ -> Some fbCompoundObjTy), makeRuntimeNullableTy, makeRuntimeSeqTy, alwaysThere) - -type FreebaseUnit = - | SI of string - | Prod of FreebaseUnit * FreebaseUnit - | Div of FreebaseUnit * FreebaseUnit - | One - static member (*) (u1: FreebaseUnit, u2:FreebaseUnit) = Prod (u1, u2) - static member (/) (u1: FreebaseUnit, u2:FreebaseUnit) = Div (u1, u2) - -/// This table of data was downloaded from www.freebase.com itself. -/// See www.freebase.com for term and conditions of use. -let units = - dict [ - ("/en/astronomical_unit", (* "Astronomical unit", *) (SI "metre", 1.49598e+11, None)) - ("/en/centimeter", (* "Centimeter", *) (SI "metre", 0.01, None)) - ("/en/furlong", (* "Furlong", *) (SI "metre", 201.168, None)) - ("/en/geographical_mile", (* "Geographical mile", *) (SI "metre", 1855.0, None)) - ("/en/inch", (* "Inch", *) (SI "metre", 0.0254, None)) - ("/en/meter", (* "Meter", *) (SI "metre", 1.0, None)) - ("/en/mile", (* "Mile", *) (SI "metre", 1609.34, None)) - ("/m/055v9", (* "Micrometer", *) (SI "metre", 1e-06, None)) - ("/en/nautical_mile", (* "Nautical mile", *) (SI "metre", 1852.0, None)) - ("/en/parsec", (* "Parsec", *) (SI "metre", 3.08568e+16, None)) - ("/en/yard", (* "Yard", *) (SI "metre", 0.9144, None)) - ("/en/kilometer", (* "Kilometer", *) (SI "metre", 1000.0, None)) - ("/en/millimeter", (* "Millimeter", *) (SI "metre", 0.001, None)) - ("/en/earth_radius", (* "Earth radius", *) (SI "metre", 6.37814e+06, None)) - ("/en/smoot", (* "Smoot", *) (SI "metre", 1.7, None)) - ("/en/angstrom", (* "Ångström", *) (SI "metre", 1e-10, None)) - ("/en/fathom", (* "Fathom", *) (SI "metre", 1.8288, None)) - ("/en/bohr_radius", (* "Bohr radius", *) (SI "metre", 5.29177e-11, None)) - ("/en/light_second", (* "Light second", *) (SI "metre", 2.99792e+08, None)) - ("/en/international_foot", (* "Foot", *) (SI "metre", 0.3048, None)) - ("/m/01g8lv", (* "Hand", *) (SI "metre", 0.1016, None)) - ("/en/decimetre", (* "Decimetre", *) (SI "metre", 0.1, None)) - ("/en/decametre", (* "Decametre", *) (SI "metre", 10.0, None)) - ("/en/shaku", (* "Shaku", *) (SI "metre", 0.303, None)) - ("/en/solar_radius", (* "Solar radius", *) (SI "metre", 6.96e+08, None)) - ("/m/02mr9z", (* "Rod", *) (SI "metre", 5.029, None)) - ("/en/megametre", (* "Megametre", *) (SI "metre", 1e+06, None)) - ("/en/hectometre", (* "Hectometre", *) (SI "metre", 100.0, None)) - ("/en/light-year", (* "Light-year", *) (SI "metre", 9.46073e+15, None)) - ("/en/megalithic_yard", (* "Megalithic yard", *) (SI "metre", 0.8297, None)) - ("/m/0355rq", (* "Chain", *) (SI "metre", 20.117, None)) - ("/en/light_hour", (* "Light hour", *) (SI "metre", 1.07925e+12, None)) - ("/en/planck_length", (* "Planck length", *) (SI "metre", 0.0, None)) - ("/en/light_week", (* "Light week", *) (SI "metre", 1.81314e+14, None)) - ("/en/light_day", (* "Light day", *) (SI "metre", 2.59021e+13, None)) - ("/en/light_minute", (* "Light minute", *) (SI "metre", 1.79875e+10, None)) - ("/en/light_month", (* "Light month", *) (SI "metre", 7.77062e+14, None)) - ("/m/051v_f", (* "Span", *) (SI "metre", 0.2286, None)) - ("/m/055vq1", (* "Li", *) (SI "metre", 500.0, None)) - ("/m/05b1qt", (* "Digit", *) (SI "metre", 0.01905, None)) - ("/m/05b1sy", (* "Finger", *) (SI "metre", 0.022225, None)) - ("/m/05b1tz", (* "Palm", *) (SI "metre", 0.0762, None)) - ("/en/shaftment", (* "Shaftment", *) (SI "metre", 0.1524, None)) - ("/en/ell", (* "Ell", *) (SI "metre", 1.143, None)) - ("/m/05gwxt", (* "Link", *) (SI "metre", 0.201, None)) - ("/en/arpent", (* "Arpent", *) (SI "metre", 58.47, None)) - ("/en/siriometer", (* "Siriometer", *) (SI "metre", 1.49598e+17, None)) - ("/en/spat", (* "Spat", *) (SI "metre", 1e+12, None)) - ("/en/beard-second", (* "Beard-second", *) (SI "metre", 5e-09, None)) - ("/en/toise", (* "Toise", *) (SI "metre", 1.949, None)) - ("/m/0fhs97", (* "Thou", *) (SI "metre", 2.54e-05, None)) - ("/en/picometre", (* "Picometre", *) (SI "metre", 1e-12, None)) - ("/en/cham_am", (* "Cham am", *) (SI "metre", 0.25, None)) - ("/m/027tq8y", (* "Bahar", *) (SI "metre", 0.0325, None)) - ("/en/nanometre", (* "Nanometre", *) (SI "metre", 1e-09, None)) - ("/m/03yvsyr", (* "Jupiter radius", *) (SI "metre", 7.1492e+06, None)) - ("/m/0cv2t5d", (* "moot", *) (SI "metre", 1.7, None)) - ("/en/acre", (* "Acre", *) (Prod (SI "metre",SI "metre"), 4046.86, None)) - ("/en/hectare", (* "Hectare", *) (Prod (SI "metre",SI "metre"), 10000.0, None)) - ("/en/barn_measure", (* "Barn", *) (Prod (SI "metre",SI "metre"), 1e-27, None)) - ("/en/square_kilometer", (* "Square kilometer", *) (Prod (SI "metre",SI "metre"), 1e+06, None)) - ("/en/square_mile", (* "Square mile", *) (Prod (SI "metre",SI "metre"), 2.58999e+06, None)) - ("/en/square_foot", (* "Square foot", *) (Prod (SI "metre",SI "metre"), 0.092903, None)) - ("/en/square_inch", (* "Square inch", *) (Prod (SI "metre",SI "metre"), 0.00064516, None)) - ("/en/square_yard", (* "Square yard", *) (Prod (SI "metre",SI "metre"), 0.836127, None)) - ("/en/square_meter", (* "Square meter", *) (Prod (SI "metre",SI "metre"), 1.0, None)) - ("/en/us_survey_acre", (* "US survey acre", *) (Prod (SI "metre",SI "metre"), 4046.87, None)) - ("/en/iraqi_dunam", (* "Iraqi dunam", *) (Prod (SI "metre",SI "metre"), 2500.0, None)) - ("/en/metric_dunam", (* "Metric dunam", *) (Prod (SI "metre",SI "metre"), 1000.0, None)) - ("/en/old_dunam", (* "Old dunam", *) (Prod (SI "metre",SI "metre"), 919.3, None)) - ("/en/cypriot_dunam", (* "Cypriot dunam", *) (Prod (SI "metre",SI "metre"), 1337.8, None)) - ("/en/british_thermal_unit", (* "British thermal unit", *) (SI "joule", 1055.06, None)) - ("/en/calorie", (* "Calorie", *) (SI "joule", 4.184, None)) - ("/en/electronvolt", (* "Electronvolt", *) (SI "joule", 1.60218e-19, None)) - ("/en/erg", (* "Erg", *) (SI "joule", 7e-07, None)) - ("/en/joule", (* "Joule", *) (SI "joule", 1.0, None)) - ("/en/hartree_energy", (* "Hartree energy", *) (SI "joule", 4.35974e-18, None)) - ("/en/watt-hour", (* "Watt-hour", *) (SI "joule", 3600.0, None)) - ("/en/barrel_of_oil_equivalent", (* "Barrel of oil equivalent", *) (SI "joule", 6.11786e+09, None)) - ("/en/kilowatt_hour", (* "Kilowatt-hour", *) (SI "joule", 3.6e+06, None)) - ("/en/kilocalorie", (* "Kilocalorie", *) (SI "joule", 4184.0, None)) - ("/en/kilojoule", (* "Kilojoule", *) (SI "joule", 1000.0, None)) - ("/en/ton_of_tnt", (* "Ton of TNT", *) (SI "joule", 4.184e+09, None)) - ("/en/kiloton_of_tnt", (* "Kiloton of TNT", *) (SI "joule", 4.184e+12, None)) - ("/en/megaton_of_tnt", (* "Megaton of TNT", *) (SI "joule", 4.184e+15, None)) - ("/en/milliton_of_tnt", (* "Milliton of TNT", *) (SI "joule", 4.184e+06, None)) - ("/en/microton_of_tnt", (* "Microton of TNT", *) (SI "joule", 4184.0, None)) - ("/en/megaelectronvolt", (* "Megaelectronvolt", *) (SI "joule", 1.60218e-13, None)) - ("/en/pound-force_per_square_inch", (* "Pound-force per square inch", *) (SI "pascal", 6894.76, None)) - ("/en/torr", (* "Torr", *) (SI "pascal", 133.322, None)) - ("/en/pascal", (* "Pascal", *) (SI "pascal", 1.0, None)) - ("/en/bar", (* "Bar", *) (SI "pascal", 100000.0, None)) - ("/en/atmosphere_measure", (* "Atmosphere", *) (SI "pascal", 101325.0, None)) - ("/en/centimetre_of_water", (* "Centimetre of water", *) (SI "pascal", 98.0638, None)) - ("/en/barye", (* "Barye", *) (SI "pascal", 0.1, None)) - ("/en/pieze", (* "Pièze", *) (SI "pascal", 1000.0, None)) - ("/en/technical_atmosphere", (* "Technical atmosphere", *) (SI "pascal", 98066.5, None)) - ("/en/inch_of_mercury", (* "Inch of mercury", *) (SI "pascal", 3386.39, None)) - ("/en/decibars", (* "Decibars", *) (SI "pascal", 10000.0, None)) - ("/en/kilogram-force_per_square_centimetre", (* "Kilogram-force per square centimetre", *) (SI "pascal", 98066.5, None)) - ("/en/megapascal", (* "Megapascal", *) (SI "pascal", 1e+06, None)) - ("/en/millibar", (* "Millibar", *) (SI "pascal", 100.0, None)) - ("/en/gigapascal", (* "Gigapascal", *) (SI "pascal", 1e+09, None)) - ("/en/kilonewton_per_metre_squared", (* "KiloNewton per metre squared", *) (SI "pascal", 1000.0, None)) - ("/en/kilopound_force_per_square_inch", (* "Kilopound-force per square inch", *) (SI "pascal", 6.89476e+06, None)) - ("/en/kilopascal", (* "Kilopascal", *) (SI "pascal", 1000.0, None)) - ("/en/watt", (* "Watt", *) (SI "watt", 1.0, None)) - ("/en/solar_luminosity", (* "Solar luminosity", *) (SI "watt", 3.827e+26, None)) - ("/en/mechanical_horsepower", (* "Mechanical horsepower", *) (SI "watt", 745.7, None)) - ("/en/metric_horsepower", (* "Metric horsepower", *) (SI "watt", 735.499, None)) - ("/en/boiler_horsepower", (* "Boiler horsepower", *) (SI "watt", 9809.5, None)) - ("/en/electrical_horsepower", (* "Electrical horsepower", *) (SI "watt", 746.0, None)) - ("/en/kilowatt_measure", (* "Kilowatt", *) (SI "watt", 1000.0, None)) - ("/en/milliwatt", (* "Milliwatt", *) (SI "watt", 0.001, None)) - ("/en/megawatt", (* "Megawatt", *) (SI "watt", 1e+06, None)) - ("/en/metre_per_second", (* "Metre per second", *) (Div (SI "metre",SI "second"), 1.0, None)) - ("/en/miles_per_hour", (* "Miles per hour", *) (Div (SI "metre",SI "second"), 0.44704, None)) - ("/en/knot_measure", (* "Knot", *) (Div (SI "metre",SI "second"), 0.514444, None)) - ("/en/kilometres_per_hour", (* "Kilometres per hour", *) (Div (SI "metre",SI "second"), 0.27778, None)) - ("/en/kilometres_per_second", (* "Kilometres per second", *) (Div (SI "metre",SI "second"), 1000.0, None)) - ("/en/gallon", (* "Gallon (US)", *) (Prod (Prod (SI "metre",SI "metre"),SI "metre"), 0.00378541, None)) - ("/en/liter", (* "Liter", *) (Prod (Prod (SI "metre",SI "metre"),SI "metre"), 0.001, None)) - ("/en/teaspoon", (* "Teaspoon", *) (Prod (Prod (SI "metre",SI "metre"),SI "metre"), 5e-06, None)) - ("/en/tablespoon", (* "Tablespoon", *) (Prod (Prod (SI "metre",SI "metre"),SI "metre"), 1.5e-05, None)) - ("/en/peck", (* "Peck (Imperial)", *) (Prod (Prod (SI "metre",SI "metre"),SI "metre"), 0.00727373, None)) - ("/en/pint_us", (* "Pint (US)", *) (Prod (Prod (SI "metre",SI "metre"),SI "metre"), 0.000473176, None)) - ("/en/cubic_foot", (* "Cubic foot", *) (Prod (Prod (SI "metre",SI "metre"),SI "metre"), 0.0283168, None)) - ("/en/quart_us", (* "Quart (US)", *) (Prod (Prod (SI "metre",SI "metre"),SI "metre"), 0.000946353, None)) - ("/en/fluid_ounce_us", (* "Fluid ounce (US)", *) (Prod (Prod (SI "metre",SI "metre"),SI "metre"), 2.95735e-05, None)) - ("/en/dessert_spoon", (* "Dessert spoon", *) (Prod (Prod (SI "metre",SI "metre"),SI "metre"), 1e-05, None)) - ("/en/gill_measure", (* "Gill", *) (Prod (Prod (SI "metre",SI "metre"),SI "metre"), 0.000118294, None)) - ("/en/cubic_mile", (* "Cubic mile", *) (Prod (Prod (SI "metre",SI "metre"),SI "metre"), 4.16818e+09, None)) - ("/en/cubic_metre", (* "Cubic metre", *) (Prod (Prod (SI "metre",SI "metre"),SI "metre"), 1.0, None)) - ("/en/jigger", (* "Jigger", *) (Prod (Prod (SI "metre",SI "metre"),SI "metre"), 44.36, None)) - ("/en/mutchkin", (* "Mutchkin", *) (Prod (Prod (SI "metre",SI "metre"),SI "metre"), 8.48e-07, None)) - ("/en/chopin_measure", (* "Chopin", *) (Prod (Prod (SI "metre",SI "metre"),SI "metre"), 0.000848, None)) - ("/en/milliliter", (* "Milliliter", *) (Prod (Prod (SI "metre",SI "metre"),SI "metre"), 1e-06, None)) - ("/en/gallon_imperial", (* "Gallon (Imperial)", *) (Prod (Prod (SI "metre",SI "metre"),SI "metre"), 0.00454609, None)) - ("/en/fluid_ounce_imperial", (* "Fluid ounce (imperial)", *) (Prod (Prod (SI "metre",SI "metre"),SI "metre"), 2.84131e-05, None)) - ("/en/pint_imperial", (* "Pint (Imperial)", *) (Prod (Prod (SI "metre",SI "metre"),SI "metre"), 0.000568261, None)) - ("/en/quart_imperial", (* "Quart (Imperial)", *) (Prod (Prod (SI "metre",SI "metre"),SI "metre"), 0.00113652, None)) - ("/en/cubic_centimetre", (* "Cubic centimetre", *) (Prod (Prod (SI "metre",SI "metre"),SI "metre"), 1e-06, None)) - ("/en/joug", (* "Joug", *) (Prod (Prod (SI "metre",SI "metre"),SI "metre"), 0.001696, None)) - ("/en/gallon_scots", (* "Gallon (Scots)", *) (Prod (Prod (SI "metre",SI "metre"),SI "metre"), 0.013568, None)) - ("/en/cubic_kilometer", (* "Cubic kilometer", *) (Prod (Prod (SI "metre",SI "metre"),SI "metre"), 1e+09, None)) - ("/en/hectoliter", (* "Hectoliter", *) (Prod (Prod (SI "metre",SI "metre"),SI "metre"), 0.1, None)) - ("/en/fluid_dram_us", (* "Fluid Dram US", *) (Prod (Prod (SI "metre",SI "metre"),SI "metre"), 3.69669e-06, None)) - ("/en/tablespoon_au", (* "Tablespoon (AU)", *) (Prod (Prod (SI "metre",SI "metre"),SI "metre"), 2e-05, None)) - ("/en/cup_imperial", (* "Cup (Imperial)", *) (Prod (Prod (SI "metre",SI "metre"),SI "metre"), 0.000284131, None)) - ("/en/cup_metric", (* "Cup (Metric)", *) (Prod (Prod (SI "metre",SI "metre"),SI "metre"), 0.00025, None)) - ("/en/cup_us", (* "Cup (US)", *) (Prod (Prod (SI "metre",SI "metre"),SI "metre"), 0.00024, None)) - ("/en/cup_japan", (* "Cup (Japan)", *) (Prod (Prod (SI "metre",SI "metre"),SI "metre"), 0.0002, None)) - ("/en/pint_us_dry", (* "Pint (US dry)", *) (Prod (Prod (SI "metre",SI "metre"),SI "metre"), 0.00055061, None)) - ("/en/pint_metric", (* "Pint (metric)", *) (Prod (Prod (SI "metre",SI "metre"),SI "metre"), 0.0005, None)) - ("/en/quart_us_dry", (* "Quart (US dry)", *) (Prod (Prod (SI "metre",SI "metre"),SI "metre"), 0.00110121, None)) - ("/en/gallon_us_dry", (* "Gallon (US dry)", *) (Prod (Prod (SI "metre",SI "metre"),SI "metre"), 0.00440488, None)) - ("/en/gill_imperial", (* "Gill (Imperial)", *) (Prod (Prod (SI "metre",SI "metre"),SI "metre"), 0.000142065, None)) - ("/en/centiliter", (* "Centiliter", *) (Prod (Prod (SI "metre",SI "metre"),SI "metre"), 1e-05, None)) - ("/en/deciliter", (* "Deciliter", *) (Prod (Prod (SI "metre",SI "metre"),SI "metre"), 0.0001, None)) - ("/en/peck_us", (* "Peck (US)", *) (Prod (Prod (SI "metre",SI "metre"),SI "metre"), 0.0090921, None)) - ("/en/bushel_us", (* "Bushel (US)", *) (Prod (Prod (SI "metre",SI "metre"),SI "metre"), 0.0352391, None)) - ("/en/bushel_imperial", (* "Bushel (Imperial)", *) (Prod (Prod (SI "metre",SI "metre"),SI "metre"), 0.0363687, None)) - ("/en/beer_barrel_us", (* "Beer barrel (US)", *) (Prod (Prod (SI "metre",SI "metre"),SI "metre"), 0.117348, None)) - ("/en/beer_barrel_uk", (* "Beer barrel (UK)", *) (Prod (Prod (SI "metre",SI "metre"),SI "metre"), 0.163659, None)) - ("/en/oil_barrel", (* "Oil barrel", *) (Prod (Prod (SI "metre",SI "metre"),SI "metre"), 0.158987, None)) - ("/m/0h8pr0v", (* "Coles Lime 1lt", *) (Prod (Prod (SI "metre",SI "metre"),SI "metre"), 0.001, None)) - ("/en/kilogram_per_cubic_metre", (* "Kilogram per cubic metre", *) (Div (SI "kilogram",Prod (Prod (SI "metre",SI "metre"),SI "metre")), 1.0, None)) - ("/en/gram_per_cubic_centimeter", (* "Gram per cubic centimeter", *) (Div (SI "kilogram",Prod (Prod (SI "metre",SI "metre"),SI "metre")), 1000.0, None)) - ("/en/calendar_year", (* "Year", *) (SI "second", 3.1536e+07, None)) - ("/en/day", (* "Day", *) (SI "second", 86400.0, None)) - ("/en/hour", (* "Hour", *) (SI "second", 3600.0, None)) - ("/en/leap_year", (* "Leap year", *) (SI "second", 3.16224e+07, None)) - ("/en/minute", (* "Minute", *) (SI "second", 60.0, None)) - ("/en/month", (* "Month", *) (SI "second", 2.628e+06, None)) - ("/en/second", (* "Second", *) (SI "second", 1.0, None)) - ("/en/tropical_year", (* "Tropical year", *) (SI "second", 3.15569e+07, None)) - ("/en/week", (* "Week", *) (SI "second", 604800.0, None)) - ("/en/planck_time", (* "Planck time", *) (SI "second", 0.0, None)) - ("/en/millennium", (* "Millennium", *) (SI "second", 3.15567e+10, None)) - ("/en/julian_year", (* "Julian year", *) (SI "second", 3.15576e+07, None)) - ("/en/centisecond", (* "Centisecond", *) (SI "second", 0.01, None)) - ("/en/jiffy", (* "Jiffy", *) (SI "second", 0.01, None)) - ("/en/nanosecond", (* "Nanosecond", *) (SI "second", 1e-09, None)) - ("/en/millisecond", (* "Millisecond", *) (SI "second", 0.001, None)) - ("/en/microsecond", (* "Microsecond", *) (SI "second", 1e-06, None)) - ("/en/yottasecond", (* "yottasecond", *) (SI "second", 1e+24, None)) - ("/en/zettasecond", (* "zettasecond", *) (SI "second", 1e+21, None)) - ("/en/exasecond", (* "exasecond", *) (SI "second", 1e+18, None)) - ("/en/petasecond", (* "petasecond", *) (SI "second", 1e+15, None)) - ("/en/terasecond", (* "terasecond", *) (SI "second", 1e+12, None)) - ("/en/gigasecond", (* "gigasecond", *) (SI "second", 1e+09, None)) - ("/en/megasecond", (* "megasecond", *) (SI "second", 1e+06, None)) - ("/en/kilosecond", (* "kilosecond", *) (SI "second", 1000.0, None)) - ("/en/hectosecond", (* "hectosecond", *) (SI "second", 100.0, None)) - ("/en/decasecond", (* "decasecond", *) (SI "second", 10.0, None)) - ("/en/decisecond", (* "decisecond", *) (SI "second", 0.1, None)) - ("/en/picosecond", (* "picosecond", *) (SI "second", 1e-12, None)) - ("/en/femtosecond", (* "femtosecond", *) (SI "second", 1e-15, None)) - ("/en/attosecond", (* "attosecond", *) (SI "second", 1e-18, None)) - ("/en/zeptosecond", (* "zeptosecond", *) (SI "second", 1e-21, None)) - ("/en/yoctosecond", (* "yoctosecond", *) (SI "second", 1e-24, None)) - ("/en/million_years", (* "Million years", *) (SI "second", 3.15576e+13, None)) - ("/en/julian_century", (* "Julian Century", *) (SI "second", 3.15576e+09, None)) - ("/en/myriad_measure", (* "Myriad", *) (SI "second", 3.15576e+11, None)) - ("/en/carat", (* "Carat", *) (SI "kilogram", 0.0002, None)) - ("/en/kilogram", (* "Kilogram", *) (SI "kilogram", 1.0, None)) - ("/en/pound", (* "Pound", *) (SI "kilogram", 0.453592, None)) - ("/en/tonne", (* "Tonne", *) (SI "kilogram", 1000.0, None)) - ("/en/atomic_mass_unit", (* "Atomic mass unit", *) (SI "kilogram", 1.7e-27, None)) - ("/en/tael", (* "Tael", *) (SI "kilogram", 0.0377994, None)) - ("/en/grain_measure", (* "Grain", *) (SI "kilogram", 6.47989e-05, None)) - ("/en/planck_mass", (* "Planck mass", *) (SI "kilogram", 2.17645e-08, None)) - ("/en/solar_mass", (* "Solar mass", *) (SI "kilogram", 1.9891e+30, None)) - ("/en/ounce", (* "Ounce", *) (SI "kilogram", 0.0283495, None)) - ("/en/pennyweight", (* "Pennyweight", *) (SI "kilogram", 0.00155517, None)) - ("/en/long_ton", (* "Long ton", *) (SI "kilogram", 1016.05, None)) - ("/en/hundredweight", (* "Hundredweight", *) (SI "kilogram", 50.8023, None)) - ("/en/short_ton", (* "Short ton", *) (SI "kilogram", 907.185, None)) - ("/en/stone_measure", (* "Stone", *) (SI "kilogram", 6.35029, None)) - ("/en/dram", (* "Dram", *) (SI "kilogram", 0.00177185, None)) - ("/en/catty", (* "Catty", *) (SI "kilogram", 0.60479, None)) - ("/en/candareen", (* "Candareen", *) (SI "kilogram", 0.000377994, None)) - ("/en/mace_measure", (* "Mace", *) (SI "kilogram", 0.00377994, None)) - ("/en/grave_measure", (* "Grave", *) (SI "kilogram", 1.0, None)) - ("/en/milligram_measure", (* "Milligram", *) (SI "kilogram", 1e-06, None)) - ("/en/gram", (* "Gram", *) (SI "kilogram", 0.001, None)) - ("/en/microgram", (* "Microgram", *) (SI "kilogram", 1e-09, None)) - ("/en/picul", (* "Picul", *) (SI "kilogram", 60.479, None)) - ("/en/cash_measure", (* "Cash", *) (SI "kilogram", 3.77994e-06, None)) - ("/en/jupiter_mass", (* "Jupiter mass", *) (SI "kilogram", 1.8986e+27, None)) - ("/en/long_quarter", (* "Long quarter", *) (SI "kilogram", 12.7006, None)) - ("/en/cental", (* "Cental", *) (SI "kilogram", 45.3592, None)) - ("/en/troy_ounce", (* "Troy ounce", *) (SI "kilogram", 0.0311035, None)) - ("/en/troy_pound", (* "Troy pound", *) (SI "kilogram", 0.373242, None)) - ("/en/electron_rest_mass", (* "Electron rest mass", *) (SI "kilogram", 0.0, None)) - ("/en/short_quarter", (* "Short quarter", *) (SI "kilogram", 11.3398, None)) - ("/en/earth_mass", (* "Earth mass", *) (SI "kilogram", 5.9736e+28, None)) - ("/en/lunar_mass", (* "Lunar mass", *) (SI "kilogram", 7.3477e+22, None)) - ("/en/mev_c", (* "MeV/c²", *) (SI "kilogram", 1.6e-27, None)) - ("/en/gray", (* "Gray", *) (SI "gray", 1.0, None)) - ("/en/rad_measure", (* "Rad", *) (SI "gray", 0.01, None)) - ("/en/gray_per_second", (* "Gray per second", *) (Div (SI "gray",SI "second"), 1.0, None)) - ("/en/gal", (* "Gal", *) (Div (SI "metre",Prod (SI "second",SI "second")), 0.01, None)) - ("/en/metre_per_second_squared", (* "Metre per second squared", *) (Div (SI "metre",Prod (SI "second",SI "second")), 1.0, None)) - ("/en/g_force_measure", (* "g-force", *) (Div (SI "metre",Prod (SI "second",SI "second")), 9.80665, None)) - ("/en/mole_per_cubic_metre", (* "Mole per cubic metre", *) (Div (SI "mole",Prod (Prod (SI "metre",SI "metre"),SI "metre")), 1.0, None)) - ("/en/molar_measure", (* "Molar", *) (Div (SI "mole",Prod (Prod (SI "metre",SI "metre"),SI "metre")), 0.001, None)) - ("/en/nanomolar", (* "Nanomolar", *) (Div (SI "mole",Prod (Prod (SI "metre",SI "metre"),SI "metre")), 1e-09, None)) - ("/en/micromolar", (* "Micromolar", *) (Div (SI "mole",Prod (Prod (SI "metre",SI "metre"),SI "metre")), 1e-06, None)) - ("/en/mole_measure", (* "Mole", *) (SI "mole", 1.0, None)) - ("/en/micromole", (* "Micromole", *) (SI "mole", 1e-06, None)) - ("/en/millimole", (* "Millimole", *) (SI "mole", 0.001, None)) - ("/en/nanomole", (* "Nanomole", *) (SI "mole", 1e-08, None)) - ("/en/pound_mole", (* "Pound mole", *) (SI "mole", 4.53592e+39, None)) - ("/en/radian_per_second_squared", (* "Radian per second squared", *) (Div (One,Prod (SI "second",SI "second")), 1.0, None)) - ("/en/revolutions_per_minute", (* "Revolutions per minute", *) (Div (One,SI "second"), 0.10472, None)) - ("/en/radian_per_second", (* "Radian per second", *) (Div (One,SI "second"), 1.0, None)) - ("/en/farad", (* "Farad", *) (SI "farad", 1.0, None)) - ("/en/katal", (* "Katal", *) (SI "katal", 1.0, None)) - ("/en/enzyme_unit", (* "Enzyme unit", *) (SI "katal", 1.667e-08, None)) - ("/en/katal_per_cubic_metre", (* "Katal per cubic metre", *) (Div (SI "katal",Prod (Prod (SI "metre",SI "metre"),SI "metre")), 1.0, None)) - ("/en/coulomb", (* "Coulomb", *) (SI "coulomb", 1.0, None)) - ("/en/statcoulomb", (* "Statcoulomb", *) (SI "coulomb", 3.3356e-10, None)) - ("/en/elementary_charge", (* "Elementary charge", *) (SI "coulomb", 1.60218e-19, None)) - ("/en/planck_charge", (* "Planck charge", *) (SI "coulomb", 1.87555e-18, None)) - ("/en/abcoulomb", (* "Abcoulomb", *) (SI "coulomb", 10.0, None)) - ("/en/ampere-hour", (* "Ampere-hour", *) (SI "coulomb", 3600.0, None)) - ("/en/siemens", (* "Siemens", *) (SI "siemens", 1.0, None)) - ("/en/microsiemens", (* "Microsiemens", *) (SI "siemens", 1e-06, None)) - ("/en/millisiemens", (* "Millisiemens", *) (SI "siemens", 0.001, None)) - ("/en/siemens_per_meter", (* "Siemens per meter", *) (Div (SI "siemens",SI "metre"), 1.0, None)) - ("/en/microsiemens_per_centimeter", (* "Microsiemens per centimeter", *) (Div (SI "siemens",SI "metre"), 0.01, None)) - ("/en/ampere_per_square_metre", (* "Ampere per square metre", *) (Div (SI "ampere",Prod (SI "metre",SI "metre")), 1.0, None)) - ("/en/sievert", (* "Sievert", *) (SI "sievert", 1.0, None)) - ("/en/coulomb_per_cubic_metre", (* "Coulomb per cubic metre", *) (Div (SI "coulomb",Prod (Prod (SI "metre",SI "metre"),SI "metre")), 1.0, None)) - ("/en/ampere", (* "Ampere", *) (SI "ampere", 1.0, None)) - ("/en/abampere", (* "Abampere", *) (SI "ampere", 10.0, None)) - ("/en/volt_per_metre", (* "Volt per metre", *) (Div (SI "volt",SI "metre"), 1.0, None)) - ("/en/newtons_per_coulomb", (* "Newtons per coulomb", *) (Div (SI "volt",SI "metre"), 1.0, None)) - ("/en/coulomb_per_square_metre", (* "Coulomb per square metre", *) (Div (SI "coulomb",Prod (SI "metre",SI "metre")), 1.0, None)) - ("/en/joule_per_cubic_metre", (* "Joule per cubic metre", *) (Div (SI "joule",Prod (Prod (SI "metre",SI "metre"),SI "metre")), 1.0, None)) - ("/en/coulomb_per_kilogram", (* "Coulomb per kilogram", *) (Div (SI "coulomb",SI "kilogram"), 1.0, None)) - ("/en/dyne", (* "Dyne", *) (SI "newton", 1e-05, None)) - ("/en/newton", (* "Newton", *) (SI "newton", 1.0, None)) - ("/en/pound-force", (* "Pound-force", *) (SI "newton", 4.44822, None)) - ("/en/kilogram-force", (* "Kilogram-force", *) (SI "newton", 9.80665, None)) - ("/en/poundal", (* "Poundal", *) (SI "newton", 0.138255, None)) - ("/en/kilonewton", (* "KiloNewton", *) (SI "newton", 1000.0, None)) - ("/en/joule_per_kelvin", (* "Joule per kelvin", *) (Div (SI "joule",SI "kelvin"), 1.0, None)) - ("/en/lux", (* "Lux", *) (SI "lux", 1.0, None)) - ("/en/henry_measure", (* "Henry", *) (SI "henry", 1.0, None)) - ("/en/inverse_kelvin", (* "Inverse Kelvin", *) (Div (One,SI "kelvin"), 1.0, None)) - ("/en/micro_per_degree_c", (* "micro per degree C", *) (Div (One,SI "kelvin"), 1e-06, None)) - ("/en/micro_per_degree_f", (* "micro per degree F", *) (Div (One,SI "kelvin"), 5.556e-07, None)) - ("/en/watt_per_square_metre", (* "Watt per square metre", *) (Div (SI "watt",Prod (SI "metre",SI "metre")), 1.0, None)) - ("/en/footlambert", (* "Footlambert", *) (Div (SI "candela",Prod (SI "metre",SI "metre")), 3.42626, None)) - ("/en/lambert_measure", (* "Lambert", *) (Div (SI "candela",Prod (SI "metre",SI "metre")), 3183.1, None)) - ("/en/candela_per_square_metre", (* "Candela per square metre", *) (Div (SI "candela",Prod (SI "metre",SI "metre")), 1.0, None)) - ("/en/stilb", (* "Stilb", *) (Div (SI "candela",Prod (SI "metre",SI "metre")), 10000.0, None)) - ("/en/lumen_measure", (* "Lumen", *) (SI "lumen", 1.0, None)) - ("/en/candela", (* "Candela", *) (SI "candela", 1.0, None)) - ("/en/oersted", (* "Oersted", *) (Div (SI "ampere",Prod (SI "metre",SI "metre")), 79.5775, None)) - ("/en/ampere_per_metre", (* "Ampere per metre", *) (Div (SI "ampere",Prod (SI "metre",SI "metre")), 1.0, None)) - ("/en/weber", (* "Weber", *) (SI "weber", 1.0, None)) - ("/en/gauss_measure", (* "Gauss", *) (SI "tesla", 0.0001, None)) - ("/en/tesla_measure", (* "Tesla", *) (SI "tesla", 1.0, None)) - ("/en/joule_per_mole", (* "Joule per mole", *) (Div (SI "joule",SI "mole"), 1.0, None)) - ("/en/kilojoule_per_mole", (* "Kilojoule per mole", *) (Div (SI "joule",SI "mole"), 1000.0, None)) - ("/en/joule_per_mole_per_kelvin", (* "Joule per mole per kelvin", *) (Div (Div (SI "joule",SI "mole"),SI "kelvin"), 1.0, None)) - ("/en/cubic_metre_per_mole", (* "Cubic metre per mole", *) (Div (Prod (Prod (SI "metre",SI "metre"),SI "metre"),SI "mole"), 1.0, None)) - ("/en/newton_metre", (* "Newton metre", *) (Prod (SI "newton",SI "metre"), 1.0, None)) - ("/en/foot-pound_force", (* "Foot-pound force", *) (Prod (SI "newton",SI "metre"), 1.35582, None)) - ("/en/ounce_force_inch", (* "Ounce-force inch", *) (Prod (SI "newton",SI "metre"), 0.00706155, None)) - ("/en/henry_per_metre", (* "Henry per metre", *) (Div (SI "henry",SI "metre"), 1.0, None)) - ("/en/farad_per_metre", (* "Farad per metre", *) (Div (SI "farad",SI "metre"), 1.0, None)) - ("/en/volt", (* "Volt", *) (SI "volt", 1.0, None)) - ("/en/watt_per_square_metre_per_steradian", (* "Watt per square metre per steradian", *) (Div (Div (SI "watt",Prod (SI "metre",SI "metre")),One), 1.0, None)) - ("/en/watt_per_steradian", (* "Watt per steradian", *) (Div (SI "watt",One), 1.0, None)) - ("/en/curie", (* "Curie", *) (SI "becquerel", 3.7e+10, None)) - ("/en/becquerel", (* "Becquerel", *) (SI "becquerel", 1.0, None)) - ("/en/ohm", (* "Ohm", *) (SI "ohm", 1.0, None)) - ("/en/ohm_meter", (* "Ohm meter", *) (Prod (SI "ohm",SI "metre"), 1.0, None)) - ("/en/ohm_centimeter", (* "Ohm centimeter", *) (Prod (SI "ohm",SI "metre"), 0.01, None)) - ("/en/joule_per_kilogram", (* "Joule per kilogram", *) (Div (SI "joule",SI "kilogram"), 1.0, None)) - ("/en/joule_per_gram", (* "Joule per gram", *) (Div (SI "joule",SI "kilogram"), 0.001, None)) - ("/en/joule_per_kilogram_per_kelvin", (* "Joule per kilogram per kelvin", *) (Div (Div (SI "joule",SI "kilogram"),SI "kelvin"), 1.0, None)) - ("/en/joule_per_gram_per_kelvin", (* "Joule per gram per kelvin", *) (Div (Div (SI "joule",SI "kilogram"),SI "kelvin"), 1000.0, None)) - ("/en/btu_per_pound_mass_per_degree_f", (* "Btu per pound-mass per degree F", *) (Div (Div (SI "joule",SI "kilogram"),SI "kelvin"), 4.1868, None)) - ("/en/cubic_metre_per_kilogram", (* "Cubic metre per kilogram", *) (Div (Prod (Prod (SI "metre",SI "metre"),SI "metre"),SI "kilogram"), 1.0, None)) - ("/en/kilogram_per_square_metre", (* "Kilogram per square metre", *) (Div (SI "kilogram",Prod (SI "metre",SI "metre")), 1.0, None)) - ("/en/newton_per_metre", (* "Newton per metre", *) (Div (SI "newton",SI "metre"), 1.0, None)) - ("/en/celsius", (* "Degree Celsius", *) (SI "kelvin", 1.0, Some 273.15)) - ("/en/fahrenheit", (* "Degree Fahrenheit", *) (SI "kelvin", 0.55555, Some 255.372)) - ("/en/kelvin", (* "Kelvin", *) (SI "kelvin", 1.0, Some 0.0)) - ("/en/rankine", (* "Degree Rankine", *) (SI "kelvin", 0.55555, Some 0.0)) - ("/en/watt_per_metre_per_kelvin", (* "Watt per meter per kelvin", *) (Div (Div (SI "watt",SI "metre"),SI "kelvin"), 1.0, None)) - ("/en/pascal_second_measure", (* "Pascal second", *) (Prod (SI "pascal",SI "second"), 1.0, None)) - ("/en/cubic_metres_per_second", (* "Cubic metres per second", *) (Div (Prod (Prod (SI "metre",SI "metre"),SI "metre"),SI "second"), 1.0, None)) - ("/en/barrel_petroleum_per_day", (* "Barrel (petroleum) per day", *) (Div (Prod (Prod (SI "metre",SI "metre"),SI "metre"),SI "second"), 1.84e-06, None)) - ("/en/reciprocal_metre", (* "Reciprocal metre", *) (Div (One,SI "metre"), 1.0, None)) - ("/en/hertz", (* "Hertz", *) (SI "hertz", 1.0, None)) - ("/en/daily", (* "Daily", *) (SI "hertz", 1.15741e-05, None)) - ("/en/biweekly", (* "Once every two weeks", *) (SI "hertz", 8.27e-07, None)) - ("/en/weekly", (* "Weekly", *) (SI "hertz", 1.653e-06, None)) - ("/en/megahertz", (* "Megahertz", *) (SI "hertz", 1e+06, None)) - ("/en/gigahertz", (* "Gigahertz", *) (SI "hertz", 1e+09, None)) - ("/en/hourly", (* "Hourly", *) (SI "hertz", 0.000277778, None)) - ("/en/kilohertz_measure", (* "Kilohertz", *) (SI "hertz", 1000.0, None)) - ] diff --git a/src/TypeProviderInstantiation.fs b/src/TypeProviderInstantiation.fs index 84d1e9edc..ca8564d04 100644 --- a/src/TypeProviderInstantiation.fs +++ b/src/TypeProviderInstantiation.fs @@ -5,7 +5,6 @@ open System.IO open ProviderImplementation open ProviderImplementation.ProvidedTypes open FSharp.Data.Runtime -open FSharp.Data.Runtime.Freebase.FreebaseRequests type CsvProviderArgs = { Sample : string @@ -59,24 +58,12 @@ type WorldBankProviderArgs = { Sources : string Asynchronous : bool } -type FreebaseProviderArgs = - { Key : string - ServiceUrl : string - NumIndividuals : int - UseUnitsOfMeasure : bool - Pluralize : bool - SnapshotDate : string - LocalCache : bool - AllowLocalQueryEvaluation : bool - UseRefinedTypes: bool } - type TypeProviderInstantiation = | Csv of CsvProviderArgs | Xml of XmlProviderArgs | Json of JsonProviderArgs | Html of HtmlProviderArgs | WorldBank of WorldBankProviderArgs - | Freebase of FreebaseProviderArgs member x.GenerateType resolutionFolder runtimeAssembly = let f, args = @@ -133,17 +120,6 @@ type TypeProviderInstantiation = (fun cfg -> new WorldBankProvider(cfg) :> TypeProviderForNamespaces), [| box x.Sources box x.Asynchronous |] - | Freebase x -> - (fun cfg -> new FreebaseTypeProvider(cfg) :> TypeProviderForNamespaces), - [| box x.Key - box x.ServiceUrl - box x.NumIndividuals - box x.UseUnitsOfMeasure - box x.Pluralize - box x.SnapshotDate - box x.LocalCache - box x.AllowLocalQueryEvaluation - box x.UseRefinedTypes |] Debug.generate resolutionFolder runtimeAssembly f args override x.ToString() = @@ -182,11 +158,6 @@ type TypeProviderInstantiation = ["WorldBank" x.Sources x.Asynchronous.ToString()] - | Freebase x -> - ["Freebase" - x.NumIndividuals.ToString() - x.UseUnitsOfMeasure.ToString() - x.Pluralize.ToString()] |> String.concat "," member x.ExpectedPath outputFolder = @@ -196,9 +167,7 @@ type TypeProviderInstantiation = let replace (oldValue:string) (newValue:string) (str:string) = str.Replace(oldValue, newValue) let output = x.GenerateType resolutionFolder runtimeAssembly - |> match x with - | Freebase _ -> Debug.prettyPrint signatureOnly ignoreOutput 5 10 - | _ -> Debug.prettyPrint signatureOnly ignoreOutput 10 100 + |> Debug.prettyPrint signatureOnly ignoreOutput 10 100 |> replace "FSharp.Data.Runtime." "FDR." |> replace resolutionFolder "" if outputFolder <> "" then @@ -256,16 +225,6 @@ type TypeProviderInstantiation = | "WorldBank" -> WorldBank { Sources = args.[1] Asynchronous = args.[2] |> bool.Parse } - | "Freebase" -> - Freebase { Key = args.[1] - NumIndividuals = args.[2] |> Int32.Parse - UseUnitsOfMeasure = args.[3] |> bool.Parse - Pluralize = args.[4] |> bool.Parse - SnapshotDate = "" - ServiceUrl = FreebaseQueries.DefaultServiceUrl - LocalCache = true - AllowLocalQueryEvaluation = true - UseRefinedTypes = true } | _ -> failwithf "Unknown: %s" args.[0] open System.Runtime.CompilerServices diff --git a/teamcity.cmd b/teamcity.cmd index b21d0a5b2..fe6cadac6 100644 --- a/teamcity.cmd +++ b/teamcity.cmd @@ -1,4 +1,3 @@ -set FREEBASE_API_KEY=AIzaSyBTcOKmU7L7gFB4AdyAz75JRmdHixdLYjY call build CleanInternetCaches || exit /B 1 call build All || exit /B 1 call build SourceLink || exit /B 1 diff --git a/tests/FSharp.Data.DesignTime.Tests/SignatureTestCases.config b/tests/FSharp.Data.DesignTime.Tests/SignatureTestCases.config index 28bb67615..db7cfeee3 100644 --- a/tests/FSharp.Data.DesignTime.Tests/SignatureTestCases.config +++ b/tests/FSharp.Data.DesignTime.Tests/SignatureTestCases.config @@ -64,4 +64,3 @@ Html,us_presidents_wikipedia.html,false,false, Html,doctor_who.html,false,false, Html,SimpleHtmlLists.html,false,false, WorldBank,World Development Indicators;Global Financial Development,true -Freebase,,5,true,true \ No newline at end of file diff --git a/tests/FSharp.Data.DesignTime.Tests/SignatureTests.fs b/tests/FSharp.Data.DesignTime.Tests/SignatureTests.fs index d36248991..925178a34 100644 --- a/tests/FSharp.Data.DesignTime.Tests/SignatureTests.fs +++ b/tests/FSharp.Data.DesignTime.Tests/SignatureTests.fs @@ -23,7 +23,7 @@ let testCasesTuple = let testCases = testCasesTuple #if BUILD_SERVER - |> Array.filter (snd >> function | Freebase _ | WorldBank _ -> false | _ -> true) + |> Array.filter (snd >> function | WorldBank _ -> false | _ -> true) #endif |> Array.map snd diff --git a/tests/FSharp.Data.DesignTime.Tests/expected/Freebase,5,True,True.expected b/tests/FSharp.Data.DesignTime.Tests/expected/Freebase,5,True,True.expected deleted file mode 100644 index 392f65867..000000000 --- a/tests/FSharp.Data.DesignTime.Tests/expected/Freebase,5,True,True.expected +++ /dev/null @@ -1,2279 +0,0 @@ -class FreebaseDataProvider - static member GetDataContext: () -> FreebaseDataProvider+ServiceTypes+FreebaseService - FreebaseDataContext._Create("", "https://www.googleapis.com/freebase/v1", true, "", true, true) - - -class FreebaseDataProvider+ServiceTypes+FreebaseService : FDR.Freebase.FreebaseDataContext - member ``Arts and Entertainment``: FreebaseDataProvider+ServiceTypes+DomainObjects+Arts and Entertainment with get - this.GetDomainCategoryById("/en/arts_entertainment") - - member Businessperson: FreebaseDataProvider+ServiceTypes+DomainObjects+Businessperson with get - this.GetDomainCategoryById("/en/businessperson") - - member Commons: FreebaseDataProvider+ServiceTypes+DomainObjects+Commons with get - this.GetDomainCategoryById("/category/commons") - - member ``Products and Services``: FreebaseDataProvider+ServiceTypes+DomainObjects+Products and Services with get - this.GetDomainCategoryById("/en/products_services") - - member ``Science and Technology``: FreebaseDataProvider+ServiceTypes+DomainObjects+Science and Technology with get - this.GetDomainCategoryById("/en/science_technology") - - member Society: FreebaseDataProvider+ServiceTypes+DomainObjects+Society with get - this.GetDomainCategoryById("/category/society") - - member ``Special Interests``: FreebaseDataProvider+ServiceTypes+DomainObjects+Special Interests with get - this.GetDomainCategoryById("/en/special_interests") - - member Sports: FreebaseDataProvider+ServiceTypes+DomainObjects+Sports with get - this.GetDomainCategoryById("/category/sports") - - member System: FreebaseDataProvider+ServiceTypes+DomainObjects+System with get - this.GetDomainCategoryById("/category/system") - - member ``Time and Space``: FreebaseDataProvider+ServiceTypes+DomainObjects+Time and Space with get - this.GetDomainCategoryById("/category/time-space") - - member Transportation: FreebaseDataProvider+ServiceTypes+DomainObjects+Transportation with get - this.GetDomainCategoryById("/m/0cnr02s") - - -class FreebaseDataProvider+ServiceTypes - -class FreebaseDataProvider+ServiceTypes+DomainObjects+Arts and Entertainment : FDR.Freebase.FreebaseDomainCategory - member Books: FreebaseDataProvider+ServiceTypes+DomainObjects+BooksDomain with get - this.GetDomainById("/book") - - member Broadcast: FreebaseDataProvider+ServiceTypes+DomainObjects+BroadcastDomain with get - this.GetDomainById("/broadcast") - - member Comics: FreebaseDataProvider+ServiceTypes+DomainObjects+ComicsDomain with get - this.GetDomainById("/comic_books") - - member ``Fictional Universes``: FreebaseDataProvider+ServiceTypes+DomainObjects+Fictional Universes Domain with get - this.GetDomainById("/fictional_universe") - - member Film: FreebaseDataProvider+ServiceTypes+DomainObjects+FilmDomain with get - this.GetDomainById("/film") - - member Games: FreebaseDataProvider+ServiceTypes+DomainObjects+GamesDomain with get - this.GetDomainById("/games") - - member Media: FreebaseDataProvider+ServiceTypes+DomainObjects+MediaDomain with get - this.GetDomainById("/media_common") - - member Music: FreebaseDataProvider+ServiceTypes+DomainObjects+MusicDomain with get - this.GetDomainById("/music") - - member Opera: FreebaseDataProvider+ServiceTypes+DomainObjects+OperaDomain with get - this.GetDomainById("/opera") - - member Periodicals: FreebaseDataProvider+ServiceTypes+DomainObjects+PeriodicalsDomain with get - this.GetDomainById("/periodicals") - - member Radio: FreebaseDataProvider+ServiceTypes+DomainObjects+RadioDomain with get - this.GetDomainById("/radio") - - member TV: FreebaseDataProvider+ServiceTypes+DomainObjects+TVDomain with get - this.GetDomainById("/tv") - - member Theater: FreebaseDataProvider+ServiceTypes+DomainObjects+TheaterDomain with get - this.GetDomainById("/theater") - - member ``Video Games``: FreebaseDataProvider+ServiceTypes+DomainObjects+Video Games Domain with get - this.GetDomainById("/cvg") - - member ``Visual Art``: FreebaseDataProvider+ServiceTypes+DomainObjects+Visual Art Domain with get - this.GetDomainById("/visual_art") - - -class FreebaseDataProvider+ServiceTypes+DomainObjects+Businessperson : FDR.Freebase.FreebaseDomainCategory - -class FreebaseDataProvider+ServiceTypes+DomainObjects+Commons : FDR.Freebase.FreebaseDomainCategory - member ``American football``: FreebaseDataProvider+ServiceTypes+DomainObjects+American football Domain with get - this.GetDomainById("/american_football") - - member ``Amusement Parks``: FreebaseDataProvider+ServiceTypes+DomainObjects+Amusement Parks Domain with get - this.GetDomainById("/amusement_parks") - - member Architecture: FreebaseDataProvider+ServiceTypes+DomainObjects+ArchitectureDomain with get - this.GetDomainById("/architecture") - - member Astronomy: FreebaseDataProvider+ServiceTypes+DomainObjects+AstronomyDomain with get - this.GetDomainById("/astronomy") - - member Automotive: FreebaseDataProvider+ServiceTypes+DomainObjects+AutomotiveDomain with get - this.GetDomainById("/automotive") - - member Aviation: FreebaseDataProvider+ServiceTypes+DomainObjects+AviationDomain with get - this.GetDomainById("/aviation") - - member Awards: FreebaseDataProvider+ServiceTypes+DomainObjects+AwardsDomain with get - this.GetDomainById("/award") - - member Baseball: FreebaseDataProvider+ServiceTypes+DomainObjects+BaseballDomain with get - this.GetDomainById("/baseball") - - member Basketball: FreebaseDataProvider+ServiceTypes+DomainObjects+BasketballDomain with get - this.GetDomainById("/basketball") - - member Bicycles: FreebaseDataProvider+ServiceTypes+DomainObjects+BicyclesDomain with get - this.GetDomainById("/bicycles") - - member Biology: FreebaseDataProvider+ServiceTypes+DomainObjects+BiologyDomain with get - this.GetDomainById("/biology") - - member Boats: FreebaseDataProvider+ServiceTypes+DomainObjects+BoatsDomain with get - this.GetDomainById("/boats") - - member Books: FreebaseDataProvider+ServiceTypes+DomainObjects+BooksDomain with get - this.GetDomainById("/book") - - member Boxing: FreebaseDataProvider+ServiceTypes+DomainObjects+BoxingDomain with get - this.GetDomainById("/boxing") - - member Broadcast: FreebaseDataProvider+ServiceTypes+DomainObjects+BroadcastDomain with get - this.GetDomainById("/broadcast") - - member Business: FreebaseDataProvider+ServiceTypes+DomainObjects+BusinessDomain with get - this.GetDomainById("/business") - - member Celebrities: FreebaseDataProvider+ServiceTypes+DomainObjects+CelebritiesDomain with get - this.GetDomainById("/celebrities") - - member Chemistry: FreebaseDataProvider+ServiceTypes+DomainObjects+ChemistryDomain with get - this.GetDomainById("/chemistry") - - member Comedy: FreebaseDataProvider+ServiceTypes+DomainObjects+ComedyDomain with get - this.GetDomainById("/comedy") - - member Comics: FreebaseDataProvider+ServiceTypes+DomainObjects+ComicsDomain with get - this.GetDomainById("/comic_books") - - member Computers: FreebaseDataProvider+ServiceTypes+DomainObjects+ComputersDomain with get - this.GetDomainById("/computer") - - member ``Conferences and Conventions``: FreebaseDataProvider+ServiceTypes+DomainObjects+Conferences and Conventions Domain with get - this.GetDomainById("/conferences") - - member Cricket: FreebaseDataProvider+ServiceTypes+DomainObjects+CricketDomain with get - this.GetDomainById("/cricket") - - member Digicams: FreebaseDataProvider+ServiceTypes+DomainObjects+DigicamsDomain with get - this.GetDomainById("/digicams") - - member Education: FreebaseDataProvider+ServiceTypes+DomainObjects+EducationDomain with get - this.GetDomainById("/education") - - member Engineering: FreebaseDataProvider+ServiceTypes+DomainObjects+EngineeringDomain with get - this.GetDomainById("/engineering") - - member Event: FreebaseDataProvider+ServiceTypes+DomainObjects+EventDomain with get - this.GetDomainById("/event") - - member Exhibitions: FreebaseDataProvider+ServiceTypes+DomainObjects+ExhibitionsDomain with get - this.GetDomainById("/exhibitions") - - member ``Fashion, Clothing and Textiles``: FreebaseDataProvider+ServiceTypes+DomainObjects+Fashion with get - this.GetDomainById("/fashion") - - member ``Fictional Universes``: FreebaseDataProvider+ServiceTypes+DomainObjects+Fictional Universes Domain with get - this.GetDomainById("/fictional_universe") - - member Film: FreebaseDataProvider+ServiceTypes+DomainObjects+FilmDomain with get - this.GetDomainById("/film") - - member ``Food & Drink``: FreebaseDataProvider+ServiceTypes+DomainObjects+Food & Drink Domain with get - this.GetDomainById("/food") - - member Games: FreebaseDataProvider+ServiceTypes+DomainObjects+GamesDomain with get - this.GetDomainById("/games") - - member Geology: FreebaseDataProvider+ServiceTypes+DomainObjects+GeologyDomain with get - this.GetDomainById("/geology") - - member Government: FreebaseDataProvider+ServiceTypes+DomainObjects+GovernmentDomain with get - this.GetDomainById("/government") - - member ``Hobbies and Interests``: FreebaseDataProvider+ServiceTypes+DomainObjects+Hobbies and Interests Domain with get - this.GetDomainById("/interests") - - member ``Ice Hockey``: FreebaseDataProvider+ServiceTypes+DomainObjects+Ice Hockey Domain with get - this.GetDomainById("/ice_hockey") - - member Influence: FreebaseDataProvider+ServiceTypes+DomainObjects+InfluenceDomain with get - this.GetDomainById("/influence") - - member Internet: FreebaseDataProvider+ServiceTypes+DomainObjects+InternetDomain with get - this.GetDomainById("/internet") - - member Language: FreebaseDataProvider+ServiceTypes+DomainObjects+LanguageDomain with get - this.GetDomainById("/language") - - member Law: FreebaseDataProvider+ServiceTypes+DomainObjects+LawDomain with get - this.GetDomainById("/law") - - member Library: FreebaseDataProvider+ServiceTypes+DomainObjects+LibraryDomain with get - this.GetDomainById("/library") - - member Location: FreebaseDataProvider+ServiceTypes+DomainObjects+LocationDomain with get - this.GetDomainById("/location") - - member ``Martial Arts``: FreebaseDataProvider+ServiceTypes+DomainObjects+Martial Arts Domain with get - this.GetDomainById("/martial_arts") - - member ``Measurement Unit``: FreebaseDataProvider+ServiceTypes+DomainObjects+Measurement Unit Domain with get - this.GetDomainById("/measurement_unit") - - member Media: FreebaseDataProvider+ServiceTypes+DomainObjects+MediaDomain with get - this.GetDomainById("/media_common") - - member Medicine: FreebaseDataProvider+ServiceTypes+DomainObjects+MedicineDomain with get - this.GetDomainById("/medicine") - - member Meteorology: FreebaseDataProvider+ServiceTypes+DomainObjects+MeteorologyDomain with get - this.GetDomainById("/meteorology") - - member Military: FreebaseDataProvider+ServiceTypes+DomainObjects+MilitaryDomain with get - this.GetDomainById("/military") - - member Music: FreebaseDataProvider+ServiceTypes+DomainObjects+MusicDomain with get - this.GetDomainById("/music") - - member Olympics: FreebaseDataProvider+ServiceTypes+DomainObjects+OlympicsDomain with get - this.GetDomainById("/olympics") - - member Opera: FreebaseDataProvider+ServiceTypes+DomainObjects+OperaDomain with get - this.GetDomainById("/opera") - - member Organization: FreebaseDataProvider+ServiceTypes+DomainObjects+OrganizationDomain with get - this.GetDomainById("/organization") - - member People: FreebaseDataProvider+ServiceTypes+DomainObjects+PeopleDomain with get - this.GetDomainById("/people") - - member Periodicals: FreebaseDataProvider+ServiceTypes+DomainObjects+PeriodicalsDomain with get - this.GetDomainById("/periodicals") - - member ``Physical Geography``: FreebaseDataProvider+ServiceTypes+DomainObjects+Physical Geography Domain with get - this.GetDomainById("/geography") - - member Physics: FreebaseDataProvider+ServiceTypes+DomainObjects+PhysicsDomain with get - this.GetDomainById("/physics") - - member Projects: FreebaseDataProvider+ServiceTypes+DomainObjects+ProjectsDomain with get - this.GetDomainById("/projects") - - member ``Protected Places``: FreebaseDataProvider+ServiceTypes+DomainObjects+Protected Places Domain with get - this.GetDomainById("/protected_sites") - - member Radio: FreebaseDataProvider+ServiceTypes+DomainObjects+RadioDomain with get - this.GetDomainById("/radio") - - member Rail: FreebaseDataProvider+ServiceTypes+DomainObjects+RailDomain with get - this.GetDomainById("/rail") - - member Religion: FreebaseDataProvider+ServiceTypes+DomainObjects+ReligionDomain with get - this.GetDomainById("/religion") - - member ``Royalty and Nobility``: FreebaseDataProvider+ServiceTypes+DomainObjects+Royalty and Nobility Domain with get - this.GetDomainById("/royalty") - - member Skiing: FreebaseDataProvider+ServiceTypes+DomainObjects+SkiingDomain with get - this.GetDomainById("/skiing") - - member Soccer: FreebaseDataProvider+ServiceTypes+DomainObjects+SoccerDomain with get - this.GetDomainById("/soccer") - - member Spaceflight: FreebaseDataProvider+ServiceTypes+DomainObjects+SpaceflightDomain with get - this.GetDomainById("/spaceflight") - - member Sports: FreebaseDataProvider+ServiceTypes+DomainObjects+SportsDomain with get - this.GetDomainById("/sports") - - member Symbols: FreebaseDataProvider+ServiceTypes+DomainObjects+SymbolsDomain with get - this.GetDomainById("/symbols") - - member TV: FreebaseDataProvider+ServiceTypes+DomainObjects+TVDomain with get - this.GetDomainById("/tv") - - member Tennis: FreebaseDataProvider+ServiceTypes+DomainObjects+TennisDomain with get - this.GetDomainById("/tennis") - - member Theater: FreebaseDataProvider+ServiceTypes+DomainObjects+TheaterDomain with get - this.GetDomainById("/theater") - - member Time: FreebaseDataProvider+ServiceTypes+DomainObjects+TimeDomain with get - this.GetDomainById("/time") - - member Transportation: FreebaseDataProvider+ServiceTypes+DomainObjects+TransportationDomain with get - this.GetDomainById("/transportation") - - member Travel: FreebaseDataProvider+ServiceTypes+DomainObjects+TravelDomain with get - this.GetDomainById("/travel") - - member ``Video Games``: FreebaseDataProvider+ServiceTypes+DomainObjects+Video Games Domain with get - this.GetDomainById("/cvg") - - member ``Visual Art``: FreebaseDataProvider+ServiceTypes+DomainObjects+Visual Art Domain with get - this.GetDomainById("/visual_art") - - member ``Zoos and Aquariums``: FreebaseDataProvider+ServiceTypes+DomainObjects+Zoos and Aquariums Domain with get - this.GetDomainById("/zoos") - - -class FreebaseDataProvider+ServiceTypes+DomainObjects - -class FreebaseDataProvider+ServiceTypes+DomainObjects+Products and Services : FDR.Freebase.FreebaseDomainCategory - member Automotive: FreebaseDataProvider+ServiceTypes+DomainObjects+AutomotiveDomain with get - this.GetDomainById("/automotive") - - member Business: FreebaseDataProvider+ServiceTypes+DomainObjects+BusinessDomain with get - this.GetDomainById("/business") - - member Digicams: FreebaseDataProvider+ServiceTypes+DomainObjects+DigicamsDomain with get - this.GetDomainById("/digicams") - - member ``Food & Drink``: FreebaseDataProvider+ServiceTypes+DomainObjects+Food & Drink Domain with get - this.GetDomainById("/food") - - -class FreebaseDataProvider+ServiceTypes+DomainObjects+Science and Technology : FDR.Freebase.FreebaseDomainCategory - member Astronomy: FreebaseDataProvider+ServiceTypes+DomainObjects+AstronomyDomain with get - this.GetDomainById("/astronomy") - - member Biology: FreebaseDataProvider+ServiceTypes+DomainObjects+BiologyDomain with get - this.GetDomainById("/biology") - - member Chemistry: FreebaseDataProvider+ServiceTypes+DomainObjects+ChemistryDomain with get - this.GetDomainById("/chemistry") - - member Computers: FreebaseDataProvider+ServiceTypes+DomainObjects+ComputersDomain with get - this.GetDomainById("/computer") - - member Engineering: FreebaseDataProvider+ServiceTypes+DomainObjects+EngineeringDomain with get - this.GetDomainById("/engineering") - - member Geology: FreebaseDataProvider+ServiceTypes+DomainObjects+GeologyDomain with get - this.GetDomainById("/geology") - - member Internet: FreebaseDataProvider+ServiceTypes+DomainObjects+InternetDomain with get - this.GetDomainById("/internet") - - member Medicine: FreebaseDataProvider+ServiceTypes+DomainObjects+MedicineDomain with get - this.GetDomainById("/medicine") - - member Meteorology: FreebaseDataProvider+ServiceTypes+DomainObjects+MeteorologyDomain with get - this.GetDomainById("/meteorology") - - member Physics: FreebaseDataProvider+ServiceTypes+DomainObjects+PhysicsDomain with get - this.GetDomainById("/physics") - - member Spaceflight: FreebaseDataProvider+ServiceTypes+DomainObjects+SpaceflightDomain with get - this.GetDomainById("/spaceflight") - - -class FreebaseDataProvider+ServiceTypes+DomainObjects+Society : FDR.Freebase.FreebaseDomainCategory - member Awards: FreebaseDataProvider+ServiceTypes+DomainObjects+AwardsDomain with get - this.GetDomainById("/award") - - member Celebrities: FreebaseDataProvider+ServiceTypes+DomainObjects+CelebritiesDomain with get - this.GetDomainById("/celebrities") - - member ``Conferences and Conventions``: FreebaseDataProvider+ServiceTypes+DomainObjects+Conferences and Conventions Domain with get - this.GetDomainById("/conferences") - - member Education: FreebaseDataProvider+ServiceTypes+DomainObjects+EducationDomain with get - this.GetDomainById("/education") - - member Exhibitions: FreebaseDataProvider+ServiceTypes+DomainObjects+ExhibitionsDomain with get - this.GetDomainById("/exhibitions") - - member Government: FreebaseDataProvider+ServiceTypes+DomainObjects+GovernmentDomain with get - this.GetDomainById("/government") - - member Influence: FreebaseDataProvider+ServiceTypes+DomainObjects+InfluenceDomain with get - this.GetDomainById("/influence") - - member Language: FreebaseDataProvider+ServiceTypes+DomainObjects+LanguageDomain with get - this.GetDomainById("/language") - - member Law: FreebaseDataProvider+ServiceTypes+DomainObjects+LawDomain with get - this.GetDomainById("/law") - - member Library: FreebaseDataProvider+ServiceTypes+DomainObjects+LibraryDomain with get - this.GetDomainById("/library") - - member Organization: FreebaseDataProvider+ServiceTypes+DomainObjects+OrganizationDomain with get - this.GetDomainById("/organization") - - member People: FreebaseDataProvider+ServiceTypes+DomainObjects+PeopleDomain with get - this.GetDomainById("/people") - - member Religion: FreebaseDataProvider+ServiceTypes+DomainObjects+ReligionDomain with get - this.GetDomainById("/religion") - - member ``Royalty and Nobility``: FreebaseDataProvider+ServiceTypes+DomainObjects+Royalty and Nobility Domain with get - this.GetDomainById("/royalty") - - -class FreebaseDataProvider+ServiceTypes+DomainObjects+Special Interests : FDR.Freebase.FreebaseDomainCategory - member ``Amusement Parks``: FreebaseDataProvider+ServiceTypes+DomainObjects+Amusement Parks Domain with get - this.GetDomainById("/amusement_parks") - - member Architecture: FreebaseDataProvider+ServiceTypes+DomainObjects+ArchitectureDomain with get - this.GetDomainById("/architecture") - - member ``Fashion, Clothing and Textiles``: FreebaseDataProvider+ServiceTypes+DomainObjects+Fashion with get - this.GetDomainById("/fashion") - - member ``Hobbies and Interests``: FreebaseDataProvider+ServiceTypes+DomainObjects+Hobbies and Interests Domain with get - this.GetDomainById("/interests") - - member Military: FreebaseDataProvider+ServiceTypes+DomainObjects+MilitaryDomain with get - this.GetDomainById("/military") - - member Symbols: FreebaseDataProvider+ServiceTypes+DomainObjects+SymbolsDomain with get - this.GetDomainById("/symbols") - - member Travel: FreebaseDataProvider+ServiceTypes+DomainObjects+TravelDomain with get - this.GetDomainById("/travel") - - member ``Zoos and Aquariums``: FreebaseDataProvider+ServiceTypes+DomainObjects+Zoos and Aquariums Domain with get - this.GetDomainById("/zoos") - - -class FreebaseDataProvider+ServiceTypes+DomainObjects+Sports : FDR.Freebase.FreebaseDomainCategory - member ``American football``: FreebaseDataProvider+ServiceTypes+DomainObjects+American football Domain with get - this.GetDomainById("/american_football") - - member Baseball: FreebaseDataProvider+ServiceTypes+DomainObjects+BaseballDomain with get - this.GetDomainById("/baseball") - - member Basketball: FreebaseDataProvider+ServiceTypes+DomainObjects+BasketballDomain with get - this.GetDomainById("/basketball") - - member Boxing: FreebaseDataProvider+ServiceTypes+DomainObjects+BoxingDomain with get - this.GetDomainById("/boxing") - - member Cricket: FreebaseDataProvider+ServiceTypes+DomainObjects+CricketDomain with get - this.GetDomainById("/cricket") - - member ``Ice Hockey``: FreebaseDataProvider+ServiceTypes+DomainObjects+Ice Hockey Domain with get - this.GetDomainById("/ice_hockey") - - member ``Martial Arts``: FreebaseDataProvider+ServiceTypes+DomainObjects+Martial Arts Domain with get - this.GetDomainById("/martial_arts") - - member Olympics: FreebaseDataProvider+ServiceTypes+DomainObjects+OlympicsDomain with get - this.GetDomainById("/olympics") - - member Skiing: FreebaseDataProvider+ServiceTypes+DomainObjects+SkiingDomain with get - this.GetDomainById("/skiing") - - member Soccer: FreebaseDataProvider+ServiceTypes+DomainObjects+SoccerDomain with get - this.GetDomainById("/soccer") - - member Sports: FreebaseDataProvider+ServiceTypes+DomainObjects+SportsDomain with get - this.GetDomainById("/sports") - - member Tennis: FreebaseDataProvider+ServiceTypes+DomainObjects+TennisDomain with get - this.GetDomainById("/tennis") - - -class FreebaseDataProvider+ServiceTypes+DomainObjects+System : FDR.Freebase.FreebaseDomainCategory - member Common: FreebaseDataProvider+ServiceTypes+DomainObjects+CommonDomain with get - this.GetDomainById("/common") - - member ``Data World``: FreebaseDataProvider+ServiceTypes+DomainObjects+Data World Domain with get - this.GetDomainById("/dataworld") - - member Freebase: FreebaseDataProvider+ServiceTypes+DomainObjects+FreebaseDomain with get - this.GetDomainById("/freebase") - - member ``Metaweb System Types``: FreebaseDataProvider+ServiceTypes+DomainObjects+Metaweb System Types Domain with get - this.GetDomainById("/type") - - -class FreebaseDataProvider+ServiceTypes+DomainObjects+American football Domain : FDR.Freebase.FreebaseDomain - member ``American football coach positions``: FreebaseDataProvider+ServiceTypes+American_football+American_football+Football_coach_positionDataCollection with get - this.GetObjectsOfTypeId("/american_football/football_coach_position") - - member ``American football conferences``: FreebaseDataProvider+ServiceTypes+American_football+American_football+Football_conferenceDataCollection with get - this.GetObjectsOfTypeId("/american_football/football_conference") - - member ``American football divisions``: FreebaseDataProvider+ServiceTypes+American_football+American_football+Football_divisionDataCollection with get - this.GetObjectsOfTypeId("/american_football/football_division") - - member ``American football games``: FreebaseDataProvider+ServiceTypes+American_football+American_football+Football_gameDataCollection with get - this.GetObjectsOfTypeId("/american_football/football_game") - - member ``American football head coaches``: FreebaseDataProvider+ServiceTypes+American_football+American_football+Football_coachDataCollection with get - this.GetObjectsOfTypeId("/american_football/football_coach") - - member ``American football players``: FreebaseDataProvider+ServiceTypes+American_football+American_football+Football_playerDataCollection with get - this.GetObjectsOfTypeId("/american_football/football_player") - - member ``American football teams``: FreebaseDataProvider+ServiceTypes+American_football+American_football+Football_teamDataCollection with get - this.GetObjectsOfTypeId("/american_football/football_team") - - member ``Football Scoring Events``: FreebaseDataProvider+ServiceTypes+American_football+American_football+Football_scoring_eventDataCollection with get - this.GetObjectsOfTypeId("/american_football/football_scoring_event") - - member ``NFL Games``: FreebaseDataProvider+ServiceTypes+American_football+American_football+Nfl_gameDataCollection with get - this.GetObjectsOfTypeId("/american_football/nfl_game") - - member ``Scoreboard Quarters``: FreebaseDataProvider+ServiceTypes+American_football+American_football+Scoreboard_quarterDataCollection with get - this.GetObjectsOfTypeId("/american_football/scoreboard_quarter") - - member ``Super bowls``: FreebaseDataProvider+ServiceTypes+American_football+American_football+Super_bowlDataCollection with get - this.GetObjectsOfTypeId("/american_football/super_bowl") - - -class FreebaseDataProvider+ServiceTypes+DomainObjects+Amusement Parks Domain : FDR.Freebase.FreebaseDomain - member ``Amusement Park Areas``: FreebaseDataProvider+ServiceTypes+Amusement_parks+Amusement_parks+Amusement_park_areaDataCollection with get - this.GetObjectsOfTypeId("/amusement_parks/amusement_park_area") - - member ``Amusement Parks``: FreebaseDataProvider+ServiceTypes+Amusement_parks+Amusement_parks+ParkDataCollection with get - this.GetObjectsOfTypeId("/amusement_parks/park") - - member ``Amusement Ride Designers``: FreebaseDataProvider+ServiceTypes+Amusement_parks+Amusement_parks+Ride_designerDataCollection with get - this.GetObjectsOfTypeId("/amusement_parks/ride_designer") - - member ``Amusement Ride Manufacturers``: FreebaseDataProvider+ServiceTypes+Amusement_parks+Amusement_parks+Ride_manufacturerDataCollection with get - this.GetObjectsOfTypeId("/amusement_parks/ride_manufacturer") - - member ``Amusement Ride Themes``: FreebaseDataProvider+ServiceTypes+Amusement_parks+Amusement_parks+Ride_themeDataCollection with get - this.GetObjectsOfTypeId("/amusement_parks/ride_theme") - - member ``Amusement Ride Types``: FreebaseDataProvider+ServiceTypes+Amusement_parks+Amusement_parks+Ride_typeDataCollection with get - this.GetObjectsOfTypeId("/amusement_parks/ride_type") - - member ``Amusement Rides``: FreebaseDataProvider+ServiceTypes+Amusement_parks+Amusement_parks+RideDataCollection with get - this.GetObjectsOfTypeId("/amusement_parks/ride") - - member ``Disney Ride Tickets``: FreebaseDataProvider+ServiceTypes+Amusement_parks+Amusement_parks+Disney_ride_ticketDataCollection with get - this.GetObjectsOfTypeId("/amusement_parks/disney_ride_ticket") - - member ``Disney Rides``: FreebaseDataProvider+ServiceTypes+Amusement_parks+Amusement_parks+Disney_rideDataCollection with get - this.GetObjectsOfTypeId("/amusement_parks/disney_ride") - - member ``Roller Coaster Materials``: FreebaseDataProvider+ServiceTypes+Amusement_parks+Amusement_parks+Roller_coaster_materialDataCollection with get - this.GetObjectsOfTypeId("/amusement_parks/roller_coaster_material") - - member ``Roller Coaster Propulsion Systems``: FreebaseDataProvider+ServiceTypes+Amusement_parks+Amusement_parks+Roller_coaster_propulsion_systemDataCollection with get - this.GetObjectsOfTypeId("/amusement_parks/roller_coaster_propulsion_system") - - member ``Roller Coaster Train Configurations``: FreebaseDataProvider+ServiceTypes+Amusement_parks+Amusement_parks+Roller_coaster_train_configurationDataCollection with get - this.GetObjectsOfTypeId("/amusement_parks/roller_coaster_train_configuration") - - member ``Roller Coasters``: FreebaseDataProvider+ServiceTypes+Amusement_parks+Amusement_parks+Roller_coasterDataCollection with get - this.GetObjectsOfTypeId("/amusement_parks/roller_coaster") - - -class FreebaseDataProvider+ServiceTypes+DomainObjects+ArchitectureDomain : FDR.Freebase.FreebaseDomain - member Architects: FreebaseDataProvider+ServiceTypes+Architecture+Architecture+ArchitectDataCollection with get - this.GetObjectsOfTypeId("/architecture/architect") - - member ``Architectural contractors``: FreebaseDataProvider+ServiceTypes+Architecture+Architecture+Architectural_contractorDataCollection with get - this.GetObjectsOfTypeId("/architecture/architectural_contractor") - - member ``Architectural structure owners``: FreebaseDataProvider+ServiceTypes+Architecture+Architecture+Architectural_structure_ownerDataCollection with get - this.GetObjectsOfTypeId("/architecture/architectural_structure_owner") - - member ``Architectural styles``: FreebaseDataProvider+ServiceTypes+Architecture+Architecture+Architectural_styleDataCollection with get - this.GetObjectsOfTypeId("/architecture/architectural_style") - - member ``Architecture firm partners``: FreebaseDataProvider+ServiceTypes+Architecture+Architecture+Architecture_firm_partnersDataCollection with get - this.GetObjectsOfTypeId("/architecture/architecture_firm_partners") - - member ``Architecture firms``: FreebaseDataProvider+ServiceTypes+Architecture+Architecture+Architecture_firmDataCollection with get - this.GetObjectsOfTypeId("/architecture/architecture_firm") - - member ``Building Occupants``: FreebaseDataProvider+ServiceTypes+Architecture+Architecture+Building_occupantDataCollection with get - this.GetObjectsOfTypeId("/architecture/building_occupant") - - member ``Building complex functions``: FreebaseDataProvider+ServiceTypes+Architecture+Architecture+Building_complex_functionDataCollection with get - this.GetObjectsOfTypeId("/architecture/building_complex_function") - - member ``Building complexs``: FreebaseDataProvider+ServiceTypes+Architecture+Architecture+Building_complexDataCollection with get - this.GetObjectsOfTypeId("/architecture/building_complex") - - member ``Building functions``: FreebaseDataProvider+ServiceTypes+Architecture+Architecture+Building_functionDataCollection with get - this.GetObjectsOfTypeId("/architecture/building_function") - - member Buildings: FreebaseDataProvider+ServiceTypes+Architecture+Architecture+BuildingDataCollection with get - this.GetObjectsOfTypeId("/architecture/building") - - member ``Civil engineers``: FreebaseDataProvider+ServiceTypes+Architecture+Architecture+Civil_engineerDataCollection with get - this.GetObjectsOfTypeId("/architecture/civil_engineer") - - member ``Destruction methods``: FreebaseDataProvider+ServiceTypes+Architecture+Architecture+Destruction_methodDataCollection with get - this.GetObjectsOfTypeId("/architecture/destruction_method") - - member ``Engineering firms``: FreebaseDataProvider+ServiceTypes+Architecture+Architecture+Engineering_firmDataCollection with get - this.GetObjectsOfTypeId("/architecture/engineering_firm") - - member Engineers: FreebaseDataProvider+ServiceTypes+Architecture+Architecture+EngineerDataCollection with get - this.GetObjectsOfTypeId("/architecture/engineer") - - member Houses: FreebaseDataProvider+ServiceTypes+Architecture+Architecture+HouseDataCollection with get - this.GetObjectsOfTypeId("/architecture/house") - - member ``Landscape architects``: FreebaseDataProvider+ServiceTypes+Architecture+Architecture+Landscape_architectDataCollection with get - this.GetObjectsOfTypeId("/architecture/landscape_architect") - - member ``Landscape projects``: FreebaseDataProvider+ServiceTypes+Architecture+Architecture+Landscape_projectDataCollection with get - this.GetObjectsOfTypeId("/architecture/landscape_project") - - member ``Light characteristics``: FreebaseDataProvider+ServiceTypes+Architecture+Architecture+Light_characteristicDataCollection with get - this.GetObjectsOfTypeId("/architecture/light_characteristic") - - member ``Lighthouse construction materials``: FreebaseDataProvider+ServiceTypes+Architecture+Architecture+Lighthouse_construction_materialDataCollection with get - this.GetObjectsOfTypeId("/architecture/lighthouse_construction_material") - - member Lighthouses: FreebaseDataProvider+ServiceTypes+Architecture+Architecture+LighthouseDataCollection with get - this.GetObjectsOfTypeId("/architecture/lighthouse") - - member ``Museum directors``: FreebaseDataProvider+ServiceTypes+Architecture+Architecture+Museum_directorDataCollection with get - this.GetObjectsOfTypeId("/architecture/museum_director") - - member Museums: FreebaseDataProvider+ServiceTypes+Architecture+Architecture+MuseumDataCollection with get - this.GetObjectsOfTypeId("/architecture/museum") - - member Skyscrapers: FreebaseDataProvider+ServiceTypes+Architecture+Architecture+SkyscraperDataCollection with get - this.GetObjectsOfTypeId("/architecture/skyscraper") - - member ``Structural engineers``: FreebaseDataProvider+ServiceTypes+Architecture+Architecture+Structural_engineerDataCollection with get - this.GetObjectsOfTypeId("/architecture/structural_engineer") - - member Structures: FreebaseDataProvider+ServiceTypes+Architecture+Architecture+StructureDataCollection with get - this.GetObjectsOfTypeId("/architecture/structure") - - member ``Tower shapes``: FreebaseDataProvider+ServiceTypes+Architecture+Architecture+Tower_shapeDataCollection with get - this.GetObjectsOfTypeId("/architecture/tower_shape") - - member Towers: FreebaseDataProvider+ServiceTypes+Architecture+Architecture+TowerDataCollection with get - this.GetObjectsOfTypeId("/architecture/tower") - - member ``Type of museums``: FreebaseDataProvider+ServiceTypes+Architecture+Architecture+Type_of_museumDataCollection with get - this.GetObjectsOfTypeId("/architecture/type_of_museum") - - member ``Unrealized designs``: FreebaseDataProvider+ServiceTypes+Architecture+Architecture+Unrealized_designDataCollection with get - this.GetObjectsOfTypeId("/architecture/unrealized_design") - - member Venues: FreebaseDataProvider+ServiceTypes+Architecture+Architecture+VenueDataCollection with get - this.GetObjectsOfTypeId("/architecture/venue") - - -class FreebaseDataProvider+ServiceTypes+DomainObjects+AstronomyDomain : FDR.Freebase.FreebaseDomain - member Asterisms: FreebaseDataProvider+ServiceTypes+Astronomy+Astronomy+AsterismDataCollection with get - this.GetObjectsOfTypeId("/astronomy/asterism") - - member ``Asteroid Families``: FreebaseDataProvider+ServiceTypes+Astronomy+Astronomy+Asteroid_familyDataCollection with get - this.GetObjectsOfTypeId("/astronomy/asteroid_family") - - member ``Asteroid Groups``: FreebaseDataProvider+ServiceTypes+Astronomy+Astronomy+Asteroid_groupDataCollection with get - this.GetObjectsOfTypeId("/astronomy/asteroid_group") - - member ``Asteroid Spectral Types``: FreebaseDataProvider+ServiceTypes+Astronomy+Astronomy+Asteroid_spectral_typeDataCollection with get - this.GetObjectsOfTypeId("/astronomy/asteroid_spectral_type") - - member Asteroids: FreebaseDataProvider+ServiceTypes+Astronomy+Astronomy+AsteroidDataCollection with get - this.GetObjectsOfTypeId("/astronomy/asteroid") - - member Astronomers: FreebaseDataProvider+ServiceTypes+Astronomy+Astronomy+AstronomerDataCollection with get - this.GetObjectsOfTypeId("/astronomy/astronomer") - - member ``Astronomical Discoveries``: FreebaseDataProvider+ServiceTypes+Astronomy+Astronomy+Astronomical_discoveryDataCollection with get - this.GetObjectsOfTypeId("/astronomy/astronomical_discovery") - - member ``Astronomical Discovery Statuses``: FreebaseDataProvider+ServiceTypes+Astronomy+Astronomy+Astronomical_discovery_statusDataCollection with get - this.GetObjectsOfTypeId("/astronomy/astronomical_discovery_status") - - member ``Astronomical Discovery Techniques``: FreebaseDataProvider+ServiceTypes+Astronomy+Astronomy+Astronomical_discovery_techniqueDataCollection with get - this.GetObjectsOfTypeId("/astronomy/astronomical_discovery_technique") - - member ``Astronomical Observatories``: FreebaseDataProvider+ServiceTypes+Astronomy+Astronomy+Astronomical_observatoryDataCollection with get - this.GetObjectsOfTypeId("/astronomy/astronomical_observatory") - - member ``Astronomical Survey/Project Organizations``: FreebaseDataProvider+ServiceTypes+Astronomy+Astronomy+Astronomical_survey_project_organizationDataCollection with get - this.GetObjectsOfTypeId("/astronomy/astronomical_survey_project_organization") - - member ``Celestial Objects``: FreebaseDataProvider+ServiceTypes+Astronomy+Astronomy+Celestial_objectDataCollection with get - this.GetObjectsOfTypeId("/astronomy/celestial_object") - - member ``Celestial object categories``: FreebaseDataProvider+ServiceTypes+Astronomy+Astronomy+Celestial_object_categoryDataCollection with get - this.GetObjectsOfTypeId("/astronomy/celestial_object_category") - - member ``Celestial object with coordinate systems``: FreebaseDataProvider+ServiceTypes+Astronomy+Astronomy+Celestial_object_with_coordinate_systemDataCollection with get - this.GetObjectsOfTypeId("/astronomy/celestial_object_with_coordinate_system") - - member ``Comet groups``: FreebaseDataProvider+ServiceTypes+Astronomy+Astronomy+Comet_groupDataCollection with get - this.GetObjectsOfTypeId("/astronomy/comet_group") - - member Comets: FreebaseDataProvider+ServiceTypes+Astronomy+Astronomy+CometDataCollection with get - this.GetObjectsOfTypeId("/astronomy/comet") - - member Constellations: FreebaseDataProvider+ServiceTypes+Astronomy+Astronomy+ConstellationDataCollection with get - this.GetObjectsOfTypeId("/astronomy/constellation") - - member ``Dwarf Planets``: FreebaseDataProvider+ServiceTypes+Astronomy+Astronomy+Dwarf_planetDataCollection with get - this.GetObjectsOfTypeId("/astronomy/dwarf_planet") - - member ``Extraterrestrial locations``: FreebaseDataProvider+ServiceTypes+Astronomy+Astronomy+Extraterrestrial_locationDataCollection with get - this.GetObjectsOfTypeId("/astronomy/extraterrestrial_location") - - member ``Galactic clusters``: FreebaseDataProvider+ServiceTypes+Astronomy+Astronomy+Galactic_clusterDataCollection with get - this.GetObjectsOfTypeId("/astronomy/galactic_cluster") - - member ``Galactic filaments``: FreebaseDataProvider+ServiceTypes+Astronomy+Astronomy+Galactic_filamentDataCollection with get - this.GetObjectsOfTypeId("/astronomy/galactic_filament") - - member ``Galactic groups``: FreebaseDataProvider+ServiceTypes+Astronomy+Astronomy+Galactic_groupDataCollection with get - this.GetObjectsOfTypeId("/astronomy/galactic_group") - - member ``Galactic interaction statuses``: FreebaseDataProvider+ServiceTypes+Astronomy+Astronomy+Galactic_interaction_statusDataCollection with get - this.GetObjectsOfTypeId("/astronomy/galactic_interaction_status") - - member ``Galactic interaction types``: FreebaseDataProvider+ServiceTypes+Astronomy+Astronomy+Galactic_interaction_typeDataCollection with get - this.GetObjectsOfTypeId("/astronomy/galactic_interaction_type") - - member ``Galactic shapes``: FreebaseDataProvider+ServiceTypes+Astronomy+Astronomy+Galactic_shapeDataCollection with get - this.GetObjectsOfTypeId("/astronomy/galactic_shape") - - member ``Galactic superclusters``: FreebaseDataProvider+ServiceTypes+Astronomy+Astronomy+Galactic_super_clusterDataCollection with get - this.GetObjectsOfTypeId("/astronomy/galactic_super_cluster") - - member Galaxies: FreebaseDataProvider+ServiceTypes+Astronomy+Astronomy+GalaxyDataCollection with get - this.GetObjectsOfTypeId("/astronomy/galaxy") - - member ``Galaxy classification codes``: FreebaseDataProvider+ServiceTypes+Astronomy+Astronomy+Galaxy_classification_codeDataCollection with get - this.GetObjectsOfTypeId("/astronomy/galaxy_classification_code") - - member ``Meteor Showers``: FreebaseDataProvider+ServiceTypes+Astronomy+Astronomy+Meteor_showerDataCollection with get - this.GetObjectsOfTypeId("/astronomy/meteor_shower") - - member ``Meteorite Sources``: FreebaseDataProvider+ServiceTypes+Astronomy+Astronomy+Meteorite_sourceDataCollection with get - this.GetObjectsOfTypeId("/astronomy/meteorite_source") - - member ``Meteorite classfications``: FreebaseDataProvider+ServiceTypes+Astronomy+Astronomy+Meteoric_compositionDataCollection with get - this.GetObjectsOfTypeId("/astronomy/meteoric_composition") - - member Meteorites: FreebaseDataProvider+ServiceTypes+Astronomy+Astronomy+MeteoriteDataCollection with get - this.GetObjectsOfTypeId("/astronomy/meteorite") - - member Moons: FreebaseDataProvider+ServiceTypes+Astronomy+Astronomy+MoonDataCollection with get - this.GetObjectsOfTypeId("/astronomy/moon") - - member ``Near-Earth Object Classifications``: FreebaseDataProvider+ServiceTypes+Astronomy+Astronomy+Near_earth_object_classificationDataCollection with get - this.GetObjectsOfTypeId("/astronomy/near_earth_object_classification") - - member ``Near-Earth Objects``: FreebaseDataProvider+ServiceTypes+Astronomy+Astronomy+Near_earth_objectDataCollection with get - this.GetObjectsOfTypeId("/astronomy/near_earth_object") - - member Nebulas: FreebaseDataProvider+ServiceTypes+Astronomy+Astronomy+NebulaDataCollection with get - this.GetObjectsOfTypeId("/astronomy/nebula") - - member ``Orbit Types``: FreebaseDataProvider+ServiceTypes+Astronomy+Astronomy+Orbit_typeDataCollection with get - this.GetObjectsOfTypeId("/astronomy/orbit_type") - - member ``Orbital Relationships``: FreebaseDataProvider+ServiceTypes+Astronomy+Astronomy+Orbital_relationshipDataCollection with get - this.GetObjectsOfTypeId("/astronomy/orbital_relationship") - - member ``Planetographic coordinate systems``: FreebaseDataProvider+ServiceTypes+Astronomy+Astronomy+Planetographic_coordinate_systemDataCollection with get - this.GetObjectsOfTypeId("/astronomy/planetographic_coordinate_system") - - member Planets: FreebaseDataProvider+ServiceTypes+Astronomy+Astronomy+PlanetDataCollection with get - this.GetObjectsOfTypeId("/astronomy/planet") - - member Plutoids: FreebaseDataProvider+ServiceTypes+Astronomy+Astronomy+PlutoidDataCollection with get - this.GetObjectsOfTypeId("/astronomy/plutoid") - - member ``Satellite galaxies``: FreebaseDataProvider+ServiceTypes+Astronomy+Astronomy+Satellite_galaxyDataCollection with get - this.GetObjectsOfTypeId("/astronomy/satellite_galaxy") - - member ``Scattered Disc Objects``: FreebaseDataProvider+ServiceTypes+Astronomy+Astronomy+Scattered_disc_objectDataCollection with get - this.GetObjectsOfTypeId("/astronomy/scattered_disc_object") - - member ``Spectral Types``: FreebaseDataProvider+ServiceTypes+Astronomy+Astronomy+Spectral_typeDataCollection with get - this.GetObjectsOfTypeId("/astronomy/spectral_type") - - member ``Star Systems``: FreebaseDataProvider+ServiceTypes+Astronomy+Astronomy+Star_systemDataCollection with get - this.GetObjectsOfTypeId("/astronomy/star_system") - - member ``Star system bodies``: FreebaseDataProvider+ServiceTypes+Astronomy+Astronomy+Star_system_bodyDataCollection with get - this.GetObjectsOfTypeId("/astronomy/star_system_body") - - member Stars: FreebaseDataProvider+ServiceTypes+Astronomy+Astronomy+StarDataCollection with get - this.GetObjectsOfTypeId("/astronomy/star") - - member Supernovas: FreebaseDataProvider+ServiceTypes+Astronomy+Astronomy+SupernovaDataCollection with get - this.GetObjectsOfTypeId("/astronomy/supernova") - - member ``Telescope platforms``: FreebaseDataProvider+ServiceTypes+Astronomy+Astronomy+Telescope_platformDataCollection with get - this.GetObjectsOfTypeId("/astronomy/telescope_platform") - - member ``Telescope principle types``: FreebaseDataProvider+ServiceTypes+Astronomy+Astronomy+Telescope_principle_typeDataCollection with get - this.GetObjectsOfTypeId("/astronomy/telescope_principle_type") - - member ``Telescope types``: FreebaseDataProvider+ServiceTypes+Astronomy+Astronomy+Telescope_typeDataCollection with get - this.GetObjectsOfTypeId("/astronomy/telescope_type") - - member Telescopes: FreebaseDataProvider+ServiceTypes+Astronomy+Astronomy+TelescopeDataCollection with get - this.GetObjectsOfTypeId("/astronomy/telescope") - - member ``Trans-Neptunian Objects``: FreebaseDataProvider+ServiceTypes+Astronomy+Astronomy+Trans_neptunian_objectDataCollection with get - this.GetObjectsOfTypeId("/astronomy/trans_neptunian_object") - - member ``Trans-Neptunian regions``: FreebaseDataProvider+ServiceTypes+Astronomy+Astronomy+Trans_neptunian_regionDataCollection with get - this.GetObjectsOfTypeId("/astronomy/trans_neptunian_region") - - member ``Type of planetographic features``: FreebaseDataProvider+ServiceTypes+Astronomy+Astronomy+Type_of_planetographic_featureDataCollection with get - this.GetObjectsOfTypeId("/astronomy/type_of_planetographic_feature") - - -class FreebaseDataProvider+ServiceTypes+DomainObjects+AutomotiveDomain : FDR.Freebase.FreebaseDomain - member ``Automobile Companies``: FreebaseDataProvider+ServiceTypes+Automotive+Automotive+CompanyDataCollection with get - this.GetObjectsOfTypeId("/automotive/company") - - member ``Automobile Makes``: FreebaseDataProvider+ServiceTypes+Automotive+Automotive+MakeDataCollection with get - this.GetObjectsOfTypeId("/automotive/make") - - member ``Automobile Model Years``: FreebaseDataProvider+ServiceTypes+Automotive+Automotive+Model_yearDataCollection with get - this.GetObjectsOfTypeId("/automotive/model_year") - - member ``Automobile Models``: FreebaseDataProvider+ServiceTypes+Automotive+Automotive+ModelDataCollection with get - this.GetObjectsOfTypeId("/automotive/model") - - member ``Automobile generations``: FreebaseDataProvider+ServiceTypes+Automotive+Automotive+GenerationDataCollection with get - this.GetObjectsOfTypeId("/automotive/generation") - - member ``Automotive Classes``: FreebaseDataProvider+ServiceTypes+Automotive+Automotive+Automotive_classDataCollection with get - this.GetObjectsOfTypeId("/automotive/automotive_class") - - member ``Automotive Designers``: FreebaseDataProvider+ServiceTypes+Automotive+Automotive+DesignerDataCollection with get - this.GetObjectsOfTypeId("/automotive/designer") - - member ``Body Styles``: FreebaseDataProvider+ServiceTypes+Automotive+Automotive+Body_styleDataCollection with get - this.GetObjectsOfTypeId("/automotive/body_style") - - member Drivelines: FreebaseDataProvider+ServiceTypes+Automotive+Automotive+DrivelineDataCollection with get - this.GetObjectsOfTypeId("/automotive/driveline") - - member ``Engine Types``: FreebaseDataProvider+ServiceTypes+Automotive+Automotive+Engine_typeDataCollection with get - this.GetObjectsOfTypeId("/automotive/engine_type") - - member Engines: FreebaseDataProvider+ServiceTypes+Automotive+Automotive+EngineDataCollection with get - this.GetObjectsOfTypeId("/automotive/engine") - - member ``Exterior Colors``: FreebaseDataProvider+ServiceTypes+Automotive+Automotive+Exterior_colorDataCollection with get - this.GetObjectsOfTypeId("/automotive/exterior_color") - - member ``Fuel Delivery Methods``: FreebaseDataProvider+ServiceTypes+Automotive+Automotive+Fuel_delivery_methodDataCollection with get - this.GetObjectsOfTypeId("/automotive/fuel_delivery_method") - - member Fuels: FreebaseDataProvider+ServiceTypes+Automotive+Automotive+FuelDataCollection with get - this.GetObjectsOfTypeId("/automotive/fuel") - - member ``Manufacturing Plants``: FreebaseDataProvider+ServiceTypes+Automotive+Automotive+Manufacturing_plantDataCollection with get - this.GetObjectsOfTypeId("/automotive/manufacturing_plant") - - member ``Option Packages``: FreebaseDataProvider+ServiceTypes+Automotive+Automotive+Option_packageDataCollection with get - this.GetObjectsOfTypeId("/automotive/option_package") - - member Options: FreebaseDataProvider+ServiceTypes+Automotive+Automotive+OptionDataCollection with get - this.GetObjectsOfTypeId("/automotive/option") - - member Platforms: FreebaseDataProvider+ServiceTypes+Automotive+Automotive+PlatformDataCollection with get - this.GetObjectsOfTypeId("/automotive/platform") - - member ``Privately Owned Vehicles``: FreebaseDataProvider+ServiceTypes+Automotive+Automotive+Privately_owned_vehicleDataCollection with get - this.GetObjectsOfTypeId("/automotive/privately_owned_vehicle") - - member ``Transmission Classifications``: FreebaseDataProvider+ServiceTypes+Automotive+Automotive+Transmission_typeDataCollection with get - this.GetObjectsOfTypeId("/automotive/transmission_type") - - member Transmissions: FreebaseDataProvider+ServiceTypes+Automotive+Automotive+TransmissionDataCollection with get - this.GetObjectsOfTypeId("/automotive/transmission") - - member ``Trim Levels``: FreebaseDataProvider+ServiceTypes+Automotive+Automotive+Trim_levelDataCollection with get - this.GetObjectsOfTypeId("/automotive/trim_level") - - member ``Truck Trim Levels``: FreebaseDataProvider+ServiceTypes+Automotive+Automotive+Truck_trim_levelDataCollection with get - this.GetObjectsOfTypeId("/automotive/truck_trim_level") - - -class FreebaseDataProvider+ServiceTypes+DomainObjects+AviationDomain : FDR.Freebase.FreebaseDomain - member Aircraft: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+AircraftDataCollection with get - this.GetObjectsOfTypeId("/aviation/aircraft") - - member ``Aircraft Engine Types``: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+Aircraft_engine_typeDataCollection with get - this.GetObjectsOfTypeId("/aviation/aircraft_engine_type") - - member ``Aircraft Lines``: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+Aircraft_lineDataCollection with get - this.GetObjectsOfTypeId("/aviation/aircraft_line") - - member ``Aircraft Owners``: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+Aircraft_ownerDataCollection with get - this.GetObjectsOfTypeId("/aviation/aircraft_owner") - - member ``Aircraft accident types``: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+Accident_typeDataCollection with get - this.GetObjectsOfTypeId("/aviation/accident_type") - - member ``Aircraft designers``: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+Aircraft_designerDataCollection with get - this.GetObjectsOfTypeId("/aviation/aircraft_designer") - - member ``Aircraft manufacturers``: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+Aircraft_manufacturerDataCollection with get - this.GetObjectsOfTypeId("/aviation/aircraft_manufacturer") - - member ``Aircraft models``: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+Aircraft_modelDataCollection with get - this.GetObjectsOfTypeId("/aviation/aircraft_model") - - member ``Aircraft types``: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+Aircraft_typeDataCollection with get - this.GetObjectsOfTypeId("/aviation/aircraft_type") - - member ``Airline alliances``: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+Airline_allianceDataCollection with get - this.GetObjectsOfTypeId("/aviation/airline_alliance") - - member Airlines: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+AirlineDataCollection with get - this.GetObjectsOfTypeId("/aviation/airline") - - member ``Airport operators``: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+Airport_operatorDataCollection with get - this.GetObjectsOfTypeId("/aviation/airport_operator") - - member ``Airport runway surfaces``: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+Airport_runway_surfaceDataCollection with get - this.GetObjectsOfTypeId("/aviation/airport_runway_surface") - - member ``Airport terminals``: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+Airport_terminalDataCollection with get - this.GetObjectsOfTypeId("/aviation/airport_terminal") - - member ``Airport types``: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+Airport_typeDataCollection with get - this.GetObjectsOfTypeId("/aviation/airport_type") - - member Airports: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+AirportDataCollection with get - this.GetObjectsOfTypeId("/aviation/airport") - - member ``Aviation incidents``: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+Airliner_accidentDataCollection with get - this.GetObjectsOfTypeId("/aviation/airliner_accident") - - member ``Aviation waypoints``: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+Aviation_waypointDataCollection with get - this.GetObjectsOfTypeId("/aviation/aviation_waypoint") - - member ``IATA airline designators``: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+Iata_airline_designatorDataCollection with get - this.GetObjectsOfTypeId("/aviation/iata_airline_designator") - - member ``ICAO airline designators``: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+Icao_airline_designatorDataCollection with get - this.GetObjectsOfTypeId("/aviation/icao_airline_designator") - - member ``Waypoint types``: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+Waypoint_typeDataCollection with get - this.GetObjectsOfTypeId("/aviation/waypoint_type") - - -class FreebaseDataProvider+ServiceTypes+DomainObjects+AwardsDomain : FDR.Freebase.FreebaseDomain - member ``Award Judges``: FreebaseDataProvider+ServiceTypes+Award+Award+Award_judgeDataCollection with get - this.GetObjectsOfTypeId("/award/award_judge") - - member ``Award Nominees``: FreebaseDataProvider+ServiceTypes+Award+Award+Award_nomineeDataCollection with get - this.GetObjectsOfTypeId("/award/award_nominee") - - member ``Award Presenting Organizations``: FreebaseDataProvider+ServiceTypes+Award+Award+Award_presenting_organizationDataCollection with get - this.GetObjectsOfTypeId("/award/award_presenting_organization") - - member ``Award Winners``: FreebaseDataProvider+ServiceTypes+Award+Award+Award_winnerDataCollection with get - this.GetObjectsOfTypeId("/award/award_winner") - - member ``Award achievement levels``: FreebaseDataProvider+ServiceTypes+Award+Award+Award_achievement_levelDataCollection with get - this.GetObjectsOfTypeId("/award/award_achievement_level") - - member ``Award announcements``: FreebaseDataProvider+ServiceTypes+Award+Award+Award_announcementDataCollection with get - this.GetObjectsOfTypeId("/award/award_announcement") - - member ``Award categories``: FreebaseDataProvider+ServiceTypes+Award+Award+Award_categoryDataCollection with get - this.GetObjectsOfTypeId("/award/award_category") - - member ``Award ceremonies``: FreebaseDataProvider+ServiceTypes+Award+Award+Award_ceremonyDataCollection with get - this.GetObjectsOfTypeId("/award/award_ceremony") - - member ``Award disciplines``: FreebaseDataProvider+ServiceTypes+Award+Award+Award_disciplineDataCollection with get - this.GetObjectsOfTypeId("/award/award_discipline") - - member ``Award nomination announcements``: FreebaseDataProvider+ServiceTypes+Award+Award+Award_nomination_announcementDataCollection with get - this.GetObjectsOfTypeId("/award/award_nomination_announcement") - - member ``Award-Nominated Works``: FreebaseDataProvider+ServiceTypes+Award+Award+Award_nominated_workDataCollection with get - this.GetObjectsOfTypeId("/award/award_nominated_work") - - member ``Award-Winning Works``: FreebaseDataProvider+ServiceTypes+Award+Award+Award_winning_workDataCollection with get - this.GetObjectsOfTypeId("/award/award_winning_work") - - member Awards: FreebaseDataProvider+ServiceTypes+Award+Award+AwardDataCollection with get - this.GetObjectsOfTypeId("/award/award") - - member ``Competition types``: FreebaseDataProvider+ServiceTypes+Award+Award+Competition_typeDataCollection with get - this.GetObjectsOfTypeId("/award/competition_type") - - member Competitions: FreebaseDataProvider+ServiceTypes+Award+Award+CompetitionDataCollection with get - this.GetObjectsOfTypeId("/award/competition") - - member Competitors: FreebaseDataProvider+ServiceTypes+Award+Award+CompetitorDataCollection with get - this.GetObjectsOfTypeId("/award/competitor") - - member ``Hall of fame disciplines``: FreebaseDataProvider+ServiceTypes+Award+Award+Hall_of_fame_disciplineDataCollection with get - this.GetObjectsOfTypeId("/award/hall_of_fame_discipline") - - member ``Hall of fame inductees``: FreebaseDataProvider+ServiceTypes+Award+Award+Hall_of_fame_inducteeDataCollection with get - this.GetObjectsOfTypeId("/award/hall_of_fame_inductee") - - member ``Hall of fame induction categories``: FreebaseDataProvider+ServiceTypes+Award+Award+Hall_of_fame_induction_categoryDataCollection with get - this.GetObjectsOfTypeId("/award/hall_of_fame_induction_category") - - member ``Hall of fames``: FreebaseDataProvider+ServiceTypes+Award+Award+Hall_of_fameDataCollection with get - this.GetObjectsOfTypeId("/award/hall_of_fame") - - member ``Long-list nominees``: FreebaseDataProvider+ServiceTypes+Award+Award+Long_list_nomineeDataCollection with get - this.GetObjectsOfTypeId("/award/long_list_nominee") - - member ``Long-listed works``: FreebaseDataProvider+ServiceTypes+Award+Award+Long_listed_workDataCollection with get - this.GetObjectsOfTypeId("/award/long_listed_work") - - member ``Ranked items``: FreebaseDataProvider+ServiceTypes+Award+Award+Ranked_itemDataCollection with get - this.GetObjectsOfTypeId("/award/ranked_item") - - member ``Ranked list compilers``: FreebaseDataProvider+ServiceTypes+Award+Award+Ranked_list_compilerDataCollection with get - this.GetObjectsOfTypeId("/award/ranked_list_compiler") - - member ``Ranked lists``: FreebaseDataProvider+ServiceTypes+Award+Award+Ranked_listDataCollection with get - this.GetObjectsOfTypeId("/award/ranked_list") - - member ``Recurring award ceremonies``: FreebaseDataProvider+ServiceTypes+Award+Award+Recurring_award_ceremonyDataCollection with get - this.GetObjectsOfTypeId("/award/recurring_award_ceremony") - - member ``Recurring competitions``: FreebaseDataProvider+ServiceTypes+Award+Award+Recurring_competitionDataCollection with get - this.GetObjectsOfTypeId("/award/recurring_competition") - - -class FreebaseDataProvider+ServiceTypes+DomainObjects+BaseballDomain : FDR.Freebase.FreebaseDomain - member ``Baseball Coaches``: FreebaseDataProvider+ServiceTypes+Baseball+Baseball+Baseball_coachDataCollection with get - this.GetObjectsOfTypeId("/baseball/baseball_coach") - - member ``Baseball Coaching Positions``: FreebaseDataProvider+ServiceTypes+Baseball+Baseball+Baseball_coaching_positionDataCollection with get - this.GetObjectsOfTypeId("/baseball/baseball_coaching_position") - - member ``Baseball Divisions``: FreebaseDataProvider+ServiceTypes+Baseball+Baseball+Baseball_divisionDataCollection with get - this.GetObjectsOfTypeId("/baseball/baseball_division") - - member ``Baseball Leagues``: FreebaseDataProvider+ServiceTypes+Baseball+Baseball+Baseball_leagueDataCollection with get - this.GetObjectsOfTypeId("/baseball/baseball_league") - - member ``Baseball Managers``: FreebaseDataProvider+ServiceTypes+Baseball+Baseball+Baseball_managerDataCollection with get - this.GetObjectsOfTypeId("/baseball/baseball_manager") - - member ``Baseball Players``: FreebaseDataProvider+ServiceTypes+Baseball+Baseball+Baseball_playerDataCollection with get - this.GetObjectsOfTypeId("/baseball/baseball_player") - - member ``Baseball Positions``: FreebaseDataProvider+ServiceTypes+Baseball+Baseball+Baseball_positionDataCollection with get - this.GetObjectsOfTypeId("/baseball/baseball_position") - - member ``Baseball Teams``: FreebaseDataProvider+ServiceTypes+Baseball+Baseball+Baseball_teamDataCollection with get - this.GetObjectsOfTypeId("/baseball/baseball_team") - - -class FreebaseDataProvider+ServiceTypes+DomainObjects+BasketballDomain : FDR.Freebase.FreebaseDomain - member ``Basketball Coaches``: FreebaseDataProvider+ServiceTypes+Basketball+Basketball+Basketball_coachDataCollection with get - this.GetObjectsOfTypeId("/basketball/basketball_coach") - - member ``Basketball Conferences``: FreebaseDataProvider+ServiceTypes+Basketball+Basketball+Basketball_conferenceDataCollection with get - this.GetObjectsOfTypeId("/basketball/basketball_conference") - - member ``Basketball Divisions``: FreebaseDataProvider+ServiceTypes+Basketball+Basketball+Basketball_divisionDataCollection with get - this.GetObjectsOfTypeId("/basketball/basketball_division") - - member ``Basketball Players``: FreebaseDataProvider+ServiceTypes+Basketball+Basketball+Basketball_playerDataCollection with get - this.GetObjectsOfTypeId("/basketball/basketball_player") - - member ``Basketball Positions``: FreebaseDataProvider+ServiceTypes+Basketball+Basketball+Basketball_positionDataCollection with get - this.GetObjectsOfTypeId("/basketball/basketball_position") - - member ``Basketball Teams``: FreebaseDataProvider+ServiceTypes+Basketball+Basketball+Basketball_teamDataCollection with get - this.GetObjectsOfTypeId("/basketball/basketball_team") - - -class FreebaseDataProvider+ServiceTypes+DomainObjects+BicyclesDomain : FDR.Freebase.FreebaseDomain - member ``Bicycle manufacturers``: FreebaseDataProvider+ServiceTypes+Bicycles+Bicycles+Bicycle_manufacturerDataCollection with get - this.GetObjectsOfTypeId("/bicycles/bicycle_manufacturer") - - member ``Bicycle models``: FreebaseDataProvider+ServiceTypes+Bicycles+Bicycles+Bicycle_modelDataCollection with get - this.GetObjectsOfTypeId("/bicycles/bicycle_model") - - member ``Bicycle types``: FreebaseDataProvider+ServiceTypes+Bicycles+Bicycles+Bicycle_typeDataCollection with get - this.GetObjectsOfTypeId("/bicycles/bicycle_type") - - -class FreebaseDataProvider+ServiceTypes+Aviation+Aviation+Accident_typeDataCollection - member Individuals: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+Accident_typeDataIndividuals with get - FreebaseIndividuals._GetIndividualsObject((this :> obj)) - - member Individuals10: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+Accident_typeDataIndividuals10 with get - FreebaseIndividuals._GetIndividualsObject((this :> obj)) - - member Individuals100: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+Accident_typeDataIndividuals100 with get - FreebaseIndividuals._GetIndividualsObject((this :> obj)) - - member IndividualsAZ: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+Accident_typeDataIndividualsAZ with get - FreebaseIndividuals._GetIndividualsObject((this :> obj)) - - -class FreebaseDataProvider+ServiceTypes+Aviation+Aviation+AircraftDataCollection - member Individuals: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+AircraftDataIndividuals with get - FreebaseIndividuals._GetIndividualsObject((this :> obj)) - - member Individuals10: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+AircraftDataIndividuals10 with get - FreebaseIndividuals._GetIndividualsObject((this :> obj)) - - member Individuals100: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+AircraftDataIndividuals100 with get - FreebaseIndividuals._GetIndividualsObject((this :> obj)) - - member IndividualsAZ: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+AircraftDataIndividualsAZ with get - FreebaseIndividuals._GetIndividualsObject((this :> obj)) - - -class FreebaseDataProvider+ServiceTypes+Aviation+Aviation+Aircraft_designerDataCollection - member Individuals: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+Aircraft_designerDataIndividuals with get - FreebaseIndividuals._GetIndividualsObject((this :> obj)) - - member Individuals10: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+Aircraft_designerDataIndividuals10 with get - FreebaseIndividuals._GetIndividualsObject((this :> obj)) - - member Individuals100: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+Aircraft_designerDataIndividuals100 with get - FreebaseIndividuals._GetIndividualsObject((this :> obj)) - - member IndividualsAZ: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+Aircraft_designerDataIndividualsAZ with get - FreebaseIndividuals._GetIndividualsObject((this :> obj)) - - -class FreebaseDataProvider+ServiceTypes+Aviation+Aviation+Aircraft_engine_typeDataCollection - member Individuals: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+Aircraft_engine_typeDataIndividuals with get - FreebaseIndividuals._GetIndividualsObject((this :> obj)) - - member Individuals10: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+Aircraft_engine_typeDataIndividuals10 with get - FreebaseIndividuals._GetIndividualsObject((this :> obj)) - - member Individuals100: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+Aircraft_engine_typeDataIndividuals100 with get - FreebaseIndividuals._GetIndividualsObject((this :> obj)) - - member IndividualsAZ: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+Aircraft_engine_typeDataIndividualsAZ with get - FreebaseIndividuals._GetIndividualsObject((this :> obj)) - - -class FreebaseDataProvider+ServiceTypes+Aviation+Aviation+Aircraft_lineDataCollection - member Individuals: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+Aircraft_lineDataIndividuals with get - FreebaseIndividuals._GetIndividualsObject((this :> obj)) - - member Individuals10: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+Aircraft_lineDataIndividuals10 with get - FreebaseIndividuals._GetIndividualsObject((this :> obj)) - - member Individuals100: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+Aircraft_lineDataIndividuals100 with get - FreebaseIndividuals._GetIndividualsObject((this :> obj)) - - member IndividualsAZ: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+Aircraft_lineDataIndividualsAZ with get - FreebaseIndividuals._GetIndividualsObject((this :> obj)) - - -class FreebaseDataProvider+ServiceTypes+Aviation+Aviation+Aircraft_manufacturerDataCollection - member Individuals: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+Aircraft_manufacturerDataIndividuals with get - FreebaseIndividuals._GetIndividualsObject((this :> obj)) - - member Individuals10: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+Aircraft_manufacturerDataIndividuals10 with get - FreebaseIndividuals._GetIndividualsObject((this :> obj)) - - member Individuals100: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+Aircraft_manufacturerDataIndividuals100 with get - FreebaseIndividuals._GetIndividualsObject((this :> obj)) - - member IndividualsAZ: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+Aircraft_manufacturerDataIndividualsAZ with get - FreebaseIndividuals._GetIndividualsObject((this :> obj)) - - -class FreebaseDataProvider+ServiceTypes+Aviation+Aviation+Aircraft_modelDataCollection - member Individuals: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+Aircraft_modelDataIndividuals with get - FreebaseIndividuals._GetIndividualsObject((this :> obj)) - - member Individuals10: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+Aircraft_modelDataIndividuals10 with get - FreebaseIndividuals._GetIndividualsObject((this :> obj)) - - member Individuals100: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+Aircraft_modelDataIndividuals100 with get - FreebaseIndividuals._GetIndividualsObject((this :> obj)) - - member IndividualsAZ: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+Aircraft_modelDataIndividualsAZ with get - FreebaseIndividuals._GetIndividualsObject((this :> obj)) - - -class FreebaseDataProvider+ServiceTypes+Aviation+Aviation+Aircraft_ownerDataCollection - member Individuals: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+Aircraft_ownerDataIndividuals with get - FreebaseIndividuals._GetIndividualsObject((this :> obj)) - - member Individuals10: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+Aircraft_ownerDataIndividuals10 with get - FreebaseIndividuals._GetIndividualsObject((this :> obj)) - - member Individuals100: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+Aircraft_ownerDataIndividuals100 with get - FreebaseIndividuals._GetIndividualsObject((this :> obj)) - - member IndividualsAZ: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+Aircraft_ownerDataIndividualsAZ with get - FreebaseIndividuals._GetIndividualsObject((this :> obj)) - - -class FreebaseDataProvider+ServiceTypes+Aviation+Aviation+Aircraft_typeDataCollection - member Individuals: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+Aircraft_typeDataIndividuals with get - FreebaseIndividuals._GetIndividualsObject((this :> obj)) - - member Individuals10: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+Aircraft_typeDataIndividuals10 with get - FreebaseIndividuals._GetIndividualsObject((this :> obj)) - - member Individuals100: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+Aircraft_typeDataIndividuals100 with get - FreebaseIndividuals._GetIndividualsObject((this :> obj)) - - member IndividualsAZ: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+Aircraft_typeDataIndividualsAZ with get - FreebaseIndividuals._GetIndividualsObject((this :> obj)) - - -class FreebaseDataProvider+ServiceTypes+Aviation+Aviation+AirlineDataCollection - member Individuals: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+AirlineDataIndividuals with get - FreebaseIndividuals._GetIndividualsObject((this :> obj)) - - member Individuals10: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+AirlineDataIndividuals10 with get - FreebaseIndividuals._GetIndividualsObject((this :> obj)) - - member Individuals100: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+AirlineDataIndividuals100 with get - FreebaseIndividuals._GetIndividualsObject((this :> obj)) - - member IndividualsAZ: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+AirlineDataIndividualsAZ with get - FreebaseIndividuals._GetIndividualsObject((this :> obj)) - - -class FreebaseDataProvider+ServiceTypes+Aviation+Aviation+Accident_typeDataIndividuals : FDR.Freebase.FreebaseIndividuals - member ``Aircraft hijacking``: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+Accident_typeDataIndividuals+Aircraft hijacking Item with get - this.GetIndividualById("/aviation/accident_type", "/m/0wj1") - - member ``Aviation accident or incident``: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+Accident_typeDataIndividuals+Aviation accident or incident Item with get - this.GetIndividualById("/aviation/accident_type", "/m/015xf8") - - member Bomb: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+Accident_typeDataIndividuals+Bomb Item with get - this.GetIndividualById("/aviation/accident_type", "/m/0ct4f") - - member Fire: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+Accident_typeDataIndividuals+Fire Item with get - this.GetIndividualById("/aviation/accident_type", "/m/02_41") - - member Sabotage: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+Accident_typeDataIndividuals+Sabotage Item with get - this.GetIndividualById("/aviation/accident_type", "/m/0795q") - - -class FreebaseDataProvider+ServiceTypes+Aviation+Aviation+Accident_typeDataIndividuals10 : FDR.Freebase.FreebaseIndividuals - member ``Aircraft hijacking``: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+Accident_typeDataIndividuals10+Aircraft hijacking Item with get - this.GetIndividualById("/aviation/accident_type", "/m/0wj1") - - member ``Aircraft upset``: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+Accident_typeDataIndividuals10+Aircraft upset Item with get - this.GetIndividualById("/aviation/accident_type", "/m/0cb79t") - - member ``Atmospheric icing``: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+Accident_typeDataIndividuals10+Atmospheric icing Item with get - this.GetIndividualById("/aviation/accident_type", "/m/083d7q") - - member ``Aviation accident or incident``: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+Accident_typeDataIndividuals10+Aviation accident or incident Item with get - this.GetIndividualById("/aviation/accident_type", "/m/015xf8") - - member ``Bird strike``: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+Accident_typeDataIndividuals10+Bird strike Item with get - this.GetIndividualById("/aviation/accident_type", "/m/04gk6_") - - member Bomb: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+Accident_typeDataIndividuals10+Bomb Item with get - this.GetIndividualById("/aviation/accident_type", "/m/0ct4f") - - member ``Controlled flight into terrain``: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+Accident_typeDataIndividuals10+Controlled flight into terrain Item with get - this.GetIndividualById("/aviation/accident_type", "/m/02gt2p") - - member Fatigue: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+Accident_typeDataIndividuals10+Fatigue Item with get - this.GetIndividualById("/aviation/accident_type", "/m/01z0cf") - - member Fire: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+Accident_typeDataIndividuals10+Fire Item with get - this.GetIndividualById("/aviation/accident_type", "/m/02_41") - - member ``Fuel starvation``: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+Accident_typeDataIndividuals10+Fuel starvation Item with get - this.GetIndividualById("/aviation/accident_type", "/m/0g5xlr") - - member ``Improvised bombing``: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+Accident_typeDataIndividuals10+Improvised bombing Item with get - this.GetIndividualById("/aviation/accident_type", "/m/01n8xw") - - member Landing: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+Accident_typeDataIndividuals10+Landing Item with get - this.GetIndividualById("/aviation/accident_type", "/m/01hh79") - - member ``Mechanical failure``: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+Accident_typeDataIndividuals10+Mechanical failure Item with get - this.GetIndividualById("/aviation/accident_type", "/m/04zj7qs") - - member ``Mechanical overload``: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+Accident_typeDataIndividuals10+Mechanical overload Item with get - this.GetIndividualById("/aviation/accident_type", "/m/02qbwp_") - - member ``Mid-air collision``: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+Accident_typeDataIndividuals10+Mid-air collision Item with get - this.GetIndividualById("/aviation/accident_type", "/m/025y2y3") - - member ``Pilot error``: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+Accident_typeDataIndividuals10+Pilot error Item with get - this.GetIndividualById("/aviation/accident_type", "/m/0742yy") - - member ``Rejected takeoff``: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+Accident_typeDataIndividuals10+Rejected takeoff Item with get - this.GetIndividualById("/aviation/accident_type", "/m/0f3t9h") - - member ``Runway incursion``: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+Accident_typeDataIndividuals10+Runway incursion Item with get - this.GetIndividualById("/aviation/accident_type", "/m/02qp609") - - member ``Runway overrun``: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+Accident_typeDataIndividuals10+Runway overrun Item with get - this.GetIndividualById("/aviation/accident_type", "/m/049hhk0") - - member ``Runway undershoot``: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+Accident_typeDataIndividuals10+Runway undershoot Item with get - this.GetIndividualById("/aviation/accident_type", "/m/049hhk3") - - member Sabotage: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+Accident_typeDataIndividuals10+Sabotage Item with get - this.GetIndividualById("/aviation/accident_type", "/m/0795q") - - member ``Turbine engine failure``: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+Accident_typeDataIndividuals10+Turbine engine failure Item with get - this.GetIndividualById("/aviation/accident_type", "/m/02rpp7p") - - member ``Uncontrolled decompression``: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+Accident_typeDataIndividuals10+Uncontrolled decompression Item with get - this.GetIndividualById("/aviation/accident_type", "/m/04g6p2") - - member ``Water landing``: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+Accident_typeDataIndividuals10+Water landing Item with get - this.GetIndividualById("/aviation/accident_type", "/m/0czb9f") - - member ``Wind shear``: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+Accident_typeDataIndividuals10+Wind shear Item with get - this.GetIndividualById("/aviation/accident_type", "/m/01gmh2") - - -class FreebaseDataProvider+ServiceTypes+Aviation+Aviation+Accident_typeDataIndividuals100 : FDR.Freebase.FreebaseIndividuals - member ``Aircraft hijacking``: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+Accident_typeDataIndividuals100+Aircraft hijacking Item with get - this.GetIndividualById("/aviation/accident_type", "/m/0wj1") - - member ``Aircraft upset``: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+Accident_typeDataIndividuals100+Aircraft upset Item with get - this.GetIndividualById("/aviation/accident_type", "/m/0cb79t") - - member ``Atmospheric icing``: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+Accident_typeDataIndividuals100+Atmospheric icing Item with get - this.GetIndividualById("/aviation/accident_type", "/m/083d7q") - - member ``Aviation accident or incident``: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+Accident_typeDataIndividuals100+Aviation accident or incident Item with get - this.GetIndividualById("/aviation/accident_type", "/m/015xf8") - - member ``Bird strike``: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+Accident_typeDataIndividuals100+Bird strike Item with get - this.GetIndividualById("/aviation/accident_type", "/m/04gk6_") - - member Bomb: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+Accident_typeDataIndividuals100+Bomb Item with get - this.GetIndividualById("/aviation/accident_type", "/m/0ct4f") - - member ``Controlled flight into terrain``: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+Accident_typeDataIndividuals100+Controlled flight into terrain Item with get - this.GetIndividualById("/aviation/accident_type", "/m/02gt2p") - - member Fatigue: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+Accident_typeDataIndividuals100+Fatigue Item with get - this.GetIndividualById("/aviation/accident_type", "/m/01z0cf") - - member Fire: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+Accident_typeDataIndividuals100+Fire Item with get - this.GetIndividualById("/aviation/accident_type", "/m/02_41") - - member ``Fuel starvation``: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+Accident_typeDataIndividuals100+Fuel starvation Item with get - this.GetIndividualById("/aviation/accident_type", "/m/0g5xlr") - - member ``Improvised bombing``: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+Accident_typeDataIndividuals100+Improvised bombing Item with get - this.GetIndividualById("/aviation/accident_type", "/m/01n8xw") - - member Landing: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+Accident_typeDataIndividuals100+Landing Item with get - this.GetIndividualById("/aviation/accident_type", "/m/01hh79") - - member ``Mechanical failure``: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+Accident_typeDataIndividuals100+Mechanical failure Item with get - this.GetIndividualById("/aviation/accident_type", "/m/04zj7qs") - - member ``Mechanical overload``: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+Accident_typeDataIndividuals100+Mechanical overload Item with get - this.GetIndividualById("/aviation/accident_type", "/m/02qbwp_") - - member ``Mid-air collision``: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+Accident_typeDataIndividuals100+Mid-air collision Item with get - this.GetIndividualById("/aviation/accident_type", "/m/025y2y3") - - member ``Pilot error``: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+Accident_typeDataIndividuals100+Pilot error Item with get - this.GetIndividualById("/aviation/accident_type", "/m/0742yy") - - member ``Rejected takeoff``: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+Accident_typeDataIndividuals100+Rejected takeoff Item with get - this.GetIndividualById("/aviation/accident_type", "/m/0f3t9h") - - member ``Runway incursion``: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+Accident_typeDataIndividuals100+Runway incursion Item with get - this.GetIndividualById("/aviation/accident_type", "/m/02qp609") - - member ``Runway overrun``: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+Accident_typeDataIndividuals100+Runway overrun Item with get - this.GetIndividualById("/aviation/accident_type", "/m/049hhk0") - - member ``Runway undershoot``: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+Accident_typeDataIndividuals100+Runway undershoot Item with get - this.GetIndividualById("/aviation/accident_type", "/m/049hhk3") - - member Sabotage: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+Accident_typeDataIndividuals100+Sabotage Item with get - this.GetIndividualById("/aviation/accident_type", "/m/0795q") - - member ``Turbine engine failure``: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+Accident_typeDataIndividuals100+Turbine engine failure Item with get - this.GetIndividualById("/aviation/accident_type", "/m/02rpp7p") - - member ``Uncontrolled decompression``: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+Accident_typeDataIndividuals100+Uncontrolled decompression Item with get - this.GetIndividualById("/aviation/accident_type", "/m/04g6p2") - - member ``Water landing``: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+Accident_typeDataIndividuals100+Water landing Item with get - this.GetIndividualById("/aviation/accident_type", "/m/0czb9f") - - member ``Wind shear``: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+Accident_typeDataIndividuals100+Wind shear Item with get - this.GetIndividualById("/aviation/accident_type", "/m/01gmh2") - - -class FreebaseDataProvider+ServiceTypes+Aviation+Aviation+Accident_typeDataIndividualsAZ : FDR.Freebase.FreebaseIndividuals - member A: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+Accident_typeDataIndividualsAZ+Accident_typeDataIndividualsIndexedA with get - this - - member B: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+Accident_typeDataIndividualsAZ+Accident_typeDataIndividualsIndexedB with get - this - - member C: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+Accident_typeDataIndividualsAZ+Accident_typeDataIndividualsIndexedC with get - this - - member D: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+Accident_typeDataIndividualsAZ+Accident_typeDataIndividualsIndexedD with get - this - - member E: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+Accident_typeDataIndividualsAZ+Accident_typeDataIndividualsIndexedE with get - this - - member F: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+Accident_typeDataIndividualsAZ+Accident_typeDataIndividualsIndexedF with get - this - - member G: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+Accident_typeDataIndividualsAZ+Accident_typeDataIndividualsIndexedG with get - this - - member H: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+Accident_typeDataIndividualsAZ+Accident_typeDataIndividualsIndexedH with get - this - - member I: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+Accident_typeDataIndividualsAZ+Accident_typeDataIndividualsIndexedI with get - this - - member J: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+Accident_typeDataIndividualsAZ+Accident_typeDataIndividualsIndexedJ with get - this - - member K: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+Accident_typeDataIndividualsAZ+Accident_typeDataIndividualsIndexedK with get - this - - member L: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+Accident_typeDataIndividualsAZ+Accident_typeDataIndividualsIndexedL with get - this - - member M: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+Accident_typeDataIndividualsAZ+Accident_typeDataIndividualsIndexedM with get - this - - member N: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+Accident_typeDataIndividualsAZ+Accident_typeDataIndividualsIndexedN with get - this - - member O: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+Accident_typeDataIndividualsAZ+Accident_typeDataIndividualsIndexedO with get - this - - member P: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+Accident_typeDataIndividualsAZ+Accident_typeDataIndividualsIndexedP with get - this - - member Q: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+Accident_typeDataIndividualsAZ+Accident_typeDataIndividualsIndexedQ with get - this - - member R: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+Accident_typeDataIndividualsAZ+Accident_typeDataIndividualsIndexedR with get - this - - member S: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+Accident_typeDataIndividualsAZ+Accident_typeDataIndividualsIndexedS with get - this - - member T: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+Accident_typeDataIndividualsAZ+Accident_typeDataIndividualsIndexedT with get - this - - member U: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+Accident_typeDataIndividualsAZ+Accident_typeDataIndividualsIndexedU with get - this - - member V: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+Accident_typeDataIndividualsAZ+Accident_typeDataIndividualsIndexedV with get - this - - member W: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+Accident_typeDataIndividualsAZ+Accident_typeDataIndividualsIndexedW with get - this - - member X: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+Accident_typeDataIndividualsAZ+Accident_typeDataIndividualsIndexedX with get - this - - member Y: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+Accident_typeDataIndividualsAZ+Accident_typeDataIndividualsIndexedY with get - this - - member Z: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+Accident_typeDataIndividualsAZ+Accident_typeDataIndividualsIndexedZ with get - this - - -class FreebaseDataProvider+ServiceTypes+Aviation+Aviation+AircraftDataIndividuals : FDR.Freebase.FreebaseIndividuals - member Autogyro: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+AircraftDataIndividuals+Autogyro Item with get - this.GetIndividualById("/aviation/aircraft", "/m/0gy9p") - - member Bockscar: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+AircraftDataIndividuals+Bockscar Item with get - this.GetIndividualById("/aviation/aircraft", "/m/018sk0") - - member ``Enola Gay``: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+AircraftDataIndividuals+Enola Gay Item with get - this.GetIndividualById("/aviation/aircraft", "/m/02m5s") - - member ``LZ 129 Hindenburg``: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+AircraftDataIndividuals+LZ 129 Hindenburg Item with get - this.GetIndividualById("/aviation/aircraft", "/m/0fbt7") - - member ``QinetiQ 1``: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+AircraftDataIndividuals+QinetiQ 1 Item with get - this.GetIndividualById("/aviation/aircraft", "/m/01n6mw") - - -class FreebaseDataProvider+ServiceTypes+Aviation+Aviation+AircraftDataIndividuals10 : FDR.Freebase.FreebaseIndividuals - member ``1942 KNILM Douglas DC-3 shootdown``: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+AircraftDataIndividuals10+1942 KNILM Douglas DC-3 shootdown Item with get - this.GetIndividualById("/aviation/aircraft", "/m/0dvf3h") - - member ``2006 Mexico DC-9 drug bust``: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+AircraftDataIndividuals10+2006 Mexico DC-9 drug bust Item with get - this.GetIndividualById("/aviation/aircraft", "/m/0cp7gx") - - member America: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+AircraftDataIndividuals10+America Item with get - this.GetIndividualById("/aviation/aircraft", "/m/08l9v3") - - member Autogyro: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+AircraftDataIndividuals10+Autogyro Item with get - this.GetIndividualById("/aviation/aircraft", "/m/0gy9p") - - member ``Balls 8``: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+AircraftDataIndividuals10+Balls 8 Item with get - this.GetIndividualById("/aviation/aircraft", "/m/0h49x2") - - member ``Big Stink``: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+AircraftDataIndividuals10+Big Stink Item with get - this.GetIndividualById("/aviation/aircraft", "/m/0fr9pk") - - member Bockscar: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+AircraftDataIndividuals10+Bockscar Item with get - this.GetIndividualById("/aviation/aircraft", "/m/018sk0") - - member ``Breitling Orbiter 3``: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+AircraftDataIndividuals10+Breitling Orbiter 3 Item with get - this.GetIndividualById("/aviation/aircraft", "/m/09kr0z") - - member ``China Clipper``: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+AircraftDataIndividuals10+China Clipper Item with get - this.GetIndividualById("/aviation/aircraft", "/m/0211c8") - - member ``Curtiss NC-4``: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+AircraftDataIndividuals10+Curtiss NC-4 Item with get - this.GetIndividualById("/aviation/aircraft", "/m/022yqs") - - member ``Double Eagle II``: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+AircraftDataIndividuals10+Double Eagle II Item with get - this.GetIndividualById("/aviation/aircraft", "/m/05nyts") - - member ``Double Eagle V``: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+AircraftDataIndividuals10+Double Eagle V Item with get - this.GetIndividualById("/aviation/aircraft", "/m/02695pv") - - member ``Enola Gay``: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+AircraftDataIndividuals10+Enola Gay Item with get - this.GetIndividualById("/aviation/aircraft", "/m/02m5s") - - member ``Finito Benito Next Hirohito``: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+AircraftDataIndividuals10+Finito Benito Next Hirohito Item with get - this.GetIndividualById("/aviation/aircraft", "/m/0bmkhh") - - member ``Flak Bait``: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+AircraftDataIndividuals10+Flak Bait Item with get - this.GetIndividualById("/aviation/aircraft", "/m/0g5m2f") - - member ``Full House``: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+AircraftDataIndividuals10+Full House Item with get - this.GetIndividualById("/aviation/aircraft", "/m/0fr8hx") - - member ``G for George``: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+AircraftDataIndividuals10+G for George Item with get - this.GetIndividualById("/aviation/aircraft", "/m/03x477") - - member G-BBDG: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+AircraftDataIndividuals10+G-BBDG Item with get - this.GetIndividualById("/aviation/aircraft", "/m/06s12z") - - member ``Gossamer Condor``: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+AircraftDataIndividuals10+Gossamer Condor Item with get - this.GetIndividualById("/aviation/aircraft", "/m/02wlc4") - - member ``Jabit III``: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+AircraftDataIndividuals10+Jabit III Item with get - this.GetIndividualById("/aviation/aircraft", "/m/0fr8nd") - - member Kamikaze: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+AircraftDataIndividuals10+Kamikaze Item with get - this.GetIndividualById("/aviation/aircraft", "/m/0by2wq") - - member ``LZ 129 Hindenburg``: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+AircraftDataIndividuals10+LZ 129 Hindenburg Item with get - this.GetIndividualById("/aviation/aircraft", "/m/0fbt7") - - member ``Lady Be Good``: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+AircraftDataIndividuals10+Lady Be Good Item with get - this.GetIndividualById("/aviation/aircraft", "/m/097ply") - - member ``Laggin' Dragon``: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+AircraftDataIndividuals10+Laggin' Dragon Item with get - this.GetIndividualById("/aviation/aircraft", "/m/0fr9h9") - - member ``Liberty Belle``: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+AircraftDataIndividuals10+Liberty Belle Item with get - this.GetIndividualById("/aviation/aircraft", "/m/0cdl99") - - member Lituanica: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+AircraftDataIndividuals10+Lituanica Item with get - this.GetIndividualById("/aviation/aircraft", "/m/03k91m") - - member ``Lonesome Polecat II``: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+AircraftDataIndividuals10+Lonesome Polecat II Item with get - this.GetIndividualById("/aviation/aircraft", "/m/0czz9f") - - member ``Memphis Belle``: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+AircraftDataIndividuals10+Memphis Belle Item with get - this.GetIndividualById("/aviation/aircraft", "/m/0ch_5c") - - member ``Necessary Evil``: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+AircraftDataIndividuals10+Necessary Evil Item with get - this.GetIndividualById("/aviation/aircraft", "/m/0fr93y") - - member Norge: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+AircraftDataIndividuals10+Norge Item with get - this.GetIndividualById("/aviation/aircraft", "/m/04h3fm") - - member ``Pratt & Whitney R-2800 Double Wasp``: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+AircraftDataIndividuals10+Pratt & Whitney R-2800 Double Wasp Item with get - this.GetIndividualById("/aviation/aircraft", "/m/031rz5") - - member ``QinetiQ 1``: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+AircraftDataIndividuals10+QinetiQ 1 Item with get - this.GetIndividualById("/aviation/aircraft", "/m/01n6mw") - - member R101: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+AircraftDataIndividuals10+R101 Item with get - this.GetIndividualById("/aviation/aircraft", "/m/01rnwx") - - member ``Rare Bear``: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+AircraftDataIndividuals10+Rare Bear Item with get - this.GetIndividualById("/aviation/aircraft", "/m/0gp28q") - - member ``Rendition aircraft``: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+AircraftDataIndividuals10+Rendition aircraft Item with get - this.GetIndividualById("/aviation/aircraft", "/m/04gx31") - - member ``Samoan Clipper``: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+AircraftDataIndividuals10+Samoan Clipper Item with get - this.GetIndividualById("/aviation/aircraft", "/m/03tm1n") - - member ``Santos-Dumont number 6``: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+AircraftDataIndividuals10+Santos-Dumont number 6 Item with get - this.GetIndividualById("/aviation/aircraft", "/m/0bsbnz") - - member ``Scaled Composites ATTT``: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+AircraftDataIndividuals10+Scaled Composites ATTT Item with get - this.GetIndividualById("/aviation/aircraft", "/m/0dyrvm") - - member ``Some Punkins``: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+AircraftDataIndividuals10+Some Punkins Item with get - this.GetIndividualById("/aviation/aircraft", "/m/0fyg0t") - - member ``Southern Cross``: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+AircraftDataIndividuals10+Southern Cross Item with get - this.GetIndividualById("/aviation/aircraft", "/m/07wkbt") - - member ``Spirit of St. Louis``: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+AircraftDataIndividuals10+Spirit of St. Louis Item with get - this.GetIndividualById("/aviation/aircraft", "/m/01_6sf") - - member ``Straight Flush``: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+AircraftDataIndividuals10+Straight Flush Item with get - this.GetIndividualById("/aviation/aircraft", "/m/0923kv") - - member T1-323: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+AircraftDataIndividuals10+T1-323 Item with get - this.GetIndividualById("/aviation/aircraft", "/m/08dj4x") - - member ``The Great Artiste``: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+AircraftDataIndividuals10+The Great Artiste Item with get - this.GetIndividualById("/aviation/aircraft", "/m/01r3mq") - - member ``The Pink Lady``: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+AircraftDataIndividuals10+The Pink Lady Item with get - this.GetIndividualById("/aviation/aircraft", "/m/0gn53z") - - member ``The Starship``: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+AircraftDataIndividuals10+The Starship Item with get - this.GetIndividualById("/aviation/aircraft", "/m/0dlpw3") - - member Tingmissartoq: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+AircraftDataIndividuals10+Tingmissartoq Item with get - this.GetIndividualById("/aviation/aircraft", "/m/0269dsf") - - member ``Up An' Atom``: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+AircraftDataIndividuals10+Up An' Atom Item with get - this.GetIndividualById("/aviation/aircraft", "/m/0fr9c5") - - member ``VSS Enterprise``: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+AircraftDataIndividuals10+VSS Enterprise Item with get - this.GetIndividualById("/aviation/aircraft", "/m/025rr06") - - member ``Vin Fiz Flyer``: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+AircraftDataIndividuals10+Vin Fiz Flyer Item with get - this.GetIndividualById("/aviation/aircraft", "/m/026lt_") - - -class FreebaseDataProvider+ServiceTypes+Aviation+Aviation+AircraftDataIndividuals100 : FDR.Freebase.FreebaseIndividuals - member ``1942 KNILM Douglas DC-3 shootdown``: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+AircraftDataIndividuals100+1942 KNILM Douglas DC-3 shootdown Item with get - this.GetIndividualById("/aviation/aircraft", "/m/0dvf3h") - - member ``2006 Mexico DC-9 drug bust``: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+AircraftDataIndividuals100+2006 Mexico DC-9 drug bust Item with get - this.GetIndividualById("/aviation/aircraft", "/m/0cp7gx") - - member ``AHRLAC Holdings Ahrlac``: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+AircraftDataIndividuals100+AHRLAC Holdings Ahrlac Item with get - this.GetIndividualById("/aviation/aircraft", "/m/0h7lzhg") - - member Aero-X: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+AircraftDataIndividuals100+Aero-X Item with get - this.GetIndividualById("/aviation/aircraft", "/m/0ll4xyc") - - member ``Akutan Zero``: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+AircraftDataIndividuals100+Akutan Zero Item with get - this.GetIndividualById("/aviation/aircraft", "/m/051z2vs") - - member ``Aluminum Overcast``: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+AircraftDataIndividuals100+Aluminum Overcast Item with get - this.GetIndividualById("/aviation/aircraft", "/m/02r6f4h") - - member America: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+AircraftDataIndividuals100+America Item with get - this.GetIndividualById("/aviation/aircraft", "/m/08l9v3") - - member ``American Blimp MZ-3``: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+AircraftDataIndividuals100+American Blimp MZ-3 Item with get - this.GetIndividualById("/aviation/aircraft", "/m/02w1j8r") - - member Autogyro: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+AircraftDataIndividuals100+Autogyro Item with get - this.GetIndividualById("/aviation/aircraft", "/m/0gy9p") - - member ``Balls 8``: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+AircraftDataIndividuals100+Balls 8 Item with get - this.GetIndividualById("/aviation/aircraft", "/m/0h49x2") - - member ``Bataan 1 and Bataan 2``: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+AircraftDataIndividuals100+Bataan 1 and Bataan 2 Item with get - this.GetIndividualById("/aviation/aircraft", "/m/02q8n_h") - - member ``Beautiful Betsy``: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+AircraftDataIndividuals100+Beautiful Betsy Item with get - this.GetIndividualById("/aviation/aircraft", "/m/02vw7b0") - - member ``Big Stink``: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+AircraftDataIndividuals100+Big Stink Item with get - this.GetIndividualById("/aviation/aircraft", "/m/0fr9pk") - - member ``Black Cat``: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+AircraftDataIndividuals100+Black Cat Item with get - this.GetIndividualById("/aviation/aircraft", "/m/0yp337r") - - member Bockscar: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+AircraftDataIndividuals100+Bockscar Item with get - this.GetIndividualById("/aviation/aircraft", "/m/018sk0") - - member ``Boeing ZA001``: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+AircraftDataIndividuals100+Boeing ZA001 Item with get - this.GetIndividualById("/aviation/aircraft", "/m/0gwnc5x") - - member ``Bravo November``: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+AircraftDataIndividuals100+Bravo November Item with get - this.GetIndividualById("/aviation/aircraft", "/m/07s4xq_") - - member ``Brazilian Air Force One``: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+AircraftDataIndividuals100+Brazilian Air Force One Item with get - this.GetIndividualById("/aviation/aircraft", "/m/026k9s4") - - member ``Breitling Orbiter 3``: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+AircraftDataIndividuals100+Breitling Orbiter 3 Item with get - this.GetIndividualById("/aviation/aircraft", "/m/09kr0z") - - member ``Bristol Belle``: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+AircraftDataIndividuals100+Bristol Belle Item with get - this.GetIndividualById("/aviation/aircraft", "/m/02r85tm") - - member C-54Q: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+AircraftDataIndividuals100+C-54Q Item with get - this.GetIndividualById("/aviation/aircraft", "/m/0h82947") - - member ``Caesar's Chariot``: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+AircraftDataIndividuals100+Caesar's Chariot Item with get - this.GetIndividualById("/aviation/aircraft", "/m/04647n7") - - member ``China Clipper``: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+AircraftDataIndividuals100+China Clipper Item with get - this.GetIndividualById("/aviation/aircraft", "/m/0211c8") - - member ``Curtiss NC-4``: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+AircraftDataIndividuals100+Curtiss NC-4 Item with get - this.GetIndividualById("/aviation/aircraft", "/m/022yqs") - - member ``DHL Balloon``: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+AircraftDataIndividuals100+DHL Balloon Item with get - this.GetIndividualById("/aviation/aircraft", "/m/02z4zff") - - member ``Dakota Queen``: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+AircraftDataIndividuals100+Dakota Queen Item with get - this.GetIndividualById("/aviation/aircraft", "/m/05c3jv3") - - member ``Double Eagle``: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+AircraftDataIndividuals100+Double Eagle Item with get - this.GetIndividualById("/aviation/aircraft", "/m/0269f0b") - - member ``Double Eagle II``: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+AircraftDataIndividuals100+Double Eagle II Item with get - this.GetIndividualById("/aviation/aircraft", "/m/05nyts") - - member ``Double Eagle V``: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+AircraftDataIndividuals100+Double Eagle V Item with get - this.GetIndividualById("/aviation/aircraft", "/m/02695pv") - - member ``Douglas R4D-3 N763A``: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+AircraftDataIndividuals100+Douglas R4D-3 N763A Item with get - this.GetIndividualById("/aviation/aircraft", "/m/027ty2y") - - member ``Enola Gay``: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+AircraftDataIndividuals100+Enola Gay Item with get - this.GetIndividualById("/aviation/aircraft", "/m/02m5s") - - member ``Evergreen 747 Supertanker``: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+AircraftDataIndividuals100+Evergreen 747 Supertanker Item with get - this.GetIndividualById("/aviation/aircraft", "/m/04d_jsw") - - member ``Finito Benito Next Hirohito``: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+AircraftDataIndividuals100+Finito Benito Next Hirohito Item with get - this.GetIndividualById("/aviation/aircraft", "/m/0bmkhh") - - member ``Flak Bait``: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+AircraftDataIndividuals100+Flak Bait Item with get - this.GetIndividualById("/aviation/aircraft", "/m/0g5m2f") - - member ``Free Life``: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+AircraftDataIndividuals100+Free Life Item with get - this.GetIndividualById("/aviation/aircraft", "/m/04yg64z") - - member ``Full House``: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+AircraftDataIndividuals100+Full House Item with get - this.GetIndividualById("/aviation/aircraft", "/m/0fr8hx") - - member ``G for George``: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+AircraftDataIndividuals100+G for George Item with get - this.GetIndividualById("/aviation/aircraft", "/m/03x477") - - member G-BBDG: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+AircraftDataIndividuals100+G-BBDG Item with get - this.GetIndividualById("/aviation/aircraft", "/m/06s12z") - - member G-BDXJ: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+AircraftDataIndividuals100+G-BDXJ Item with get - this.GetIndividualById("/aviation/aircraft", "/m/02rtcyt") - - member ``Galloping Ghost``: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+AircraftDataIndividuals100+Galloping Ghost Item with get - this.GetIndividualById("/aviation/aircraft", "/m/0h58ct0") - - member ``Glacier Girl``: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+AircraftDataIndividuals100+Glacier Girl Item with get - this.GetIndividualById("/aviation/aircraft", "/m/02rxf8l") - - member ``Gossamer Condor``: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+AircraftDataIndividuals100+Gossamer Condor Item with get - this.GetIndividualById("/aviation/aircraft", "/m/02wlc4") - - member ``Gwiazda Polski``: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+AircraftDataIndividuals100+Gwiazda Polski Item with get - this.GetIndividualById("/aviation/aircraft", "/m/03nxh2c") - - member ``Hawker Hurricane PZ865``: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+AircraftDataIndividuals100+Hawker Hurricane PZ865 Item with get - this.GetIndividualById("/aviation/aircraft", "/m/07kb65f") - - member ``Heliocourier (WHOI)``: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+AircraftDataIndividuals100+Heliocourier (WHOI) Item with get - this.GetIndividualById("/aviation/aircraft", "/m/0h8296h") - - member Hemaseh: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+AircraftDataIndividuals100+Hemaseh Item with get - this.GetIndividualById("/aviation/aircraft", "/m/0z2phf6") - - member Intrepid: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+AircraftDataIndividuals100+Intrepid Item with get - this.GetIndividualById("/aviation/aircraft", "/m/03y9cb6") - - member ``Jabit III``: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+AircraftDataIndividuals100+Jabit III Item with get - this.GetIndividualById("/aviation/aircraft", "/m/0fr8nd") - - member Kamikaze: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+AircraftDataIndividuals100+Kamikaze Item with get - this.GetIndividualById("/aviation/aircraft", "/m/0by2wq") - - member ``Kee Bird``: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+AircraftDataIndividuals100+Kee Bird Item with get - this.GetIndividualById("/aviation/aircraft", "/m/026cfk4") - - member ``Kiowa Warrior``: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+AircraftDataIndividuals100+Kiowa Warrior Item with get - this.GetIndividualById("/aviation/aircraft", "/m/011__hyf") - - member ``L'Oiseau Blanc``: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+AircraftDataIndividuals100+L'Oiseau Blanc Item with get - this.GetIndividualById("/aviation/aircraft", "/m/043qr5k") - - member ``LZ 129 Hindenburg``: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+AircraftDataIndividuals100+LZ 129 Hindenburg Item with get - this.GetIndividualById("/aviation/aircraft", "/m/0fbt7") - - member ``Lady Be Good``: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+AircraftDataIndividuals100+Lady Be Good Item with get - this.GetIndividualById("/aviation/aircraft", "/m/097ply") - - member ``Lady Southern Cross``: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+AircraftDataIndividuals100+Lady Southern Cross Item with get - this.GetIndividualById("/aviation/aircraft", "/m/0288npj") - - member ``Laggin' Dragon``: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+AircraftDataIndividuals100+Laggin' Dragon Item with get - this.GetIndividualById("/aviation/aircraft", "/m/0fr9h9") - - member ``Lethal Lady``: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+AircraftDataIndividuals100+Lethal Lady Item with get - this.GetIndividualById("/aviation/aircraft", "/m/0463v5g") - - member ``Liberty Belle``: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+AircraftDataIndividuals100+Liberty Belle Item with get - this.GetIndividualById("/aviation/aircraft", "/m/0cdl99") - - member Lituanica: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+AircraftDataIndividuals100+Lituanica Item with get - this.GetIndividualById("/aviation/aircraft", "/m/03k91m") - - member ``Lockheed PV-2 Harpoon No. 37396``: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+AircraftDataIndividuals100+Lockheed PV-2 Harpoon No. 37396 Item with get - this.GetIndividualById("/aviation/aircraft", "/m/06427ql") - - member ``Lonesome Polecat II``: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+AircraftDataIndividuals100+Lonesome Polecat II Item with get - this.GetIndividualById("/aviation/aircraft", "/m/0czz9f") - - member ``Lucky Lady II``: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+AircraftDataIndividuals100+Lucky Lady II Item with get - this.GetIndividualById("/aviation/aircraft", "/m/07kbgbb") - - member ``Luke the Spook``: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+AircraftDataIndividuals100+Luke the Spook Item with get - this.GetIndividualById("/aviation/aircraft", "/m/02q_y63") - - member ``MacRobert's Reply``: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+AircraftDataIndividuals100+MacRobert's Reply Item with get - this.GetIndividualById("/aviation/aircraft", "/m/03hhgk_") - - member ``Meckler-Allen 1912 Biplane``: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+AircraftDataIndividuals100+Meckler-Allen 1912 Biplane Item with get - this.GetIndividualById("/aviation/aircraft", "/m/0cn_t_9") - - member ``Memphis Belle``: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+AircraftDataIndividuals100+Memphis Belle Item with get - this.GetIndividualById("/aviation/aircraft", "/m/0ch_5c") - - member ``My Gal Sal``: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+AircraftDataIndividuals100+My Gal Sal Item with get - this.GetIndividualById("/aviation/aircraft", "/m/028636t") - - member ``Necessary Evil``: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+AircraftDataIndividuals100+Necessary Evil Item with get - this.GetIndividualById("/aviation/aircraft", "/m/0fr93y") - - member ``Next Objective``: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+AircraftDataIndividuals100+Next Objective Item with get - this.GetIndividualById("/aviation/aircraft", "/m/02qz_jd") - - member Nine-O-Nine: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+AircraftDataIndividuals100+Nine-O-Nine Item with get - this.GetIndividualById("/aviation/aircraft", "/m/027xwwd") - - member Nippon: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+AircraftDataIndividuals100+Nippon Item with get - this.GetIndividualById("/aviation/aircraft", "/m/0q56v7s") - - member Norge: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+AircraftDataIndividuals100+Norge Item with get - this.GetIndividualById("/aviation/aircraft", "/m/04h3fm") - - member ``Old 666``: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+AircraftDataIndividuals100+Old 666 Item with get - this.GetIndividualById("/aviation/aircraft", "/m/02pthhk") - - member Orlan-10: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+AircraftDataIndividuals100+Orlan-10 Item with get - this.GetIndividualById("/aviation/aircraft", "/m/010s9t4j") - - member Osoaviakhim-1: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+AircraftDataIndividuals100+Osoaviakhim-1 Item with get - this.GetIndividualById("/aviation/aircraft", "/m/05s_gxk") - - member PBY6A: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+AircraftDataIndividuals100+PBY6A Item with get - this.GetIndividualById("/aviation/aircraft", "/m/0h8296x") - - member ``PSU Zephyrus``: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+AircraftDataIndividuals100+PSU Zephyrus Item with get - this.GetIndividualById("/aviation/aircraft", "/m/05q9878") - - member ``Piccadilly Lilly II``: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+AircraftDataIndividuals100+Piccadilly Lilly II Item with get - this.GetIndividualById("/aviation/aircraft", "/m/027xmrt") - - member ``Pratt & Whitney R-2800 Double Wasp``: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+AircraftDataIndividuals100+Pratt & Whitney R-2800 Double Wasp Item with get - this.GetIndividualById("/aviation/aircraft", "/m/031rz5") - - member ``QinetiQ 1``: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+AircraftDataIndividuals100+QinetiQ 1 Item with get - this.GetIndividualById("/aviation/aircraft", "/m/01n6mw") - - member ``Question Mark``: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+AircraftDataIndividuals100+Question Mark Item with get - this.GetIndividualById("/aviation/aircraft", "/m/02799g7") - - member R-4D: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+AircraftDataIndividuals100+R-4D Item with get - this.GetIndividualById("/aviation/aircraft", "/m/0h8297t") - - member R101: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+AircraftDataIndividuals100+R101 Item with get - this.GetIndividualById("/aviation/aircraft", "/m/01rnwx") - - member ``Rare Bear``: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+AircraftDataIndividuals100+Rare Bear Item with get - this.GetIndividualById("/aviation/aircraft", "/m/0gp28q") - - member ``Rendition aircraft``: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+AircraftDataIndividuals100+Rendition aircraft Item with get - this.GetIndividualById("/aviation/aircraft", "/m/04gx31") - - member ``Sally B``: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+AircraftDataIndividuals100+Sally B Item with get - this.GetIndividualById("/aviation/aircraft", "/m/027xyg9") - - member ``Samoan Clipper``: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+AircraftDataIndividuals100+Samoan Clipper Item with get - this.GetIndividualById("/aviation/aircraft", "/m/03tm1n") - - member ``Santos-Dumont number 6``: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+AircraftDataIndividuals100+Santos-Dumont number 6 Item with get - this.GetIndividualById("/aviation/aircraft", "/m/0bsbnz") - - member ``Saro Shrimp``: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+AircraftDataIndividuals100+Saro Shrimp Item with get - this.GetIndividualById("/aviation/aircraft", "/m/02pvsm6") - - member ``Scaled Composites ATTT``: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+AircraftDataIndividuals100+Scaled Composites ATTT Item with get - this.GetIndividualById("/aviation/aircraft", "/m/0dyrvm") - - member ``Sentimental Journey``: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+AircraftDataIndividuals100+Sentimental Journey Item with get - this.GetIndividualById("/aviation/aircraft", "/m/0286sl2") - - member ``Shoo Shoo Baby``: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+AircraftDataIndividuals100+Shoo Shoo Baby Item with get - this.GetIndividualById("/aviation/aircraft", "/m/027ylph") - - member ``Sir Baboon McGoon``: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+AircraftDataIndividuals100+Sir Baboon McGoon Item with get - this.GetIndividualById("/aviation/aircraft", "/m/0j_6rwf") - - member SmartBird: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+AircraftDataIndividuals100+SmartBird Item with get - this.GetIndividualById("/aviation/aircraft", "/m/0gkzq9w") - - member ``Some Punkins``: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+AircraftDataIndividuals100+Some Punkins Item with get - this.GetIndividualById("/aviation/aircraft", "/m/0fyg0t") - - member ``Southern Cross``: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+AircraftDataIndividuals100+Southern Cross Item with get - this.GetIndividualById("/aviation/aircraft", "/m/07wkbt") - - member ``Spirit of Dubai``: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+AircraftDataIndividuals100+Spirit of Dubai Item with get - this.GetIndividualById("/aviation/aircraft", "/m/026g9cf") - - member ``Spirit of St. Louis``: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+AircraftDataIndividuals100+Spirit of St. Louis Item with get - this.GetIndividualById("/aviation/aircraft", "/m/01_6sf") - - member ``Spruce Goose``: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+AircraftDataIndividuals100+Spruce Goose Item with get - this.GetIndividualById("/aviation/aircraft", "/m/0cvjtgn") - - member Stargazer: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+AircraftDataIndividuals100+Stargazer Item with get - this.GetIndividualById("/aviation/aircraft", "/m/05mv2qh") - - member ``Straight Flush``: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+AircraftDataIndividuals100+Straight Flush Item with get - this.GetIndividualById("/aviation/aircraft", "/m/0923kv") - - member ``Strange Cargo``: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+AircraftDataIndividuals100+Strange Cargo Item with get - this.GetIndividualById("/aviation/aircraft", "/m/02q_6d4") - - member ``Swamp Ghost``: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+AircraftDataIndividuals100+Swamp Ghost Item with get - this.GetIndividualById("/aviation/aircraft", "/m/02r98pp") - - member T1-323: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+AircraftDataIndividuals100+T1-323 Item with get - this.GetIndividualById("/aviation/aircraft", "/m/08dj4x") - - member ``The Great Artiste``: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+AircraftDataIndividuals100+The Great Artiste Item with get - this.GetIndividualById("/aviation/aircraft", "/m/01r3mq") - - member ``The Pink Lady``: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+AircraftDataIndividuals100+The Pink Lady Item with get - this.GetIndividualById("/aviation/aircraft", "/m/0gn53z") - - member ``The Ruptured Duck``: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+AircraftDataIndividuals100+The Ruptured Duck Item with get - this.GetIndividualById("/aviation/aircraft", "/m/03nq4lj") - - member ``The Starship``: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+AircraftDataIndividuals100+The Starship Item with get - this.GetIndividualById("/aviation/aircraft", "/m/0dlpw3") - - member ``The Swoose``: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+AircraftDataIndividuals100+The Swoose Item with get - this.GetIndividualById("/aviation/aircraft", "/m/027qv0p") - - member Thunderbird: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+AircraftDataIndividuals100+Thunderbird Item with get - this.GetIndividualById("/aviation/aircraft", "/m/027xlvx") - - member Tingmissartoq: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+AircraftDataIndividuals100+Tingmissartoq Item with get - this.GetIndividualById("/aviation/aircraft", "/m/0269dsf") - - member ``Top Secret``: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+AircraftDataIndividuals100+Top Secret Item with get - this.GetIndividualById("/aviation/aircraft", "/m/02q_57c") - - member USSR-1: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+AircraftDataIndividuals100+USSR-1 Item with get - this.GetIndividualById("/aviation/aircraft", "/m/05zty7_") - - member ``Up An' Atom``: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+AircraftDataIndividuals100+Up An' Atom Item with get - this.GetIndividualById("/aviation/aircraft", "/m/0fr9c5") - - member ``VC-137C SAM 26000``: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+AircraftDataIndividuals100+VC-137C SAM 26000 Item with get - this.GetIndividualById("/aviation/aircraft", "/m/02rwg9x") - - member ``VC-137C SAM 27000``: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+AircraftDataIndividuals100+VC-137C SAM 27000 Item with get - this.GetIndividualById("/aviation/aircraft", "/m/02rwg9k") - - member ``VMS Eve``: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+AircraftDataIndividuals100+VMS Eve Item with get - this.GetIndividualById("/aviation/aircraft", "/m/04gwg6d") - - member ``VSS Enterprise``: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+AircraftDataIndividuals100+VSS Enterprise Item with get - this.GetIndividualById("/aviation/aircraft", "/m/025rr06") - - member ``Vin Fiz Flyer``: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+AircraftDataIndividuals100+Vin Fiz Flyer Item with get - this.GetIndividualById("/aviation/aircraft", "/m/026lt_") - - -class FreebaseDataProvider+ServiceTypes+Aviation+Aviation+AircraftDataIndividualsAZ : FDR.Freebase.FreebaseIndividuals - member A: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+AircraftDataIndividualsAZ+AircraftDataIndividualsIndexedA with get - this - - member B: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+AircraftDataIndividualsAZ+AircraftDataIndividualsIndexedB with get - this - - member C: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+AircraftDataIndividualsAZ+AircraftDataIndividualsIndexedC with get - this - - member D: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+AircraftDataIndividualsAZ+AircraftDataIndividualsIndexedD with get - this - - member E: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+AircraftDataIndividualsAZ+AircraftDataIndividualsIndexedE with get - this - - member F: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+AircraftDataIndividualsAZ+AircraftDataIndividualsIndexedF with get - this - - member G: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+AircraftDataIndividualsAZ+AircraftDataIndividualsIndexedG with get - this - - member H: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+AircraftDataIndividualsAZ+AircraftDataIndividualsIndexedH with get - this - - member I: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+AircraftDataIndividualsAZ+AircraftDataIndividualsIndexedI with get - this - - member J: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+AircraftDataIndividualsAZ+AircraftDataIndividualsIndexedJ with get - this - - member K: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+AircraftDataIndividualsAZ+AircraftDataIndividualsIndexedK with get - this - - member L: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+AircraftDataIndividualsAZ+AircraftDataIndividualsIndexedL with get - this - - member M: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+AircraftDataIndividualsAZ+AircraftDataIndividualsIndexedM with get - this - - member N: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+AircraftDataIndividualsAZ+AircraftDataIndividualsIndexedN with get - this - - member O: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+AircraftDataIndividualsAZ+AircraftDataIndividualsIndexedO with get - this - - member P: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+AircraftDataIndividualsAZ+AircraftDataIndividualsIndexedP with get - this - - member Q: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+AircraftDataIndividualsAZ+AircraftDataIndividualsIndexedQ with get - this - - member R: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+AircraftDataIndividualsAZ+AircraftDataIndividualsIndexedR with get - this - - member S: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+AircraftDataIndividualsAZ+AircraftDataIndividualsIndexedS with get - this - - member T: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+AircraftDataIndividualsAZ+AircraftDataIndividualsIndexedT with get - this - - member U: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+AircraftDataIndividualsAZ+AircraftDataIndividualsIndexedU with get - this - - member V: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+AircraftDataIndividualsAZ+AircraftDataIndividualsIndexedV with get - this - - member W: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+AircraftDataIndividualsAZ+AircraftDataIndividualsIndexedW with get - this - - member X: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+AircraftDataIndividualsAZ+AircraftDataIndividualsIndexedX with get - this - - member Y: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+AircraftDataIndividualsAZ+AircraftDataIndividualsIndexedY with get - this - - member Z: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+AircraftDataIndividualsAZ+AircraftDataIndividualsIndexedZ with get - this - - -class FreebaseDataProvider+ServiceTypes+Aviation+Aviation+Aircraft_designerDataIndividuals : FDR.Freebase.FreebaseIndividuals - member ``Alexander Graham Bell``: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+Aircraft_designerDataIndividuals+Alexander Graham Bell Item with get - this.GetIndividualById("/aviation/aircraft_designer", "/m/0k70") - - member Boeing: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+Aircraft_designerDataIndividuals+Boeing Item with get - this.GetIndividualById("/aviation/aircraft_designer", "/m/0178g") - - member ``Howard Hughes``: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+Aircraft_designerDataIndividuals+Howard Hughes Item with get - this.GetIndividualById("/aviation/aircraft_designer", "/m/03n93") - - member ``Kelly Johnson``: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+Aircraft_designerDataIndividuals+Kelly Johnson Item with get - this.GetIndividualById("/aviation/aircraft_designer", "/m/0254n") - - member ``R. J. Mitchell``: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+Aircraft_designerDataIndividuals+R. J. Mitchell Item with get - this.GetIndividualById("/aviation/aircraft_designer", "/m/09qws") - - -class FreebaseDataProvider+ServiceTypes+Aviation+Aviation+Aircraft_designerDataIndividuals10 : FDR.Freebase.FreebaseIndividuals - member ATR: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+Aircraft_designerDataIndividuals10+ATR Item with get - this.GetIndividualById("/aviation/aircraft_designer", "/m/01l2_v") - - member Airbus: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+Aircraft_designerDataIndividuals10+Airbus Item with get - this.GetIndividualById("/aviation/aircraft_designer", "/m/015zfz") - - member ``Airbus Helicopters``: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+Aircraft_designerDataIndividuals10+Airbus Helicopters Item with get - this.GetIndividualById("/aviation/aircraft_designer", "/m/0n3z0") - - member ``Alexander Graham Bell``: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+Aircraft_designerDataIndividuals10+Alexander Graham Bell Item with get - this.GetIndividualById("/aviation/aircraft_designer", "/m/0k70") - - member ``Alexander Lippisch``: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+Aircraft_designerDataIndividuals10+Alexander Lippisch Item with get - this.GetIndividualById("/aviation/aircraft_designer", "/m/01_kh4") - - member ``Ames Research Center``: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+Aircraft_designerDataIndividuals10+Ames Research Center Item with get - this.GetIndividualById("/aviation/aircraft_designer", "/m/0crzv") - - member ``Andrei Tupolev``: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+Aircraft_designerDataIndividuals10+Andrei Tupolev Item with get - this.GetIndividualById("/aviation/aircraft_designer", "/m/015r1r") - - member ``Anthony Fokker``: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+Aircraft_designerDataIndividuals10+Anthony Fokker Item with get - this.GetIndividualById("/aviation/aircraft_designer", "/m/0dn62") - - member Antonov: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+Aircraft_designerDataIndividuals10+Antonov Item with get - this.GetIndividualById("/aviation/aircraft_designer", "/m/0ctgc") - - member ``Aurel Vlaicu``: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+Aircraft_designerDataIndividuals10+Aurel Vlaicu Item with get - this.GetIndividualById("/aviation/aircraft_designer", "/m/0221cz") - - member ``AviaBellanca Aircraft``: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+Aircraft_designerDataIndividuals10+AviaBellanca Aircraft Item with get - this.GetIndividualById("/aviation/aircraft_designer", "/m/0ctj1") - - member ``Barnes Wallis``: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+Aircraft_designerDataIndividuals10+Barnes Wallis Item with get - this.GetIndividualById("/aviation/aircraft_designer", "/m/01cp3s") - - member Beriev: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+Aircraft_designerDataIndividuals10+Beriev Item with get - this.GetIndividualById("/aviation/aircraft_designer", "/m/0ctk9") - - member ``Blackburn Aircraft``: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+Aircraft_designerDataIndividuals10+Blackburn Aircraft Item with get - this.GetIndividualById("/aviation/aircraft_designer", "/m/0ctl5") - - member Boeing: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+Aircraft_designerDataIndividuals10+Boeing Item with get - this.GetIndividualById("/aviation/aircraft_designer", "/m/0178g") - - member ``Bristol Taurus``: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+Aircraft_designerDataIndividuals10+Bristol Taurus Item with get - this.GetIndividualById("/aviation/aircraft_designer", "/m/0157s8") - - member Bölkow: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+Aircraft_designerDataIndividuals10+Bölkow Item with get - this.GetIndividualById("/aviation/aircraft_designer", "/m/01603c") - - member ``Geoffrey de Havilland``: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+Aircraft_designerDataIndividuals10+Geoffrey de Havilland Item with get - this.GetIndividualById("/aviation/aircraft_designer", "/m/01jp40") - - member ``Glenn Curtiss``: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+Aircraft_designerDataIndividuals10+Glenn Curtiss Item with get - this.GetIndividualById("/aviation/aircraft_designer", "/m/01qgkm") - - member Heinkel: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+Aircraft_designerDataIndividuals10+Heinkel Item with get - this.GetIndividualById("/aviation/aircraft_designer", "/m/022ws6") - - member ``Hindustan Aeronautics Limited``: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+Aircraft_designerDataIndividuals10+Hindustan Aeronautics Limited Item with get - this.GetIndividualById("/aviation/aircraft_designer", "/m/01k1jb") - - member ``Horten brothers``: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+Aircraft_designerDataIndividuals10+Horten brothers Item with get - this.GetIndividualById("/aviation/aircraft_designer", "/m/01tkkx") - - member ``Howard Hughes``: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+Aircraft_designerDataIndividuals10+Howard Hughes Item with get - this.GetIndividualById("/aviation/aircraft_designer", "/m/03n93") - - member ``Igor Sikorsky``: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+Aircraft_designerDataIndividuals10+Igor Sikorsky Item with get - this.GetIndividualById("/aviation/aircraft_designer", "/m/01cb9n") - - member Ilyushin: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+Aircraft_designerDataIndividuals10+Ilyushin Item with get - this.GetIndividualById("/aviation/aircraft_designer", "/m/0cy1s") - - member ``Kelly Johnson``: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+Aircraft_designerDataIndividuals10+Kelly Johnson Item with get - this.GetIndividualById("/aviation/aircraft_designer", "/m/0254n") - - member ``Kurt Tank``: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+Aircraft_designerDataIndividuals10+Kurt Tank Item with get - this.GetIndividualById("/aviation/aircraft_designer", "/m/01k0qs") - - member ``Langley Research Center``: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+Aircraft_designerDataIndividuals10+Langley Research Center Item with get - this.GetIndividualById("/aviation/aircraft_designer", "/m/01xmps") - - member ``Lockheed Corporation``: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+Aircraft_designerDataIndividuals10+Lockheed Corporation Item with get - this.GetIndividualById("/aviation/aircraft_designer", "/m/0d8c4") - - member ``Lockheed Martin``: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+Aircraft_designerDataIndividuals10+Lockheed Martin Item with get - this.GetIndividualById("/aviation/aircraft_designer", "/m/0hkqn") - - member ``Marcel Dassault``: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+Aircraft_designerDataIndividuals10+Marcel Dassault Item with get - this.GetIndividualById("/aviation/aircraft_designer", "/m/01vr20") - - member ``McDonnell Douglas``: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+Aircraft_designerDataIndividuals10+McDonnell Douglas Item with get - this.GetIndividualById("/aviation/aircraft_designer", "/m/0147vs") - - member Messerschmitt: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+Aircraft_designerDataIndividuals10+Messerschmitt Item with get - this.GetIndividualById("/aviation/aircraft_designer", "/m/017zf2") - - member ``Nevil Shute``: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+Aircraft_designerDataIndividuals10+Nevil Shute Item with get - this.GetIndividualById("/aviation/aircraft_designer", "/m/0kfjg") - - member ``Northrop Corporation``: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+Aircraft_designerDataIndividuals10+Northrop Corporation Item with get - this.GetIndividualById("/aviation/aircraft_designer", "/m/01frmh") - - member ``Northrop Grumman``: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+Aircraft_designerDataIndividuals10+Northrop Grumman Item with get - this.GetIndividualById("/aviation/aircraft_designer", "/m/01frpd") - - member PZL: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+Aircraft_designerDataIndividuals10+PZL Item with get - this.GetIndividualById("/aviation/aircraft_designer", "/m/01hftq") - - member ``Pavel Sukhoi``: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+Aircraft_designerDataIndividuals10+Pavel Sukhoi Item with get - this.GetIndividualById("/aviation/aircraft_designer", "/m/0hpzs") - - member ``R. J. Mitchell``: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+Aircraft_designerDataIndividuals10+R. J. Mitchell Item with get - this.GetIndividualById("/aviation/aircraft_designer", "/m/09qws") - - member ``Scaled Composites``: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+Aircraft_designerDataIndividuals10+Scaled Composites Item with get - this.GetIndividualById("/aviation/aircraft_designer", "/m/01fn55") - - member ``Secondo Campini``: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+Aircraft_designerDataIndividuals10+Secondo Campini Item with get - this.GetIndividualById("/aviation/aircraft_designer", "/m/01b9q_") - - member ``Semyon Lavochkin``: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+Aircraft_designerDataIndividuals10+Semyon Lavochkin Item with get - this.GetIndividualById("/aviation/aircraft_designer", "/m/01g17p") - - member ``Short Brothers``: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+Aircraft_designerDataIndividuals10+Short Brothers Item with get - this.GetIndividualById("/aviation/aircraft_designer", "/m/01ybl7") - - member ``Siegfried and Walter Günter``: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+Aircraft_designerDataIndividuals10+Siegfried and Walter Günter Item with get - this.GetIndividualById("/aviation/aircraft_designer", "/m/0232qf") - - member ``Smithsonian Institution``: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+Aircraft_designerDataIndividuals10+Smithsonian Institution Item with get - this.GetIndividualById("/aviation/aircraft_designer", "/m/0hfyj") - - member ``Sydney Camm``: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+Aircraft_designerDataIndividuals10+Sydney Camm Item with get - this.GetIndividualById("/aviation/aircraft_designer", "/m/01vlh5") - - member ``William Boeing``: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+Aircraft_designerDataIndividuals10+William Boeing Item with get - this.GetIndividualById("/aviation/aircraft_designer", "/m/01t920") - - member ``Willy Messerschmitt``: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+Aircraft_designerDataIndividuals10+Willy Messerschmitt Item with get - this.GetIndividualById("/aviation/aircraft_designer", "/m/01h2n3") - - member Yakovlev: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+Aircraft_designerDataIndividuals10+Yakovlev Item with get - this.GetIndividualById("/aviation/aircraft_designer", "/m/019nzy") - - member ``de Havilland``: FreebaseDataProvider+ServiceTypes+Aviation+Aviation+Aircraft_designerDataIndividuals10+de Havilland Item with get - this.GetIndividualById("/aviation/aircraft_designer", "/m/01962k") - - diff --git a/tests/FSharp.Data.Tests/FSharp.Data.Tests.fsproj b/tests/FSharp.Data.Tests/FSharp.Data.Tests.fsproj index 1f8bd7e9e..d8e36f58b 100755 --- a/tests/FSharp.Data.Tests/FSharp.Data.Tests.fsproj +++ b/tests/FSharp.Data.Tests/FSharp.Data.Tests.fsproj @@ -300,7 +300,6 @@ - diff --git a/tests/FSharp.Data.Tests/FreebaseProvider.fs b/tests/FSharp.Data.Tests/FreebaseProvider.fs deleted file mode 100644 index 502640e69..000000000 --- a/tests/FSharp.Data.Tests/FreebaseProvider.fs +++ /dev/null @@ -1,241 +0,0 @@ -#if INTERACTIVE -#r "../../bin/FSharp.Data.dll" -#r "../../packages/NUnit/lib/nunit.framework.dll" -#load "../Common/FsUnit.fs" -#else -module FSharp.Data.Tests.FreebaseProvider -#endif - -open NUnit.Framework -open FsUnit -open System -open System.Linq -open System.Net -open FSharp.Data -open FSharp.Data.FreebaseOperators -open Microsoft.FSharp.Data.UnitSystems.SI.UnitNames - -//alow tests to work when you're behind a proxy -WebRequest.DefaultWebProxy.Credentials <- CredentialCache.DefaultNetworkCredentials - -//Safe set the key environment variable to value (or delete it if value = "") only for this context -let environmentVariable key value = - let old = Environment.GetEnvironmentVariable(key) - Environment.SetEnvironmentVariable(key, value) - { new IDisposable with - member x.Dispose() = Environment.SetEnvironmentVariable(key, old) } - -[] -let ``Should not use api key if FREEBASE_API_KEY environment variable not set``() = - use v = environmentVariable "FREEBASE_API_KEY" "" - let data = FreebaseData.GetDataContext() - data.DataContext.ApiKey |> should equal None - -[] -let ``Should use api key from FREEBASE_API_KEY environment variable``() = - use v = environmentVariable "FREEBASE_API_KEY" "KEY1234" - let data = FreebaseData.GetDataContext() - data.DataContext.ApiKey |> should equal (Some "KEY1234") - -let data = FreebaseDataProvider.GetDataContext() - -[] -let ``Can access the first 10 amino acids``() = - - let aminoAcids = data.``Science and Technology``.Biology.``Amino Acids`` - - let q = query { - for acid in aminoAcids do - take 10 - select (acid.Name, String.Join(" ", acid.Blurb.ToArray())) } - - let a = q.ToArray() - a.Count() |> should equal 10 - -[] -let ``Can access the symbol for hydrogen``() = - - let elements = data.``Science and Technology``.Chemistry.``Chemical Elements`` - - let hydrogen = elements.Individuals.Hydrogen - hydrogen.Symbol |> should equal "H" - -[] -let ``Can access specific properties for hydrogen individual``() = - - let elements = data.``Science and Technology``.Chemistry.``Chemical Elements`` - - let hydrogen = elements.Individuals.Hydrogen - hydrogen.``Atomic number`` |> should equal 1 - hydrogen.``Atomic mass``.Mass.HasValue |> should equal true - abs (1.0 - hydrogen.``Atomic mass``.Mass.Value / 1.713498e-27) < 0.00001 |> should equal true - abs (1.0 - hydrogen.``Boiling Point`` / 20.28) < 0.00001 |> should equal true - -let findCountryByFifaCode code = - query { for x in data.``Time and Space``.Location.Countries do - where (x.``FIFA Code``.Contains code) - exactlyOne } - -[] -let ``Can access Australia's national anthem by Fifa code``() = - let country = findCountryByFifaCode "AUS" - let anthem = country.``National anthem`` |> Seq.head - anthem.Anthem.Name |> should equal "Advance Australia Fair" - -[] -let ``Can access Austrias national anthem by Fifa code``() = - let country = findCountryByFifaCode "AUT" - let anthem = country.``National anthem`` |> Seq.head - anthem.Anthem.Name |> should equal "Land der Berge, Land am Strome" - -#if BUILD_SERVER -#else -[] -let ``Can access the webpages for music composers``() = - - let webPage = - data.``Arts and Entertainment``.Music.Composers - |> Seq.map (fun composer -> String.concat "\n" composer.``Topical webpage``) - |> Seq.find (not << String.IsNullOrWhiteSpace) - - webPage.Split('\n').[0] |> should equal "http://www.quantz.info/" -#endif - -[] -let ``Can access the webpages of stock exchanges``() = - - let webPage = - data.``Products and Services``.Business.``Stock exchanges`` - |> Seq.map (fun exchange -> String.concat "\n" exchange.``Official website``) - |> Seq.find (not << String.IsNullOrWhiteSpace) - - webPage |> should equal "http://www.nasdaqomx.com/\nhttp://www.nasdaq.com/" - -[] -let ``Can execute > 1500 chars MQL query``() = - - let astronomy = data.``Science and Technology``.Astronomy.Stars - - let someStarDistances = - query { for e in astronomy do - where e.Distance.HasValue - select (e.Name, e.Distance) } - |> Seq.toList - someStarDistances |> Seq.head |> fst |> should equal "Arcturus" - -[] -let ``Can access olympics info``() = - - let firstOlympicCity = - query { for game in data.Commons.Olympics.``Olympic games`` do - sortBy game.``End date`` - for city in game.``Host City`` do - select city - head } - - firstOlympicCity.Name |> should equal "Athens" - -[] -let ``Can execute query that checks for not null``() = - let p = query { - for p in data.Commons.People.Persons do - where (p.Name.ApproximatelyMatches "^Evelyn ") - where (p.Gender <> null) - head - } - p.Name |> should equal "Evelyn Waugh" - p.Gender.Name |> should equal "Male" - -[] -let ``Can execute query that checks for null``() = - let p = query { - for p in data.Commons.People.Persons do - where (p.Name.ApproximatelyMatches "^Evelyn ") - where (p.Gender = null) - head - } - p.Name |> should equal "Evelyn Escalante" - p.Gender |> should equal null - -[] -let ``Can execute query that gets the head of a sequence of compound objects``() = - query { - for p in data.Commons.People.Persons do - where (p.Name.ApproximatelyMatches "^Evelyn ") - select (p.Name, p.``Date of birth``) - head - } |> should equal ("Evelyn Waugh", "1903-10-28") - -[] -let ``Can execute query that gets the head of a sequence of basic types``() = - query { - for p in data.Commons.People.Persons do - where (p.Name.ApproximatelyMatches "^Evelyn ") - select p.Name - head - } |> should equal "Evelyn Waugh" - -[] -let ``tvrage_id is not unique in mql query``() = - query { - for p in data.Commons.People.Persons do - select (p.Name, p.``Date of birth``) - } - |> Seq.head - |> should equal ("Jack Abramoff", "1958-02-28") - -#if BUILD_SERVER -#else -[] -let ``Can handle Ghana multiple ISO 3 codes``() = - let country = data.``Time and Space``.Location.Countries.Individuals.Ghana - country.``ISO Alpha 3`` |> Seq.toArray |> should equal [|"GHA"|] -#endif - -[] -let ``Check Individuals10 works for small collection``() = - let country = data.``Time and Space``.Location.Countries.Individuals10.``United Kingdom`` - country.``ISO Alpha 3`` |> Seq.toArray |> should equal [|"GBR"|] - -[] -let ``Check Individuals100 works for small collection``() = - let country = data.``Time and Space``.Location.Countries.Individuals100.``Czech Republic`` - country.``ISO Alpha 3`` |> Seq.toArray |> should equal [|"CZE"|] - -[] -let ``Check IndividualsAZ works for small collection``() = - let country = data.``Time and Space``.Location.Countries.IndividualsAZ.P.Portugal - country.``ISO Alpha 3`` |> Seq.toArray |> should equal [|"PRT"|] - -[] -let ``Check IndividualsAZ good for large collections``() = - let bible = data.``Arts and Entertainment``.Books.Books.IndividualsAZ .T.``The Bible`` - bible.Characters.Any(fun x -> x.Name = "Satan") |> should equal true - bible.Characters.Any(fun x -> x.Name = "John the Baptist") |> should equal true - bible.Characters.Any(fun x -> x.Name = "Jesus") |> should equal true - // I couldn't resist.... - bible.Characters.Any(fun x -> x.Name = "Bart Simpson") |> should equal false - -open Microsoft.FSharp.Data.UnitSystems.SI.UnitNames -open Microsoft.FSharp.Data.UnitSystems.SI.UnitSymbols - -[] -let ``Can access meteorology with units of measure``() = - let cyclones = data.``Science and Technology``.Meteorology.``Tropical Cyclones`` - let topWind = cyclones.Individuals10.``Hurricane Sandy``.``Highest winds`` - abs(topWind - 51.3893) < 1e-14 |> should equal true - -open FSharp.Data.Runtime.Freebase.FreebaseRequests -open FSharp.Data.Runtime.Freebase.FreebaseSchema - -[] -let ``Wrong key gives relevant message``() = - let fb = new FreebaseQueries("invalidKey", "https://www.googleapis.com/freebase/v1", "FreebaseSchema", "none", false) - let fbSchema = new FreebaseSchemaConnection(fb) - let exn = - try - fbSchema.GetDomainStructure() |> ignore - "" - with :? FreebaseWebException as e -> - e.Message - exn |> should contain "Reason='keyInvalid'"