private WebClientInformation GetClientInformation(Boolean refresh)
 {
     if (_clientInformation.IsNull() || refresh)
     {
         _clientInformation = new WebClientInformation();
     }
     return(_clientInformation);
 }
 /// <summary>
 /// Delete species facts.
 /// </summary>
 /// <param name="clientInformation">Information about the client that makes this web service call.</param>
 /// <param name="deleteSpeciesFacts">Existing species facts to delete.</param>
 public void DeleteSpeciesFacts(WebClientInformation clientInformation,
                                List <WebSpeciesFact> deleteSpeciesFacts)
 {
     using (ClientProxy client = new ClientProxy(this, 10))
     {
         client.Client.DeleteSpeciesFacts(clientInformation, deleteSpeciesFacts);
     }
 }
 /// <summary>
 /// Get information about taxa that matches search criteria.
 /// </summary>
 /// <param name="clientInformation">Information about the client that makes this web service call.</param>
 /// <param name="searchCriteria">Species fact search criteria.</param>
 /// <returns>List of Taxa ids that matches search criteria.</returns>
 public List <WebTaxon> GetTaxaBySearchCriteria(WebClientInformation clientInformation,
                                                WebSpeciesFactSearchCriteria searchCriteria)
 {
     using (ClientProxy client = new ClientProxy(this, 2))
     {
         return(client.Client.GetTaxaBySearchCriteria(clientInformation, searchCriteria));
     }
 }
Esempio n. 4
0
 /// <summary>
 /// Get regions related to specified region categories.
 /// </summary>
 /// <param name="clientInformation">Information about the client that makes this web service call.</param>
 /// <param name="regionCategories">Get regions related to specified region categories.</param>
 /// <returns>Regions related to specified region categories.</returns>
 public List <WebRegion> GetRegionsByCategories(WebClientInformation clientInformation,
                                                List <WebRegionCategory> regionCategories)
 {
     using (ClientProxy client = new ClientProxy(this, 1))
     {
         return(client.Client.GetRegionsByCategories(clientInformation, regionCategories));
     }
 }
 /// <summary>
 /// Get species facts with specified identifiers.
 /// Only existing species facts are returned,
 /// e.g. species fact identifiers that does not
 /// match existing species fact does not affect
 /// the returned species facts.
 /// </summary>
 /// <param name="clientInformation">Information about the client that makes this web service call.</param>
 /// <param name="speciesFactIdentifiers">
 /// Species facts identifiers. E.g. WebSpeciesFacts
 /// instances where id for requested combination of
 /// factor, host, individual category, period and taxon
 /// has been set.
 /// Host id is only used together with taxonomic factors.
 /// Period id is only used together with periodic factors.
 /// </param>
 /// <returns>
 /// Existing species facts among the
 /// requested species facts.
 /// </returns>
 public List <WebSpeciesFact> GetSpeciesFactsByIdentifiers(WebClientInformation clientInformation,
                                                           List <WebSpeciesFact> speciesFactIdentifiers)
 {
     using (ClientProxy client = new ClientProxy(this, 2))
     {
         return(client.Client.GetSpeciesFactsByIdentifiers(clientInformation, speciesFactIdentifiers));
     }
 }
 /// <summary>
 /// Create species facts.
 /// </summary>
 /// <param name="clientInformation">Information about the client that makes this web service call.</param>
 /// <param name="createSpeciesFacts">New species facts to create.</param>
 public void CreateSpeciesFacts(WebClientInformation clientInformation,
                                List <WebSpeciesFact> createSpeciesFacts)
 {
     using (ClientProxy client = new ClientProxy(this, 10))
     {
         client.Client.CreateSpeciesFacts(clientInformation, createSpeciesFacts);
     }
 }
Esempio n. 7
0
 /// <summary>
 /// Get regions that matches the search criterias.
 /// </summary>
 /// <param name="clientInformation">Information about the client that makes this web service call.</param>
 /// <param name="searchCriteria">Region search criterias.</param>
 /// <returns>Regions that matches the search criterias.</returns>
 public List <WebRegion> GetRegionsBySearchCriteria(WebClientInformation clientInformation,
                                                    WebRegionSearchCriteria searchCriteria)
 {
     using (ClientProxy client = new ClientProxy(this, 1))
     {
         return(client.Client.GetRegionsBySearchCriteria(clientInformation, searchCriteria));
     }
 }
