import { FDSNCommon } from "./fdsncommon.mjs"; import { DateTime, Interval } from "luxon"; import { Network } from "./stationxml.mjs"; import { StationQuery } from "./fdsnstation.mjs"; import { NslcId } from "./fdsnsourceid.mjs"; import { DataSelectQuery } from "./fdsndataselect.mjs"; import { SeismogramDisplayData } from "./seismogram.mjs"; /** const for service name */ export declare const IRISFEDCAT_SERVICE = "fedcatalog"; /** * Major version of the IRIS web service supported here. * Currently is 1. */ export declare const SERVICE_VERSION = 1; /** * Service name as used in the FDSN DataCenters registry, * https://www.fdsn.org/datacenters */ export declare const SERVICE_NAME = "irisws-fedcatalog-1"; export declare const TARGET_DATASELECT = "dataselect"; export declare const TARGET_STATION = "station"; /** a fake, completely empty stationxml document in case of no data. */ export declare const FAKE_EMPTY_TEXT = "\n"; /** * Represents the part of the results of a fedcatalog query for a single * datacenter, a section of the larger FedCatalogResult. * */ export declare class FedCatalogDataCenter { dataCenter: string; services: Map; stationService: string; dataSelectService: string; postLines: Array; stationQuery: StationQuery | null; dataSelectQuery: DataSelectQuery | null; level: string; constructor(); /** * Uses the response from the FedCat server to make the actual FDSNStation * query that returns StationXML. If the original FedCat query did not return * a Station service, or it was not asked for, then the array will be empty. * * @returns promise to networks */ queryNetworkList(): Promise>; queryStationRawXml(): Promise; querySDDList(): Promise>; } /** * Represents the results of a fedcatalog query. * */ export declare class FedCatalogResult { params: Map; queries: Array; constructor(); } /** * Query to a IRIS FedCatalog web service. * * @see https://service.iris.edu/irisws/fedcatalog/1/ * @param host optional host to connect to, defaults to IRIS */ export declare class FedCatalogQuery extends FDSNCommon { /** @private */ _targetService: string | undefined; /** @private */ _level: string | undefined; /** @private */ _networkCode: string | undefined; /** @private */ _stationCode: string | undefined; /** @private */ _locationCode: string | undefined; /** @private */ _channelCode: string | undefined; /** @private */ _startTime: DateTime | undefined; /** @private */ _endTime: DateTime | undefined; /** @private */ _startBefore: DateTime | undefined; /** @private */ _endBefore: DateTime | undefined; /** @private */ _startAfter: DateTime | undefined; /** @private */ _endAfter: DateTime | undefined; /** @private */ _minLat: number | undefined; /** @private */ _maxLat: number | undefined; /** @private */ _minLon: number | undefined; /** @private */ _maxLon: number | undefined; /** @private */ _latitude: number | undefined; /** @private */ _longitude: number | undefined; /** @private */ _minRadius: number | undefined; /** @private */ _maxRadius: number | undefined; /** @private */ _includeRestricted: boolean | undefined; /** @private */ _includeAvailability: boolean | undefined; /** @private */ _format: string | undefined; /** @private */ _updatedAfter: DateTime | undefined; /** @private */ _matchTimeseries: boolean | undefined; fedCatResult: Promise | null; /** * Construct a query * * @param host the host to connect to , defaults to service.iris.edu */ constructor(host?: string); /** * Constructs a station FedCatalogQuery using the parameters in a StationQuery. * * @param stationQuery query to pull parameters from * @returns fedcatalog query */ static fromStationQuery(stationQuery: StationQuery): FedCatalogQuery; /** * Gets/Sets the version of the fdsnws spec, 1 is currently the only value. * Setting this is probably a bad idea as the code may not be compatible with * the web service. * * @param value optional new value if setting * @returns new value if getting, this if setting */ specVersion(value?: string): FedCatalogQuery; getSpecVersion(): string; /** * Gets/Sets the protocol, http or https. This should match the protocol * of the page loaded, but is autocalculated and generally need not be set. * * @param value optional new value if setting * @returns new value if getting, this if setting */ protocol(value?: string): FedCatalogQuery; getProtocol(): string | undefined; /** * Gets/Sets the remote host to connect to. * * @param value optional new value if setting * @returns new value if getting, this if setting */ host(value?: string): FedCatalogQuery; getHost(): string | undefined; /** * Gets/Sets the remote port to connect to. * * @param value optional new value if setting * @returns new value if getting, this if setting */ port(value?: number): FedCatalogQuery; getPort(): number | undefined; pathBase(value?: string): FedCatalogQuery; getPathBase(): string; /** * Gets/Sets the nodata parameter, usually 404 or 204 (default), controlling * the status code when no matching data is found by the service. * * @param value optional new value if setting * @returns new value if getting, this if setting */ nodata(value?: number): FedCatalogQuery; getNodata(): number | undefined; /** * Get/Set the targetservice query parameter. * * @param value optional new value if setting * @returns new value if getting, this if setting */ targetService(value?: string): FedCatalogQuery; getTargetService(): string | undefined; /** * Get/Set the network query parameter. * * @param value optional new value if setting * @returns new value if getting, this if setting */ networkCode(value?: string): FedCatalogQuery; getNetworkCode(): string | undefined; /** * Get/Set the station query parameter. * * @param value optional new value if setting * @returns new value if getting, this if setting */ stationCode(value?: string): FedCatalogQuery; getStationCode(): string | undefined; /** * Get/Set the location code query parameter. * * @param value optional new value if setting * @returns new value if getting, this if setting */ locationCode(value?: string): FedCatalogQuery; getLocationCode(): string | undefined; /** * Get/Set the channel query parameter. * * @param value optional new value if setting * @returns new value if getting, this if setting */ channelCode(value?: string): FedCatalogQuery; getChannelCode(): string | undefined; nslcCodes(channelId: NslcId): FedCatalogQuery; /** * Get/Set the starttime query parameter. * * @param value optional new value if setting * @returns new value if getting, this if setting */ startTime(value?: DateTime | string): FedCatalogQuery; getStartTime(): DateTime | undefined; /** * Get/Set the endtime query parameter. * * @param value optional new value if setting * @returns new value if getting, this if setting */ endTime(value?: DateTime | string): FedCatalogQuery; getEndTime(): DateTime | undefined; /** * Sets startTime and endTime using the given time window * * @param se time window * @returns this */ timeRange(se: Interval): FedCatalogQuery; /** * Get/Set the startbefore query parameter. * * @param value optional new value if setting * @returns new value if getting, this if setting */ startBefore(value?: DateTime | string): FedCatalogQuery; getStartBefore(): DateTime | undefined; /** * Get/Set the endbefore query parameter. * * @param value optional new value if setting * @returns new value if getting, this if setting */ endBefore(value?: DateTime | string): FedCatalogQuery; getEndBefore(): DateTime | undefined; /** * Get/Set the startafter query parameter. * * @param value optional new value if setting * @returns new value if getting, this if setting */ startAfter(value?: DateTime | string): FedCatalogQuery; getStartAfter(): DateTime | undefined; /** * Get/Set the endafter query parameter. * * @param value optional new value if setting * @returns new value if getting, this if setting */ endAfter(value?: DateTime | string): FedCatalogQuery; getEndAfter(): DateTime | undefined; /** * Get/Set the minlat query parameter. * * @param value optional new value if setting * @returns new value if getting, this if setting */ minLat(value?: number): FedCatalogQuery; getMinLat(): number | undefined; /** * Get/Set the maxlon query parameter. * * @param value optional new value if setting * @returns new value if getting, this if setting */ maxLat(value?: number): FedCatalogQuery; getMaxLat(): number | undefined; /** * Get/Set the minlon query parameter. * * @param value optional new value if setting * @returns new value if getting, this if setting */ minLon(value?: number): FedCatalogQuery; getMinLon(): number | undefined; /** * Get/Set the maxlon query parameter. * * @param value optional new value if setting * @returns new value if getting, this if setting */ maxLon(value?: number): FedCatalogQuery; getMaxLon(): number | undefined; /** * Get/Set the latitude query parameter. * * @param value optional new value if setting * @returns new value if getting, this if setting */ latitude(value?: number): FedCatalogQuery; getLatitude(): number | undefined; /** * Get/Set the longitude query parameter. * * @param value optional new value if setting * @returns new value if getting, this if setting */ longitude(value?: number): FedCatalogQuery; getLongitude(): number | undefined; /** * Get/Set the minradius query parameter. * * @param value optional new value if setting * @returns new value if getting, this if setting */ minRadius(value?: number): FedCatalogQuery; getMinRadius(): number | undefined; /** * Get/Set the maxradius query parameter. * * @param value optional new value if setting * @returns new value if getting, this if setting */ maxRadius(value?: number): FedCatalogQuery; getMaxRadius(): number | undefined; /** * Get/Set the includerestricted query parameter. * * @param value optional new value if setting * @returns new value if getting, this if setting */ includeRestricted(value?: boolean): FedCatalogQuery; getIncludeRestricted(): boolean | undefined; /** * Get/Set the includeavailability query parameter. * * @param value optional new value if setting * @returns new value if getting, this if setting */ includeAvailability(value?: boolean): FedCatalogQuery; getIncludeAvailability(): boolean | undefined; /** * Get/Set the format query parameter. * * @param value optional new value if setting * @returns new value if getting, this if setting */ format(value?: string): FedCatalogQuery; getFormat(): string | undefined; /** * Get/Set the updatedafter query parameter. * * @param value optional new value if setting * @returns new value if getting, this if setting */ updatedAfter(value?: DateTime): FedCatalogQuery; getUpdatedAfter(): DateTime | undefined; /** * Get/Set the matchtimeseries query parameter. * * @param value optional new value if setting * @returns new value if getting, this if setting */ matchTimeseries(value?: boolean): FedCatalogQuery; getMatchTimeseries(): boolean | undefined; /** * Get/Set the timeout in seconds for the request. Default is 30. * * @param value optional new value if setting * @returns new value if getting, this if setting */ timeout(value?: number): FedCatalogQuery; getTimeout(): number | undefined; /** * Checks to see if any parameter that would limit the data * returned is set. This is a crude, coarse check to make sure * the client doesn't ask for EVERYTHING the server has. * * @returns true if some parameter set */ isSomeParameterSet(): boolean; /** * Queries the remote web service for networks. * * @returns a Promise to an Array of Network objects. */ queryNetworks(): Promise>; /** * Queries the remote web service for stations. The stations * are contained within their respective Networks. * * @returns a Promise to an Array of Network objects. */ queryStations(): Promise>; /** * Queries the remote web service for channels. The Channels * are contained within their respective Stations which are in Networks. * * @returns a Promise to an Array of Network objects. */ queryChannels(): Promise>; /** * Queries the remote web service for responses. The Responses * are contained within their respective Channels, * which are in Stations which are in Networks. * * @returns a Promise to an Array of Network objects. */ queryResponses(): Promise>; /** * Queries the remote station web service at the given level. * * @param level the level to query at, networ, station, channel or response. * @returns a Promise to an Array of Network objects. */ queryFdsnStation(level: string): Promise>; setupQueryFdsnStation(level: string): Promise; /** * For each item in a parsed result returned from a FedCat service, create a * DataSelectQuery with host and port, or url filled in correctly, ready to * be called with the result lines. * * @param fedCatalogResult result from a FedCat web service * @returns result with dataSelectQuery added to each item */ setupForFdnsDataSelect(fedCatalogResult: FedCatalogResult): FedCatalogResult; queryFdsnDataselect(): Promise>; postFdsnDataselectForFedCatResult(fedCatalogResult: FedCatalogResult): Promise>; /** * query the fed cat server for dataselect using post, which allows for multiple * channel-timeranges at once. This assumes that there are not multiple * time ranges for the same channel as the results, encapsulated as * SeismogramDisplayData objects, are returned one seismogram * per channel, which may contain gaps. The original channel and timerange are * also populated with each result. * * @param sddList array of SeismogramDisplayData objects * that will be filled in with the resulting seismogram * @returns Promise to the input Array of SeismogramDisplayData objects, each with the * seismogram containing the data returned from the server */ postQuerySeismograms(sddList: Array): Promise>; postQueryRaw(sddList: Array, targetService: string): Promise; postQueryRawWithBody(body: string): Promise; /** * Queries the remote web service. * * @returns a Promise to an parsed result. */ queryRaw(): Promise; handleHttpResponseCodes(response: Response): Promise; parseRequest(requestText: string): FedCatalogResult; /** * Forms the URL to get version from the web service, without any query paramters * * @returns the url */ formVersionURL(): string; /** * Queries the remote web service to get its version * * @returns Promise to version string */ queryVersion(): Promise; /** * Forms the base of the url for accessing the dataselect service. * * @returns URL as string */ formBaseURL(): string; /** * Form URL to post the remote web service. No parameters are added * to the URL as those will be in the body of the post. * * @returns the URL for posting */ formPostURL(): string; /** * Form URL to query the remote web service, encoding the query parameters. * * @returns url */ formURL(): string; } //# sourceMappingURL=irisfedcatalog.d.mts.map