update ontology a bit more

This commit is contained in:
Devin Howard 2017-01-22 14:21:45 -05:00
parent 0eac267075
commit 6f5f21f255
3 changed files with 19 additions and 11 deletions

View file

@ -53,7 +53,7 @@ class Synapse < ApplicationRecord
def as_rdf def as_rdf
output = '' 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:topic1 d:topic_#{topic1_id} ;\n)
output += %( mm:topic2 d:topic_#{topic2_id} ;\n) output += %( mm:topic2 d:topic_#{topic2_id} ;\n)
output += %( mm:direction "#{category}" ;\n) output += %( mm:direction "#{category}" ;\n)

View file

@ -84,7 +84,7 @@ class Topic < ApplicationRecord
def as_rdf def as_rdf
output = '' output = ''
output += %(d:topic_#{id} a mm:topic ;\n) output += %(d:topic_#{id} a mm:Topic ;\n)
output += %( rdfs:label "#{name}" ;\n) output += %( rdfs:label "#{name}" ;\n)
output += %( rdfs:comment "#{desc}" ;\n) if desc.present? output += %( rdfs:comment "#{desc}" ;\n) if desc.present?
output += %( foaf:homepage <#{link}> ;\n) if link.present? output += %( foaf:homepage <#{link}> ;\n) if link.present?

View file

@ -9,26 +9,34 @@
: a owl:Ontology ; : a owl:Ontology ;
rdfs:label "Metamaps Map"@en . rdfs:label "Metamaps Map"@en .
mm:topic a owl:Class ; mm:Topic a owl:Class ;
rdfs:label "One concept on a metamap"@en . 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 . rdfs:label "Link between two topics on a metamap"@en .
mm:topic1 a owl:ObjectProperty ; mm:topic1 a owl:ObjectProperty ;
a owl:FunctionalProperty ; a owl:FunctionalProperty ;
rdfs:label "first topic of a synapse"@en ; rdfs:label "first topic of a synapse"@en ;
rdfs:domain mm:topic ; rdfs:domain mm:Synapse ;
rdfs:range owl:Thing . rdfs:range mm:Topic .
mm:topic2 a owl:ObjectProperty ; mm:topic2 a owl:ObjectProperty ;
a owl:FunctionalProperty ; a owl:FunctionalProperty ;
rdfs:label "second topic of a synapse"@en ; rdfs:label "second topic of a synapse"@en ;
rdfs:domain mm:topic ; rdfs:domain mm:Topic ;
rdfs:range owl:Thing . 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 ; a owl:FunctionalProperty ;
rdfs:label "from-to, both, or none"@en ; rdfs:label "from-to, both, or none"@en ;
rdfs:domain mm:synapse ; rdfs:domain mm:Synapse ;
rdfs:range xsd:string . rdfs:range [ owl:oneOf mm:from-to, mm:both, mm:none ] .
mm:frome-to a owl: