Class: Cdss::Parser
- Inherits:
-
Object
- Object
- Cdss::Parser
- Defined in:
- lib/cdss/parser.rb
Overview
The Parser class handles parsing of response data from the CDSS API into domain objects. It delegates the actual parsing work to specialized parser modules for each data type.
Class Method Summary collapse
-
.parse_admin_calls(response) ⇒ Array<AdminCall>
Parses administrative calls data from the API response.
-
.parse_call_analyses(response, type:) ⇒ Array<CallAnalysis>
Parses call analysis data from the API response.
-
.parse_climate_readings(response, type:) ⇒ Array<Reading>
Parses climate reading data from the API response.
-
.parse_climate_stations(response) ⇒ Array<ClimateStation>
Parses climate station data from the API response.
-
.parse_diversion_records(response, type:) ⇒ Array<Cdss::Models::DiversionRecord>
Parses diversion record data from the API response.
-
.parse_geophysical_wells(response) ⇒ Array<Well>
Parses geophysical well data from the API response.
-
.parse_log_picks(response) ⇒ Array<Reading>
Parses geophysical log pick data from the API response.
-
.parse_readings(response, timescale:) ⇒ Array<Reading>
Parses time series readings from the API response.
-
.parse_reference_table(response) ⇒ Array<Cdss::Models::ReferenceTable>
Parses reference table data from the API response.
-
.parse_route_analyses(response) ⇒ Array<RouteAnalysis>
Parses route analysis data from the API response.
-
.parse_source_routes(response) ⇒ Array<SourceRoute>
Parses source route framework data from the API response.
-
.parse_stations(response) ⇒ Array<Station>
Parses station data from the API response.
-
.parse_structures(response) ⇒ Array<Cdss::Models::Structure>
Parses structure data from the API response.
-
.parse_water_classes(response) ⇒ Array<Cdss::Models::WaterClass>
Parses water class data from the API response.
-
.parse_water_rights(response, type:) ⇒ Array<WaterRight>
Parses water rights data from the API response.
-
.parse_well_measurements(response) ⇒ Array<Reading>
Parses well measurement data from the API response.
-
.parse_wells(response) ⇒ Array<Well>
Parses well data from the API response.
Class Method Details
.parse_admin_calls(response) ⇒ Array<AdminCall>
Parses administrative calls data from the API response.
108 109 110 |
# File 'lib/cdss/parser.rb', line 108 def parse_admin_calls(response) Parsers::AdminCallsParser.parse_admin_calls(response) end |
.parse_call_analyses(response, type:) ⇒ Array<CallAnalysis>
Parses call analysis data from the API response.
118 119 120 |
# File 'lib/cdss/parser.rb', line 118 def parse_call_analyses(response, type:) Parsers::AnalysisParser.parse_call_analyses(response, type: type) end |
.parse_climate_readings(response, type:) ⇒ Array<Reading>
Parses climate reading data from the API response.
98 99 100 |
# File 'lib/cdss/parser.rb', line 98 def parse_climate_readings(response, type:) Parsers::ClimateParser.parse_climate_readings(response, type: type) end |
.parse_climate_stations(response) ⇒ Array<ClimateStation>
Parses climate station data from the API response.
88 89 90 |
# File 'lib/cdss/parser.rb', line 88 def parse_climate_stations(response) Parsers::ClimateParser.parse_climate_stations(response) end |
.parse_diversion_records(response, type:) ⇒ Array<Cdss::Models::DiversionRecord>
Parses diversion record data from the API response.
151 152 153 |
# File 'lib/cdss/parser.rb', line 151 def parse_diversion_records(response, type:) Parsers::StructuresParser.parse_diversion_records(response, type: type) end |
.parse_geophysical_wells(response) ⇒ Array<Well>
Parses geophysical well data from the API response.
56 57 58 |
# File 'lib/cdss/parser.rb', line 56 def parse_geophysical_wells(response) Parsers::WellParser.parse_geophysical_wells(response) end |
.parse_log_picks(response) ⇒ Array<Reading>
Parses geophysical log pick data from the API response.
66 67 68 |
# File 'lib/cdss/parser.rb', line 66 def parse_log_picks(response) Parsers::WellParser.parse_log_picks(response) end |
.parse_readings(response, timescale:) ⇒ Array<Reading>
Parses time series readings from the API response.
26 27 28 |
# File 'lib/cdss/parser.rb', line 26 def parse_readings(response, timescale:) Parsers::ReadingParser.parse_readings(response, timescale: timescale) end |
.parse_reference_table(response) ⇒ Array<Cdss::Models::ReferenceTable>
Parses reference table data from the API response.
167 168 169 |
# File 'lib/cdss/parser.rb', line 167 def parse_reference_table(response) Parsers::ReferenceTablesParser.parse_reference_table(response) end |
.parse_route_analyses(response) ⇒ Array<RouteAnalysis>
Parses route analysis data from the API response.
134 135 136 |
# File 'lib/cdss/parser.rb', line 134 def parse_route_analyses(response) Parsers::AnalysisParser.parse_route_analyses(response) end |
.parse_source_routes(response) ⇒ Array<SourceRoute>
Parses source route framework data from the API response.
126 127 128 |
# File 'lib/cdss/parser.rb', line 126 def parse_source_routes(response) Parsers::AnalysisParser.parse_source_routes(response) end |
.parse_stations(response) ⇒ Array<Station>
Parses station data from the API response.
14 15 16 |
# File 'lib/cdss/parser.rb', line 14 def parse_stations(response) Parsers::StationParser.parse_stations(response) end |
.parse_structures(response) ⇒ Array<Cdss::Models::Structure>
Parses structure data from the API response.
142 143 144 |
# File 'lib/cdss/parser.rb', line 142 def parse_structures(response) Parsers::StructuresParser.parse_structures(response) end |
.parse_water_classes(response) ⇒ Array<Cdss::Models::WaterClass>
Parses water class data from the API response.
159 160 161 |
# File 'lib/cdss/parser.rb', line 159 def parse_water_classes(response) Parsers::StructuresParser.parse_water_classes(response) end |
.parse_water_rights(response, type:) ⇒ Array<WaterRight>
Parses water rights data from the API response.
80 81 82 |
# File 'lib/cdss/parser.rb', line 80 def parse_water_rights(response, type:) Parsers::WaterRightsParser.parse_water_rights(response, type: type) end |
.parse_well_measurements(response) ⇒ Array<Reading>
Parses well measurement data from the API response.
46 47 48 |
# File 'lib/cdss/parser.rb', line 46 def parse_well_measurements(response) Parsers::WellParser.parse_well_measurements(response) end |
.parse_wells(response) ⇒ Array<Well>
Parses well data from the API response.
36 37 38 |
# File 'lib/cdss/parser.rb', line 36 def parse_wells(response) Parsers::WellParser.parse_wells(response) end |