Class: EasyData::RDF::RDFS

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

Constant Summary collapse

@@uri =
"http://www.w3.org/2000/01/rdf-schema#"
@@properties =
{"comment" => "",
 "domain" => "",
 "isDefinedBy" => "",
 "label" => "",
 "member" => "",
 "range" => "",
 "seeAlso" => "",
 "subClassOf" => "",
 "subPropertyOf" => ""  
}
@@classes =
{"Class" => "",
             "Resource" => "",
             "Literal" => "",
             "Container" => "",
             "ContainerMembershipProperty" => "",
             "Datatype" => ""
}

Class Method Summary collapse

Methods inherited from Namespaces

list, list_form

Class Method Details

.classesObject

Return a list of Namespace’s classes



48
49
50
# File 'lib/data_models/namespaces/rdfs.rb', line 48

def self.classes
   @@classes.keys
end

.classes_formObject



52
53
54
55
56
57
58
# File 'lib/data_models/namespaces/rdfs.rb', line 52

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

.get_uriObject

Return Namespace URI



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

def self.get_uri
  @@uri
end

.propertiesObject

Return a list of Namespace’s properties



35
36
37
# File 'lib/data_models/namespaces/rdfs.rb', line 35

def self.properties
   @@properties.keys
end

.properties_formObject



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

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



30
31
32
# File 'lib/data_models/namespaces/rdfs.rb', line 30

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