/// <summary> /// Retrieve sub-subjects of the requested subject /// </summary> /// <param name="specific_subjects">ID of the subject to retrieve</param> /// <returns></returns> public List <Subject> GetSubjects(string specific_subjects) { Console.WriteLine("Get subject " + specific_subjects); connection.Settings[SettingConstants.SubjectID] = specific_subjects; connection.Settings[SettingConstants.Recursive] = "false"; return(Retrievers.SubjectsRetriever(connection)); }
/// <summary> /// Retrieve the specified subjects recursively /// </summary> /// <param name="specific_subjects">ID of the subject to retrieve</param> /// <param name="recursive">Whether subjects should be retrieved recursively</param> /// <returns></returns> public List <Subject> GetSubjects(string specific_subjects, bool recursive) { Console.WriteLine("Get subject " + specific_subjects); connection.Settings[SettingConstants.SubjectID] = specific_subjects; connection.Settings[SettingConstants.Recursive] = recursive.ToString().ToLower(); return(Retrievers.SubjectsRetriever(connection)); }
/// <summary> /// <c>ICloneable</c> implementation. Returns a shallow copy of the object. /// </summary> public object Clone() { ExtenderSection ext = new ExtenderSection(); ext._retrievers = Retrievers.Clone() as ArrayList; ext._traverser = Traverser; ext._visitors = Visitors.Clone() as SortedList; return(ext); }
/// <summary> /// Retreive all subjects recursively /// </summary> /// <param name="recursive">Whether subjects should be retrieved recursively</param> /// <returns></returns> public List <Subject> GetSubjects(bool recursive) { connection.Settings[SettingConstants.Recursive] = recursive.ToString().ToLower(); return(Retrievers.SubjectsRetriever(connection)); }
/// <summary> /// Retrieve list of all subjects non-recursively /// </summary> /// <returns></returns> public List <Subject> GetSubjects() { connection.Settings[SettingConstants.SubjectID] = ""; connection.Settings[SettingConstants.Recursive] = "false"; return(Retrievers.SubjectsRetriever(connection)); }
/// <summary> /// Since the data requested is tied to the table metadata, a datarequest is performed for the variables contained in the provided metadata object. /// </summary> /// <param name="requestData"></param> /// <returns></returns> public string GetTableData(TableMetadata requestData) { return(Retrievers.TableDataRetriever(connection, requestData)); }
/// <summary> /// Retrieve metadata of this table /// </summary> /// <param name="tableID"></param> /// <returns></returns> public TableMetadata GetTableMetadata(string tableID) { connection.Settings[SettingConstants.TableID] = tableID; return(Retrievers.TableMetadataRetriever(connection)); }
/// <summary> /// Retrieve metadata of the currently selected table /// </summary> /// <returns></returns> public TableMetadata GetTableMetadata() { return(Retrievers.TableMetadataRetriever(connection)); }
/// <summary> /// Retrieve the tables which both belongs to the subjects specified and was updated within the given number of days /// </summary> /// <param name="subjectIDs">Comma sepparated list of subject ids to request tables for</param> /// <param name="updatedWithinDays">The maximum number of days that have passed since the table was updated</param> /// <returns></returns> public List <Table> GetTables(string subjectIDs, int updatedWithinDays) { connection.Settings[SettingConstants.SubjectID] = subjectIDs; connection.Settings[SettingConstants.OnlyTablesUpdatedWithinDays] = updatedWithinDays.ToString(); return(Retrievers.TablesRetriever(connection)); }
/// <summary> /// Retrieve tables according to subjectIDs /// </summary> /// <param name="subjectIDs">Comma sepparated list of subject ids to request tables for</param> /// <returns></returns> public List <Table> GetTables(string subjectIDs) { connection.Settings[SettingConstants.TableSubject] = subjectIDs; return(Retrievers.TablesRetriever(connection)); }
/// <summary> /// Retrieve tables updated within the specified number of days /// </summary> /// <param name="updatedWithinDays">The maximum number of days that have passed since the table was updated</param> /// <returns></returns> public List <Table> GetTables(int updatedWithinDays) { connection.Settings[SettingConstants.SubjectID] = ""; // we want all the tables here connection.Settings[SettingConstants.OnlyTablesUpdatedWithinDays] = updatedWithinDays.ToString(); return(Retrievers.TablesRetriever(connection)); }
/// <summary> /// Retrieve tables according to the current settings /// </summary> /// <returns></returns> public List <Table> GetTables() { return(Retrievers.TablesRetriever(connection)); }
public override object VisitCondition([NotNull] ChatParser.ConditionContext context) { if (context.HasUserMentioned() != null) { string username = context.huser().GetText(); if (username != "<missing STRING>") { return(Retrievers.HasUserMentioned(username)); } else { return(new List <int>()); } } else if (context.ByUser() != null) { string username = context.huser().GetText(); if (username != "<missing STRING>") { return(Retrievers.HasUser(username)); } else { return(new List <int>()); } } else if (context.HasLocation() != null) { return(Retrievers.HasNERTag(NER.LOC)); } else if (context.HasOrganization() != null) { return(Retrievers.HasNERTag(NER.ORG)); } else if (context.HasTime() != null) { return(Retrievers.HasNERTag(NER.TIME)); } else if (context.HasURL() != null) { return(Retrievers.HasNERTag(NER.URL)); } else if (context.HasQuestion() != null) { return(Retrievers.HasQuestion()); } else if (context.HasWordOfDict() != null) { string dictname = context.hdict().GetText(); List <string> list = new List <string>(); if (dictname != "<missing STRING>") { if (UserDictsContainer.UserDicts.TryGetValue(dictname, out list)) { return(Retrievers.HasWordOfList(list)); } else { return(null); } } else { return(null); } } else if (context.HasDate() != null) { return(Retrievers.HasNERTag(NER.DATE)); } else { // Message about incorrect query return(null); } }