Class: EasyData::RDF::FOAF

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

Constant Summary collapse

@@uri =
"http://xmlns.com/foaf/0.1/"
@@properties =
{"account" => "",
    "accountName" => "",
    "accountServiceHomepage" => "",
    "age" => "",
    "aimChatID" => "",
    "based_near" => "",
    "birthday" => "",
    "currentProject" => "",
    "depiction" => "",
    "depicts" => "",
    "dnaChecksum" => "",
    "familyName" => "",
    "family_name" => "",
    "firstName" => "",
    "fundedBy" => "",
    "geekcode" => "",
    "gender" => "",
    "givenName" => "",
    "givenname" => "",
    "holdsAccount" => "",
    "homepage" => "",
    "icqChatID" => "",
    "img" => "",
    "interest" => "",
    "isPrimaryTopicOf" => "",
    "jabberID" => "",
    "knows" => "",
    "lastName" => "",
    "logo" => "",
    "made" => "",
    "maker" => "",
    "mbox" => "",
    "mbox_sha1sum" => "",
    "member" => "",
    "membershipClass" => "",
    "msnChatID" => "",
    "myersBriggs" => "",
    "name" => "",
    "nick" => "",
    "openid" => "",
    "page" => "",
    "pastProject" => "",
    "phone" => "",
    "plan" => "",
    "primaryTopic" => "",
    "publications" => "",
    "schoolHomepage" => "",
    "sha1" => "",
    "skypeID" => "",
    "status" => "",
    "surname" => "",
    "theme" => "",
    "thumbnail" => "",
    "tipjar" => "",
    "title" => "",
    "topic" => "",
    "topic_interest" => "",
    "weblog" => "",
    "workInfoHomepage" => "",
    "workplaceHomepage" => "",
    "yahooChatID" => ""
}
@@classes =
{"Agent" => "",
             "Document" => "",
             "Group" => "",
             "Image" => "",
             "LabelProperty" => "",
             "OnlineAccount" => "",
             "OnlineChatAccount" => "",
             "OnlineEcommerceAccount" => "",
             "OnlineGamingAccount" => "",
             "Organization" => "",
             "Person" => "",
             "PersonalProfileDocument" => "",
             "Project" => ""            
}

Class Method Summary collapse

Methods inherited from Namespaces

list, list_form

Class Method Details

.classesObject

Return a list of Namespace’s classes



108
109
110
# File 'lib/data_models/namespaces/foaf.rb', line 108

def self.classes
   @@classes.keys
end

.classes_formObject



112
113
114
115
116
117
118
# File 'lib/data_models/namespaces/foaf.rb', line 112

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

.get_uriObject

Return Namespace URI



85
86
87
# File 'lib/data_models/namespaces/foaf.rb', line 85

def self.get_uri
  @@uri
end

.propertiesObject

Return a list of Namespace’s properties



95
96
97
# File 'lib/data_models/namespaces/foaf.rb', line 95

def self.properties
   @@properties.keys
end

.properties_formObject



99
100
101
102
103
104
105
# File 'lib/data_models/namespaces/foaf.rb', line 99

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



90
91
92
# File 'lib/data_models/namespaces/foaf.rb', line 90

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