Esempio n. 8
0
 /// <summary>
 /// Gets the regions by list of regionId values.
 /// </summary>
 /// <param name="clientInformation">Information about the client that makes this web service call.</param>
 /// <param name="regionIds">List of region id values.</param>
 /// <returns>Return a list of regions matching the list of id values.</returns>
 public List <WebRegion> GetRegionsByIds(WebClientInformation clientInformation,
                                         List <Int32> regionIds)
 {
     using (ClientProxy client = new ClientProxy(this, 1))
     {
         return(client.Client.GetRegionsByIds(clientInformation, regionIds));
     }
 }
Esempio n. 9
0
 /// <summary>
 /// Get regions by GUIDs.
 /// </summary>
 /// <param name="clientInformation">Information about the client that makes this web service call.</param>
 /// <param name="GUIDs">Region GUIDs.</param>
 /// <returns>Regions matching provided GUIDs.</returns>
 public List <WebRegion> GetRegionsByGUIDs(WebClientInformation clientInformation,
                                           List <String> GUIDs)
 {
     using (ClientProxy client = new ClientProxy(this, 1))
     {
         return(client.Client.GetRegionsByGUIDs(clientInformation, GUIDs));
     }
 }
 /// <summary>
 /// Start trace usage of web service for specified user.
 /// If no user is specified then all usage of web service
 /// is traced.
 /// Note: Tracing has negative impact on web service performance.
 /// </summary>
 /// <param name="clientInformation">Information about the client that makes this web service call.</param>
 /// <param name="userName">User name.</param>
 public void StartTrace(WebClientInformation clientInformation,
                        String userName)
 {
     using (ClientProxy client = new ClientProxy(this, 1))
     {
         client.Client.StartTrace(clientInformation, userName);
     }
 }
Esempio n. 11
0
 /// <summary>
 /// Get cities that matches the search criteria.
 /// </summary>
 /// <param name="clientInformation">Information about the client that makes this web service call.</param>
 /// <param name="searchCriteria">City search criteria.</param>
 /// <param name="coordinateSystem">Coordinate system used in returned geography information.</param>
 /// <returns>Regions that matches the search criterias.</returns>
 public List <WebCityInformation> GetCitiesByNameSearchString(WebClientInformation clientInformation,
                                                              WebStringSearchCriteria searchCriteria,
                                                              WebCoordinateSystem coordinateSystem)
 {
     using (ClientProxy client = new ClientProxy(this, 1))
     {
         return(client.Client.GetCitiesByNameSearchString(clientInformation, searchCriteria, coordinateSystem));
     }
 }
 /// <summary>
 /// Get picture relations related to specified picture.
 /// </summary>
 /// <param name="clientInformation">Information about the client that makes this web service call.</param>
 /// <param name="pictureId">Id of specified picture.</param>
 /// <returns>Picture relations related to specified picture.</returns>
 public List <WebPictureRelation> GetPictureRelationsByPictureId(WebClientInformation clientInformation,
                                                                 Int64 pictureId)
 {
     using (ClientProxy client = new ClientProxy(this, 2))
     {
         return(client.Client.GetPictureRelationsByPictureId(clientInformation,
                                                             pictureId));
     }
 }
 /// <summary>
 /// Update picture relations.
 /// </summary>
 /// <param name="clientInformation">Information about the client that makes this web service call.</param>
 /// <param name="pictureRelations">List of picture relations to update.</param>
 /// <returns>Number of updated records.</returns>
 public Int32 UpdatePictureRelations(WebClientInformation clientInformation,
                                     List <WebPictureRelation> pictureRelations)
 {
     using (ClientProxy client = new ClientProxy(this, 2))
     {
         return(client.Client.UpdatePictureRelations(clientInformation,
                                                     pictureRelations));
     }
 }
 /// <summary>
 /// Get requested species observations.
 /// Scope is restricted to those observations
 /// that the user has access rights to.
 /// Max 25000 observations can be retrieved in one call.
 /// </summary>
 /// <param name="clientInformation">Information about the client that makes this web service call.</param>
 /// <param name="speciesObservationIds">Id for species observations to get.</param>
 /// <param name="coordinateSystem">
 /// Coordinate system used in returned species observations.
 /// </param>
 /// <returns>Species observations.</returns>
 public WebDarwinCoreInformation GetDarwinCoreByIds(WebClientInformation clientInformation,
                                                    List <Int64> speciesObservationIds,
                                                    WebCoordinateSystem coordinateSystem)
 {
     using (ClientProxy client = new ClientProxy(this, 5))
     {
         return(client.Client.GetDarwinCoreByIds(clientInformation, speciesObservationIds, coordinateSystem));
     }
 }
 /// <summary>
 /// Get species observation provenances
 /// that matches the search criteria.
 /// </summary>
 /// <param name="clientInformation">Information about the client that makes this web service call.</param>
 /// <param name="searchCriteria">Species observation search criteria - defined in class WebSpeciesObservationSearchCriteria.</param>
 /// <param name="coordinateSystem">Coordinate system used in search criteria.</param>
 /// <returns>Number of species that matches the search criteria.</returns>
 public List <WebSpeciesObservationProvenance> GetProvenancesBySearchCriteria(WebClientInformation clientInformation,
                                                                              WebSpeciesObservationSearchCriteria searchCriteria,
                                                                              WebCoordinateSystem coordinateSystem)
 {
     using (ClientProxy client = new ClientProxy(this, 5))
     {
         return(client.Client.GetSpeciesObservationProvenancesBySearchCriteria(clientInformation, searchCriteria, coordinateSystem));
     }
 }
