/// <summary>
        /// Wrapper to method call.
        /// </summary>
        /// <param name="methodName">Name of the method to execute.</param>
        /// <param name="dictionaryWebData">The dictionary web data.</param>
        /// <param name="context">Web service context.</param>
        /// <param name="mapping">Mapping where the method is used.</param>
        /// <returns>String value as returned from the method that was being called.</returns>
        protected override String MethodWrapper(String methodName,
                                                Dictionary <string, WebDataField> dictionaryWebData,
                                                WebServiceContext context,
                                                HarvestMapping mapping)
        {
            String returnValue = String.Empty;

            switch (methodName)
            {
            case "GetCoordinateX":
                returnValue = GetCoordinateX(dictionaryWebData);
                break;

            case "GetCoordinateX_RT90":
                returnValue = GetCoordinateX_RT90_25_gon_v(dictionaryWebData);
                break;

            case "GetCoordinateX_SWEREF99":
                returnValue = GetCoordinateX_SWEREF99_TM(dictionaryWebData);
                break;

            case "GetCoordinateY":
                returnValue = GetCoordinateY(dictionaryWebData);
                break;

            case "GetCoordinateY_RT90":
                returnValue = GetCoordinateY_RT90_25_gon_v(dictionaryWebData);
                break;

            case "GetCoordinateY_SWEREF99":
                returnValue = GetCoordinateY_SWEREF99_TM(dictionaryWebData);
                break;

            case "CreateEventTime":
                returnValue = CreateEventTime(dictionaryWebData);
                break;

            case "GetCatalogNumber":
                returnValue = GetCatalogNumber(dictionaryWebData);
                break;

            case "GetYear":
                if (dictionaryWebData["eventdate"].GetString().IsDateTime())
                {
                    returnValue = dictionaryWebData["eventdate"].GetString().WebParseDateTime().Year.WebToString();
                }

                break;

            case "GetMonth":
                if (dictionaryWebData["eventdate"].GetString().IsDateTime())
                {
                    returnValue = dictionaryWebData["eventdate"].GetString().WebParseDateTime().Month.WebToString();
                }

                break;

            case "GetDay":
                if (dictionaryWebData["eventdate"].GetString().IsDateTime())
                {
                    returnValue = dictionaryWebData["eventdate"].GetString().WebParseDateTime().Day.WebToString();
                }

                break;

            case "GetEndDayOfYear":
                if (dictionaryWebData["eventdate"].GetString().IsDateTime())
                {
                    returnValue = dictionaryWebData["eventdate"].GetString().WebParseDateTime().DayOfYear.WebToString();
                }

                break;

            case "GetProtectionLevel":
                returnValue = GetProtectionLevel(dictionaryWebData, context);
                break;

            case "GetStartDayOfYear":
                if (dictionaryWebData["eventdate"].GetString().IsDateTime())
                {
                    returnValue = dictionaryWebData["eventdate"].GetString().WebParseDateTime().DayOfYear.WebToString();
                }

                break;
            }

            return(returnValue);
        }
Пример #2
0
        /// <summary>
        /// Wrapper to method call.
        /// </summary>
        /// <param name="methodName">Name of the method to execute.</param>
        /// <param name="dictionaryWebData">The dictionary web data.</param>
        /// <param name="context">Web service context.</param>
        /// <param name="mapping">Mapping where the method is used.</param>
        /// <returns>String value as returned from the method that was being called.</returns>
        protected override String MethodWrapper(String methodName,
                                                Dictionary <string, WebDataField> dictionaryWebData,
                                                WebServiceContext context,
                                                HarvestMapping mapping)
        {
            String returnValue = String.Empty;

            switch (methodName)
            {
            case "CreateEventDate":
                returnValue = CreateEventDate(dictionaryWebData, "start", "end", "start", "end");
                break;

            case "CreateEventTime":
                returnValue = CreateEventTime(dictionaryWebData);
                break;

            case "CreateInstitutionId":
                returnValue = "urn:lsid:artdata.slu.se:organization:" + dictionaryWebData["id"].Value.Trim();
                break;

            case "GetCatalogNumber":
                returnValue = GetCatalogNumber(dictionaryWebData);
                break;

            case "FindTaxonID":
                returnValue = FindTaxonId(dictionaryWebData, context);
                break;

            case "GetBirdNestActivityId":
                returnValue = GetBirdNestActivityId(dictionaryWebData, context);
                break;

            case "GetCollectionCode":
                returnValue = GetCollectionCode(dictionaryWebData, "collection");
                break;

            case "GetCoordinateX":
                returnValue = GetCoordinateX(dictionaryWebData);
                break;

            case "GetCoordinateX_RT90":
                returnValue = GetCoordinateX_RT90_25_gon_v(dictionaryWebData);
                break;

            case "GetCoordinateX_SWEREF99":
                returnValue = GetCoordinateX_SWEREF99_TM(dictionaryWebData);
                break;

            case "GetCoordinateX_ETRS89_LAEA":
                returnValue = GetCoordinateX_ETRS89_LAEA(dictionaryWebData);
                break;

            case "GetCoordinateY":
                returnValue = GetCoordinateY(dictionaryWebData);
                break;

            case "GetCoordinateY_RT90":
                returnValue = GetCoordinateY_RT90_25_gon_v(dictionaryWebData);
                break;

            case "GetCoordinateY_SWEREF99":
                returnValue = GetCoordinateY_SWEREF99_TM(dictionaryWebData);
                break;

            case "GetCoordinateY_ETRS89_LAEA":
                returnValue = GetCoordinateY_ETRS89_LAEA(dictionaryWebData);
                break;

            case "GetDecimalLatitude":
                returnValue = GetDecimalLatitude(dictionaryWebData);
                break;

            case "GetDecimalLongitude":
                returnValue = GetDecimalLongitude(dictionaryWebData);
                break;

            case "GetDyntaxaTaxonId":
                returnValue = GetDyntaxaTaxonId(dictionaryWebData, context);
                break;

            case "GetIsNeverFoundObservation":
                returnValue = GetIsNeverFoundObservation(dictionaryWebData);
                break;

            case "GetIsPositiveObservation":
                returnValue = GetIsPositiveObservation(dictionaryWebData);
                break;

            case "GetOccurrenceStatus":
                returnValue = GetOccurrenceStatus(dictionaryWebData);
                break;

            case "GetProtectionLevel":
                returnValue = GetProtectionLevel(dictionaryWebData, context);
                break;

            case "GetRecordedBy":
                returnValue = GetRecordedBy(dictionaryWebData);
                break;

            case "GetRights":
                returnValue = GetRights(dictionaryWebData);
                break;

            case "GetYear":
                returnValue = dictionaryWebData["end"].GetDateTime().Year.WebToString();
                break;

            case "GetMonth":
                returnValue = dictionaryWebData["end"].GetDateTime().Month.WebToString();
                break;

            case "GetDay":
                returnValue = dictionaryWebData["end"].GetDateTime().Day.WebToString();
                break;

            case "GetEndDayOfYear":
                returnValue = dictionaryWebData["end"].GetDateTime().DayOfYear.WebToString();
                break;

            case "GetStartDayOfYear":
                returnValue = dictionaryWebData["start"].GetDateTime().DayOfYear.WebToString();
                break;
            }

            return(returnValue);
        }
