Class: EasyData::RDF::HTTP

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

Constant Summary collapse

@@uri =
"http://www.w3.org/2006/http#"
@@properties =
{"abs_path" => "",
 "absoluteURI" => "",
 "authority" => "",
 "body" => "",
 "connectionAuthority" => "",
 "elementName" => "",
 "elementValue" => "",
 "fieldName" => "",
 "fieldValue" => "",
 "header" => "",
 "param" => "",
 "paramName" => "",
 "paramValue" => "",
 "request" => "",
 "requestURI" => "",
 "response" => "",
 "responseCode" => "",
 "version" => "" 
}

Class Method Summary collapse

Methods inherited from Namespaces

list, list_form

Class Method Details

.get_uriObject

Return Namespace URI



27
28
29
# File 'lib/data_models/namespaces/http.rb', line 27

def self.get_uri
  @@uri
end

.propertiesObject

Return a list of Namespace’s properties



37
38
39
# File 'lib/data_models/namespaces/http.rb', line 37

def self.properties
   @@properties.keys
end

.properties_formObject



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

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



32
33
34
# File 'lib/data_models/namespaces/http.rb', line 32

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