Class: EasyData::RDF::GEO

Inherits:
Namespaces show all
Defined in:
lib/data_models/namespaces/geo.rb

Constant Summary collapse

@@uri =
"http://www.w3.org/2003/01/geo/wgs84_pos#"
@@properties =
{ "lat" => "",
  "location" => "",
  "long" => "",
  "lat_long" => ""   
}

Class Method Summary collapse

Methods inherited from Namespaces

list, list_form

Class Method Details

.get_uriObject

Return Namespace URI



12
13
14
# File 'lib/data_models/namespaces/geo.rb', line 12

def self.get_uri
  @@uri
end

.propertiesObject

Return a list of Namespace’s properties



22
23
24
# File 'lib/data_models/namespaces/geo.rb', line 22

def self.properties
   @@properties.keys
end

.properties_formObject



26
27
28
29
30
31
32
# File 'lib/data_models/namespaces/geo.rb', line 26

def self.properties_form 
  list = {}
  @@properties.keys.each do |property|
    list[property] = property
  end
  list
end

.to_s(property, uri, value) ⇒ Object

Return tag to rdf doc



17
18
19
# File 'lib/data_models/namespaces/geo.rb', line 17

def self.to_s(property,uri,value)
   @@properties[property].gsub("%uri%",uri).gsub('%value%',value)
end