Пример #1
0
        /// <inheritDoc />
        public override bool Equals(BaseEntity other)
        {
            DataServiceInfo otherService = other as DataServiceInfo;

            if (otherService == null)
            {
                return(base.Equals(other));
            }
            else
            {
                return(EndpointURL.Equals(otherService.EndpointURL));
            }
        }
Пример #2
0
 public IWaterOneFlowParser GetParser(DataServiceInfo dataService)
 {
     IWaterOneFlowParser parser;
     switch (dataService.Version.ToString("F1", CultureInfo.InvariantCulture))
     {
         case "1.0":
             parser = new WaterOneFlow10Parser();
             break;
         default:
             parser = new WaterOneFlow11Parser();
             break;
     }
     return parser;
 }
Пример #3
0
 /// <summary>
 /// Creates a copy of the data service object with the same
 /// properties as the original
 /// </summary>
 /// <param name="original">The original dataServiceInfo object</param>
 public DataServiceInfo(DataServiceInfo original)
 {
     ServiceTitle   = original.ServiceTitle;
     ServiceCode    = original.ServiceCode;
     ServiceName    = original.ServiceName;
     ServiceType    = original.ServiceType;
     Version        = original.Version;
     Protocol       = original.Protocol;
     EndpointURL    = original.EndpointURL;
     DescriptionURL = original.DescriptionURL;
     NorthLatitude  = original.NorthLatitude;
     SouthLatitude  = original.SouthLatitude;
     EastLongitude  = original.EastLongitude;
     WestLongitude  = original.WestLongitude;
     Abstract       = original.Abstract;
     ContactName    = original.ContactName;
     ContactEmail   = original.ContactEmail;
     Citation       = original.Citation;
     IsHarvested    = original.IsHarvested;
     HarveDateTime  = original.HarveDateTime;
 }
Пример #4
0
 /// <summary>
 /// Creates a copy of the data service object with the same
 /// properties as the original
 /// </summary>
 /// <param name="original">The original dataServiceInfo object</param>
 public DataServiceInfo(DataServiceInfo original)
 {
     ServiceTitle = original.ServiceTitle;
     ServiceCode = original.ServiceCode;
     ServiceName = original.ServiceName;
     ServiceType = original.ServiceType;
     Version = original.Version;
     Protocol = original.Protocol;
     EndpointURL = original.EndpointURL;
     DescriptionURL = original.DescriptionURL;
     NorthLatitude = original.NorthLatitude;
     SouthLatitude = original.SouthLatitude;
     EastLongitude = original.EastLongitude;
     WestLongitude = original.WestLongitude;
     Abstract = original.Abstract;
     ContactName = original.ContactName;
     ContactEmail = original.ContactEmail;
     Citation = original.Citation;
     IsHarvested = original.IsHarvested;
     HarveDateTime = original.HarveDateTime;
 }
Пример #5
0
		/// <summary>
		/// Creates a new instance of a WaterOneFlow web service client
		/// which communicates with the specified web service.
		/// </summary>
		/// <param name="serviceInfo">The object with web service information</param>
		/// <remarks>Throws an exception if the web service is not a valid
		/// WaterOneFlow service</remarks>
		public WaterOneFlowClient(DataServiceInfo serviceInfo)
		{
			_serviceURL = serviceInfo.EndpointURL;

			//find out the WaterOneFlow version of this web service
			_serviceInfo = serviceInfo;
            _serviceInfo.Version = WebServiceHelper.GetWaterOneFlowVersion(_serviceURL);
                        
            //assign the waterOneFlow parser
            _parser = new ParserFactory().GetParser(ServiceInfo);
            
            SaveXmlFiles = false; // false on webserver
		}