private void GetDeliveryStatuses(GeodatalovDatasetViewModel geodatalovDatasetViewModel, GeodatalovDataset geodatalovDataset) { geodatalovDatasetViewModel.MetadataStatusId = _datasetDeliveryService.GetMetadataStatus(geodatalovDataset.Uuid, true, geodatalovDatasetViewModel.MetadataStatusId); geodatalovDatasetViewModel.ProductSpesificationStatusId = _registerService.GetDOKStatus(geodatalovDataset.ProductSpecificationUrl, true, geodatalovDatasetViewModel.ProductSpesificationStatusId); geodatalovDatasetViewModel.SosiDataStatusId = _registerService.GetSosiRequirements(geodatalovDataset.Uuid, geodatalovDatasetViewModel.ProductSpecificationUrl, true, geodatalovDatasetViewModel.SosiDataStatusId); geodatalovDatasetViewModel.GmlDataStatusId = _registerService.GetGmlRequirements(geodatalovDataset.Uuid, true, geodatalovDatasetViewModel.GmlDataStatusId); geodatalovDatasetViewModel.WmsStatusId = _datasetDeliveryService.GetDokDeliveryServiceStatus(geodatalovDataset.Uuid, true, geodatalovDatasetViewModel.WmsStatusId, geodatalovDataset.UuidService); geodatalovDatasetViewModel.WfsStatusId = _datasetDeliveryService.GetWfsStatus(geodatalovDataset.Uuid, true, geodatalovDatasetViewModel.WfsStatusId); geodatalovDatasetViewModel.AtomFeedStatusId = _datasetDeliveryService.GetAtomFeedStatus(geodatalovDataset.Uuid, true, geodatalovDatasetViewModel.AtomFeedStatusId); geodatalovDatasetViewModel.CommonStatusId = _datasetDeliveryService.GetDownloadRequirementsStatus(geodatalovDatasetViewModel.WfsStatusId, geodatalovDatasetViewModel.AtomFeedStatusId); }
private void GetDeliveryStatuses(MareanoDatasetViewModel MareanoDatasetViewModel, MareanoDataset MareanoDataset) { MareanoDatasetViewModel.MetadataStatusId = _datasetDeliveryService.GetMetadataStatus(MareanoDataset.Uuid, true, MareanoDatasetViewModel.MetadataStatusId); MareanoDatasetViewModel.ProductSpesificationStatusId = _registerService.GetDOKStatus(MareanoDataset.ProductSpecificationUrl, true, MareanoDatasetViewModel.ProductSpesificationStatusId); MareanoDatasetViewModel.ProductSheetStatusId = _registerService.GetDOKStatus(MareanoDataset.ProductSheetUrl, true, MareanoDatasetViewModel.ProductSpesificationStatusId); MareanoDatasetViewModel.PresentationRulesStatusId = _registerService.GetDOKStatus(MareanoDataset.PresentationRulesUrl, true, MareanoDatasetViewModel.PresentationRulesStatusId); MareanoDatasetViewModel.SosiDataStatusId = _registerService.GetSosiRequirements(MareanoDataset.Uuid, MareanoDatasetViewModel.ProductSpecificationUrl, true, MareanoDatasetViewModel.SosiDataStatusId); MareanoDatasetViewModel.GmlDataStatusId = _registerService.GetGmlRequirements(MareanoDataset.Uuid, true, MareanoDatasetViewModel.GmlDataStatusId); MareanoDatasetViewModel.WmsStatusId = _datasetDeliveryService.GetDokDeliveryServiceStatus(MareanoDataset.Uuid, true, MareanoDatasetViewModel.WmsStatusId, MareanoDataset.UuidService); MareanoDatasetViewModel.WfsStatusId = _datasetDeliveryService.GetWfsStatus(MareanoDataset.Uuid, true, MareanoDatasetViewModel.WfsStatusId); MareanoDatasetViewModel.AtomFeedStatusId = _datasetDeliveryService.GetAtomFeedStatus(MareanoDataset.Uuid, true, MareanoDatasetViewModel.AtomFeedStatusId); MareanoDatasetViewModel.CommonStatusId = _datasetDeliveryService.GetDownloadRequirementsStatus(MareanoDatasetViewModel.WfsStatusId, MareanoDatasetViewModel.AtomFeedStatusId); if (MareanoDataset.Grade.HasValue) { MareanoDatasetViewModel.Grade = MareanoDataset.Grade.Value; } }
private void NewInspireDatasetFromKartkatalogen(InspireDataset inspireDataset, Synchronize synchronizationJob) { if (!_registerItemService.ItemNameIsValid(inspireDataset)) { synchronizationJob.FailCount++; synchronizationJob.FailLog.Add(new SyncLogEntry(inspireDataset, "Navn finnes fra før")); return; } inspireDataset.SystemId = Guid.NewGuid(); inspireDataset.Seoname = RegisterUrls.MakeSeoFriendlyString(inspireDataset.Name); inspireDataset.SubmitterId = _registerService.GetOrganizationIdByUserName(); inspireDataset.DateSubmitted = DateTime.Now; inspireDataset.Modified = DateTime.Now; inspireDataset.RegisterId = _registerService.GetInspireStatusRegisterId(); inspireDataset.VersioningId = _registerItemService.NewVersioningGroup(inspireDataset); inspireDataset.VersionNumber = 1; inspireDataset.StatusId = "Submitted"; inspireDataset.DokStatusId = "Proposal"; //GetDeliveryStatuses(inspireDatasetViewModel, inspireDataset); var metadataStatus = _datasetDeliveryService.GetMetadataStatus(inspireDataset.Uuid); var metadataServiceStatus = "good"; var distributionStatus = _datasetDeliveryService.GetDeliveryDistributionStatus(inspireDataset.Uuid, inspireDataset.DistributionUrl); var wmsStatus = _datasetDeliveryService.GetInspireWmsStatus(inspireDataset.Uuid, true, "deficient", inspireDataset.UuidService); var wfsStatus = _datasetDeliveryService.GetInspireWfsStatus(inspireDataset.Uuid); var atomFeedStatus = _datasetDeliveryService.GetAtomFeedStatus(inspireDataset.Uuid); var wfsOrAtomStatus = _datasetDeliveryService.GetDownloadRequirementsStatus(wfsStatus, atomFeedStatus); var harmonizedDataStatus = _datasetDeliveryService.GetHarmonizedStatus(inspireDataset.Uuid); var spatialDataServiceStatusId = _datasetDeliveryService.GetSpatialDataStatus(inspireDataset.Uuid); inspireDataset.InspireDeliveryMetadataId = _datasetDeliveryService.CreateDatasetDelivery(metadataStatus); inspireDataset.InspireDeliveryMetadataServiceId = _datasetDeliveryService.CreateDatasetDelivery(metadataServiceStatus); inspireDataset.InspireDeliveryDistributionId = _datasetDeliveryService.CreateDatasetDelivery(distributionStatus); inspireDataset.InspireDeliveryWmsId = _datasetDeliveryService.CreateDatasetDelivery(wmsStatus); inspireDataset.InspireDeliveryWfsId = _datasetDeliveryService.CreateDatasetDelivery(wfsStatus); inspireDataset.InspireDeliveryAtomFeedId = _datasetDeliveryService.CreateDatasetDelivery(atomFeedStatus); inspireDataset.InspireDeliveryWfsOrAtomId = _datasetDeliveryService.CreateDatasetDelivery(wfsOrAtomStatus); inspireDataset.InspireDeliveryHarmonizedDataId = _datasetDeliveryService.CreateDatasetDelivery(harmonizedDataStatus); inspireDataset.InspireDeliverySpatialDataServiceId = _datasetDeliveryService.CreateDatasetDelivery(spatialDataServiceStatusId); synchronizationJob.AddedLog.Add(new SyncLogEntry(inspireDataset, "Lagt til")); _dbContext.InspireDatasets.Add(inspireDataset); _dbContext.SaveChanges(); }
public Dataset UpdateDataset(Dataset inputDataset, Dataset originalDataset = null, CoverageDataset coverage = null) { Dataset dataset = originalDataset ?? new Dataset(); dataset.systemId = inputDataset.GetSystemId(); dataset.modified = dataset.GetDateModified(); dataset.dateSubmitted = dataset.GetDateSubmbitted(); dataset.register = inputDataset.register; dataset.registerId = inputDataset.registerId; dataset.DatasetType = dataset.GetDatasetType(); dataset.statusId = dataset.SetStatusId(); dataset.dokStatusId = inputDataset.GetDokStatus(); dataset.dokStatusDateAccepted = inputDataset.GetDokStatusDateAccepted(); dataset.Kandidatdato = inputDataset.Kandidatdato; dataset.versionNumber = dataset.GetVersionNr(); dataset.versioningId = GetVersioningId(dataset); dataset.datasetownerId = GetDatasetOwnerId(inputDataset.datasetownerId); dataset.datasetowner = (Organization)_registerItemService.GetRegisterItemBySystemId(dataset.datasetownerId); dataset.submitterId = GetSubmitterId(inputDataset.submitterId); dataset.submitter = (Organization)_registerItemService.GetRegisterItemBySystemId(dataset.submitterId); dataset.Notes = inputDataset.GetNotes(); dataset.name = inputDataset.GetName(); dataset.seoname = RegisterUrls.MakeSeoFriendlyString(dataset.name); dataset.description = inputDataset.GetDescription(); dataset.DistributionUrl = inputDataset.GetDistributionUrl(); dataset.MetadataUrl = inputDataset.GetMetadataUrl(); dataset.PresentationRulesUrl = inputDataset.GetPresentationRulesUrl(); dataset.ProductSheetUrl = inputDataset.GetProductSheetUrl(); dataset.ProductSpecificationUrl = inputDataset.GetProductSpecificationUrl(); dataset.UuidService = inputDataset.GetServceUuid(); dataset.WmsUrl = inputDataset.GetWmsUrl(); dataset.DistributionFormat = inputDataset.GetDistributionFormat(); dataset.DistributionArea = inputDataset.GetDistributionArea(); dataset.ThemeGroupId = inputDataset.GetThemeGroupId(); dataset.datasetthumbnail = inputDataset.Getdatasetthumbnail(); dataset.Uuid = inputDataset.Uuid; dataset.SpecificUsage = inputDataset.SpecificUsage; dataset.restricted = inputDataset.restricted; dataset.dokDeliveryMetadataStatusId = _datasetDeliveryService.GetMetadataStatus(inputDataset.Uuid, inputDataset.dokDeliveryMetadataStatusAutoUpdate, inputDataset.dokDeliveryMetadataStatusId); dataset.dokDeliveryMetadataStatusNote = inputDataset.dokDeliveryMetadataStatusNote; dataset.dokDeliveryMetadataStatusAutoUpdate = inputDataset.dokDeliveryMetadataStatusAutoUpdate; dataset.dokDeliveryProductSheetStatusId = _registerService.GetDOKStatus(inputDataset.GetProductSheetUrl(), inputDataset.dokDeliveryProductSheetStatusAutoUpdate, inputDataset.dokDeliveryProductSheetStatusId); dataset.dokDeliveryProductSheetStatusNote = inputDataset.dokDeliveryProductSheetStatusNote; dataset.dokDeliveryProductSheetStatusAutoUpdate = inputDataset.dokDeliveryProductSheetStatusAutoUpdate; dataset.dokDeliveryPresentationRulesStatusId = _registerService.GetDOKStatus(inputDataset.GetPresentationRulesUrl(), inputDataset.dokDeliveryPresentationRulesStatusAutoUpdate, inputDataset.dokDeliveryPresentationRulesStatusId); dataset.dokDeliveryPresentationRulesStatusNote = inputDataset.dokDeliveryPresentationRulesStatusNote; dataset.dokDeliveryPresentationRulesStatusAutoUpdate = inputDataset.dokDeliveryPresentationRulesStatusAutoUpdate; dataset.dokDeliveryProductSpecificationStatusId = _registerService.GetDOKStatus(inputDataset.GetProductSpecificationUrl(), inputDataset.dokDeliveryProductSpecificationStatusAutoUpdate, inputDataset.dokDeliveryProductSpecificationStatusId); dataset.dokDeliveryProductSpecificationStatusNote = inputDataset.dokDeliveryProductSpecificationStatusNote; dataset.dokDeliveryProductSpecificationStatusAutoUpdate = inputDataset.dokDeliveryProductSpecificationStatusAutoUpdate; dataset.dokDeliveryWmsStatusId = _datasetDeliveryService.GetDokDeliveryServiceStatus(inputDataset.Uuid, inputDataset.dokDeliveryWmsStatusAutoUpdate, inputDataset.dokDeliveryWmsStatusId, inputDataset.UuidService); dataset.dokDeliveryWmsStatusNote = inputDataset.dokDeliveryWmsStatusNote; dataset.dokDeliveryWmsStatusAutoUpdate = inputDataset.dokDeliveryWmsStatusAutoUpdate; dataset.dokDeliveryWfsStatusId = _datasetDeliveryService.GetWfsStatus(inputDataset.Uuid, inputDataset.dokDeliveryWfsStatusAutoUpdate, inputDataset.dokDeliveryWfsStatusId); dataset.dokDeliveryWfsStatusNote = inputDataset.dokDeliveryWfsStatusNote; dataset.dokDeliveryWfsStatusAutoUpdate = inputDataset.dokDeliveryWfsStatusAutoUpdate; dataset.dokDeliverySosiRequirementsStatusId = _registerService.GetSosiRequirements(inputDataset.Uuid, inputDataset.GetProductSpecificationUrl(), inputDataset.dokDeliverySosiStatusAutoUpdate, inputDataset.dokDeliverySosiRequirementsStatusId); dataset.dokDeliverySosiRequirementsStatusNote = inputDataset.dokDeliverySosiRequirementsStatusNote; dataset.dokDeliverySosiStatusAutoUpdate = inputDataset.dokDeliverySosiStatusAutoUpdate; dataset.dokDeliveryGmlRequirementsStatusId = _registerService.GetGmlRequirements(inputDataset.Uuid, inputDataset.dokDeliveryGmlRequirementsStatusAutoUpdate, inputDataset.dokDeliveryGmlRequirementsStatusId); dataset.dokDeliveryGmlRequirementsStatusNote = inputDataset.dokDeliveryGmlRequirementsStatusNote; dataset.dokDeliveryGmlRequirementsStatusAutoUpdate = inputDataset.dokDeliveryGmlRequirementsStatusAutoUpdate; dataset.dokDeliveryAtomFeedStatusId = _datasetDeliveryService.GetAtomFeedStatus(inputDataset.Uuid, inputDataset.dokDeliveryAtomFeedStatusAutoUpdate, inputDataset.dokDeliveryAtomFeedStatusId); dataset.dokDeliveryAtomFeedStatusNote = inputDataset.dokDeliveryAtomFeedStatusNote; dataset.dokDeliveryAtomFeedStatusAutoUpdate = inputDataset.dokDeliveryAtomFeedStatusAutoUpdate; dataset.dokDeliveryDistributionStatusNote = inputDataset.dokDeliveryDistributionStatusNote; dataset.dokDeliveryDistributionStatusAutoUpdate = inputDataset.dokDeliveryDistributionStatusAutoUpdate; dataset.dokDeliveryDistributionStatusId = inputDataset.dokDeliveryDistributionStatusId; dataset.dokDeliveryDistributionStatusId = _registerService.GetDeliveryDownloadStatus(inputDataset.Uuid, inputDataset.dokDeliveryDistributionStatusAutoUpdate, dataset.dokDeliveryDistributionStatusId, dataset.dokDeliveryWfsStatusId, dataset.dokDeliveryAtomFeedStatusId); dataset.Coverage = EditDatasetCoverage(coverage, dataset, originalDataset); dataset.RegionalPlan = inputDataset.RegionalPlan; dataset.RegionalPlanNote = inputDataset.RegionalPlanNote; dataset.MunicipalSocialPlan = inputDataset.MunicipalSocialPlan; dataset.MunicipalSocialPlanNote = inputDataset.MunicipalSocialPlanNote; dataset.MunicipalLandUseElementPlan = inputDataset.MunicipalLandUseElementPlan; dataset.MunicipalLandUseElementPlanNote = inputDataset.MunicipalLandUseElementPlanNote; dataset.ZoningPlanArea = inputDataset.ZoningPlanArea; dataset.ZoningPlanAreaNote = inputDataset.ZoningPlanAreaNote; dataset.ZoningPlanDetails = inputDataset.ZoningPlanDetails; dataset.ZoningPlanDetailsNote = inputDataset.ZoningPlanDetailsNote; dataset.BuildingMatter = inputDataset.BuildingMatter; dataset.BuildingMatterNote = inputDataset.BuildingMatterNote; dataset.PartitionOff = inputDataset.PartitionOff; dataset.PartitionOffNote = inputDataset.PartitionOffNote; dataset.EenvironmentalImpactAssessment = inputDataset.EenvironmentalImpactAssessment; dataset.EenvironmentalImpactAssessmentNote = inputDataset.EenvironmentalImpactAssessmentNote; return(dataset); }