Esempio n. 16
0
 /// <summary>
 /// Get geography for regions.
 /// </summary>
 /// <param name="clientInformation">Information about the client that makes this web service call.</param>
 /// <param name="regionIds">Region ids.</param>
 /// <param name="coordinateSystem">Coordinate system used in returned geography information.</param>
 /// <returns>Geography for regions.</returns>
 public List <WebRegionGeography> GetRegionsGeographyByIds(WebClientInformation clientInformation,
                                                           List <Int32> regionIds,
                                                           WebCoordinateSystem coordinateSystem)
 {
     using (ClientProxy client = new ClientProxy(this, 2))
     {
         return(client.Client.GetRegionsGeographyByIds(clientInformation, regionIds, coordinateSystem));
     }
 }
Esempio n. 17
0
 /// <summary>
 /// Get geography for regions.
 /// </summary>
 /// <param name="clientInformation">Information about the client that makes this web service call.</param>
 /// <param name="GUIDs">Region GUIDs.</param>
 /// <param name="coordinateSystem">Coordinate system used in returned geography information.</param>
 /// <returns>Geography for regions.</returns>
 public List <WebRegionGeography> GetRegionsGeographyByGUIDs(WebClientInformation clientInformation,
                                                             List <String> GUIDs,
                                                             WebCoordinateSystem coordinateSystem)
 {
     using (ClientProxy client = new ClientProxy(this, 2))
     {
         return(client.Client.GetRegionsGeographyByGUIDs(clientInformation, GUIDs, coordinateSystem));
     }
 }
 /// <summary>
 /// Gets number of species observations
 /// that matches the search criteria.
 /// </summary>
 /// <param name="clientInformation">Information about the client that makes this web service call.</param>
 /// <param name="searchCriteria">The species observation search criteria.</param>
 /// <param name="coordinateSystem">Coordinate system used in geometry search criteria.
 /// </param>
 /// <returns>No of species observations that matches the search criteria.</returns>
 public Int64 GetSpeciesObservationCountBySearchCriteria(WebClientInformation clientInformation,
                                                         WebSpeciesObservationSearchCriteria searchCriteria,
                                                         WebCoordinateSystem coordinateSystem)
 {
     using (ClientProxy client = new ClientProxy(this, 5))
     {
         return(client.Client.GetSpeciesObservationCountBySearchCriteria(clientInformation, searchCriteria, coordinateSystem));
     }
 }
 /// <summary>
 /// Get all Dyntaxa Revision Reference relation items.
 /// </summary>
 /// <param name="clientInformation">Client information.</param>
 /// <param name="revisionId">Revision id.</param>
 /// <returns></returns>
 public List <WebDyntaxaRevisionReferenceRelation> GetAllDyntaxaRevisionReferenceRelations(
     WebClientInformation clientInformation,
     int revisionId)
 {
     using (ClientProxy client = new ClientProxy(this, 1))
     {
         return(client.Client.GetAllDyntaxaRevisionReferenceRelations(clientInformation, revisionId));
     }
 }
