Class: EasyData::RDF::DC11

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

Constant Summary collapse

@@uri =
"http://purl.org/dc/elements/1.1/"
@@properties =
{"contributor" => "",
 "coverage" => "",
 "creator" => "",
 "date" => "",
 "description" => "",
 "format" => "",
 "identifier" => "",
 "language" => "",
 "publisher" => "",
 "relation" => "",
 "rights" => "",
 "source" => "",
 "subject" => "",
 "title" => "",
 "type" => "",
}

Class Method Summary collapse

Methods inherited from Namespaces

list, list_form

Class Method Details

.get_uriObject

Return Namespace URI



23
24
25
26
# File 'lib/data_models/namespaces/dc11.rb', line 23

def self.get_uri
   @@uri
#       "http://purl.org/dc/elements/1.1/" 
end

.propertiesObject

Return a list of Namespace’s properties



34
35
36
# File 'lib/data_models/namespaces/dc11.rb', line 34

def self.properties
   @@properties.keys
end

.properties_formObject



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

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



29
30
31
# File 'lib/data_models/namespaces/dc11.rb', line 29

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