hide unused fields in rdf
This commit is contained in:
parent
f1cf05ce75
commit
8c24b7e717
3 changed files with 6 additions and 6 deletions
|
@ -57,7 +57,7 @@ class Synapse < ApplicationRecord
|
|||
output += %( mm:topic1 d:topic_#{topic1_id} ;\n)
|
||||
output += %( mm:topic2 d:topic_#{topic2_id} ;\n)
|
||||
output += %( mm:direction "#{category}" ;\n)
|
||||
output += %( rdfs:comment "#{desc}" ;\n)
|
||||
output += %( rdfs:comment "#{desc}" ;\n) if desc.present?
|
||||
output[-2] = '.'
|
||||
output += %(\n)
|
||||
output
|
||||
|
|
|
@ -85,9 +85,9 @@ class Topic < ApplicationRecord
|
|||
def as_rdf
|
||||
output = ''
|
||||
output += %(d:topic_#{id} a mm:topic ;\n)
|
||||
output += %( rdfs:label "#{name}";\n)
|
||||
output += %( rdfs:comment "#{desc}";\n)
|
||||
output += %( foaf:homepage <#{link}>;\n) if link.present?
|
||||
output += %( rdfs:label "#{name}" ;\n)
|
||||
output += %( rdfs:comment "#{desc}" ;\n) if desc.present?
|
||||
output += %( foaf:homepage <#{link}> ;\n) if link.present?
|
||||
output += %( mm:mapper d:mapper_#{user_id} ;\n)
|
||||
output += %( mm:metacode "#{metacode.name}" ;\n)
|
||||
output[-2] = '.' # change last ; to a .
|
||||
|
|
|
@ -71,8 +71,8 @@ class User < ApplicationRecord
|
|||
base_url = opts[:base_url] || 'https://metamaps.cc'
|
||||
output = ''
|
||||
output += %(d:mapper_#{id} a foaf:OnlineAccount ;\n)
|
||||
output += %( foaf:accountName "#{name}";\n)
|
||||
output += %( foaf:accountServiceHomepage "#{base_url}/mapper/#{id}";\n)
|
||||
output += %( foaf:accountName "#{name}" ;\n)
|
||||
output += %( foaf:accountServiceHomepage "#{base_url}/mapper/#{id}" ;\n)
|
||||
output[-2] = '.' # change last ; to a .
|
||||
output += %(\n)
|
||||
output
|
||||
|
|
Loading…
Add table
Reference in a new issue