Esempio n. 20
0
 /// <summary>
 /// Get region categories.
 /// All region categories are returned if parameter countryIsoCode is not specified.
 /// </summary>
 /// <param name="clientInformation">Information about the client that makes this web service call.</param>
 /// <param name="isCountryIsoCodeSpecified">Indicates if parameter countryIsoCode is specified.</param>
 /// <param name="countryIsoCode">
 /// Get region categories related to this country.
 /// Country iso codes are specified in standard ISO-3166.
 /// </param>
 /// <returns>Region categories.</returns>
 public List <WebRegionCategory> GetRegionCategories(WebClientInformation clientInformation,
                                                     Boolean isCountryIsoCodeSpecified,
                                                     Int32 countryIsoCode)
 {
     using (ClientProxy client = new ClientProxy(this, 1))
     {
         return(client.Client.GetRegionCategories(clientInformation, isCountryIsoCodeSpecified, countryIsoCode));
     }
 }
 /// <summary>
 /// Get an indication if specified geometries contains any
 /// protected species observations.
 /// </summary>
 /// <param name="clientInformation">Information about the client that makes this web service call.</param>
 /// <param name="searchCriteria">
 /// The species observation search criteria.
 /// At least one of BoundingBox, Polygons and RegionGuids
 /// must be specified.
 /// Search criterias that may be used: Accuracy,
 /// BirdNestActivityLimit, BoundingBox, IsAccuracyConsidered,
 /// IsDisturbanceSensitivityConsidered, MinProtectionLevel,
 /// ObservationDateTime, Polygons and RegionGuids.
 /// </param>
 /// <param name="coordinateSystem">Coordinate system used in geometry search criterias.</param>
 /// <returns>
 /// True, if specified geometries contains any
 /// protected species observations.
 /// </returns>
 public Boolean GetProtectedSpeciesObservationIndication(WebClientInformation clientInformation,
                                                         WebSpeciesObservationSearchCriteria searchCriteria,
                                                         WebCoordinateSystem coordinateSystem)
 {
     using (ClientProxy client = new ClientProxy(this, 20))
     {
         return(client.Client.GetProtectedSpeciesObservationIndication(clientInformation, searchCriteria, coordinateSystem));
     }
 }
 /// <summary>
 /// Gets the dyntaxa revision reference relation by identifier.
 /// </summary>
 /// <param name="clientInformation">Client information.</param>
 /// <param name="id">The identifier.</param>
 /// <returns></returns>
 public WebDyntaxaRevisionReferenceRelation GetDyntaxaRevisionReferenceRelationById(
     WebClientInformation clientInformation,
     int id)
 {
     using (ClientProxy client = new ClientProxy(this, 1))
     {
         return(client.Client.GetDyntaxaRevisionReferenceRelationById(clientInformation, id));
     }
 }
 /// <summary>
 /// Create picture relations.
 /// </summary>
 /// <param name="clientInformation">Information about the client that makes this web service call.</param>
 /// <param name="pictureRelations">List of picture relation to create.</param>
 public void CreatePictureRelations(WebClientInformation clientInformation,
                                    List <WebPictureRelation> pictureRelations)
 {
     using (ClientProxy client = new ClientProxy(this, 2))
     {
         client.Client.CreatePictureRelations(clientInformation,
                                              pictureRelations);
     }
 }
 /// <summary>
 /// Set revision reference relation published flag to true
 /// </summary>
 /// <param name="clientInformation">Client information.</param>
 /// <param name="revisionId"></param>
 /// <returns></returns>
 public bool SetRevisionReferenceRelationPublished(
     WebClientInformation clientInformation,
     int revisionId)
 {
     using (ClientProxy client = new ClientProxy(this, 1))
     {
         return(client.Client.SetRevisionReferenceRelationPublished(clientInformation, revisionId));
     }
 }
 /// <summary>
 /// Delete picture relations.
 /// </summary>
 /// <param name="clientInformation">Information about the client that makes this web service call.</param>
 /// <param name="pictureRelationIds">List of ids of picture relations to delete.</param>
 /// <returns>Number of deleted records.</returns>
 public Int32 DeletePictureRelations(WebClientInformation clientInformation,
                                     List <Int64> pictureRelationIds)
 {
     using (ClientProxy client = new ClientProxy(this, 2))
     {
         return(client.Client.DeletePictureRelations(clientInformation,
                                                     pictureRelationIds));
     }
 }
 /// <summary>
 /// Creates a dyntaxa revision reference relation..
 /// </summary>
 /// <param name="clientInformation">Client information.</param>
 /// <param name="dyntaxaRevisionReferenceRelation">The dyntaxa revision reference relation.</param>
 /// <returns></returns>
 public WebDyntaxaRevisionReferenceRelation CreateDyntaxaRevisionReferenceRelation(
     WebClientInformation clientInformation,
     WebDyntaxaRevisionReferenceRelation dyntaxaRevisionReferenceRelation)
 {
     using (ClientProxy client = new ClientProxy(this, 1))
     {
         return(client.Client.CreateDyntaxaRevisionReferenceRelation(clientInformation, dyntaxaRevisionReferenceRelation));
     }
 }
