private MetadataExistenceIndicators GetMetadataExsistensIndicators()
        {
            MetadataExistenceIndicators metadataExistenceIndicators = new MetadataExistenceIndicators();

            metadataExistenceIndicators.MDi11 = _inspireMonitoring.ProportionOfDatasetsWithMetadataByAnnexI();    // Andel datasett som har metadata av Annex1 data (<MDv11>/<DSv_Num1>)
            metadataExistenceIndicators.MDi12 = _inspireMonitoring.ProportionOfDatasetsWithMetadataByAnnexII();   // Andel datasett som har metadata av Annex2 data (<MDv12>/<DSv_Num2>)
            metadataExistenceIndicators.MDi13 = _inspireMonitoring.ProportionOfDatasetsWithMetadataByAnnexIII();  // Andel datasett som har metadata av Annex3 data (<MDv13>/<DSv_Num3>)
            metadataExistenceIndicators.MDi14 = _inspireMonitoring.ProportionOfServicesWithMetadata();            // Andel tjenester som har metadata (<MDv14>/<NSv_NumAllServ>)
            metadataExistenceIndicators.MDi1  = _inspireMonitoring.ProportionOfDatasetsAndServicesWithMetadata(); // <MDv1_DS>+<MDv14> /<NSv_NumAllServ>+<DSv_Num>

            metadataExistenceIndicators.MetadataExistence = GetMetadataExistence();

            return(metadataExistenceIndicators);
        }
