public InspireServiceStatusReport(Models.StatusReport statusReport) { if (statusReport != null) { NumberOfInspireServices = statusReport.NumberOfInspireDataServices(); Date = statusReport.Date; NumberOfItemsWithMetadata = new NumberOfStatuses(statusReport.NumberOfInspireDataServiceWithMetadata(Good), statusReport.NumberOfInspireDataServiceWithMetadata(Useable), statusReport.NumberOfInspireDataServiceWithMetadata(Deficient), statusReport.NumberOfInspireDataServiceWithMetadata(Notset)); NumberOfItemsWithMetadataInSearchService = new NumberOfStatuses(statusReport.NumberOfInspireDataServicesWithMetadataService(Good), statusReport.NumberOfInspireDataServicesWithMetadataService(Useable), statusReport.NumberOfInspireDataServicesWithMetadataService(Deficient), statusReport.NumberOfInspireDataServicesWithMetadataService(Notset)); NumberOfItemsWithServiceStatus = new NumberOfStatuses(statusReport.NumberOfItemsWithServiceStatus(Good), statusReport.NumberOfItemsWithServiceStatus(Useable), statusReport.NumberOfItemsWithServiceStatus(Deficient), statusReport.NumberOfItemsWithServiceStatus(Notset)); NumberOfItemsWithSds = statusReport.NumberOfInspireDataServiceWithSds(); NumberOfItemsWithoutSds = GetNumberOfItemsWithoutSds(); NumberOfItemsWithNetworkService = statusReport.NumberOfInspireDataServiceWithNetworkService(); NumberOfItemsWithoutNetworkService = GetNumberOfItemsWithoutNetworkService(); } }
public InspireDataSetStatusReport(Models.StatusReport statusReport) { if (statusReport.IsInspireDatasetReport()) { NumberOfInspireDatasets = statusReport.NumberOfInspireDataServices(); Date = statusReport.Date; NumberOfItemsWithMetadata = new NumberOfStatuses(statusReport.NumberOfInspireDatasetsWithMetadata(Good), statusReport.NumberOfInspireDatasetsWithMetadata(Useable), statusReport.NumberOfInspireDatasetsWithMetadata(Deficient), statusReport.NumberOfInspireDatasetsWithMetadata(Notset)); NumberOfItemsWithMetadataService = new NumberOfStatuses(statusReport.NumberOfItemsWithMetadataService(Good), statusReport.NumberOfItemsWithMetadataService(Useable), statusReport.NumberOfItemsWithMetadataService(Deficient), statusReport.NumberOfItemsWithMetadataService(Notset)); NumberOfItemsWithDistribution = new NumberOfStatuses(statusReport.NumberOfInspireDatasetsWithDistribution(Good), statusReport.NumberOfInspireDatasetsWithDistribution(Useable), statusReport.NumberOfInspireDatasetsWithDistribution(Deficient), statusReport.NumberOfInspireDatasetsWithDistribution(Notset)); NumberOfItemsWithWms = new NumberOfStatuses(statusReport.NumberOfInspireDatasetsWithWms(Good), statusReport.NumberOfInspireDatasetsWithWms(Useable), statusReport.NumberOfInspireDatasetsWithWms(Deficient), statusReport.NumberOfInspireDatasetsWithWms(Notset)); NumberOfItemsWithWfs = new NumberOfStatuses(statusReport.NumberOfInspireDatasetsWithWfs(Good), statusReport.NumberOfInspireDatasetsWithWfs(Useable), statusReport.NumberOfInspireDatasetsWithWfs(Deficient), statusReport.NumberOfInspireDatasetsWithWfs(Notset)); NumberOfItemsWithAtomFeed = new NumberOfStatuses(statusReport.NumberOfInspireDatasetsWithAtomFeed(Good), statusReport.NumberOfInspireDatasetsWithAtomFeed(Useable), statusReport.NumberOfInspireDatasetsWithAtomFeed(Deficient), statusReport.NumberOfInspireDatasetsWithAtomFeed(Notset)); NumberOfItemsWithWfsOrAtom = new NumberOfStatuses(statusReport.NumberOfItemsWithWfsOrAtom(Good), statusReport.NumberOfItemsWithWfsOrAtom(Useable), statusReport.NumberOfItemsWithWfsOrAtom(Deficient), statusReport.NumberOfItemsWithWfsOrAtom(Notset)); NumberOfItemsWithHarmonizedData = new NumberOfStatuses(statusReport.NumberOfItemsWithHarmonizedData(Good), statusReport.NumberOfItemsWithHarmonizedData(Useable), statusReport.NumberOfItemsWithHarmonizedData(Deficient), statusReport.NumberOfItemsWithHarmonizedData(Notset)); NumberOfItemsWithSpatialDataService = new NumberOfStatuses(statusReport.NumberOfItemsWithSpatialDataService(Good), statusReport.NumberOfItemsWithSpatialDataService(Useable), statusReport.NumberOfItemsWithSpatialDataService(Deficient), statusReport.NumberOfItemsWithSpatialDataService(Notset)); NumberOfInspireDatasets = statusReport.NumberOfInspireDatasets(); } }