Пример #3
0
        /// <summary>
        /// Wrapper to method call.
        /// </summary>
        /// <param name="methodName">Name of the method to execute.</param>
        /// <param name="dictionaryWebData">The dictionary web data.</param>
        /// <param name="context">Web service context.</param>
        /// <param name="mapping">Mapping where the method is used.</param>
        /// <returns>String value as returned from the method that was being called.</returns>
        protected override String MethodWrapper(String methodName,
                                                Dictionary <string, WebDataField> dictionaryWebData,
                                                WebServiceContext context,
                                                HarvestMapping mapping)
        {
            String returnValue = String.Empty;

            switch (methodName)
            {
            case "CreateEventDate":
                returnValue = CreateEventDate(dictionaryWebData);
                break;

            case "CreateOccurrenceID":
                returnValue = CreateOccurrenceId(dictionaryWebData);
                break;

            case "GetDecimalLongitude":
                returnValue = GetDecimalLongitude(dictionaryWebData);
                break;

            case "GetDecimalLatitude":
                returnValue = GetDecimalLatitude(dictionaryWebData);
                break;

            case "GetIsPositiveObservation":
                returnValue = GetIsPositiveObservation(dictionaryWebData);
                break;

            case "GetOccurrenceStatus":
                returnValue = GetOccurrenceStatus(dictionaryWebData);
                break;

            case "GetCollectionCode":
                returnValue = GetCollectionCode(dictionaryWebData, "collectioncode");
                break;

            case "GetCoordinateX":
                returnValue = GetCoordinateX(dictionaryWebData);
                break;

            case "GetCoordinateX_RT90":
                returnValue = GetCoordinateX_RT90_25_gon_v(dictionaryWebData);
                break;

            case "GetCoordinateX_SWEREF99":
                returnValue = GetCoordinateX_SWEREF99_TM(dictionaryWebData);
                break;

            case "GetCoordinateX_ETRS89_LAEA":
                returnValue = GetCoordinateX_ETRS89_LAEA(dictionaryWebData);
                break;

            case "GetCoordinateY":
                returnValue = GetCoordinateY(dictionaryWebData);
                break;

            case "GetCoordinateY_RT90":
                returnValue = GetCoordinateY_RT90_25_gon_v(dictionaryWebData);
                break;

            case "GetCoordinateY_SWEREF99":
                returnValue = GetCoordinateY_SWEREF99_TM(dictionaryWebData);
                break;

            case "GetCoordinateY_ETRS89_LAEA":
                returnValue = GetCoordinateY_ETRS89_LAEA(dictionaryWebData);
                break;

            case "GetLocality":
                returnValue = GetLocality(dictionaryWebData);
                break;

            case "GetModifiedDate":
                returnValue = GetModifiedDate(dictionaryWebData, "editdate", "registerdate");
                break;

            case "GetProtectionLevel":
                returnValue = GetProtectionLevel(dictionaryWebData, context);
                break;

            case "GetRights":
                returnValue = GetRights(dictionaryWebData);
                break;
            }
            return(returnValue);
        }
Пример #4
0
        /// <summary>
        /// Wrapper to method call.
        /// </summary>
        /// <param name="methodName">Name of the method to execute.</param>
        /// <param name="dictionaryWebData">The dictionary web data.</param>
        /// <param name="context">Web service context.</param>
        /// <param name="mapping">Mapping where the method is used.</param>
        /// <returns>String value as returned from the method that was being called.</returns>
        protected override String MethodWrapper(String methodName,
                                                Dictionary <string, WebDataField> dictionaryWebData,
                                                WebServiceContext context,
                                                HarvestMapping mapping)
        {
            String returnValue = String.Empty;

            switch (methodName)
            {
            case "GetDyntaxaTaxonId":
                returnValue = GetDyntaxaTaxonId(dictionaryWebData, context);
                break;

            case "GetEventDate":
                returnValue = GetEventDate(dictionaryWebData, context);
                break;

            case "GetCoordinateX":
                returnValue = GetCoordinateX(dictionaryWebData);
                break;

            case "GetCoordinateX_RT90":
                returnValue = GetCoordinateX_RT90_25_gon_v(dictionaryWebData);
                break;

            case "GetCoordinateX_SWEREF99":
                returnValue = GetCoordinateX_SWEREF99_TM(dictionaryWebData);
                break;

            case "GetCoordinateY":
                returnValue = GetCoordinateY(dictionaryWebData);
                break;

            case "GetCoordinateY_RT90":
                returnValue = GetCoordinateY_RT90_25_gon_v(dictionaryWebData);
                break;

            case "GetCoordinateY_SWEREF99":
                returnValue = GetCoordinateY_SWEREF99_TM(dictionaryWebData);
                break;

            //case "GetCountryCode":
            //    returnValue = GetCountryCode(dictionaryWebData);
            //    break;

            //case "CreateOccurrenceID":
            //    returnValue = CreateOccurrenceId(dictionaryWebData);
            //    break;
            case "CalculateFromEventDate":
                returnValue = GetEventDateString(dictionaryWebData);
                break;

            case "GetProtectionLevel":
                returnValue = GetProtectionLevel(dictionaryWebData, context);
                break;

            case "GetEndDayOfYear":
                returnValue = GetEndDayOfYear(dictionaryWebData);
                break;

            case "GetStartDayOfYear":
                returnValue = GetStartDayOfYear(dictionaryWebData);
                break;

            case "GetOccurrenceUrl":
                returnValue = GetOccurrenceUrl(dictionaryWebData);
                break;

            case "GetMunicipality":
                returnValue = GetMunicipality(dictionaryWebData, context, mapping);
                break;

            case "GetParish":
                returnValue = GetParish(dictionaryWebData, context, mapping);
                break;

            case "GetStateProvince":
                returnValue = GetStateProvince(dictionaryWebData, context, mapping);
                break;

            case "GetCounty":
                returnValue = GetCounty(dictionaryWebData, context, mapping);
                break;
            }

            return(returnValue);
        }