Exemple #2
0
        public InspireMonitoringViewModel(IInspireMonitoring inspireMonitoring)
        {
            if (inspireMonitoring != null)
            {
                Date = inspireMonitoring.Date;

                MDi1Value       = Percent(inspireMonitoring.ProportionOfDatasetsAndServicesWithMetadata());
                MDi1Numerator   = inspireMonitoring.NumberOfDatasetsWithMetadata + inspireMonitoring.NumberOfServicesWithMetadata;
                MDi1Denominator = inspireMonitoring.NumberOfDatasetsByAnnex + inspireMonitoring.NumberOfServicesByServiceType();

                MDi2Value     = Percent(inspireMonitoring.ProportionOfDatasetByAnnexIWithMetadatastatusGood());
                MDi2Numerator = inspireMonitoring.NumberOfServicesWhereMetadataStatusIsgood +
                                inspireMonitoring.NumberOfDatasetsByAnnexWhereMetadataStatusIsgood();
                MDi2Denominator = inspireMonitoring.NumberOfServicesByServiceType() +
                                  inspireMonitoring.NumberOfDatasetsByAnnex;

                DSi1Value       = Percent(inspireMonitoring.ProportionOfArealByAnnex());
                DSi1Numerator   = inspireMonitoring.AccumulatedCurrentAreaByAnnex();
                DSi1Denominator = inspireMonitoring.AccumulatedRelevantAreaByAnnex();

                DSi2Value       = Percent(inspireMonitoring.ProportionOfDatasetWithHarmonizedDataAndConformedMetadata());
                DSi2Numerator   = inspireMonitoring.NumberOfDatasetsWithHarmonizedDataAndConformedMetadata();
                DSi2Denominator = inspireMonitoring.NumberOfDatasetsByAnnex;

                NSi1Value     = Percent(inspireMonitoring.ProportionOfServicesAndDatasetsRegisteredInADiscoveryService());
                NSi1Numerator = inspireMonitoring.NumberOfDatasetsRegisteredInADiscoveryService +
                                inspireMonitoring.NumberOfServicesRegisteredInADiscoveryService;
                NSi1Denominator = inspireMonitoring.NumberOfDatasetsByAnnex +
                                  inspireMonitoring.NumberOfServicesByServiceType();

                NSi2Value       = Percent(inspireMonitoring.ProportionOfDatasetsAvailableThroughViewAndDownloadService());
                NSi2Numerator   = inspireMonitoring.NumberOfDatasetsAvailableThroughViewANDDownloadService;
                NSi2Denominator = inspireMonitoring.NumberOfServicesByServiceTypeDownload +
                                  inspireMonitoring.NumberOfServicesByServiceTypeView;

                NSi3Value       = Math.Round(inspireMonitoring.AverageNumberOfCallsByServiceType());
                NSi3Numerator   = inspireMonitoring.NumberOfCallsByServiceType();
                NSi3Denominator = inspireMonitoring.NumberOfServicesByServiceType();

                NSi4Value       = Percent(inspireMonitoring.ProportionOfServicesWhereConformityIsTrue());
                NSi4Numerator   = inspireMonitoring.NumberOfServicesByServiceTypeWhereConformityIsTrue();
                NSi4Denominator = inspireMonitoring.NumberOfServicesByServiceType();

                NSi11Value       = Percent(inspireMonitoring.ProportionOfDatasetsRegisteredInADiscoveryService());
                NSi11Numerator   = inspireMonitoring.NumberOfDatasetsRegisteredInADiscoveryService;
                NSi11Denominator = inspireMonitoring.NumberOfDatasetsByAnnex;

                MDi11Value       = Percent(inspireMonitoring.ProportionOfDatasetsWithMetadataByAnnexI());
                MDi11Numerator   = inspireMonitoring.NumberOfDatasetsByAnnexIWithMetadata;
                MDi11Denominator = inspireMonitoring.NumberOfDatasetsByAnnexI;

                MDi12Value       = Percent(inspireMonitoring.ProportionOfDatasetsWithMetadataByAnnexII());
                MDi12Numerator   = inspireMonitoring.NumberOfDatasetsByAnnexIIWithMetadata;
                MDi12Denominator = inspireMonitoring.NumberOfDatasetsByAnnexII;

                MDi13Value       = Percent(inspireMonitoring.ProportionOfDatasetsWithMetadataByAnnexIII());
                MDi13Numerator   = inspireMonitoring.NumberOfDatasetsByAnnexIIIWithMetadata;
                MDi13Denominator = inspireMonitoring.NumberOfDatasetsByAnnexIII;

                MDi21Value       = Percent(inspireMonitoring.ProportionOfDatasetByAnnexIWithMetadatastatusGood());
                MDi21Numerator   = inspireMonitoring.NumberOfDatasetsByAnnexIWhereMetadataStatusIsgood;
                MDi21Denominator = inspireMonitoring.NumberOfDatasetsByAnnexI;

                MDi22Value       = Percent(inspireMonitoring.ProportionOfDatasetByAnnexIIWithMetadatastatusGood());
                MDi22Numerator   = inspireMonitoring.NumberOfDatasetsByAnnexIIWhereMetadataStatusIsgood;
                MDi22Denominator = inspireMonitoring.NumberOfDatasetsByAnnexII;

                MDi23Value       = Percent(inspireMonitoring.ProportionOfDatasetByAnnexIIIWithMetadatastatusGood());
                MDi23Numerator   = inspireMonitoring.NumberOfDatasetsByAnnexIIIWhereMetadataStatusIsgood;
                MDi23Denominator = inspireMonitoring.NumberOfDatasetsByAnnexIII;

                DSi11Value       = Percent(inspireMonitoring.ProportionOfArealByAnnexI());
                DSi11Numerator   = inspireMonitoring.AccumulatedCurrentAreaByAnnexI;
                DSi11Denominator = inspireMonitoring.AccumulatedRelevantAreaByAnnexI;

                DSi12Value       = Percent(inspireMonitoring.ProportionOfArealByAnnexII());
                DSi12Numerator   = inspireMonitoring.AccumulatedCurrentAreaByAnnexII;
                DSi12Denominator = inspireMonitoring.AccumulatedRelevantAreaByAnnexII;

                DSi13Value       = Percent(inspireMonitoring.ProportionOfArealByAnnexIII());
                DSi13Numerator   = inspireMonitoring.AccumulatedCurrentAreaByAnnexIII;
                DSi13Denominator = inspireMonitoring.AccumulatedRelevantAreaByAnnexIII;

                DSi21Value       = Percent(inspireMonitoring.ProportionOfDatasetsByAnnexIWithHarmonizedDataAndConformedMetadata());
                DSi21Numerator   = inspireMonitoring.NumberOfDatasetsByAnnexIWithHarmonizedDataAndConformedMetadata;
                DSi21Denominator = inspireMonitoring.NumberOfDatasetsByAnnexI;

                DSi22Value       = Percent(inspireMonitoring.ProportionOfDatasetsByAnnexIIWithHarmonizedDataAndConformedMetadata());
                DSi22Numerator   = inspireMonitoring.NumberOfDatasetsByAnnexIIWithHarmonizedDataAndConformedMetadata;
                DSi22Denominator = inspireMonitoring.NumberOfDatasetsByAnnexII;

                DSi23Value       = Percent(inspireMonitoring.ProportionOfDatasetsByAnnexIIIWithHarmonizedDataAndConformedMetadata());
                DSi23Numerator   = inspireMonitoring.NumberOfDatasetsByAnnexIIIWithHarmonizedDataAndConformedMetadata;
                DSi23Denominator = inspireMonitoring.NumberOfDatasetsByAnnexIII;

                MDi14Value       = Percent(inspireMonitoring.ProportionOfServicesWithMetadata());
                MDi14Numerator   = inspireMonitoring.NumberOfServicesWithMetadata;
                MDi14Denominator = inspireMonitoring.NumberOfServicesByServiceType();

                MDi24Value       = Percent(inspireMonitoring.ProportionOfServicesWithMetadatastatusGood());
                MDi24Numerator   = inspireMonitoring.NumberOfServicesWhereMetadataStatusIsgood;
                MDi24Denominator = inspireMonitoring.NumberOfServicesByServiceType();

                NSi12Value       = Percent(inspireMonitoring.ProportionOfServicesRegisteredInADiscoveryService());
                NSi12Numerator   = inspireMonitoring.NumberOfServicesRegisteredInADiscoveryService;
                NSi12Denominator = inspireMonitoring.NumberOfServicesByServiceType();

                NSi31Value       = Math.Round(inspireMonitoring.AverageNumberOfCallsByServiceTypeDiscovery(), 2);
                NSi31Numerator   = inspireMonitoring.NumberOfCallsByServiceTypeDiscovery;
                NSi31Denominator = inspireMonitoring.NumberOfServicesByServiceTypeDiscovery;

                NSi32Value       = Math.Round(inspireMonitoring.AverageNumberOfCallsByServiceTypeView(), 2);
                NSi32Numerator   = inspireMonitoring.NumberOfCallsByServiceTypeView;
                NSi32Denominator = inspireMonitoring.NumberOfServicesByServiceTypeView;

                NSi33Value       = Math.Round(inspireMonitoring.AverageNumberOfCallsByServiceTypeDownload(), 2);
                NSi33Numerator   = inspireMonitoring.NumberOfCallsByServiceTypeDownload;
                NSi33Denominator = inspireMonitoring.NumberOfServicesByServiceTypeDownload;

                NSi34Value       = Math.Round(inspireMonitoring.AverageNumberOfCallsByServiceTypeTransformation(), 2);
                NSi34Numerator   = inspireMonitoring.NumberOfCallsByServiceTypeTransformation;
                NSi34Denominator = inspireMonitoring.NumberOfServicesByServiceTypeTransformation;

                NSi35Value       = Math.Round(inspireMonitoring.AverageNumberOfCallsByServiceTypeInvoke(), 2);
                NSi35Numerator   = inspireMonitoring.NumberOfCallsByServiceTypeInvoke;
                NSi35Denominator = inspireMonitoring.NumberOfServicesByServiceTypeInvoke;

                NSi41Value       = Percent(inspireMonitoring.ProportionOfServicesByServiceTypeDiscoveryWhereConformityIsTrue());
                NSi41Numerator   = inspireMonitoring.NumberOfServicesByServiceTypeDiscoveryWhereConformityIsTrue;
                NSi41Denominator = inspireMonitoring.NumberOfServicesByServiceTypeDiscovery;

                NSi42Value       = Percent(inspireMonitoring.ProportionOfServicesByServiceTypeViewWhereConformityIsTrue());
                NSi42Numerator   = inspireMonitoring.NumberOfServicesByServiceTypeViewWhereConformityIsTrue;
                NSi42Denominator = inspireMonitoring.NumberOfServicesByServiceTypeView;

                NSi43Value       = Percent(inspireMonitoring.ProportionOfServicesByServiceTypeDownloadWhereConformityIsTrue());
                NSi43Numerator   = inspireMonitoring.NumberOfServicesByServiceTypeDownloadWhereConformityIsTrue;
                NSi43Denominator = inspireMonitoring.NumberOfServicesByServiceTypeDownload;

                NSi44Value       = Percent(inspireMonitoring.ProportionOfServicesByServiceTypeTransformationWhereConformityIsTrue());
                NSi44Numerator   = inspireMonitoring.NumberOfServicesByServiceTypeTransformationWhereConformityIsTrue;
                NSi44Denominator = inspireMonitoring.NumberOfServicesByServiceTypeTransformation;

                NSi45Value       = Percent(inspireMonitoring.ProportionOfServicesByServiceTypeInvokeWhereConformityIsTrue());
                NSi45Numerator   = inspireMonitoring.NumberOfServicesByServiceTypeInvokeWhereConformityIsTrue;
                NSi45Denominator = inspireMonitoring.NumberOfServicesByServiceTypeInvoke;

                NSi21Value       = Percent(inspireMonitoring.ProportionOfDatasetsAvailableThroughViewService());
                NSi21Numerator   = inspireMonitoring.NumberOfDatasetsAvailableThroughViewService;
                NSi21Denominator = inspireMonitoring.NumberOfServicesByServiceTypeView;

                NSi22Value       = Percent(inspireMonitoring.ProportionOfDatasetsAvailableThroughDownloadService());
                NSi22Numerator   = inspireMonitoring.NumberOfDatasetsAvailableThroughDownloadService;
                NSi22Denominator = inspireMonitoring.NumberOfServicesByServiceTypeDownload;
            }
        }