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", "CS" => "Community Standard", "DP" => "Discussion Paper", "DP-Draft" => "Draft Discussion Paper", "IPR" => "Interoperability Program Report - Engineering Specification", "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", "POL-NTS" => "Policy - Name Type Specification", "Primer" => "Primer", "Profile" => "Profile", "RFC" => "Request for Comment", "Retired" => "Retired document", "SAP" => "Standard Application Profile", "TS" => "Test Suite", "WhitePaper" => "Whitepaper", }.freeze
Class Method Summary collapse
-
.parse_page(hit) ⇒ RelatonOgc::OrcBibliographicItem
papam hit [Hash].
Class Method Details
.parse_page(hit) ⇒ RelatonOgc::OrcBibliographicItem
papam hit [Hash]
34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 |
# File 'lib/relaton_ogc/scrapper.rb', line 34 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"]), ) end |