Permalink
Please sign in to comment.
Showing
with
174 additions
and 24 deletions.
- 0 csharp/{ncbo → }/ncbo.sln
- +1 −1 csharp/ncbo/{ncbo → }/AnnotateText.cs
- 0 csharp/ncbo/{ncbo → }/ClassesSearch.cs
- 0 csharp/ncbo/{ncbo → }/Common/Constants.cs
- 0 csharp/ncbo/{ncbo → }/Common/Network.cs
- 0 csharp/ncbo/{ncbo → }/DataTypes/AnnotatedClass.cs
- 0 csharp/ncbo/{ncbo → }/DataTypes/Annotation.cs
- 0 csharp/ncbo/{ncbo → }/DataTypes/AnnotationCollection.cs
- 0 csharp/ncbo/{ncbo → }/DataTypes/AnnotationLinks.cs
- 0 csharp/ncbo/{ncbo → }/DataTypes/AnnotationResult.cs
- +2 −0 csharp/ncbo/{ncbo → }/DataTypes/Ontology.cs
- 0 csharp/ncbo/{ncbo → }/DataTypes/OntologyLink.cs
- 0 csharp/ncbo/{ncbo → }/DataTypes/Page.cs
- 0 csharp/ncbo/{ncbo → }/DataTypes/PageCollection.cs
- 0 csharp/ncbo/{ncbo → }/DataTypes/PageLink.cs
- +39 −0 csharp/ncbo/DataTypes/ResourceContext.cs
- +59 −0 csharp/ncbo/DataTypes/ResourceLinks.cs
- +13 −0 csharp/ncbo/DataTypes/Resources.cs
- +0 −2 csharp/ncbo/{ncbo → }/GetLabels.cs
- +27 −0 csharp/ncbo/ListOntologies.cs
- +33 −0 csharp/ncbo/Program.cs
- 0 csharp/ncbo/{ncbo → }/classes_search_terms.txt
- 0 csharp/ncbo/{ncbo → }/ncbo.csproj
- +0 −21 csharp/ncbo/ncbo/Program.cs
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
| @@ -0,0 +1,39 @@ | ||
| +using Newtonsoft.Json; | ||
| +using System; | ||
| +using System.Collections.Generic; | ||
| +using System.Text; | ||
| + | ||
| +namespace ncbo.DataTypes | ||
| +{ | ||
| + public class ResourceContext | ||
| + { | ||
| + [JsonProperty("submissions")] | ||
| + public string Submissions { get; set; } | ||
| + [JsonProperty("notes")] | ||
| + public string Notes { get; set; } | ||
| + [JsonProperty("categories")] | ||
| + public string Categories { get; set; } | ||
| + [JsonProperty("provisional_classes")] | ||
| + public string ProvisionalClasses { get; set; } | ||
| + [JsonProperty("slices")] | ||
| + public string Slices { get; set; } | ||
| + [JsonProperty("metrics")] | ||
| + public string Metrics { get; set; } | ||
| + [JsonProperty("mappings")] | ||
| + public string Mappings { get; set; } | ||
| + [JsonProperty("users")] | ||
| + public string Users { get; set; } | ||
| + [JsonProperty("projects")] | ||
| + public string Projects { get; set; } | ||
| + [JsonProperty("ontologies")] | ||
| + public string Ontologies { get; set; } | ||
| + [JsonProperty("groups")] | ||
| + public string Groups { get; set; } | ||
| + [JsonProperty("replies")] | ||
| + public string Replies { get; set; } | ||
| + [JsonProperty("provisional_relations")] | ||
| + public string ProvisionalRelations { get; set; } | ||
| + [JsonProperty("reviews")] | ||
| + public string Reviews { get; set; } | ||
| + } | ||
| +} |
| @@ -0,0 +1,59 @@ | ||
| +using Newtonsoft.Json; | ||
| +using System; | ||
| +using System.Collections.Generic; | ||
| +using System.Text; | ||
| + | ||
| +namespace ncbo.DataTypes | ||
| +{ | ||
| + public class ResourceLinks | ||
| + { | ||
| + [JsonProperty("submissions")] | ||
| + public string Submissions { get; set; } | ||
| + [JsonProperty("notes")] | ||
| + public string Notes { get; set; } | ||
| + [JsonProperty("categories")] | ||
| + public string Categories { get; set; } | ||
| + [JsonProperty("provisional_classes")] | ||
| + public string ProvisionalClasses { get; set; } | ||
| + [JsonProperty("annotator")] | ||
| + public string Annotator { get; set; } | ||
| + [JsonProperty("resource_index")] | ||
| + public string ResourceIndex { get; set; } | ||
| + [JsonProperty("documentation")] | ||
| + public string Documentation { get; set; } | ||
| + [JsonProperty("slices")] | ||
| + public string Slices { get; set; } | ||
| + [JsonProperty("metrics")] | ||
| + public string Metrics { get; set; } | ||
| + [JsonProperty("mappings")] | ||
| + public string Mappings { get; set; } | ||
| + [JsonProperty("users")] | ||
| + public string Users { get; set; } | ||
| + [JsonProperty("search")] | ||
| + public string Search { get; set; } | ||
| + [JsonProperty("projects")] | ||
| + public string Projects { get; set; } | ||
| + [JsonProperty("ontologies")] | ||
| + public string Ontologies { get; set; } | ||
| + [JsonProperty("ccv")] | ||
| + public string CCV { get; set; } | ||
| + [JsonProperty("recommender")] | ||
| + public string Recommender { get; set; } | ||
| + [JsonProperty("groups")] | ||
| + public string Groups { get; set; } | ||
| + [JsonProperty("replies")] | ||
| + public string Replies { get; set; } | ||
| + [JsonProperty("recommender_v1")] | ||
| + public string RecommenderV1 { get; set; } | ||
| + [JsonProperty("provisional_relations")] | ||
| + public string ProvisionalRelations { get; set; } | ||
| + [JsonProperty("property_search")] | ||
| + public string PropertySearch { get; set; } | ||
| + [JsonProperty("analytics")] | ||
| + public string Analytics { get; set; } | ||
| + [JsonProperty("reviews")] | ||
| + public string Reviews { get; set; } | ||
| + [JsonProperty("@context")] | ||
| + public ResourceContext Context { get; set; } | ||
| +} | ||
| +} |
| @@ -0,0 +1,13 @@ | ||
| +using Newtonsoft.Json; | ||
| +using System; | ||
| +using System.Collections.Generic; | ||
| +using System.Text; | ||
| + | ||
| +namespace ncbo.DataTypes | ||
| +{ | ||
| + public class Resources | ||
| + { | ||
| + [JsonProperty("links")] | ||
| + public ResourceLinks Links { get; set; } | ||
| + } | ||
| +} |
| @@ -0,0 +1,27 @@ | ||
| +using ncbo.Common; | ||
| +using ncbo.DataTypes; | ||
| +using System; | ||
| +using System.Collections.Generic; | ||
| +using System.Text; | ||
| +using System.Linq; | ||
| + | ||
| +namespace ncbo | ||
| +{ | ||
| + public static class ListOntologies | ||
| + { | ||
| + public static void DoIt() | ||
| + { | ||
| + Resources resources = Network.GetResponseAs<Resources>("http://data.bioontology.org"); | ||
| + | ||
| + Ontology[] ontologies = Network.GetResponseAs<Ontology[]>(resources.Links.Ontologies); | ||
| + | ||
| + IEnumerable<string> ontologyStrings = ontologies.Select(n => n.Name + Environment.NewLine + | ||
| + n.ID + Environment.NewLine + Environment.NewLine); | ||
| + | ||
| + foreach(string ontologyString in ontologyStrings) | ||
| + { | ||
| + Console.WriteLine(ontologyString); | ||
| + } | ||
| + } | ||
| + } | ||
| +} |
| @@ -0,0 +1,33 @@ | ||
| +using Newtonsoft.Json; | ||
| +using System; | ||
| +using System.Collections.Generic; | ||
| +using System.IO; | ||
| +using System.Net.Http; | ||
| +using System.Threading.Tasks; | ||
| + | ||
| +namespace ncbo | ||
| +{ | ||
| + class Program | ||
| + { | ||
| + static void Main(string[] args) | ||
| + { | ||
| + Console.WriteLine("GetLabels:"); | ||
| + GetLabels.DoIt(); | ||
| + | ||
| + Console.WriteLine(); | ||
| + Console.WriteLine("AnnotateText:"); | ||
| + AnnotateText.DoIt(); | ||
| + | ||
| + Console.WriteLine(); | ||
| + Console.WriteLine("ClassesSearch"); | ||
| + ClassesSearch.DoIt(); | ||
| + | ||
| + Console.WriteLine(); | ||
| + Console.WriteLine("ListOntologies"); | ||
| + ListOntologies.DoIt(); | ||
| + | ||
| + Console.WriteLine("Done"); | ||
| + Console.ReadLine(); | ||
| + } | ||
| + } | ||
| +} |
File renamed without changes.
File renamed without changes.
| @@ -1,21 +0,0 @@ | ||
| -using Newtonsoft.Json; | ||
| -using System; | ||
| -using System.Collections.Generic; | ||
| -using System.IO; | ||
| -using System.Net.Http; | ||
| -using System.Threading.Tasks; | ||
| - | ||
| -namespace ncbo | ||
| -{ | ||
| - class Program | ||
| - { | ||
| - static void Main(string[] args) | ||
| - { | ||
| - //GetLabels.DoIt(); | ||
| - | ||
| - //AnnotateText.DoIt(); | ||
| - | ||
| - ClassesSearch.DoIt(); | ||
| - } | ||
| - } | ||
| -} |
0 comments on commit
38994eb