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" => ""   
}
@@classes =
{"SpatialThing" => "",
             "Point" => ""
}

Class Method Summary collapse

Methods inherited from Namespaces

list, list_form

Class Method Details

.classesObject

Return a list of Namespace’s classes



38
39
40
# File 'lib/data_models/namespaces/geo.rb', line 38

def self.classes
   @@classes.keys
end

.classes_formObject



42
43
44
45
46
47
48
# File 'lib/data_models/namespaces/geo.rb', line 42

def self.classes_form 
  list = {}
  @@classes.keys.each do |c|
    list[c] = c
  end
  list
end

.get_uriObject

Return Namespace URI



15
16
17
# File 'lib/data_models/namespaces/geo.rb', line 15

def self.get_uri
  @@uri
end

.propertiesObject

Return a list of Namespace’s properties



25
26
27
# File 'lib/data_models/namespaces/geo.rb', line 25

def self.properties
   @@properties.keys
end

.properties_formObject



29
30
31
32
33
34
35
# File 'lib/data_models/namespaces/geo.rb', line 29

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



20
21
22
# File 'lib/data_models/namespaces/geo.rb', line 20

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