Class: Placemaker::Document
- Inherits:
-
Object
- Object
- Placemaker::Document
- Includes:
- XmlHelper
- Defined in:
- lib/placemaker/document.rb
Instance Method Summary collapse
-
#administrative_scope ⇒ Object
Returns a Placemaker::Location object that is a container for the smallest administrative place that best describes the document.
-
#extents ⇒ Object
Returns a Placemaker::Extents object that is a container for the the map extents covering the places mentioned in the document.
-
#geographic_scope ⇒ Object
Returns a Placemaker::Location object that is a container for the smallest place that best describes the document.
-
#place_details ⇒ Object
Returns a Placemaker::Location object that is a container for one named place mentioned in the document.
- #reference_list ⇒ Object
Methods included from XmlHelper
Instance Method Details
#administrative_scope ⇒ Object
Returns a Placemaker::Location object that is a container for the smallest administrative place that best describes the document
20 21 22 23 |
# File 'lib/placemaker/document.rb', line 20 def administrative_scope as = @nodeset.search('.//xmlns:administrativeScope').first Placemaker::Location.new(as) unless as.nil? end |
#extents ⇒ Object
Returns a Placemaker::Extents object that is a container for the the map extents covering the places mentioned in the document
32 33 34 35 |
# File 'lib/placemaker/document.rb', line 32 def extents extents = @nodeset.search('.//xmlns:extents').first Placemaker::Extents.new(extents) unless extents.nil? end |
#geographic_scope ⇒ Object
Returns a Placemaker::Location object that is a container for the smallest place that best describes the document
26 27 28 29 |
# File 'lib/placemaker/document.rb', line 26 def geographic_scope gs = @nodeset.search('.//xmlns:geographicScope').first Placemaker::Location.new(gs) unless gs.nil? end |
#place_details ⇒ Object
Returns a Placemaker::Location object that is a container for one named place mentioned in the document
13 14 15 16 17 |
# File 'lib/placemaker/document.rb', line 13 def place_details @nodeset.search('.//xmlns:placeDetails').map do |p| Placemaker::PlaceDetails.new(p) end end |
#reference_list ⇒ Object
37 38 39 40 41 |
# File 'lib/placemaker/document.rb', line 37 def reference_list @nodeset.search('.//xmlns:referenceList[1]/xmlns:reference').map do |reference| Placemaker::Reference.new(reference) end end |