diff --git a/app/models/synapse.rb b/app/models/synapse.rb index c42123c9..d6d08bbe 100644 --- a/app/models/synapse.rb +++ b/app/models/synapse.rb @@ -53,7 +53,7 @@ class Synapse < ApplicationRecord def as_rdf output = '' - output += %(d:synapse_#{id} a mm:synapse ;\n) + output += %(d:synapse_#{id} a mm:Synapse ;\n) output += %( mm:topic1 d:topic_#{topic1_id} ;\n) output += %( mm:topic2 d:topic_#{topic2_id} ;\n) output += %( mm:direction "#{category}" ;\n) diff --git a/app/models/topic.rb b/app/models/topic.rb index fecad233..2273fd7e 100644 --- a/app/models/topic.rb +++ b/app/models/topic.rb @@ -84,7 +84,7 @@ class Topic < ApplicationRecord def as_rdf output = '' - output += %(d:topic_#{id} a mm:topic ;\n) + output += %(d:topic_#{id} a mm:Topic ;\n) output += %( rdfs:label "#{name}" ;\n) output += %( rdfs:comment "#{desc}" ;\n) if desc.present? output += %( foaf:homepage <#{link}> ;\n) if link.present? diff --git a/public/owl/map.owl.ttl b/public/owl/map.owl.ttl index 95fc7b6f..22051709 100644 --- a/public/owl/map.owl.ttl +++ b/public/owl/map.owl.ttl @@ -9,26 +9,34 @@ : a owl:Ontology ; rdfs:label "Metamaps Map"@en . -mm:topic a owl:Class ; - rdfs:label "One concept on a metamap"@en . +mm:Topic a owl:Class ; + rdfs:label "One topic on a metamap"@en . -mm:synapse a owl:Class ; +mm:Synapse a owl:Class ; rdfs:label "Link between two topics on a metamap"@en . mm:topic1 a owl:ObjectProperty ; a owl:FunctionalProperty ; rdfs:label "first topic of a synapse"@en ; - rdfs:domain mm:topic ; - rdfs:range owl:Thing . + rdfs:domain mm:Synapse ; + rdfs:range mm:Topic . mm:topic2 a owl:ObjectProperty ; a owl:FunctionalProperty ; rdfs:label "second topic of a synapse"@en ; - rdfs:domain mm:topic ; + rdfs:domain mm:Topic ; rdfs:range owl:Thing . -mm:direction a owl:objectProprty ; +mm:mapper a owl:ObjectProperty ; + a owl:FunctionalProperty ; + rdfs:label "Metamaps user who created this topic"@en ; + rdfs:domain mm:Topic ; + rdfs:range foaf:OnlineAccount . + +mm:direction a owl:ObjectProprty ; a owl:FunctionalProperty ; rdfs:label "from-to, both, or none"@en ; - rdfs:domain mm:synapse ; - rdfs:range xsd:string . + rdfs:domain mm:Synapse ; + rdfs:range [ owl:oneOf mm:from-to, mm:both, mm:none ] . + +mm:frome-to a owl: