Class: EasyData::RDF::XHTML

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

Constant Summary collapse

@@uri =
"http://www.w3.org/1999/xhtml/vocab#"
@@properties =
{}
@@classes =
{}

Class Method Summary collapse

Methods inherited from Namespaces

list, list_form

Class Method Details

.classesObject

Return a list of Namespace’s classes



33
34
35
# File 'lib/data_models/namespaces/xhtml.rb', line 33

def self.classes
   @@classes.keys
end

.classes_formObject



37
38
39
40
41
42
43
# File 'lib/data_models/namespaces/xhtml.rb', line 37

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

.get_uriObject

Return Namespace URI



10
11
12
# File 'lib/data_models/namespaces/xhtml.rb', line 10

def self.get_uri
  @@uri
end

.propertiesObject

Return a list of Namespace’s properties



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

def self.properties
   @@properties.keys
end

.properties_formObject



24
25
26
27
28
29
30
# File 'lib/data_models/namespaces/xhtml.rb', line 24

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



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

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