Esempio n. 27
0
 /// <summary>
 /// Start a transaction.
 /// </summary>
 /// <param name="clientInformation">Information about the client that makes this web service call.</param>
 /// <param name="timeout">
 /// Time before transaction timeouts if has not already finished.
 /// Unit is seconds.
 /// </param>
 public void StartTransaction(WebClientInformation clientInformation,
                              Int32 timeout)
 {
     using (ClientProxy client = new ClientProxy(this, 1))
     {
         client.Client.StartTransaction(clientInformation,
                                        timeout);
     }
 }
 /// <summary>
 /// Test if specified geometries contains any conservation relevant
 /// species observations.
 /// </summary>
 /// <param name="clientInformation">Information about the client that makes this web service call.</param>
 /// <param name="searchCriteria">
 /// Species observation search criteria including at least one
 /// polygon, bounding box or region.
 /// </param>
 /// <param name="coordinateSystem">Coordinate system used in geometry search criterias.</param>
 /// <returns>True if specified geometries contains conservation relevant species observations.</returns>
 public Boolean HasConservationSpeciesObservation(WebClientInformation clientInformation,
                                                  WebSpeciesObservationSearchCriteria searchCriteria,
                                                  WebCoordinateSystem coordinateSystem)
 {
     using (ClientProxy client = new ClientProxy(this, 5))
     {
         return(client.Client.HasConservationSpeciesObservation(clientInformation, searchCriteria, coordinateSystem));
     }
 }
Esempio n. 29
0
 /// <summary>
 /// Get entries from the web service log.
 /// </summary>
 /// <param name="clientInformation">Information about the client that makes this web service call.</param>
 /// <param name="type">Get log entries of this type.</param>
 /// <param name="userName">Get log entries for this user. May be empty.</param>
 /// <param name="rowCount">Maximum number of log entries to get.</param>
 /// <returns> Requested web log entries.</returns>
 public List <WebLogRow> GetLog(WebClientInformation clientInformation,
                                LogType type,
                                String userName,
                                Int32 rowCount)
 {
     using (ClientProxy client = new ClientProxy(this, 2))
     {
         return(client.Client.GetLog(clientInformation, type, userName, rowCount));
     }
 }
Esempio n. 30
0
        protected WebClientInformation GetClientInformation()
        {
            WebClientInformation clientInformation;
            WebServiceContext    context;

            context                 = Context;
            clientInformation       = new WebClientInformation();
            clientInformation.Token = context.ClientToken.Token;
            return(clientInformation);
        }