Esempio n. 1
0
        /// <summary>
        /// Get metadata of various sorts exposed by the service.
        /// </summary>
        /// <param name="kind">The kind of metadata to fetch.</param>
        /// <returns>A list of strings.</returns>
        public IList <string> GetServiceMetadata(string kind)
        {
            outData[] data = new outData[0];
            switch (kind)
            {
            case MetadataDatabases:
                data = _blastClient.getDatabases();
                break;

            case MetadataFilter:
                data = _blastClient.getFilters();
                break;

            case MetadataMatrices:
                data = _blastClient.getMatrices();
                break;

            case MetadataPrograms:
                data = _blastClient.getPrograms();
                break;

            case MetadataSensitivity:
                data = _blastClient.getSensitivity();
                break;

            case MetadataSort:
                data = _blastClient.getSort();
                break;

            case MetadataStatistics:
                data = _blastClient.getStats();
                break;

            case MetadataXmlFormats:
                data = _blastClient.getXmlFormats();
                break;
            }

            List <string> ret = new List <string>();

            foreach (outData d in data)
            {
                ret.Add(d.name);
            }

            return(ret);
        }
Esempio n. 2
0
        /// <summary>
        /// Get metadata of various sorts exposed by the service.
        /// </summary>
        /// <param name="kind">The kind of metadata to fetch.</param>
        /// <returns>A list of strings.</returns>
        public List <string> GetServiceMetadata(string kind)
        {
            outData[] data = new outData[0];
            switch (kind)
            {
            case METADATADATABASES:
                data = _blastClient.getDatabases();
                break;

            case METADATAFILTERS:
                data = _blastClient.getFilters();
                break;

            case METADATAMATRICES:
                data = _blastClient.getMatrices();
                break;

            case METADATAPROGRAMS:
                data = _blastClient.getPrograms();
                break;

            case METADATASENSITIVITY:
                data = _blastClient.getSensitivity();
                break;

            case METADATASORT:
                data = _blastClient.getSort();
                break;

            case METADATASTATS:
                data = _blastClient.getStats();
                break;

            case METADATAXMLFORMATS:
                data = _blastClient.getXmlFormats();
                break;
            }

            List <string> ret = new List <string>();

            foreach (outData d in data)
            {
                ret.Add(d.name);
            }

            return(ret);
        }