Module: RelatonOgc::Scrapper
- Defined in:
- lib/relaton_ogc/scrapper.rb
Constant Summary collapse
- TYPES =
{ "AS" => "abstract-specification", "BP" => "best-practice", "CAN" => "candidate-standard", "CC" => "conformance-class", "CR" => "change-request", "CP" => "community-practice", "CS" => "community-standard", "DP" => "discussion-paper", "DP-Draft" => "draft-discussion-paper", "IPR" => "interoperability-program-report", "IS" => "implementation-standard", "ISC" => "implementation-standard-corrigendum", "ISx" => "extension-package-standard", "Notes" => "notes", "ORM" => "ogc-reference-model", "PC" => "profile-corrigendum", "PER" => "public-engineering-report", "POL" => "policy", "POLNTS" => "policy-name-type-specification", "Primer" => "primer", "Profile" => "profile", "RFC" => "request-for-comment", "Retired" => "retired", "SAP" => "standard-application-profile", "TS" => "test-suite", "WhitePaper" => "whitepaper", "ATB" => "approved-technical-baseline", "RP" => "recommendation-paper", }.freeze
Class Method Summary collapse
-
.parse_page(hit) ⇒ RelatonOgc::OrcBibliographicItem
papam hit [Hash].
Class Method Details
.parse_page(hit) ⇒ RelatonOgc::OrcBibliographicItem
papam hit [Hash]
37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 |
# File 'lib/relaton_ogc/scrapper.rb', line 37 def parse_page(hit) OgcBibliographicItem.new( fetched: Date.today.to_s, title: fetch_title(hit["title"]), docid: fetch_docid(hit["identifier"]), link: fetch_link(hit["URL"]), doctype: fetch_type(hit["type"]), edition: fetch_edition(hit["identifier"]), abstract: fetch_abstract(hit["description"]), contributor: fetch_contributor(hit), language: ["en"], script: ["Latn"], date: fetch_date(hit["date"]), editorialgroup: fetch_editorialgroup, ) end |