Exemple #1
0
        public static ShowPrimaryDataModel Convert(long datasetId, string title, DataStructure dataStructure, List <ContentDescriptor> dataFileList, bool downloadAccess)
        {
            ShowPrimaryDataModel model = new ShowPrimaryDataModel();

            model.FileList                 = ConvertContentDiscriptorsToFileInfos(dataFileList);
            model.DatasetId                = datasetId;
            model.DataStructure            = dataStructure;
            model.DataStructureType        = DataStructureType.Unstructured;
            model.DatasetTitle             = title;
            model.CompareValuesOfDataTypes = CompareValues();
            model.DownloadAccess           = downloadAccess;

            return(model);
        }
Exemple #2
0
        public static ShowPrimaryDataModel Convert(long datasetId, string title, DataStructure dataStructure, DataTable data, bool downloadAccess)
        {
            ShowPrimaryDataModel model = new ShowPrimaryDataModel();

            model.Data                     = data;
            model.DatasetId                = datasetId;
            model.DataStructure            = dataStructure;
            model.DataStructureType        = DataStructureType.Structured;
            model.DatasetTitle             = title;
            model.CompareValuesOfDataTypes = CompareValues();
            model.DownloadAccess           = downloadAccess;
            model.DisplayFormats           = getDisplayFormatObjects(dataStructure as StructuredDataStructure);


            return(model);
        }
        public static ShowPrimaryDataModel Convert(long datasetId, int versionId, string title, DataStructure dataStructure, List <ContentDescriptor> dataFileList, bool downloadAccess, Dictionary <string, string> asciiFileDownloadSupport, bool latestVersion, bool hasEditRights)
        {
            ShowPrimaryDataModel model = new ShowPrimaryDataModel();

            model.FileList                 = ConvertContentDiscriptorsToFileInfos(dataFileList);
            model.DatasetId                = datasetId;
            model.VersionId                = versionId;
            model.DataStructure            = dataStructure;
            model.DataStructureType        = DataStructureType.Unstructured;
            model.DatasetTitle             = title;
            model.CompareValuesOfDataTypes = CompareValues(dataStructure as StructuredDataStructure);
            model.DownloadAccess           = downloadAccess;
            model.AsciiFileDownloadSupport = asciiFileDownloadSupport;
            model.LatestVersion            = latestVersion;
            model.HasEditRight             = hasEditRights;


            return(model);
        }
        public static ShowPrimaryDataModel Convert(long datasetId, int versionId, string title, DataStructure dataStructure, DataTable data, bool downloadAccess, Dictionary <string, string> supportedAsciiFileTypes, bool latestVersion, bool hasEditRights)
        {
            ShowPrimaryDataModel model = new ShowPrimaryDataModel();

            model.Data                     = data;
            model.DatasetId                = datasetId;
            model.VersionId                = versionId;
            model.DataStructure            = dataStructure;
            model.DataStructureType        = DataStructureType.Structured;
            model.DatasetTitle             = title;
            model.CompareValuesOfDataTypes = CompareValues(dataStructure as StructuredDataStructure);
            model.DownloadAccess           = downloadAccess;
            model.DisplayFormats           = getDisplayFormatObjects(dataStructure as StructuredDataStructure);
            model.AsciiFileDownloadSupport = supportedAsciiFileTypes;
            model.LatestVersion            = latestVersion;
            model.HasEditRight             = hasEditRights;

            return(model);
        }