Пример #5
0
        /// <summary>
        /// Wrapper to method call.
        /// </summary>
        /// <param name="methodName">Name of the method to execute.</param>
        /// <param name="dictionaryWebData">The dictionary web data.</param>
        /// <param name="context">Web service context.</param>
        /// <param name="mapping">Mapping where the method is used.</param>
        /// <returns>String value as returned from the method that was being called.</returns>
        protected override String MethodWrapper(String methodName,
                                                Dictionary <string, WebDataField> dictionaryWebData,
                                                WebServiceContext context,
                                                HarvestMapping mapping)
        {
            String returnValue = String.Empty;

            switch (methodName)
            {
            case "CreateEventDate":
                returnValue = CreateEventDate(dictionaryWebData);
                break;

            case "CreateEventTime":
                returnValue = CreateEventTime(dictionaryWebData);
                break;

            case "CreateOccurrenceID":
                returnValue = CreateOccurrenceId(dictionaryWebData);
                break;

            case "GetIsPositiveObservation":
                returnValue = GetIsPositiveObservation(dictionaryWebData);
                break;

            case "GetOccurrenceStatus":
                returnValue = GetOccurrenceStatus(dictionaryWebData);
                break;

            case "GetCollectionCode":
                returnValue = GetCollectionCode(dictionaryWebData, "collection");
                break;

            case "GetCoordinateX":
                returnValue = GetCoordinateX(dictionaryWebData);
                break;

            case "GetCoordinateX_RT90":
                returnValue = GetCoordinateX_RT90_25_gon_v(dictionaryWebData);
                break;

            case "GetCoordinateX_SWEREF99":
                returnValue = GetCoordinateX_SWEREF99_TM(dictionaryWebData);
                break;

            case "GetCoordinateX_ETRS89_LAEA":
                returnValue = GetCoordinateX_ETRS89_LAEA(dictionaryWebData);
                break;

            case "GetCoordinateY":
                returnValue = GetCoordinateY(dictionaryWebData);
                break;

            case "GetCoordinateY_RT90":
                returnValue = GetCoordinateY_RT90_25_gon_v(dictionaryWebData);
                break;

            case "GetCoordinateY_SWEREF99":
                returnValue = GetCoordinateY_SWEREF99_TM(dictionaryWebData);
                break;

            case "GetCoordinateY_ETRS89_LAEA":
                returnValue = GetCoordinateY_ETRS89_LAEA(dictionaryWebData);
                break;

            case "GetYear":
                returnValue = dictionaryWebData["enddate"].GetDateTime().Year.WebToString();
                break;

            case "GetMonth":
                returnValue = dictionaryWebData["enddate"].GetDateTime().Month.WebToString();
                break;

            case "GetDay":
                returnValue = dictionaryWebData["enddate"].GetDateTime().Day.WebToString();
                break;

            case "GetEndDayOfYear":
                returnValue = dictionaryWebData["enddate"].GetDateTime().DayOfYear.WebToString();
                break;

            case "GetStartDayOfYear":
                returnValue = dictionaryWebData["startdate"].GetDateTime().DayOfYear.WebToString();
                break;

            case "GetModifiedDate":
                returnValue = GetModifiedDate(dictionaryWebData, "editdate", "registerdate");
                break;

            case "GetBirdNestActivityId":
                returnValue = GetBirdNestActivityId(dictionaryWebData, context);
                break;

            case "GetProtectionLevel":
                returnValue = GetProtectionLevel(dictionaryWebData, context);
                break;
            }

            return(returnValue);
        }