class SemanticCrawler::LinkedGeoData::RelevantNode
Specifies relevant node that is classified by a type and GPS coordinates.
Public Class Methods
new(new_root_node)
click to toggle source
Constructor that takes the root node received from SemanticCrawler::LinkedGeoData::RelevantNodes
# File lib/semantic_crawler/linked_geo_data/relevant_node.rb, line 21 def initialize(new_root_node) @root_node = new_root_node end
Public Instance Methods
contributor()
click to toggle source
User link @return [String]
# File lib/semantic_crawler/linked_geo_data/relevant_node.rb, line 57 def contributor query_root_node("lgdo:contributor/@rdf:resource", @@NAMESPACES).to_s end
created_by()
click to toggle source
Data Source @return [String]
# File lib/semantic_crawler/linked_geo_data/relevant_node.rb, line 51 def created_by query_root_node("lgdp:created_by/text()", @@NAMESPACES).to_s end
has_city()
click to toggle source
City name @return [String]
# File lib/semantic_crawler/linked_geo_data/relevant_node.rb, line 92 def has_city query_root_node("lgdo:hasCity/text()", @@NAMESPACES).to_s end
has_country()
click to toggle source
Country in ISO 3166-1 alpha-2 @return [String]
# File lib/semantic_crawler/linked_geo_data/relevant_node.rb, line 86 def has_country query_root_node("lgdo:hasCountry/text()", @@NAMESPACES).to_s end
has_house_number()
click to toggle source
House number @return [String]
# File lib/semantic_crawler/linked_geo_data/relevant_node.rb, line 80 def has_house_number query_root_node("lgdo:hasHouseNumber/text()", @@NAMESPACES).to_s end
has_postal_code()
click to toggle source
Postal code @return [String]
# File lib/semantic_crawler/linked_geo_data/relevant_node.rb, line 74 def has_postal_code query_root_node("lgdo:hasPostalCode/text()", @@NAMESPACES).to_s end
has_street()
click to toggle source
Street name @return [String]
# File lib/semantic_crawler/linked_geo_data/relevant_node.rb, line 68 def has_street query_root_node("lgdo:hasStreet/text()", @@NAMESPACES).to_s end
latitude()
click to toggle source
geo:lat @return [String]
# File lib/semantic_crawler/linked_geo_data/relevant_node.rb, line 27 def latitude query_root_node("geo:lat/text()", @@NAMESPACES).to_s end
longitude()
click to toggle source
geo:long @return [String]
# File lib/semantic_crawler/linked_geo_data/relevant_node.rb, line 33 def longitude query_root_node("geo:long/text()", @@NAMESPACES).to_s end
member_of_way()
click to toggle source
Link to way
# File lib/semantic_crawler/linked_geo_data/relevant_node.rb, line 62 def member_of_way query_root_node("lgdo:memberOfWay/@rdf:resource", @@NAMESPACES) end
note()
click to toggle source
Comment about the entity @return [String]
# File lib/semantic_crawler/linked_geo_data/relevant_node.rb, line 45 def note query_root_node("lgdp:note/text()", @@NAMESPACES).to_s end
query_root_node(xpath_query, namespaces = {})
click to toggle source
Query the root_node
# File lib/semantic_crawler/linked_geo_data/relevant_node.rb, line 103 def query_root_node(xpath_query, namespaces = {}) if !@root_node.nil? @root_node.xpath(xpath_query, namespaces) end end
type()
click to toggle source
The type as URL @return [String]
# File lib/semantic_crawler/linked_geo_data/relevant_node.rb, line 39 def type query_root_node("rdf:type/@rdf:resource", @@NAMESPACES).to_s end
wheelchair()
click to toggle source
Is this place wheelchair friendly? @return [String]
# File lib/semantic_crawler/linked_geo_data/relevant_node.rb, line 98 def wheelchair query_root_node("lgdo:wheelchair/@rdf:resource", @@NAMESPACES).to_s end
xml_document()
click to toggle source
Outputs the document as XML @return [String] The document serialized as XML
# File lib/semantic_crawler/linked_geo_data/relevant_node.rb, line 111 def xml_document @root_node.to_s end