├── .gitignore ├── ontospyweb ├── __init__.py ├── templatetags │ └── __init__.py ├── templates │ └── ontospyweb │ │ ├── components │ │ ├── backtotop.html │ │ ├── footer-common.html │ │ ├── navbar_onto.html │ │ └── about.html │ │ ├── tabs │ │ ├── individuals.html │ │ ├── objprop.html │ │ ├── dataprop.html │ │ ├── annotationprop.html │ │ ├── xx_individuals.html │ │ ├── classes.html │ │ ├── x__properties.html │ │ ├── ontology.html │ │ ├── xx_metrics.html │ │ └── xx_classes.html │ │ ├── base.html │ │ ├── startsearch.html │ │ └── docspage.html ├── urls.py ├── models.py ├── static │ └── ontospyweb │ │ ├── ontospyweb.css │ │ └── ontologies │ │ ├── hucit.owl │ │ ├── skos.rdf │ │ ├── foaf.rdf │ │ └── semanticbible.owl ├── views.py └── ontutils.py └── README.md /.gitignore: -------------------------------------------------------------------------------- 1 | *.pyc -------------------------------------------------------------------------------- /ontospyweb/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ontospyweb/templatetags/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ontospyweb/templates/ontospyweb/components/backtotop.html: -------------------------------------------------------------------------------- 1 | {% load ontotags %} 2 | 3 | 4 |

5 | back to top 6 |

-------------------------------------------------------------------------------- /ontospyweb/templates/ontospyweb/components/footer-common.html: -------------------------------------------------------------------------------- 1 | {% load ontotags %} 2 | 3 | 4 |
5 |
6 |

© 2014 OntospyWeb

7 |
-------------------------------------------------------------------------------- /ontospyweb/urls.py: -------------------------------------------------------------------------------- 1 | from django.conf.urls.defaults import * 2 | 3 | 4 | 5 | urlpatterns = patterns('ontospyweb.views', 6 | 7 | url(r'^$', 'ontoDocsMain', name='ontodocs_main'), 8 | 9 | ) 10 | 11 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ### Intro 2 | OntospyWeb is a tool made for navigating ontologies ('vocabularies') encoded using the RDF family of languages which are part of the W3C Semantic Web standards. 3 | 4 |
5 | This project is not supported anymore. If you are looking for a way to generate docs for an ontology, check out https://github.com/lambdamusic/ontospy and https://github.com/lambdamusic/ontodocs 6 |
7 | 8 | Version: 0.9.3 9 | 10 | ### Installation 11 | 12 | 1. pre-install the required libraries: `RDFlib` and `ontosPy`: 13 | https://github.com/RDFLib/rdflib 14 | https://github.com/lambdamusic/ontosPy 15 | 16 | 2. copy the app in your django project and load it the usual way in `settings.py` 17 | 18 | 19 | 3. wire up the application in your main urls.py 20 | 21 | ```python 22 | (r'^ontospyweb/', include('ontospyweb.urls') ), 23 | ``` 24 | 25 | ### Demo 26 | 27 | A demo installation is available here: http://hacks.michelepasin.org/ontospy/ 28 | 29 | ### Notes 30 | The folder `..ontospyweb/static/ontospyweb/ontologies/` contains a few ontology files which are displayed on the start page only to logged in users. 31 | 32 | You can add more files to that folder if you want the application to display local files. 33 | 34 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /ontospyweb/templates/ontospyweb/components/navbar_onto.html: -------------------------------------------------------------------------------- 1 | {% load ontotags %} 2 | 3 | 4 | 40 | 41 | -------------------------------------------------------------------------------- /ontospyweb/models.py: -------------------------------------------------------------------------------- 1 | from django.db import models 2 | from django.contrib import admin 3 | 4 | import datetime 5 | from settings import printdebug 6 | 7 | EXTRA_SAVING_ACTIONS = True 8 | 9 | 10 | 11 | 12 | class HistoryEntry(models.Model): 13 | """(HistoryEntry description)""" 14 | uri = models.CharField(max_length=350, ) 15 | description = models.TextField(blank=True, verbose_name="description") 16 | pubdate = models.DateTimeField(null=True, blank=True, verbose_name="date added" ) 17 | score = models.IntegerField(blank=True, null=True) 18 | 19 | class Admin(admin.ModelAdmin): 20 | list_display = ('id', 'uri', 'pubdate', 'score') 21 | search_fields = ('uri',) 22 | list_filter = ('pubdate', ) 23 | 24 | def save(self, force_insert=False, force_update=False): 25 | if EXTRA_SAVING_ACTIONS: 26 | super(HistoryEntry, self).save(force_insert, force_update) 27 | self.pubdate = datetime.datetime.today() 28 | if self.score: 29 | self.score = self.score + 1 30 | else: 31 | self.score = 1 32 | super(HistoryEntry, self).save(force_insert, force_update) 33 | 34 | class Meta: 35 | verbose_name_plural="HistoryEntry" 36 | verbose_name = "HistoryEntry" 37 | ordering = ["id"] 38 | 39 | def __unicode__(self): 40 | return "HistoryEntry %d" % self.id 41 | 42 | 43 | # TODO: put in admin.py 44 | admin.site.register(HistoryEntry, HistoryEntry.Admin) 45 | 46 | 47 | -------------------------------------------------------------------------------- /ontospyweb/templates/ontospyweb/tabs/individuals.html: -------------------------------------------------------------------------------- 1 | 2 | {% load ontotags %} 3 | 4 | 5 | 6 | 11 | 12 | 13 | 14 | 15 |
16 | {% for instance in instancesData %} 17 | 18 | {{instance.instancename}} 19 | 20 |
21 | {% endfor %} 22 |
23 | 24 | 25 | 26 | 27 | 28 | {% for instance in instancesData %} 29 | 30 |
31 | 32 | 44 | 45 |
46 | 47 | 48 | 49 | 50 |
51 | 52 |
53 | 54 | 55 | 56 | {% if instance.types %} 57 |
58 | 59 |
60 |

rdfs:type

61 | 62 |

63 | 64 | {% for class in instance.types %} 65 | {{class.classname|truncchar_inverse:50}} 67 | {% if not forloop.last %} | {% endif %} 68 | {% endfor %} 69 | 70 | 71 |

72 | 73 |
74 | {% endif %} 75 | 76 | 77 |
78 | 79 | 80 | 81 |
{# col-md-offset-1 #} 82 | 83 | 84 |
85 | 86 | 87 | {% for name, value in instance.alltriples %} 88 | 89 | {% ifnotequal name "rdf:type" %} 90 | {% ifchanged name %} 91 |
92 |

{{name}}

93 | {% endifchanged %} 94 | 95 |

96 | {{value|linebreaksbr}} 97 |

98 | {% endifnotequal %} 99 | 100 | {% endfor %} 101 | 102 | 103 |
104 | 105 | 106 | 107 | 108 |
109 | 110 | 111 | 112 | 113 | 114 |
115 | 116 | 117 | {% endfor %} 118 | 119 | -------------------------------------------------------------------------------- /ontospyweb/templates/ontospyweb/components/about.html: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 |

OntospyWeb is a tool made for navigating ontologies ('vocabularies') encoded using the RDF family of languages which are part of the W3C Semantic Web standards. 7 |

8 | 9 |
10 |

11 |

12 | The Resource Description Framework (RDF) is a general-purpose language for representing information in the Web. [...] 13 | RDF's vocabulary description language, RDF Schema, is a semantic extension of RDF. It provides mechanisms for describing groups of related resources and the relationships between these resources. [...] 14 | The RDF vocabulary description language class and property system is similar to the type systems of object-oriented programming languages such as Java. RDF differs from many such systems in that instead of defining a class in terms of the properties its instances may have, the RDF vocabulary description language describes properties in terms of the classes of resource to which they apply. This is the role of the domain and range mechanisms [...] 15 |
16 | (http://www.w3.org/TR/rdf-schema/) 17 |
18 |

19 | 20 |
21 |

The application relies entirely on the OntosPy python module - of which is essentially an html front-end. 22 |

23 | 24 |

Note: this is a work-in-progress so it probably won't work as you might expect all the time. I'm trying to improve it in my spare time though so please drop me a line if you have any feedback or bug report. 25 |

26 | 27 | 28 |
29 | 30 | 33 | 34 |

35 | 36 | Made with Django, RDFlib, OntosPy, 37 | Bootstrap. 38 | Layout inspired by schema.org. 39 | 40 |

41 | 42 | 43 |

44 | Source code available on Github. 45 | 46 |

47 | 48 | -------------------------------------------------------------------------------- /ontospyweb/templates/ontospyweb/base.html: -------------------------------------------------------------------------------- 1 | {# July 1, 2014: added when upgraded to Bootstrap 3.2 #} 2 | {% load ontotags %} 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | {% block pagetitle %} 13 | OntoSPy 14 | {# 8835 9776 #} 15 | {% endblock pagetitle %} 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | {% block extrahead %} 36 | 37 | 38 | 39 | {% endblock extrahead %} 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | {% block navbar %} 48 | 49 | {% include "ontospyweb/components/navbar_onto.html" %} 50 | 51 | {% endblock navbar %} 52 | 53 | 54 | 55 | 56 | {% if messages %} {# not tested yet #} 57 | 58 | {% for message in messages %} 59 |
60 | 61 | {{ message|safe }} 62 |
63 | 64 | 65 | {% endfor %} 66 | 67 | 70 | 71 | {% endif %} 72 | 73 | 74 | 75 | 76 |
77 | 78 | 79 | {% block pageh1title %} 80 | 81 | {% endblock pageh1title %} 82 | 83 | 84 | 85 | 86 | {% block pagecontents %} 87 | 88 | {#

Hello, world!

#} 89 | 90 | 91 | {% endblock pagecontents %} 92 | 93 | 94 |
95 | 96 | 97 | {% block footer %} 98 | 110 | {% endblock footer %} 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | {% block global_js %} 127 | 128 | {% endblock %} 129 | 130 | 131 | 132 | {% include "googlestats.html" %} 133 | 134 | 135 | -------------------------------------------------------------------------------- /ontospyweb/templates/ontospyweb/tabs/objprop.html: -------------------------------------------------------------------------------- 1 | 2 | {% load ontotags %} 3 | 4 | 5 | 6 | 13 | 14 | 15 |
16 | {{objpropertiesTree|safe}} 17 |
18 | 19 | 20 | {% for propData in objPropertiesData %} 21 | 22 |
23 | 24 | 36 | 37 |
38 | 39 | 40 | 41 | 42 |
43 | 44 |
45 | 46 | 47 | {% if propData.supers %} 48 |
49 | 50 |
51 |

rdfs:subPropertyOf

52 | 53 |

54 | 55 | {% for prop in propData.supers %} 56 | 57 | 58 | {{prop.propname|truncchar_inverse:50}} 59 | 60 | {% if not forloop.last %} | {% endif %} 61 | {% endfor %} 62 | 63 |

64 | 65 | 66 |
67 | {% endif %} 68 | 69 | 70 | 71 | {% if propData.prop.domain %} 72 |

rdfs:domain

73 | 74 | {% for class in propData.prop.domain %} 75 | 76 |

77 | {% if class.isdefined %} 78 | {{class.classname|truncchar_inverse:30}} 79 | {% else %} 80 | {{class.classname|truncchar_inverse:30}} 81 | {% endif %} 82 |

83 | 84 | {% endfor %} 85 | 86 | {% else %} 87 |

rdfs:domain

88 |

89 | 90 | owl:Thing 91 | 92 | (inferred) 93 |

94 | 95 | {% endif %} 96 | 97 | 98 | 99 | {% if propData.prop.range %} 100 |

rdfs:range

101 | 102 | {% for class in propData.prop.range %} 103 | 104 |

105 | {% if class.isdefined %} 106 | {{class.classname|truncchar_inverse:30}} 107 | {% else %} 108 | {{class.classname|truncchar_inverse:30}} 109 | {% endif %} 110 |

111 | 112 | {% endfor %} 113 | 114 | {% else %} 115 | 116 |

rdfs:range

117 |

118 | 119 | owl:Thing 120 | 121 | (inferred) 122 |

123 | 124 | {% endif %} 125 | 126 | 127 | 128 | 129 | 130 | 131 |
132 | 133 | 134 | 135 |
{# col-md-offset-1 #} 136 | 137 | 138 |
139 | 140 | 141 | {% for name, value in propData.alltriples %} 142 | {% ifchanged name %} 143 |
144 |

{{name}}

145 | {% endifchanged %} 146 | 147 |

148 | {{value|linebreaksbr}} 149 |

150 | 151 | {% endfor %} 152 | 153 | 154 |
155 | 156 | 157 | 158 |
159 | 160 | 161 | 162 | 163 | 164 |
165 | 166 | 167 | {% endfor %} 168 | 169 | -------------------------------------------------------------------------------- /ontospyweb/templates/ontospyweb/tabs/dataprop.html: -------------------------------------------------------------------------------- 1 | 2 | {% load ontotags %} 3 | 4 | 5 | 6 | 12 | 13 | 14 | 15 | 16 | 17 |
18 | {{datapropertiesTree|safe}} 19 |
20 | 21 | 22 | 23 | 24 | {% for propData in dataPropertiesData %} 25 | 26 |
27 | 28 | 40 | 41 |
42 | 43 | 44 | 45 | 46 |
47 | 48 |
49 | 50 | 51 | {% if propData.supers %} 52 |
53 | 54 |
55 |

rdfs:subPropertyOf

56 | 57 |

58 | 59 | {% for prop in propData.supers %} 60 | 61 | 62 | {{prop.propname|truncchar_inverse:50}} 63 | 64 | {% if not forloop.last %} | {% endif %} 65 | {% endfor %} 66 | 67 |

68 | 69 | 70 |
71 | {% endif %} 72 | 73 | 74 | 75 | 76 | {% if propData.prop.domain %} 77 |

rdfs:domain

78 | 79 | {% for class in propData.prop.domain %} 80 | 81 |

82 | {% if class.isdefined %} 83 | {{class.classname|truncchar_inverse:30}} 84 | {% else %} 85 | {{class.classname|truncchar_inverse:30}} 86 | {% endif %} 87 |

88 | 89 | {% endfor %} 90 | 91 | {% else %} 92 |

rdfs:domain

93 |

94 | 95 | owl:Thing 96 | 97 | (inferred) 98 |

99 | 100 | {% endif %} 101 | 102 | 103 | 104 | {% if propData.prop.range %} 105 |

rdfs:range

106 | 107 | {% for class in propData.prop.range %} 108 | 109 |

110 | {% if class.isdefined %} 111 | {{class.classname|truncchar_inverse:30}} 112 | {% else %} 113 | {{class.classname|truncchar_inverse:30}} 114 | {% endif %} 115 |

116 | 117 | {% endfor %} 118 | 119 | {% else %} 120 | 121 |

rdfs:range

122 |

123 | rdfs:Literal 124 | (inferred) 125 |

126 | 127 | 128 | 129 | 130 | {% endif %} 131 | 132 | 133 | 134 | 135 | 136 |
137 | 138 | 139 | 140 |
{# col-md-offset-1 #} 141 | 142 | 143 |
144 | 145 | {% for name, value in propData.alltriples %} 146 | {% ifchanged name %} 147 |
148 |

{{name}}

149 | {% endifchanged %} 150 | 151 |

152 | {{value|linebreaksbr}} 153 |

154 | 155 | {% endfor %} 156 | 157 |
158 | 159 | 160 |
161 | 162 | 163 | 164 | 165 | 166 |
167 | 168 | 169 | {% endfor %} 170 | -------------------------------------------------------------------------------- /ontospyweb/templates/ontospyweb/tabs/annotationprop.html: -------------------------------------------------------------------------------- 1 | 2 | {% load ontotags %} 3 | 4 | 5 | 6 | 12 | 13 | 14 | 15 | 16 | 17 |
18 | {{annotationpropertiesTree|safe}} 19 |
20 | 21 | 22 | 23 | 24 | {% for propData in annotationPropertiesData %} 25 | 26 |
27 | 28 | 40 | 41 |
42 | 43 | 44 | 45 | 46 |
47 | 48 |
49 | 50 | 51 | {% if propData.supers %} 52 |
53 | 54 |
55 |

rdfs:subPropertyOf

56 | 57 |

58 | 59 | {% for prop in propData.supers %} 60 | 61 | 62 | {{prop.propname|truncchar_inverse:50}} 63 | 64 | {% if not forloop.last %} | {% endif %} 65 | {% endfor %} 66 | 67 |

68 | 69 | 70 |
71 | {% endif %} 72 | 73 | 74 | 75 | 76 | {% if propData.prop.domain %} 77 |

rdfs:domain

78 | 79 | {% for class in propData.prop.domain %} 80 | 81 |

82 | {% if class.isdefined %} 83 | {{class.classname|truncchar_inverse:30}} 84 | {% else %} 85 | {{class.classname|truncchar_inverse:30}} 86 | {% endif %} 87 |

88 | 89 | {% endfor %} 90 | 91 | {% else %} 92 |

rdfs:domain

93 |

94 | 95 | owl:Thing 96 | 97 | (inferred) 98 |

99 | 100 | {% endif %} 101 | 102 | 103 | 104 | {% if propData.prop.range %} 105 |

rdfs:range

106 | 107 | {% for class in propData.prop.range %} 108 | 109 |

110 | {% if class.isdefined %} 111 | {{class.classname|truncchar_inverse:30}} 112 | {% else %} 113 | {{class.classname|truncchar_inverse:30}} 114 | {% endif %} 115 |

116 | 117 | {% endfor %} 118 | 119 | {% else %} 120 | 121 |

rdfs:range

122 |

123 | rdfs:Literal 124 | (inferred) 125 |

126 | 127 | 128 | 129 | 130 | {% endif %} 131 | 132 | 133 | 134 | 135 | 136 |
137 | 138 | 139 | 140 |
{# col-md-offset-1 #} 141 | 142 | 143 |
144 | 145 | {% for name, value in propData.alltriples %} 146 | {% ifchanged name %} 147 |
148 |

{{name}}

149 | {% endifchanged %} 150 | 151 |

152 | {{value|linebreaksbr}} 153 |

154 | 155 | {% endfor %} 156 | 157 |
158 | 159 | 160 |
161 | 162 | 163 | 164 | 165 | 166 |
167 | 168 | 169 | {% endfor %} 170 | -------------------------------------------------------------------------------- /ontospyweb/templates/ontospyweb/startsearch.html: -------------------------------------------------------------------------------- 1 | {% extends "ontospyweb/base.html" %} 2 | {% load ontotags %} 3 | 4 | 5 | {% block pagecontents %} 6 | 7 |
8 | 9 | 10 |
11 | 12 |

Please enter the URL of an RDFS/OWL ontology:

13 | 14 |
15 | 16 | 17 | {# hidden param for history count #} 18 | 19 | 20 | 21 |

Max file size: 1M

22 | 23 |
24 |
25 | 26 |
27 | 28 | 29 | 30 | {% if history %} 31 | 32 |
33 | 34 |
35 | {# float:none is used to center the view #} 36 | 37 | 38 |

Recently viewed:

39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | {% for o in history %} 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | {% endfor %} 61 | 62 | 63 | 64 |
Vocabulary URIDescriptionLast OpenedTot Clicks
{{o.uri}}{{o.description|truncatewords:30}}{{o.pubdate|date:"d/m/Y"}}{{o.score}}
65 |
66 | 67 | 68 |
69 | {% endif %} 70 | 71 | 72 | 73 | 74 | 75 | {% if local_ontologies %} 76 | 77 |
78 | 79 | 80 |
81 | 82 |

Welcome Admin!

83 |
84 |

These are the local files found in {{LOCAL_ONTOLOGIES_FOLDER}}:

85 | 86 | 87 | 88 | 89 | 90 | {% for o in local_ontologies %} 91 | 92 | 93 | 94 | 95 | 96 | {% endfor %} 97 | 98 | 99 | 100 |
{{o}}
101 | 102 | 103 |
104 | 105 |
106 | {% endif %} 107 | 108 | 109 | 110 | 111 | 112 | 113 | {% endblock pagecontents %} 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | {% block footer %} 125 | 126 | 143 | {% endblock footer %} -------------------------------------------------------------------------------- /ontospyweb/templates/ontospyweb/tabs/xx_individuals.html: -------------------------------------------------------------------------------- 1 | {% extends "ontoview/base.html" %} 2 | {% load ontotags %} 3 | 4 | 5 | {% block pagecontents %} 6 | 7 | {% include "ontoview/components/tabs.html" %} 8 | 9 | {# ALL INDIVIDUALS view #} 10 | {% if instances %} 11 | 12 | 15 | 16 | {% for instance in instances %} 17 |
  • {{instance.instancename}} 18 | 19 | {% if instance.types %} 20 | is a 21 | {% for class in instance.types %} 22 | {{class.classname}} 24 | {% if not forloop.last %},  {% endif %} 25 | {% endfor %} 26 | {% endif %} 27 | 28 | 29 | 30 | 31 |
  • 32 | {% endfor %} 33 | 34 |

    35 | 36 | {% endif %} 37 | 38 | 39 | 40 | {# SPECIFIC INSTANCE VIEW #} 41 | {% if instance %} 42 | 43 | 44 | 51 | 52 | 53 | {# show only first comment #} 54 |

    {{instance.comment.0}}

    55 | 56 |

    57 | Instance of 58 | 59 | {% for class in instance.types %} 60 | {{class.classname|truncchar_inverse:30}}
    62 | {% endfor %} 63 |

    64 |
    65 | 66 | 67 | {% if triples %} 68 | 69 | 70 | {% for el in triples %} 71 |

    72 | {% if el.0.isdefined %} 73 | {{el.0.propname|truncchar_inverse:30}} 74 | {% else %} 75 | {{el.0.propname|truncchar_inverse:30}} 76 | {% endif %} 77 |

    78 | 79 |

    80 | {{el.1}} 81 |

    82 | 83 | {% endfor %} 84 | 85 | 86 | {# #} 87 | {# #} 88 | {# {% for el in triples %} #} 89 | {# #} 90 | {# #} 99 | {# #} 102 | {# #} 103 | {# #} 104 | {# {% endfor %} #} 105 | {# #} 106 | {#
    PropertyValue
    #} 91 | {# {% if el.0.isdefined %} #} 92 | {# {{el.0.propname|truncchar_inverse:30}} #} 93 | {# {% else %} #} 94 | {# {{el.0.propname|truncchar_inverse:30}} #} 95 | {# {% endif %} #} 96 | {# #} 97 | {#
    #} 98 | {#
    #} 100 | {# {{el.1}} #} 101 | {#
    #} 107 | 108 |

    109 | 110 | {% endif %} 111 | 112 | 113 | 114 | 115 | {% endif %} 116 | 117 | 118 | 119 | {% if siblings %} 120 | 121 | 124 | 125 | {% for instance in siblings %} 126 |
  • {{instance|truncchar_inverse:50}}
  • 127 | {% endfor %} 128 | 129 |

    130 | 131 | {% endif %} 132 | 133 | 134 | 135 | 136 | 137 | {% endblock pagecontents %} -------------------------------------------------------------------------------- /ontospyweb/templates/ontospyweb/tabs/classes.html: -------------------------------------------------------------------------------- 1 | 2 | {% load ontotags %} 3 | 4 | 5 | 6 | 13 | 14 | 15 | 16 |
    17 | 18 | {{classtreeTable|safe}} 19 | 20 | 21 |
    22 | 23 | 24 | 25 | 26 | {% for classData in classesData %} 27 | 28 |
    29 | 30 | 43 | 44 |
    45 | 46 | 47 | 48 | 49 |
    50 | 51 |
    52 | 53 | 54 |
    55 | 56 |
    57 |

    rdfs:subClassOf

    58 | 59 |

    60 | 61 | owl:Thing 62 | 63 | {% for class in classData.supers %} 64 |  |  65 | 66 | {{class.classname|truncchar_inverse:50}} 67 | 68 | 69 | {% endfor %} 70 | 71 |

    72 | 73 | 74 |
    75 | 76 | 77 |
    78 | 79 | {% for name, value in classData.alltriples %} 80 | {% ifchanged name %} 81 |
    82 |

    {{name}}

    83 | {% endifchanged %} 84 | 85 |

    86 | {{value|linebreaksbr}} 87 |

    88 | 89 | {% endfor %} 90 | 91 |
    92 | 93 | 94 | 95 |
    96 | 97 | 98 | 99 |
    {# col-md-offset-1 #} 100 | 101 | 102 | 103 | {% if classData.allDomainProperties %} 104 | 105 | 106 |
    107 |

    108 | Instances of {{classData.class.classname}} can have the following properties: 109 |


    110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | {% for innerclass, properties in classData.allDomainProperties %} 118 | 119 | 124 | 125 | 126 | {% for prop in properties %} 127 | 128 | 131 | 134 | 147 | 148 | 149 | {% endfor %} 150 | 151 | {% endfor %} 152 | 153 |
    PropertyDescriptionExpected Type
    120 | Properties 121 | {% ifnotequal classData.class.classname innerclass.classname %} inherited {% endifnotequal %} 122 | from {{innerclass.classname|truncchar_inverse:50}} 123 |
    129 | {{prop.propname|truncchar_inverse:50}} 130 | 132 | {{prop.comment.0}} 133 | 135 | {% if prop.range %} 136 | {% for range in prop.range %} 137 | {% if range.isdefined %} 138 | {{range.classname|truncchar_inverse:50}} 139 | {% else %} 140 | {{range.classname|truncchar_inverse:50}} 141 | {% endif %} 142 | {% endfor %} 143 | {% else %} 144 | -- 145 | {% endif %} 146 |
    154 | 155 | 156 | {% endif %} 157 | 158 | 159 | 160 | 161 | 162 |
    163 | 164 | 165 | 166 | 167 |
    168 | 169 | 170 | 171 |
    172 | 173 | {% endfor %} -------------------------------------------------------------------------------- /ontospyweb/templates/ontospyweb/tabs/x__properties.html: -------------------------------------------------------------------------------- 1 | {% extends "ontoview/base.html" %} 2 | {% load ontotags %} 3 | 4 | 5 | {% block pagecontents %} 6 | 7 | 8 | {% include "ontoview/components/tabs.html" %} 9 | 10 | 11 | {% if resource404 %} 12 | 13 | 16 | 17 |

    Sorry the resource {{resource}} wasn't found in this ontology. 18 |

    19 | 20 | {% endif %} 21 | 22 | 23 | 24 | {% if property %} 25 | 26 | 27 |

    41 | 42 | 43 | {# show only first comment #} 44 | {#

    {{property.comment.0}}

    #} 45 | {# #} 46 | {#
    #} 47 | 48 | 49 | {% for name, value in alltriples %} 50 | {% ifchanged name %}

    {{name}}

    {% endifchanged %} 51 | 52 |

    53 | {{value|linebreaksbr}} 54 |

    55 | 56 | {% endfor %} 57 | 58 | 59 | {% if property.domain %} 60 |

    rdfs:domain

    61 | 62 | {% for class in property.domain %} 63 | 64 |

    65 | {% if class.isdefined %} 66 | {{class.classname|truncchar_inverse:30}} 67 | {% else %} 68 | {{class.classname|truncchar_inverse:30}} 69 | {% endif %} 70 |

    71 | 72 | {% endfor %} 73 | 74 | {% endif %} 75 | 76 | 77 | 78 | {% if property.range %} 79 |

    rdfs:range

    80 | 81 | {% for class in property.range %} 82 | 83 |

    84 | {% if class.isdefined %} 85 | {{class.classname|truncchar_inverse:30}} 86 | {% else %} 87 | {{class.classname|truncchar_inverse:30}} 88 | {% endif %} 89 |

    90 | 91 | {% endfor %} 92 | 93 | {% endif %} 94 | 95 | 96 | 97 | 98 | 99 |
    100 | 101 |
    102 | 103 |


    Inheritance Diagram:


    104 | 105 | {% include "ontoview/components/tree_diagram.html" %} 106 | 107 |
    108 | 109 | 110 |
    111 | 112 | {% if subs %} 113 | 114 |


    115 | 116 |

    More Specific Properties:

    117 | {% for prop in subs %} 118 |
  • {{prop.propname|truncchar_inverse:30}}
  • 119 | {% endfor %} 120 | 121 |
    122 | 123 | 124 | {% endif %} 125 | 126 | 127 |
    128 | 129 |
    130 | 131 | 132 | 133 | {% endif %} 134 | 135 | 136 | 137 | 138 | 139 | {% if objpropertiesTree or datapropertiesTree %} 140 | 141 | 142 |
    143 | 144 | 150 | 151 |
    152 |
    153 | 154 | 158 | 159 | {{objpropertiesTree|safe}} 160 | 161 |
    162 | 163 | 164 |
    {# end of tab1 #} 165 | 166 |
    167 | 168 | 171 | 172 | 173 | {{datapropertiesTree|safe}} 174 | 175 |
    176 | 177 | 178 |
    {# end of tab2 #} 179 | 180 | 181 | 182 |
    183 |
    184 | 185 | {% endif %} 186 | 187 | 188 | 189 | {% endblock pagecontents %} -------------------------------------------------------------------------------- /ontospyweb/static/ontospyweb/ontospyweb.css: -------------------------------------------------------------------------------- 1 | /*=========== 2 | October 1, 2014 3 | ===========*/ 4 | 5 | 6 | 7 | /* Sticky footer styles 8 | -------------------------------------------------- */ 9 | html { 10 | position: relative; 11 | min-height: 100%; 12 | } 13 | body { 14 | /* Margin bottom by footer height */ 15 | margin-bottom: 60px; 16 | } 17 | .footer { 18 | position: absolute; 19 | /* bottom: 0;*/ 20 | width: 100%; 21 | /* Set the fixed height of the footer here */ 22 | height: 60px; 23 | background-color: #f5f5f5; 24 | } 25 | 26 | .main-container { 27 | margin-bottom: 100px; 28 | } 29 | 30 | 31 | /* ontospyweb styles 32 | -------------------------------------------------- */ 33 | 34 | 35 | 36 | .nav-tabs>li>a { 37 | font-size: 90%; 38 | } 39 | 40 | /*note: this does not have effect on class/prop trees */ 41 | .propcolor {color: darkcyan;} 42 | .propcolor:hover {color: darkgreen;} 43 | 44 | .rdfentity { 45 | background: white; 46 | border: 1px solid #e1e1e8; 47 | font-family: Monaco,Menlo,Consolas,"Courier New",monospace; 48 | font-size: 70%; 49 | } 50 | 51 | .rdfclass { 52 | color: #C00000; 53 | } 54 | 55 | 56 | .rdfinstance { 57 | color: #0C6D33; 58 | } 59 | 60 | 61 | .ontoPrettyUri { 62 | color: grey; 63 | } 64 | 65 | .rdfobject { 66 | font-size: 17px; 67 | color: grey; 68 | } 69 | 70 | #stats_table td {vertical-align: middle;} 71 | #stats_table p {margin: 10px 0px 10px 0px;} 72 | 73 | 74 | 75 | h3 a.rdfclass:hover { 76 | color: #AB0000; 77 | text-decoration: none; 78 | } 79 | 80 | 81 | .backtotop { 82 | font-size: 70%; 83 | text-align: right; 84 | margin-top: -25px; 85 | } 86 | 87 | .jumptobottom { 88 | font-size: 70%; 89 | text-align: right; 90 | /* margin-top: -25px;*/ 91 | } 92 | 93 | /*font-size: 70%; 94 | margin-top: 27px; 95 | margin-bottom: -5px;*/ 96 | 97 | 98 | .entityDescriptionRow { 99 | margin-bottom: 80px;" 100 | } 101 | 102 | .namespaces { 103 | padding: 40px; 104 | } 105 | 106 | /*.namespaces-container { 107 | background: grey; 108 | }*/ 109 | 110 | /*#footer { 111 | height: 60px; 112 | background-color: #EFEEEC; 113 | }*/ 114 | 115 | /*.bottom-footer { 116 | background-image: linear-gradient(to bottom,#222,#111); 117 | height: 60px; 118 | }*/ 119 | 120 | 121 | 122 | 123 | 124 | 125 | /* css for class and property trees using schema.org style */ 126 | 127 | table.h, .h tr, .h td 128 | { 129 | border: none; 130 | margin: 0; 131 | padding: 0; 132 | border-collapse: collapse; 133 | font-size: 16px; 134 | line-height: 22px; 135 | } 136 | .h .space 137 | { 138 | width: 20px 139 | } 140 | .h .bar 141 | { 142 | background-color: #000; 143 | width: 1px 144 | } 145 | .h .tc 146 | { 147 | text-indent: -21px; 148 | padding-left: 21px 149 | } 150 | 151 | 152 | table.h a:link 153 | { 154 | /* color: #d9230f;*/ 155 | text-decoration: none; 156 | border-bottom: dotted 1px ; /*#d9230f*/ 157 | } 158 | table.h a:visited 159 | { 160 | /* color: #990000;*/ 161 | text-decoration: none; 162 | border-bottom: dotted 1px; /*#990000*/ 163 | } 164 | table.h a:hover 165 | { 166 | border-bottom: none; 167 | /* color: #fff;*/ 168 | /* background-color: #d9230f;*/ 169 | text-decoration: none; 170 | } 171 | 172 | 173 | table.h.propcolor a:link 174 | { 175 | /* color: darkcyan;*/ 176 | text-decoration: none; 177 | border-bottom: dotted 1px green; 178 | } 179 | table.h.propcolor a:visited 180 | { 181 | /* color: darkgreen;*/ 182 | text-decoration: none; 183 | border-bottom: dotted 1px #990000; 184 | } 185 | table.h.propcolor a:hover 186 | { 187 | /* background-color: darkcyan;*/ 188 | border-bottom: none; 189 | /* color: #fff;*/ 190 | text-decoration: none; 191 | } 192 | 193 | 194 | 195 | /* css for property-tables in class views */ 196 | /* -------------------------------------- */ 197 | 198 | 199 | table.classproperties {border: 1px solid #98A0A6; border-collapse: separate; border-spacing: 6px;} 200 | table.classproperties tr {text-align: left;} 201 | table.classproperties td {padding: 10px;} 202 | table.classproperties td.firsttd {width: 20%; background: #EEEEEE;} 203 | table.classproperties td.secondtd {width: 20%;} 204 | table.classproperties th {background: #EEEEEE; padding-left: 5px;} 205 | 206 | table.classproperties h4 {color: gray;} 207 | 208 | 209 | 210 | /* styles for chart.js */ 211 | 212 | 213 | #legendEntities.legend { 214 | /* width: 10em;*/ 215 | /* border: 1px solid black;*/ 216 | } 217 | 218 | #chartsLegend .legend .title { 219 | /* display: block;">{*/ 220 | margin: 0.5em; 221 | border-style: solid; 222 | border-width: 0 0 0 1em; 223 | padding: 0 0.3em; 224 | } 225 | 226 | #chartsLegend span.title { 227 | display:block ; 228 | } -------------------------------------------------------------------------------- /ontospyweb/templates/ontospyweb/tabs/ontology.html: -------------------------------------------------------------------------------- 1 | 2 | {% load ontotags %} 3 | 4 | 5 | 6 | 11 | 12 | 13 | {% if ontologyAnnotations %} 14 | 15 | {% for name, value in ontologyAnnotations %} 16 | {% ifchanged name %} 17 |
    18 |

    {{name}}

    19 | 20 | {% endifchanged %} 21 | 22 |

    23 | {{value|linebreaksbr}} 24 |

    25 | 26 | {% endfor %} 27 | 28 | {% else %} 29 | 30 |

    31 | None found 32 |

    33 | 34 | {% endif %} 35 | 36 | 37 | 40 | 41 | 42 |
    43 | 44 | 45 |
    46 |

    47 | Triples: 48 |
    {{stats.0.1}} 49 |

    50 |
    51 | 52 | 53 |
    54 | 55 | 56 | 57 |
    58 | 59 | 60 | 61 |
    62 | 63 |

    64 |
    65 | 66 | 67 |
    68 | 69 | 70 |

    71 | Entity types: 72 |

    73 | 74 |
    75 | 76 |
    77 | 78 | 79 | 80 | 81 | 82 |
    83 | 84 | 85 | 86 |
    87 | 88 | {% if toplayer %} 89 |
    90 | 91 | 92 | 93 |
    94 | 95 |
    96 | 97 | 98 |
    99 | 100 |

    101 | Top Classes: 102 |

    103 | 104 |
    105 | 106 | 107 | 108 | 109 | 110 |
    111 | {% endif %} 112 | 113 | 114 | 115 | 116 | {# ONTO STATS have this format #} 117 | {# #} 118 | {# out += [("Triples", len(self.rdfGraph))] #} 119 | {# out += [("Classes", len(self.allclasses))] #} 120 | {# out += [("Object Properties", len(self.allobjproperties))] #} 121 | {# out += [("Datatype Properties", len(self.alldataproperties))] #} 122 | {# out += [("Individuals", len(self.allinstances))] #} 123 | 124 | 125 | 126 | 127 | 128 | 129 | 225 | 226 | 227 | 228 | 229 | 230 | -------------------------------------------------------------------------------- /ontospyweb/templates/ontospyweb/tabs/xx_metrics.html: -------------------------------------------------------------------------------- 1 | 2 | {% load ontotags %} 3 | 4 | 5 | 20 | 21 | 22 | 25 | 26 | {# #} 27 | {#
    #} 28 | {# #} 29 | {# #} 30 | {#
    #} 31 | {# #} 32 | {# #} 33 | {# #} 34 | {# #} 35 | {#
    #} 36 | {# #} 37 | {# #} 38 | {#
    #} 39 | {# #} 40 | {# #} 41 | {# #} 42 | {# #} 43 | {#

    #} 44 | {#

    #} 45 | {# #} 46 | {#
    #} 47 | {# #} 48 | {# #} 49 | {# #} 50 | {# #} 51 | {# #} 52 | {#
    #} 53 | {# #} 54 | {# #} 55 | {# #} 56 | {# #} 57 | {# #} 58 | {# #} 61 | {# #} 62 | {# #} 63 | {#
    #} 64 | {# #} 65 | {# #} 66 | {#
    #} 67 | {# #} 68 | {# {% for class in toplayer %} #} 69 | {# #} 70 | {#

    #} 71 | {# > {{class.classname}} {% if not forloop.last %}{% endif %} #} 73 | {#

    #} 74 | {# {% endfor %} #} 75 | {# #} 76 | {#
    #} 77 | {# #} 78 | {# #} 79 | {# #} 80 | {#
    #} 81 | {# #} 82 | {# #} 83 | {# #} 84 | {# #} 85 | {# #} 86 | {# #} 87 | {# #} 88 | {# {# ONTO STATS have this format #} #} 89 | {# {# #} #} 90 | {# {# out += [("Triples", len(self.rdfGraph))] #} #} 91 | {# {# out += [("Classes", len(self.allclasses))] #} #} 92 | {# {# out += [("Object Properties", len(self.allobjproperties))] #} #} 93 | {# {# out += [("Datatype Properties", len(self.alldataproperties))] #} #} 94 | {# {# out += [("Individuals", len(self.allinstances))] #} #} 95 | {# #} 96 | {# #} 97 | {# #} 98 | {# #} 99 | {# #} 100 | {# #} 101 | {# #} 161 | {# #} 162 | {# #} 163 | 164 | 165 | 166 | 167 | 168 | 169 | 170 | {# ALTERNATIVE METRICS WITHOUT TABLE #} 171 | 172 | {#
    #} 173 | {# #} 174 | {# #} 175 | {# {% for x, y in stats %} #} 176 | {# #} 177 | {#

    {{x}}

    #} 178 | {#

    {{y}}

    #} 179 | {# #} 180 | {# {% endfor %} #} 181 | {#
    #} 182 | {# #} 183 | {# #} 184 | {#

    Top Layer

    #} 185 | {#

    #} 186 | {# {% for class in toplayer %} #} 187 | {# {{class.classname}} {% if not forloop.last %}|{% endif %} #} 189 | {# {% endfor %} #} 190 | {#

    #} 191 | {# #} 192 | {#
    #} 193 | 194 | 195 | 196 | 197 | 198 | 199 | 200 | 201 | 202 | -------------------------------------------------------------------------------- /ontospyweb/templates/ontospyweb/docspage.html: -------------------------------------------------------------------------------- 1 | {% extends "ontospyweb/base.html" %} 2 | {% load ontotags %} 3 | 4 | 5 | 6 | 7 | 8 | {% block pageh1title %} 9 | 10 | 11 | {% if ontoPrettyUri %} 12 | 13 |

    14 | {{ontoPrettyUri|truncchar_inverse:50|default:"no uri available"}} 15 |   16 | namespaces 17 |

    18 | 19 | 20 | {% endif %} 21 | 22 | {% endblock pageh1title %} 23 | 24 | 25 | 26 | 27 | {% block pagecontents %} 28 | 29 |
    30 | 31 | 32 |
    33 | 34 | 35 | 36 | 37 | 38 | 97 | 98 | 99 | 100 | 101 |
    102 |
    103 |
    104 | {% include "ontospyweb/tabs/ontology.html" %} 105 |
    106 |
    107 | 108 | {% if classesData %} 109 |
    110 |
    111 | {% include "ontospyweb/tabs/classes.html" %} 112 |
    113 |
    114 | {% endif %} 115 | 116 | {% if objPropertiesData %} 117 |
    118 |
    119 | {% include "ontospyweb/tabs/objprop.html" %} 120 |
    121 |
    122 | {% endif %} 123 | 124 | {% if dataPropertiesData %} 125 |
    126 |
    127 | {% include "ontospyweb/tabs/dataprop.html" %} 128 |
    129 |
    130 | {% endif %} 131 | 132 | {% if annotationPropertiesData %} 133 |
    134 |
    135 | {% include "ontospyweb/tabs/annotationprop.html" %} 136 |
    137 |
    138 | {% endif %} 139 | 140 | {% if instancesData %} 141 |
    142 |
    143 | {% include "ontospyweb/tabs/individuals.html" %} 144 |
    145 |
    146 | {% endif %} 147 | 148 | {#
    #} 149 | {#
    #} 150 | {# {% include "ontospyweb/tabs/metrics.html" %} #} 151 | {#
    #} 152 | {#
    #} 153 | 154 |
    155 | 156 | 157 | 158 |
    159 | 160 | 161 | 162 |
    163 | 164 | 165 | 166 | 167 | {% endblock pagecontents %} 168 | 169 | 170 | 171 | 172 | 173 | 174 | 175 | {% block footer %} 176 | 177 | 225 | {% endblock footer %} 226 | 227 | 228 | 229 | 230 | {% block global_js %} 231 | 232 | 240 | 241 | {% endblock %} 242 | 243 | 244 | 245 | 246 | -------------------------------------------------------------------------------- /ontospyweb/templates/ontospyweb/tabs/xx_classes.html: -------------------------------------------------------------------------------- 1 | {% extends "ontoview/base.html" %} 2 | {% load ontotags %} 3 | 4 | 5 | {% block pagecontents %} 6 | 7 | 8 | {% include "ontoview/components/tabs.html" %} 9 | 10 | 11 | {% if resource404 %} 12 | 13 | 16 | 17 |

    Sorry the resource {{resource}} wasn't found in this ontology. 18 |

    19 | 20 | {% endif %} 21 | 22 | 23 | 24 | {% if class %} 25 | 26 | 27 |

    41 | 42 | 43 | {# show only first comment #} 44 | {#

    {{class.comment.0}}

    #} 45 | {# #} 46 | {#
    #} 47 | 48 | 49 | 50 | {% for name, value in alltriples %} 51 | {% ifchanged name %}

    {{name}}

    {% endifchanged %} 52 | 53 |

    54 | {{value|linebreaksbr}} 55 |

    56 | 57 | {% endfor %} 58 | 59 | 60 | 61 |
    62 | 63 | 64 | 65 | {% if allDomainProperties %} 66 | 67 |

    Instance Properties:



    68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | {% for innerclass, properties in allDomainProperties %} 76 | 77 | 80 | 81 | 82 | {% for prop in properties %} 83 | 84 | 87 | 100 | 103 | 104 | 105 | {% endfor %} 106 | 107 | {% endfor %} 108 | 109 |

    Property

    Expected Type

    Description

    78 | Properties from {{innerclass.classname|truncchar_inverse:50}}

    79 |
    85 |

    {{prop.propname|truncchar_inverse:50}}

    86 |
    88 | {% if prop.range %} 89 | {% for range in prop.range %} 90 | {% if range.isdefined %} 91 |

    {{range.classname|truncchar_inverse:50}}

    92 | {% else %} 93 |

    {{range.classname|truncchar_inverse:50}}

    94 | {% endif %} 95 | {% endfor %} 96 | {% else %} 97 | -- 98 | {% endif %} 99 |
    101 | {{prop.comment.0}} 102 |
    110 | 111 |


    112 | 113 | {% endif %} 114 | 115 | 116 | 117 | 118 |
    119 | 120 |
    121 | 122 |

    Inheritance Diagram:


    123 | 124 | {% include "ontoview/components/tree_diagram.html" %} 125 | 126 |
    127 | 128 | 129 | {# trick to move down automatically the right column when the tree_diagram is too big #} 130 | 131 | {% if alltree_diagram|length > 5 %} 132 |
    133 | {% else %} 134 |
    135 | {% endif %} 136 | 137 | 138 | 139 |
    140 | 141 | {% if subs %} 142 | 143 |

    More Specific types:


    144 | {% for class in subs %} 145 |
  • {{class.classname|truncchar_inverse:50}}
  • 146 | {% endfor %} 147 | 148 |

    149 | {% endif %} 150 | 151 | 152 | {% if siblings %} 153 | 154 |

    Siblings:


    155 | {% for class in siblings %} 156 |
  • {{class.classname|truncchar_inverse:50}}
  • 157 | {% endfor %} 158 | 159 |

    160 | {% endif %} 161 | 162 | 163 | 164 | {% if instances %} 165 | 166 |

    Instances:


    167 | {% for instance in instances %} 168 |
  • {{instance}}
  • 169 | {% endfor %} 170 | 171 |

    172 | {% endif %} 173 | 174 |
    175 | 176 |
    177 | 178 | 179 | 180 | 181 | 182 | {% endif %} 183 | 184 | 185 | 186 | 187 | 188 | 189 | 190 | 191 | 192 | 193 | {% if classtree %} 194 | 195 |
    196 | 197 | {# #} 206 | 207 |
    208 | 209 | 210 | 211 |
    {# active #} 212 | 213 | 216 | 217 | {{classtreeTable|safe}} 218 | 219 |
    220 | 221 | 222 |
    {# end of tab1 #} 223 | 224 | {#
    #} 225 | {# #} 226 | {# #} 229 | {# #} 230 | {# #} 231 | {# {{classtreeTable|safe}} #} 232 | {# #} 233 | {#
    #} 234 | {# #} 235 | {# #} 236 | {#
    #} 237 | {# end of tab2 #} 238 | 239 | 240 | {#
    #} 241 | {# #} 242 | {# #} 245 | {# #} 246 | {# #} 247 | {# {{classtreeTable|safe}} #} 248 | {# #} 249 | {#
    #} 250 | {# #} 251 | {# #} 252 | {#
    #} 253 | {# end of tab3 #} 254 | 255 | 256 | 257 | 258 | 259 | 260 |
    261 |
    262 | 263 | 264 | {% endif %} 265 | 266 | 267 | 268 | 269 | 270 | 271 | {% endblock pagecontents %} -------------------------------------------------------------------------------- /ontospyweb/views.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # encoding: utf-8 3 | 4 | """ 5 | 6 | 7 | ################## 8 | # ontospyweb 9 | # 10 | ################## 11 | 12 | 13 | """ 14 | 15 | 16 | 17 | 18 | 19 | from django.http import HttpResponse, Http404 20 | from django.shortcuts import render_to_response, redirect 21 | from django.template import RequestContext 22 | from django.utils.html import strip_tags, escape 23 | from django.contrib import messages 24 | from django.core.cache import cache 25 | 26 | from StringIO import StringIO 27 | import urllib2 28 | import os 29 | 30 | from ontospyweb.models import * 31 | from settings import STATIC_URL 32 | 33 | from ontutils import * 34 | 35 | 36 | # ps: this uses the local installation 37 | from ontospy_local.ontospy import * 38 | 39 | 40 | 41 | 42 | 43 | def ontoDocsMain(request): 44 | """ 45 | View that handle all initial requests 46 | - if a uri is passed and is valid, shows the ontology data as a single html page 47 | - else, return the initial start page (default) 48 | """ 49 | 50 | SHOW_SEARCH_PAGE = True 51 | 52 | if request.GET.get('uri', ''): 53 | 54 | try: 55 | onto = get_current_ontology(request, request.GET.get('uri', ''), request.GET.get('startpage', '')) 56 | SHOW_SEARCH_PAGE = False 57 | except:# catch all errors while trying to load the ontology 58 | _message = "Ops! An error was encountered while trying to open this file. Are you sure it's a valid RDFS/OWL ontology?" 59 | messages.error(request, _message) 60 | 61 | 62 | 63 | if SHOW_SEARCH_PAGE: 64 | if request.user.is_authenticated(): 65 | # show local files only to admin user 66 | local_ontologies = get_files() # local files don't get added to history panel! 67 | else: 68 | local_ontologies = [] 69 | 70 | history = HistoryEntry.objects.all().order_by('-score') 71 | 72 | context = { 73 | 'local_ontologies' : local_ontologies , 74 | 'history' : history , 75 | 'LOCAL_ONTOLOGIES_FOLDER' : LOCAL_ONTOLOGIES_FOLDER, 76 | } 77 | return render_to_response('ontospyweb/startsearch.html', 78 | context, 79 | context_instance=RequestContext(request)) 80 | 81 | 82 | # If RETURN_SEARCH_PAGE = False, build up the docs 83 | 84 | context = getDefaultContext(onto) 85 | 86 | context.update(get_ontology(onto)) 87 | context.update(get_classes(onto)) 88 | context.update(get_objProperties(onto)) 89 | context.update(get_dataProperties(onto)) 90 | context.update(get_annotationProperties(onto)) 91 | context.update(get_individuals(onto)) 92 | 93 | return render_to_response('ontospyweb/docspage.html', 94 | context, 95 | context_instance=RequestContext(request)) 96 | 97 | 98 | 99 | 100 | 101 | 102 | # =========== 103 | # methods to extract data for the tabs 104 | # =========== 105 | 106 | 107 | 108 | def get_ontology(onto): 109 | """""" 110 | ontologyAnnotations = onto.ontologyAnnotations(niceURI=True, excludeProps=False, excludeBNodes = False,) 111 | 112 | context = { 113 | 'stats' : onto.ontologyStats() , 114 | 'toplayer' : [onto.classRepresentation(aClass) for aClass in onto.toplayer] , 115 | # 'sourcecode1' : onto.serializeOntologyGraph("turtle").strip() , 116 | # 'sourcecode2' : onto.serializeOntologyGraph("xml").strip() , 117 | 'ontologyAnnotations' : ontologyAnnotations, 118 | 119 | } 120 | 121 | return context 122 | 123 | 124 | 125 | 126 | def get_classes(onto): 127 | """ 128 | View that .. 129 | """ 130 | 131 | # CLASS TREE 132 | context = { 133 | # 'classtree' : formatHTML_ClassTree(onto) , 134 | 'classtreeTable' : formatHTML_ClassTreeTable(onto) , 135 | } 136 | 137 | classesData = [] 138 | 139 | for aClass in onto.allclasses: 140 | # CLASS INFO 141 | supers = onto.classAllSupers(aClass) 142 | # alltree = supers + [aClass] 143 | # subs = onto.classDirectSubs(aClass, sortUriName = True) 144 | # siblings = onto.classSiblings(aClass, sortUriName = True) 145 | 146 | _exclude_ = [RDF.type, RDFS.isDefinedBy, RDFS.subClassOf] # , 147 | # alltriples = entityTriples(aClass, niceURI=True, excludeProps=_exclude_, excludeBNodes = False,) 148 | 149 | alltriples = entityTriples(onto.rdfGraph, aClass, excludeProps=_exclude_, excludeBNodes = False,) 150 | alltriples = [(uri2niceString(y, onto.ontologyNamespaces), z) for y,z in alltriples] 151 | 152 | domain_info = onto.classDomainFor(aClass, inherited = True) 153 | # explode the domain info nested list so to include all prop/class representation 154 | allDomainProperties = [] 155 | for tupl in domain_info: 156 | classExploded = onto.classRepresentation(tupl[0]) 157 | propExploded = [onto.propertyRepresentation(p) for p in tupl[1]] 158 | allDomainProperties.append((classExploded, propExploded)) 159 | 160 | mydict = { 161 | 'class' : onto.classRepresentation(aClass) , 162 | 'supers' : [onto.classRepresentation(x) for x in supers] , 163 | # 'alltree' : [onto.classRepresentation(x) for x in alltree] , 164 | # 'subs' : [onto.classRepresentation(x) for x in subs] , 165 | # 'siblings' : [onto.classRepresentation(x) for x in siblings] , 166 | 'allDomainProperties' : allDomainProperties , 167 | # 'instances' : onto.classInstances(aClass) , 168 | 'alltriples' : alltriples, 169 | } 170 | 171 | classesData += [mydict] 172 | 173 | context.update({'classesData' : classesData}) 174 | return context 175 | 176 | 177 | 178 | 179 | 180 | 181 | 182 | 183 | 184 | 185 | 186 | 187 | 188 | def get_objProperties(onto): 189 | """ 190 | Return the properties info 191 | """ 192 | 193 | objPropertiesData = [] 194 | 195 | #PROPERTY TREE 196 | context = { 197 | 'objpropertiesTree' : formatHTML_PropTreeTable(onto, classPredicate="owl.objprop") , 198 | } 199 | 200 | for aProp in onto.allobjproperties: 201 | 202 | # PROPERTY INFO 203 | supers = onto.propertyAllSupers(aProp) 204 | # alltree = supers + [aProp] 205 | # subs = onto.propertyDirectSubs(aProp, sortUriName = True) 206 | 207 | # alltriples = entityTriples(aProp, niceURI=True, excludeProps=[RDF.type, RDFS.subPropertyOf, RDFS.isDefinedBy, RDFS.domain, RDFS.range], excludeBNodes = False,) 208 | 209 | _exclude_ = [RDF.type, RDFS.subPropertyOf, RDFS.isDefinedBy, RDFS.domain, RDFS.range] 210 | alltriples = entityTriples(onto.rdfGraph, aProp, excludeProps=_exclude_, excludeBNodes = False,) 211 | alltriples = [(uri2niceString(y, onto.ontologyNamespaces), z) for y,z in alltriples] 212 | 213 | mydict = { 214 | 'prop' : onto.propertyRepresentation(aProp) , 215 | 'supers' : [onto.propertyRepresentation(x) for x in supers] , 216 | # 'subs' : [onto.propertyRepresentation(x) for x in subs] , 217 | 'alltriples' : alltriples, 218 | } 219 | 220 | objPropertiesData += [mydict] 221 | 222 | 223 | context.update({'objPropertiesData' : objPropertiesData}) 224 | return context 225 | 226 | 227 | 228 | 229 | 230 | 231 | 232 | def get_dataProperties(onto): 233 | """ 234 | Return the properties info 235 | """ 236 | 237 | dataPropertiesData = [] 238 | 239 | #PROPERTY TREE 240 | context = { 241 | 'datapropertiesTree' : formatHTML_PropTreeTable(onto, classPredicate="owl.dataprop") , 242 | } 243 | 244 | for aProp in onto.alldataproperties: 245 | 246 | # PROPERTY INFO 247 | supers = onto.propertyAllSupers(aProp) 248 | # alltree = supers + [aProp] 249 | # subs = onto.propertyDirectSubs(aProp, sortUriName = True) 250 | 251 | # alltriples = entityTriples(aProp, niceURI=True, excludeProps=[RDF.type, RDFS.subPropertyOf, RDFS.isDefinedBy, RDFS.domain, RDFS.range], excludeBNodes = False,) 252 | 253 | _exclude_ = [RDF.type, RDFS.subPropertyOf, RDFS.isDefinedBy, RDFS.domain, RDFS.range] 254 | alltriples = entityTriples(onto.rdfGraph, aProp, excludeProps=_exclude_, excludeBNodes = False,) 255 | alltriples = [(uri2niceString(y, onto.ontologyNamespaces), z) for y,z in alltriples] 256 | 257 | mydict = { 258 | 'prop' : onto.propertyRepresentation(aProp) , 259 | 'supers' : [onto.propertyRepresentation(x) for x in supers] , 260 | # 'subs' : [onto.propertyRepresentation(x) for x in subs] , 261 | 'alltriples' : alltriples, 262 | } 263 | 264 | dataPropertiesData += [mydict] 265 | 266 | 267 | context.update({'dataPropertiesData' : dataPropertiesData}) 268 | return context 269 | 270 | 271 | 272 | 273 | 274 | 275 | 276 | def get_annotationProperties(onto): 277 | """ 278 | Return the OWL annotation properties info 279 | """ 280 | 281 | annotationPropertiesData = [] 282 | 283 | #PROPERTY TREE 284 | context = { 285 | 'annotationpropertiesTree' : formatHTML_PropTreeTable(onto, classPredicate="owl.annotationprop") , 286 | } 287 | 288 | # for each property, add more info 289 | for aProp in onto.allannotationproperties: 290 | 291 | # PROPERTY INFO 292 | supers = onto.propertyAllSupers(aProp) 293 | # alltree = supers + [aProp] 294 | # subs = onto.propertyDirectSubs(aProp, sortUriName = True) 295 | 296 | # alltriples = entityTriples(aProp, niceURI=True, excludeProps=[RDF.type, RDFS.subPropertyOf, RDFS.isDefinedBy, RDFS.domain, RDFS.range], excludeBNodes = False,) 297 | 298 | _exclude_ = [RDF.type, RDFS.subPropertyOf, RDFS.isDefinedBy, RDFS.domain, RDFS.range] 299 | alltriples = entityTriples(onto.rdfGraph, aProp, excludeProps=_exclude_, excludeBNodes = False,) 300 | alltriples = [(uri2niceString(y, onto.ontologyNamespaces), z) for y,z in alltriples] 301 | 302 | mydict = { 303 | 'prop' : onto.propertyRepresentation(aProp) , 304 | 'supers' : [onto.propertyRepresentation(x) for x in supers] , 305 | # 'subs' : [onto.propertyRepresentation(x) for x in subs] , 306 | 'alltriples' : alltriples, 307 | } 308 | 309 | annotationPropertiesData += [mydict] 310 | 311 | 312 | context.update({'annotationPropertiesData' : annotationPropertiesData}) 313 | return context 314 | 315 | 316 | 317 | 318 | 319 | 320 | 321 | 322 | 323 | 324 | def get_individuals(onto): 325 | """ 326 | 327 | """ 328 | 329 | instancesData = [] 330 | context = {} 331 | 332 | # ALL INDIVIDUALS 333 | # no need for extra calculations here 334 | 335 | context = { 336 | 'instancesData' : [onto.instanceRepresentation(instance) for instance in onto.allinstances] , 337 | } 338 | 339 | return context 340 | 341 | 342 | 343 | 344 | -------------------------------------------------------------------------------- /ontospyweb/static/ontospyweb/ontologies/hucit.owl: -------------------------------------------------------------------------------- 1 | 2 | 12 | 13 | 0.9.1 15 | 2013-05-02 17 | Matteo Romanello and Michele Pasin 19 | HuCit is a light-weight ontology aimed at modelling citations with a particular focus on the Humanities 20 | HuCit, the HUmanities CITation Ontology 21 | 22 | 23 | 24 | Canonical Text Structure 26 | 27 | 28 | 29 | A TextStructure that becomes the canonical way to refer to a certain text. 30 | For example, the canonical structure to refer to Homer's Iliad consists of books that, in turn, consist of poetic lines. 31 | References to such canonical structure are usually given in the paratext of print editions of ancient texts. 32 | 33 | 34 | 35 | Text Element 36 | 37 | 38 | 39 | The elements (e.g. chapter, title, page) a textual structure is composed of. 41 | 42 | When encoding a text, for instance using TEI, the elements of a textual structured can be captured by using the relevant mark-up elements (such as <p> for a paragraph, <div> for a book or a chapter, etc.). 43 | 44 | The CTS Protocol defines a system of URNs to identify such text elements. (explain) 45 | 46 | 47 | 48 | 49 | 50 | Canonical Citation 51 | Canonical citations are references to ancient texts, usually expressed by abbreviations and referring to "logical" rather than "physical" units of texts. 52 | 53 | A citation to the first line of the Iliad, for instance does not refer to the very page of a specific critical edition of the text, but to the first line of the first book of the work (e.g. Hom. Il. 1.1). 54 | 55 | Some examples of canonical citations: 56 | * Arist. Poetics 1451a35-b6 and 1459a17-29 57 | * Hom. Il. 1.1 58 | * A. Cicero, DND 1.41 59 | 60 | In Hucit a citation is essentially a pointer and not a direct reference to a text. What the citation is pointing to is an element (TextElement) of an abstract structure of the text (TextStructure). If the citation is canonical–as not all citations are necessarily canonical–the citation is pointing to an element of a CanonicalTextStructure. 61 | 62 | 63 | Text Structure 65 | 66 | 67 | 68 | The structure of a text: here it is represented as an abstract notion, but in reality it is determined by both logical and physical characteristics of a text. 70 | 71 | Text often, if not always, have multiple structures, such as for instance a logical structure made of books / chapters / paragraphs, and a physical structure made of pages / columns / lines and so on. These structures do overlap with each other: e.g. a page may contain a chapter or part of it, a paragraph may be split over several lines, etc. 72 | 73 | The composition of a textual structure can be represented by using the properties has_texual_component and part_of_component. The latter, in particular, is a recursive property and fits well the purpose of textual structures with a varying number of levels (down to the potentially deeply nested ones). 74 | 75 | 76 | Citation 78 | 79 | 80 | 81 | TBD 83 | 84 | 85 | 86 | 87 | 88 | Self Contained Expression 90 | 91 | 92 | Needs to be aligned to CIDOC-CRM 93 | 94 | Conceptual Object 95 | 96 | 97 | A subclass of F1.Work as defined in FRBRoo 99 | Work 101 | 102 | 103 | 104 | 105 | Expression 106 | 107 | 108 | Two strings containing the same citation (e.g. a citation to Homer's Iliad, book 1, line 1) may differ for their surface appearance. We use CitationStyle to be able to distinguish two citations 109 | Citation Style 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | has canonical structure 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | is canonical structure of 156 | 157 | 158 | 159 | 160 | 161 | 162 | 163 | 164 | 165 | 166 | 167 | 168 | 169 | 170 | 171 | 172 | 173 | 174 | 175 | 176 | 177 | 178 | 179 | 180 | 181 | 182 | 183 | 184 | 185 | 186 | 187 | 188 | 189 | 190 | 191 | 192 | 193 | 194 | 195 | 196 | 197 | 198 | 199 | 200 | 201 | 202 | 203 | 204 | 205 | 206 | -------------------------------------------------------------------------------- /ontospyweb/ontutils.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # encoding: utf-8 3 | 4 | """ 5 | 6 | 7 | ################## 8 | # ontospyweb 9 | # 10 | ################## 11 | 12 | 13 | """ 14 | 15 | 16 | 17 | 18 | 19 | from django.http import HttpResponse, Http404 20 | from django.shortcuts import render_to_response, redirect 21 | from django.template import RequestContext 22 | from django.utils.html import strip_tags, escape 23 | from django.contrib import messages 24 | 25 | from StringIO import StringIO 26 | import urllib2 27 | import os 28 | 29 | from ontospyweb.models import * 30 | from settings import STATIC_URL 31 | 32 | # ps: this uses the local installation 33 | from ontospy_local.ontospy import * 34 | 35 | from django.core.cache import cache 36 | 37 | 38 | # calc abs paths for the **models** folder, assuming it's in the static dir of the ontoview app 39 | thisFilePath = os.path.dirname(os.path.realpath(__file__)).rsplit('/', 1)[0] 40 | LOCAL_ONTOLOGIES_FOLDER = os.path.join(thisFilePath, 'ontospyweb/static/ontospyweb/ontologies/') 41 | 42 | 43 | 44 | 45 | def get_current_ontology(request, url, startpage=False): 46 | """ 47 | If testing in local, loads the ontology file from the local folder. 48 | Otherwise it just expects a standard rdf-returning URI. 49 | """ 50 | 51 | if url.startswith("file://localhost/"): 52 | 53 | # then it's a local file 54 | realpath = os.path.join(LOCAL_ONTOLOGIES_FOLDER, url.replace("file://localhost/", "")) 55 | # onto = getCached_Onto(request, realpath) 56 | onto = Ontology(realpath) 57 | 58 | # hide the physical location set by OntoSpy (so to hide server path infos in display & url parameters) 59 | onto.ontologyMaskedLocation = url 60 | 61 | # override physical location set by OntosPy (so to allow source download via Django static handler) 62 | prefix = 'https://' if request.is_secure() else 'http://' 63 | if STATIC_URL.startswith("http"): 64 | onto.ontologyPhysicalLocation = STATIC_URL + 'ontospyweb/ontologies/' + url.replace("file://localhost/", "") 65 | else: 66 | onto.ontologyPhysicalLocation = prefix + request.get_host() + STATIC_URL + 'ontospyweb/ontologies/' + url.replace("file://localhost/", "") 67 | return onto 68 | 69 | else: 70 | 71 | if url.startswith("http://"): 72 | pass 73 | else: 74 | url = "http://" + url 75 | 76 | onto = Ontology(url) 77 | onto.ontologyMaskedLocation = url # what is this for? 78 | 79 | # in theory the onto has loaded succesfully - so we save it 80 | # (ps: only if the request comes from the startpage!) 81 | if startpage: 82 | updateHistory(onto) 83 | 84 | return onto 85 | 86 | 87 | 88 | # def load_webOnto(ontoInstanceURI): 89 | # """ 90 | # Similar as getCached_Onto, but removed all caching to make things simple 91 | # """ 92 | # # get Source file 93 | # req = urllib2.Request(ontoInstanceURI) 94 | # req.add_header('Accept', 'application/rdf+xml,text/rdf+n3;q=0.9,application/xhtml+xml;q=0.5, */*;q=0.1') 95 | # 96 | # res = urllib2.urlopen(req) 97 | # 98 | # onto = Ontology(StringIO(res.read())) 99 | # res.close() 100 | # return onto 101 | # 102 | 103 | 104 | 105 | def get_files(): 106 | mypath = LOCAL_ONTOLOGIES_FOLDER 107 | onlyfiles = [ "file://localhost/" + f for f in os.listdir(mypath) if os.path.isfile(os.path.join(mypath,f)) and not f.startswith(".") ] 108 | return onlyfiles 109 | 110 | 111 | 112 | # October 5, 2014: DEPRECATED 113 | # in single-html-page version of tool we dont do any caching 114 | def getCached_Onto(request, ontoInstanceURI): 115 | """ 116 | Uses the session/cache backend to avoid reloading an ontology every time 117 | 118 | Note that each time we're loading the ontology using an http request - and passing the file directly to rdflib.parse() 119 | """ 120 | ONTOVIEW_CACHE = cache.get(ontoInstanceURI) 121 | 122 | if not ONTOVIEW_CACHE: 123 | printDebug("**NO CACHE** Could not find a cached version of %s..... now retrieving and caching...." % ontoInstanceURI) 124 | 125 | # get Source file 126 | req = urllib2.Request(ontoInstanceURI) 127 | req.add_header('Accept', 'application/rdf+xml,text/rdf+n3;q=0.9,application/xhtml+xml;q=0.5, */*;q=0.1') 128 | 129 | 130 | res = urllib2.urlopen(req) 131 | 132 | ONTOVIEW_CACHE = res.read() 133 | cache.set(ontoInstanceURI, ONTOVIEW_CACHE, 300) # note: in seconds 134 | onto = Ontology(StringIO(ONTOVIEW_CACHE)) 135 | 136 | 137 | res.close() 138 | 139 | else: 140 | printDebug("**YES CACHE** Found a cached version of <%s>! " % ontoInstanceURI) 141 | onto = Ontology(StringIO(ONTOVIEW_CACHE)) 142 | 143 | return onto 144 | 145 | 146 | 147 | 148 | 149 | 150 | def bootstrapDesc(onto): 151 | """ 152 | Extract whatever could be used as a description for the ontology 153 | """ 154 | DCTERMS = Namespace('http://purl.org/dc/terms/') 155 | DC = Namespace('http://purl.org/dc/elements/1.1/') 156 | 157 | RDFSlabel = "\n".join([x for x in onto.rdfGraph.objects(onto.ontologyURI, RDFS.label)]) 158 | RDFScomment = "\n".join([x for x in onto.rdfGraph.objects(onto.ontologyURI, RDFS.comment)]) 159 | 160 | DCdescription = "\n".join([x for x in onto.rdfGraph.objects(onto.ontologyURI, DC.description)]) 161 | DCtitle = "\n".join([x for x in onto.rdfGraph.objects(onto.ontologyURI, DC.description)]) 162 | DCTERMSdescription = "\n".join([x for x in onto.rdfGraph.objects(onto.ontologyURI, DCTERMS.description)]) 163 | DCTERMStitle = "\n".join([x for x in onto.rdfGraph.objects(onto.ontologyURI, DCTERMS.description)]) 164 | 165 | return " ".join([DCtitle, DCdescription, DCTERMStitle, DCTERMSdescription, RDFSlabel, RDFScomment]) 166 | 167 | 168 | 169 | 170 | def updateHistory(onto): 171 | """ update the history table once a URI is succesfully loaded into an ontology """ 172 | if onto.ontologyPhysicalLocation: 173 | try: 174 | # if the URI already exists, just save so to increase the count 175 | h = HistoryEntry.objects.get(uri=onto.ontologyPhysicalLocation.strip()) 176 | h.save() 177 | except: 178 | # create a new history entry 179 | h = HistoryEntry(uri=onto.ontologyPhysicalLocation.strip(), description=bootstrapDesc(onto)) 180 | h.save() 181 | else: 182 | printDebug("updateHistory: failed as onto.ontologyPhysicalLocation is missing") 183 | 184 | 185 | 186 | def encodeuri(u): 187 | """ 188 | hashes are interpreted differently in urls and ontology uris, so we mask them when passed as args 189 | """ 190 | return u.replace("#", "*hash*") # # in html TODO 191 | def decodeuri(u): 192 | """ 193 | """ 194 | return u.replace("*hash*", "#") 195 | 196 | 197 | # note: duplicate of templatetagg so to avoid circular imports 198 | def truncchar_inverse(value, arg): 199 | if len(value) < arg: 200 | return value 201 | else: 202 | x = len(value) - arg 203 | return '...' + value[x:] 204 | 205 | 206 | 207 | 208 | 209 | def getDefaultContext(onto): 210 | """ 211 | Refactoring stuff that we always want in context 212 | """ 213 | 214 | context = { 215 | 'ontoFile' : onto.ontologyMaskedLocation or onto.ontologyPhysicalLocation, 216 | 'ontoFileNoMask' : onto.ontologyPhysicalLocation , 217 | 'ontoPrettyUri' : onto.ontologyPrettyURI , 218 | 'namespaces' : onto.ontologyNamespaces , 219 | } 220 | 221 | return context 222 | 223 | 224 | 225 | 226 | 227 | 228 | 229 | def printDebug(s): 230 | try: 231 | print s 232 | except: 233 | pass 234 | 235 | 236 | 237 | 238 | 239 | 240 | 241 | ################## 242 | # 243 | # TREE DISPLAY FUNCTIONS 244 | # 245 | ################## 246 | 247 | 248 | 249 | def formatHTML_ClassTreeTable(onto, treedict = None, element = 0): 250 | """ outputs an html tree representation based on the dictionary we get from the Inspector 251 | object.... 252 | 253 | EG: 254 | 255 | 256 | 257 | 259 | 260 | 261 | 263 | 264 | 265 | 266 | 267 | 268 | 269 | 270 | 280 | 281 | 282 | 283 |
    DataType 258 |
    DataType 262 |
    271 | 272 | 274 | 275 | 277 | 278 |
    Boolean 273 |
    Boolean 276 |
    279 |
    284 | 285 | 286 | Note: The top level owl:Thing never appears as a link. 287 | 288 | """ 289 | ontoFile = onto.ontologyMaskedLocation or onto.ontologyPhysicalLocation 290 | if not treedict: 291 | treedict = onto.ontologyClassTree 292 | stringa = """""" 293 | for x in treedict[element]: 294 | if uri2niceString(x, onto.ontologyNamespaces) == "owl:Thing": 295 | stringa += """ 296 | 297 | """ % (truncchar_inverse(uri2niceString(x, onto.ontologyNamespaces), 50)) 298 | else: 299 | stringa += """ 300 | 301 | """ % (str(x), uri2niceString(x, onto.ontologyNamespaces), truncchar_inverse(uri2niceString(x, onto.ontologyNamespaces), 50)) 302 | 303 | if treedict.get(x, None): 304 | stringa += """ 305 | 306 | 307 | 308 | 309 | """ % formatHTML_ClassTreeTable(onto, treedict, x) 310 | 311 | # stringa += formatHTML_ClassTree(onto, treedict, x) 312 | # stringa += "" 313 | stringa += "
    %s
    %s
    %s
    " 314 | return stringa 315 | 316 | 317 | 318 | 319 | 320 | 321 | 322 | def formatHTML_PropTreeTable(onto, classPredicate, treedict = None, element = 0): 323 | """ outputs an html tree representation based on the dictionary we get from the Inspector 324 | object.... 325 | -see above for an example- 326 | 327 | if not treedict: 328 | if classPredicate == "owl.objprop": 329 | treedict = onto.ontologyObjPropertyTree 330 | else: 331 | treedict = onto.ontologyDataPropertyTree 332 | stringa = "" 339 | return stringa 340 | 341 | 342 | 343 | """ 344 | ontoFile = onto.ontologyMaskedLocation or onto.ontologyPhysicalLocation 345 | if not treedict: 346 | if classPredicate == "owl.objprop": 347 | treedict = onto.ontologyObjPropertyTree 348 | elif classPredicate == "owl.annotationprop": 349 | treedict = onto.ontologyAnnotationPropertyTree 350 | else: 351 | treedict = onto.ontologyDataPropertyTree 352 | 353 | stringa = """""" 354 | for x in treedict[element]: 355 | stringa += """ 356 | 357 | """ % (str(x), uri2niceString(x, onto.ontologyNamespaces) , truncchar_inverse(uri2niceString(x, onto.ontologyNamespaces), 50)) 358 | 359 | if treedict.get(x, None): 360 | stringa += """ 361 | 362 | 363 | 364 | 365 | """ % formatHTML_PropTreeTable(onto, classPredicate, treedict, x) 366 | 367 | # stringa += formatHTML_ClassTree(onto, treedict, x) 368 | # stringa += "" 369 | stringa += "
    %s
    %s
    " 370 | return stringa 371 | 372 | 373 | 374 | 375 | # 376 | # 377 | # ============= 378 | # old tree formatting algorithms: work but deprecated 379 | # =========== 380 | # 381 | # 382 | 383 | 384 | 385 | def formatHTML_ClassTree(onto, treedict = None, element = 0): 386 | """ outputs an html tree representation based on the dictionary we get from the Inspector 387 | object.... 388 | 389 | EG: 390 | 405 | 406 | Note: The top level owl:Thing never appears as a link. 407 | 408 | """ 409 | ontoFile = onto.ontologyMaskedLocation or onto.ontologyPhysicalLocation 410 | if not treedict: 411 | treedict = onto.ontologyClassTree 412 | stringa = "" 422 | return stringa 423 | 424 | 425 | 426 | 427 | 428 | def formatHTML_PropTree(onto, classPredicate, treedict = None, element = 0): 429 | """ outputs an html tree representation based on the dictionary we get from the Inspector 430 | object.... 431 | """ 432 | ontoFile = onto.ontologyMaskedLocation or onto.ontologyPhysicalLocation 433 | if not treedict: 434 | if classPredicate == "owl.objprop": 435 | treedict = onto.ontologyObjPropertyTree 436 | else: 437 | treedict = onto.ontologyDataPropertyTree 438 | stringa = "" 445 | return stringa 446 | 447 | 448 | 449 | 450 | 451 | 452 | -------------------------------------------------------------------------------- /ontospyweb/static/ontospyweb/ontologies/skos.rdf: -------------------------------------------------------------------------------- 1 | 2 | 6 | 25 | 26 | SKOS Vocabulary 27 | Dave Beckett 28 | Nikki Rogers 29 | Participants in W3C's Semantic Web Deployment Working Group. 30 | An RDF vocabulary for describing the basic structure and content of concept schemes such as thesauri, classification schemes, subject heading lists, taxonomies, 'folksonomies', other types of controlled vocabulary, and also concept schemes embedded in glossaries and terminologies. 31 | Alistair Miles 32 | Sean Bechhofer 33 | 34 | 35 | 36 | Concept 37 | 38 | An idea or notion; a unit of thought. 39 | 40 | 41 | 42 | 43 | Concept Scheme 44 | 45 | A set of concepts, optionally including statements about semantic relationships between those concepts. 46 | A concept scheme may be defined to include concepts from different sources. 47 | Thesauri, classification schemes, subject heading lists, taxonomies, 'folksonomies', and other types of controlled vocabulary are all examples of concept schemes. Concept schemes are also embedded in glossaries and terminologies. 48 | 49 | 50 | 51 | 52 | 53 | 54 | Collection 55 | 56 | A meaningful collection of concepts. 57 | Labelled collections can be used where you would like a set of concepts to be displayed under a 'node label' in the hierarchy. 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | Ordered Collection 67 | 68 | An ordered collection of concepts, where both the grouping and the ordering are meaningful. 69 | Ordered collections can be used where you would like a set of concepts to be displayed in a specific order, and optionally under a 'node label'. 70 | 71 | 72 | 73 | 74 | 75 | 76 | is in scheme 77 | 78 | Relates a resource (for example a concept) to a concept scheme in which it is included. 79 | A concept may be a member of more than one concept scheme. 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | has top concept 89 | 90 | Relates, by convention, a concept scheme to a concept which is topmost in the broader/narrower concept hierarchies for that scheme, providing an entry point to these hierarchies. 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | is top concept in scheme 104 | 105 | Relates a concept to the concept scheme that it is a top level concept of. 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | preferred label 119 | 120 | The preferred lexical label for a resource, in a given language. 121 | 122 | 123 | 124 | 125 | 126 | A resource has no more than one value of skos:prefLabel per language tag, and no more than one value of skos:prefLabel without language tag. 127 | 128 | The range of skos:prefLabel is the class of RDF plain literals. 129 | 130 | skos:prefLabel, skos:altLabel and skos:hiddenLabel are pairwise 131 | disjoint properties. 132 | 133 | 134 | 135 | 136 | alternative label 137 | 138 | An alternative lexical label for a resource. 139 | Acronyms, abbreviations, spelling variants, and irregular plural/singular forms may be included among the alternative labels for a concept. Mis-spelled terms are normally included as hidden labels (see skos:hiddenLabel). 140 | 141 | 142 | 143 | 144 | 145 | The range of skos:altLabel is the class of RDF plain literals. 146 | 147 | skos:prefLabel, skos:altLabel and skos:hiddenLabel are pairwise disjoint properties. 148 | 149 | 150 | 151 | 152 | hidden label 153 | 154 | A lexical label for a resource that should be hidden when generating visual displays of the resource, but should still be accessible to free text search operations. 155 | 156 | 157 | 158 | 159 | 160 | The range of skos:hiddenLabel is the class of RDF plain literals. 161 | 162 | skos:prefLabel, skos:altLabel and skos:hiddenLabel are pairwise disjoint properties. 163 | 164 | 165 | 166 | 167 | notation 168 | 169 | A notation, also known as classification code, is a string of characters such as "T58.5" or "303.4833" used to uniquely identify a concept within the scope of a given concept scheme. 170 | By convention, skos:notation is used with a typed literal in the object position of the triple. 171 | 172 | 173 | 174 | 175 | 176 | 177 | note 178 | 179 | A general note, for any purpose. 180 | This property may be used directly, or as a super-property for more specific note types. 181 | 182 | 183 | 184 | 185 | 186 | 187 | change note 188 | 189 | A note about a modification to a concept. 190 | 191 | 192 | 193 | 194 | 195 | 196 | 197 | 198 | definition 199 | 200 | A statement or formal explanation of the meaning of a concept. 201 | 202 | 203 | 204 | 205 | 206 | 207 | 208 | 209 | editorial note 210 | 211 | A note for an editor, translator or maintainer of the vocabulary. 212 | 213 | 214 | 215 | 216 | 217 | 218 | 219 | 220 | example 221 | 222 | An example of the use of a concept. 223 | 224 | 225 | 226 | 227 | 228 | 229 | 230 | 231 | history note 232 | 233 | A note about the past state/use/meaning of a concept. 234 | 235 | 236 | 237 | 238 | 239 | 240 | 241 | 242 | scope note 243 | 244 | A note that helps to clarify the meaning and/or the use of a concept. 245 | 246 | 247 | 248 | 249 | 250 | 251 | 252 | 253 | is in semantic relation with 254 | 255 | Links a concept to a concept related by meaning. 256 | This property should not be used directly, but as a super-property for all properties denoting a relationship of meaning between concepts. 257 | 258 | 259 | 260 | 261 | 262 | 263 | 264 | 265 | 266 | 267 | has broader 268 | 269 | Relates a concept to a concept that is more general in meaning. 270 | Broader concepts are typically rendered as parents in a concept hierarchy (tree). 271 | By convention, skos:broader is only used to assert an immediate (i.e. direct) hierarchical link between two conceptual resources. 272 | 273 | 274 | 275 | 276 | 277 | 278 | 279 | 280 | 281 | 282 | has narrower 283 | 284 | Relates a concept to a concept that is more specific in meaning. 285 | By convention, skos:broader is only used to assert an immediate (i.e. direct) hierarchical link between two conceptual resources. 286 | Narrower concepts are typically rendered as children in a concept hierarchy (tree). 287 | 288 | 289 | 290 | 291 | 292 | 293 | 294 | 295 | 296 | 297 | has related 298 | 299 | Relates a concept to a concept with which there is an associative semantic relationship. 300 | 301 | 302 | 303 | 304 | 305 | 306 | 307 | skos:related is disjoint with skos:broaderTransitive 308 | 309 | 310 | 311 | 312 | has broader transitive 313 | 314 | skos:broaderTransitive is a transitive superproperty of skos:broader. 315 | By convention, skos:broaderTransitive is not used to make assertions. Rather, the properties can be used to draw inferences about the transitive closure of the hierarchical relation, which is useful e.g. when implementing a simple query expansion algorithm in a search application. 316 | 317 | 318 | 319 | 320 | 321 | 322 | 323 | 324 | 325 | 326 | 327 | 328 | has narrower transitive 329 | 330 | skos:narrowerTransitive is a transitive superproperty of skos:narrower. 331 | By convention, skos:narrowerTransitive is not used to make assertions. Rather, the properties can be used to draw inferences about the transitive closure of the hierarchical relation, which is useful e.g. when implementing a simple query expansion algorithm in a search application. 332 | 333 | 334 | 335 | 336 | 337 | 338 | 339 | 340 | 341 | 342 | 343 | 344 | has member 345 | 346 | Relates a collection to one of its members. 347 | 348 | 349 | 350 | 351 | 352 | 353 | 354 | 355 | 356 | 357 | 358 | 359 | 360 | 361 | 362 | 363 | 364 | has member list 365 | 366 | Relates an ordered collection to the RDF list containing its members. 367 | 368 | 369 | 370 | 371 | 372 | 373 | 374 | 375 | 376 | For any resource, every item in the list given as the value of the 377 | skos:memberList property is also a value of the skos:member property. 378 | 379 | 380 | 381 | 382 | is in mapping relation with 383 | 384 | Relates two concepts coming, by convention, from different schemes, and that have comparable meanings 385 | These concept mapping relations mirror semantic relations, and the data model defined below is similar (with the exception of skos:exactMatch) to the data model defined for semantic relations. A distinct vocabulary is provided for concept mapping relations, to provide a convenient way to differentiate links within a concept scheme from links between concept schemes. However, this pattern of usage is not a formal requirement of the SKOS data model, and relies on informal definitions of best practice. 386 | 387 | 388 | 389 | 390 | 391 | 392 | 393 | 394 | has broader match 395 | 396 | skos:broadMatch is used to state a hierarchical mapping link between two conceptual resources in different concept schemes. 397 | 398 | 399 | 400 | 401 | 402 | 403 | 404 | 405 | 406 | 407 | 408 | 409 | has narrower match 410 | 411 | skos:narrowMatch is used to state a hierarchical mapping link between two conceptual resources in different concept schemes. 412 | 413 | 414 | 415 | 416 | 417 | 418 | 419 | 420 | 421 | 422 | 423 | 424 | has related match 425 | 426 | skos:relatedMatch is used to state an associative mapping link between two conceptual resources in different concept schemes. 427 | 428 | 429 | 430 | 431 | 432 | 433 | 434 | 435 | 436 | 437 | 438 | 439 | has exact match 440 | 441 | skos:exactMatch is used to link two concepts, indicating a high degree of confidence that the concepts can be used interchangeably across a wide range of information retrieval applications. skos:exactMatch is a transitive property, and is a sub-property of skos:closeMatch. 442 | 443 | 444 | 445 | 446 | 447 | 448 | 449 | 450 | 451 | skos:exactMatch is disjoint with each of the properties skos:broadMatch and skos:relatedMatch. 452 | 453 | 454 | 455 | 456 | has close match 457 | 458 | skos:closeMatch is used to link two concepts that are sufficiently similar that they can be used interchangeably in some information retrieval applications. In order to avoid the possibility of "compound errors" when combining mappings across more than two concept schemes, skos:closeMatch is not declared to be a transitive property. 459 | 460 | 461 | 462 | 463 | 464 | 465 | 466 | 467 | 468 | 469 | -------------------------------------------------------------------------------- /ontospyweb/static/ontospyweb/ontologies/foaf.rdf: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 29 | 30 | 31 | 32 | 35 | 36 | 37 | 38 | 39 | 40 | 42 | 43 | 44 | 45 | 46 | Label Property 47 | A foaf:LabelProperty is any RDF property with texual values that serve as labels. 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | 160 | 161 | 162 | 163 | 164 | 165 | 166 | 169 | 170 | 171 | 172 | 173 | 174 | 176 | 177 | 178 | 179 | 180 | 181 | 182 | 183 | 184 | 185 | 186 | 187 | 188 | 189 | 190 | 191 | 192 | 193 | 194 | 195 | 196 | 197 | 198 | 199 | 200 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 208 | 209 | 210 | 211 | 212 | 213 | 214 | 215 | 216 | 217 | 218 | 224 | 225 | 226 | 227 | 228 | 229 | 230 | 231 | 232 | 233 | 234 | 235 | 236 | 237 | 238 | 239 | 240 | 241 | 242 | 243 | 244 | 245 | 246 | 247 | 248 | 249 | 250 | 251 | 252 | 253 | 254 | 255 | 256 | 257 | 258 | 259 | 260 | 261 | 262 | 263 | 264 | 265 | 266 | 267 | 268 | 269 | 270 | 271 | 272 | 273 | 274 | 275 | 276 | 277 | 278 | 279 | 280 | 281 | 282 | 283 | 284 | 285 | 286 | 287 | 288 | 289 | 290 | 291 | 292 | 293 | 294 | 295 | 296 | 297 | 298 | 299 | 300 | 301 | 302 | 303 | 304 | 305 | 306 | 307 | 308 | 309 | 310 | 311 | 312 | 313 | 314 | 315 | 316 | 317 | 318 | 319 | 320 | 321 | 322 | 323 | 326 | 327 | 328 | 329 | 330 | 331 | 332 | 333 | 334 | 335 | 336 | 337 | 338 | 339 | 340 | 341 | 342 | 343 | 344 | 345 | 346 | 347 | 348 | 349 | 350 | 351 | 352 | 353 | 354 | 355 | 356 | 357 | 358 | 359 | 360 | 361 | 362 | 363 | 364 | 365 | 366 | 367 | 368 | 369 | 370 | 371 | 372 | 373 | 374 | 375 | 376 | 378 | 379 | 380 | 381 | 382 | 383 | 384 | 385 | 386 | 387 | 388 | 389 | 390 | 391 | 392 | 393 | 394 | 395 | 396 | 397 | 398 | 399 | 400 | 401 | 402 | 403 | 404 | 405 | 406 | 407 | 408 | 409 | 410 | 411 | 412 | 413 | 414 | 415 | 416 | 417 | 418 | 419 | 420 | 421 | 422 | 423 | 424 | 425 | 426 | 427 | 428 | 429 | 430 | 431 | 432 | 433 | 434 | 435 | 436 | 437 | 438 | 439 | 440 | 441 | 442 | 443 | 444 | 445 | 446 | 447 | 448 | 449 | 450 | 451 | 452 | 453 | 454 | 455 | 456 | 457 | 458 | 459 | 460 | 461 | 462 | 463 | 464 | 465 | 466 | 467 | 468 | 469 | 470 | 471 | 472 | 473 | 474 | 475 | 476 | 477 | 478 | 479 | 480 | 481 | 482 | 483 | 484 | 485 | 486 | 487 | 488 | 489 | 490 | 491 | 492 | 493 | 494 | 495 | 497 | 498 | 499 | 500 | 501 | 502 | 503 | 504 | 505 | 506 | 507 | 508 | 509 | 510 | 511 | 512 | 514 | 515 | 516 | 517 | 518 | 519 | 520 | 521 | 522 | 523 | 524 | 525 | 526 | 527 | 528 | 529 | 530 | 531 | 532 | 533 | 534 | 535 | 536 | 537 | 538 | 539 | 540 | 541 | 542 | 543 | 544 | 545 | 546 | 547 | 548 | 549 | 550 | 551 | 552 | 553 | 554 | 555 | 556 | 557 | 558 | 559 | 560 | 561 | 562 | 563 | 564 | 565 | 566 | 567 | 568 | 569 | 570 | 573 | 574 | 575 | 576 | 577 | 578 | 579 | 580 | 581 | 582 | 583 | 584 | 585 | 586 | 587 | 588 | 589 | 590 | 591 | 592 | 593 | 594 | 595 | 596 | 597 | 598 | 599 | 600 | 601 | 602 | 603 | 604 | 605 | 606 | 607 | -------------------------------------------------------------------------------- /ontospyweb/static/ontospyweb/ontologies/semanticbible.owl: -------------------------------------------------------------------------------- 1 | 2 | 10 | 11 | The names here are as 12 | transliterated in the English Standard Version (ESV), copyright © 13 | 2001 by Crossway Bibles, a division of Good News Publishers. 14 | 15 | Reuse note: where feasible, class names coincide with SUMO (Suggested 16 | Upper Merged Ontology), as developed within the IEEE Standard Upper 17 | Ontology Working Group, described at http://www.ontologyportal.org/, 18 | and available as OWL at http://reliant.teknowledge.com/DAML/SUMO.owl 19 | (but not without some problems). I've copied, rather than re-used, but 20 | this provides a future migration path toward coordinating the two 21 | ontologies. 22 | 23 | 24 | 1.0 26 | 27 | 28 | 29 | 30 | 31 | The attribute of ascribing to a ReligiousBeliefSystem (which includes philosophies). 32 | Religious belief 33 | 34 | 35 | 36 | 37 | 38 | Those regions that are outside normal human existence. 40 | 41 | 42 | Religious belief system 43 | 44 | 45 | 46 | A system of religious beliefs, or a philosophy. 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 0 56 | 57 | 58 | 59 | 60 | 61 | Water Area 62 | Based on SUMO, http://reliant.teknowledge.com/DAML/SUMO.owl#WaterArea 63 | SUO 1.55: July 14, 2003 64 | A body which is made up predominantly of water, 65 | e.g. rivers, lakes, oceans, etc. 66 | 67 | 68 | 69 | 70 | 71 | Supernatural beings that work to support God's purposes as his agents. 72 | Angel 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | Comparable to http://reliant.teknowledge.com/DAML/SUMO.owl#Organization 82 | SUO 1.55: July 14, 2003 83 | An &%Organization is a corporate or similar institution. The &%members of an &%Organization typically have a common purpose or function. Note that this class also covers divisions, departments, etc. of organizations. For example, both the Shell Corporation and the accounting department at Shell would both be instances of &%Organization. Note too that the existence of an &%Organization is dependent on the existence of at least one &%member (since &%Organization is a subclass of &%Collection). Accordingly, in cases of purely legal organizations, a fictitious &%member 84 | should be assumed. 85 | Organization 86 | 87 | 88 | 89 | 90 | 91 | Based on SUMO, http://reliant.teknowledge.com/DAML/SUMO.owl#Nation 92 | SUO 1.55: July 14, 2003 93 | The broadest &%GeopoliticalArea, i.e. &%Nations are 94 | &%GeopoliticalAreas that are not part of any other overarching and 95 | comprehensive governance structure (excepting commonwealths and other sorts 96 | of loose international organizations). 97 | Note that modern nations referred to in the New Testament (Spain, 98 | Italy, Libya) are typically not instances of Nation, but rather 99 | of Region (if the borders are indefinite) or of LandArea. 100 | 101 | 102 | 103 | 104 | 105 | 106 | Nation 107 | 108 | 109 | 110 | 111 | 112 | Group 113 | Comparable to http://reliant.teknowledge.com/DAML/SUMO.owl#Group 114 | SUO 1.55: July 14, 2003 115 | A &%Collection of &%Agents, e.g. a flock 116 | of sheep, a herd of goats, or the local Boy Scout troop. 117 | 118 | 119 | A CognitiveAgent whose effects are not limited to the physical world. This includes the Lord Almighty, as well as supposed or imaginary deities. 120 | 121 | 122 | 123 | Supernatural Being 124 | 125 | 126 | Series 127 | 128 | 129 | 130 | Broadly the same as http://reliant.teknowledge.com/DAML/SUMO.owl#Series 131 | SUO 1.55: July 14, 2003 132 | A &%Text consisting of multiple self-contained units. 133 | Some examples are an encyclopedia containing a couple dozen volumes, a television 134 | series made up of many episodes, a film serial, etc. 135 | 136 | 137 | 138 | 139 | 140 | Comparable to http://reliant.teknowledge.com/DAML/SUMO.owl#EthnicGroup 141 | SUO 1.55: July 14, 2003 142 | A &%Group whose &%members originate from 143 | the same &%GeographicArea or share the same &%Language and/or cultural 144 | practices. 145 | Ethnic Group 146 | 147 | 148 | Belonging to the citizenry of a country (e.g. Roman). There may be parallel ethnicity attributes (Roman being the primary example) which are not easily distinguished. In the case of Roman, while all ethnic Romans (in the general sense, though not necessarily legal sense [e.g. slaves]) are Roman citizens, there are other Roman citizens (e.g. Paul) who have different ethnicity. 149 | 150 | 151 | 152 | Citizenship attribute 154 | 155 | 156 | Tribe 157 | Subclass for the Twelve Tribes of Israel 158 | 159 | 160 | 161 | Son of God 162 | Both Human and God 163 | 164 | 165 | 166 | 167 | 168 | 169 | 170 | 171 | Based on SUMO, http://reliant.teknowledge.com/DAML/SUMO.owl#Island 172 | SUO 1.55: July 14, 2003 173 | A &%LandArea that is completely surrounded by a &%WaterArea. 174 | 175 | 176 | 177 | Island 178 | 179 | 180 | Political Organization 181 | Comparable to http://reliant.teknowledge.com/DAML/SUMO.owl#PoliticalOrganization 182 | SUO 1.55: July 14, 2003 183 | An &%Organization that is a &%Government, 184 | a &%subOrganization of a &%Government, or an &%Organization that is attempting 185 | to bring about some sort of political change. 186 | 187 | 188 | 189 | Cognitive Agent 190 | 191 | 192 | 193 | Comparable to http://reliant.teknowledge.com/DAML/SUMO.owl#CognitiveAgent 194 | SUO 1.55: July 14, 2003 195 | A &%SentientAgent with responsibilities 196 | and the ability to reason, deliberate, make plans, etc. This is 197 | essentially the legal/ethical notion of a person. Note that, although 198 | &%Human is a subclass of &%CognitiveAgent, there may be instances of 199 | &%CognitiveAgent which are not also instances of &%Human. For example, 200 | chimpanzees, gorillas, dolphins, whales, and some extraterrestrials 201 | (if they exist) may be &%CognitiveAgents. 202 | 203 | 204 | 205 | Comparable to http://reliant.teknowledge.com/DAML/SUMO.owl#GroupOfPeople 206 | SUO 1.55: July 14, 2003 207 | Any &%Group whose &%members are 208 | exclusively &%Humans. 209 | Group of People 210 | 211 | 212 | Broadly the same as http://reliant.teknowledge.com/DAML/SUMO.owl#Character 213 | SUO 1.55: July 14, 2003 214 | An element of an alphabet, a set of numerals, etc. 215 | Note that a &%Character may or may not be part of a &%Language. &%Character 216 | is a subclass of &%SymbolicString, because every instance of &%Character is 217 | an alphanumeric sequence consisting of a single element. 218 | 219 | 220 | 221 | Character 222 | 223 | 224 | Region 225 | Comparable to http://reliant.teknowledge.com/DAML/SUMO.owl#Region: "A topographic location. Regions encompass surfaces of Objects, imaginary places, and GeographicAreas. " 226 | 227 | 228 | 229 | 230 | 231 | Following http://reliant.teknowledge.com/DAML/SUMO.owl#Object, this "Corresponds roughly to the class of ordinary 232 | objects. Examples include normal physical objects, geographical regions, 233 | and locations of &%Processes, the complement of &%Objects in the &%Physical class. " 234 | Object 235 | 236 | 237 | 238 | Residence Group 239 | A group identified by common residence in a City or StateOrProvince. At the level of Nation, this should generally be EthnicGroup. Unlike EthnicGroup, they need not have cultural or ethnic features in common. 240 | 241 | 242 | State or Province 243 | Based on SUMO, http://reliant.teknowledge.com/DAML/SUMO.owl#StateOrProvince 244 | SUO 1.55: July 14, 2003 245 | Administrative subdivisions of a 246 | &%Nation that are broader than any other political subdivisions that 247 | may exist. This &%Class includes the states of the United States, as 248 | well as the provinces of Canada and European countries. 249 | Here it covers both provinces and districts. 250 | 251 | 252 | 253 | 254 | 255 | 256 | 257 | 258 | Fresh Water Area 259 | 260 | 261 | 262 | Based on SUMO, http://reliant.teknowledge.com/DAML/SUMO.owl#FreshWaterArea 263 | 264 | SUO 1.55: July 14, 2003 265 | A &%WaterArea whose &%Water is not saline, 266 | e.g. most rivers and lakes. 267 | 268 | 269 | 270 | Based on SUMO, http://reliant.teknowledge.com/DAML/SUMO.owl#GeopoliticalArea 271 | SUO 1.55: July 14, 2003 272 | Any &%GeographicArea which is associated 273 | with some sort of political structure. This class includes &%Lands, 274 | &%Cities, districts of cities, counties, etc. Note that the identity 275 | of a &%GeopoliticalArea may remain constant after a change in borders. 276 | Geopolitical Area 277 | 278 | 279 | 280 | 281 | 282 | Belief system 283 | An organization of propositions into an identifiable belief system. A person who holds to a belief system can be considered a member of the corresponding BeliefGroup. 284 | 285 | The notion of Proposition here is derived from http://reliant.teknowledge.com/DAML/SUMO.owl#Proposition. 286 | 287 | 288 | Comparable to http://reliant.teknowledge.com/DAML/SUMO.owl#Agent 289 | SUO 1.55: July 14, 2003 290 | Something or someone that can act on its own and 291 | produce changes in the world. 292 | Agent 293 | 294 | 295 | 296 | Based on SUMO, http://reliant.teknowledge.com/DAML/SUMO.owl#GeographicArea 297 | SUO 1.55: July 14, 2003 298 | A geographic location, generally having 299 | definite boundaries. Note that this differs from its immediate superclass 300 | &%Region in that a &%GeographicArea is a three-dimensional &%Region of the 301 | earth. Accordingly, all astronomical objects other than earth and all 302 | one-dimensional and two-dimensional &%Regions are not classed under 303 | &%GeographicArea. 304 | 305 | Geographic Area 306 | 307 | 308 | Wordnet: "a land mass that projects well above its surroundings; higher than a hill. " 309 | Used here for things referred to as "mount", even though some of these might seem 310 | like hills to well-traveled observers. 311 | 312 | 313 | 314 | Mountain 315 | 316 | 317 | City 318 | 319 | 320 | 321 | 322 | Based on SUMO, http://reliant.teknowledge.com/DAML/SUMO.owl#City 323 | SUO 1.55: July 14, 2003 324 | A &%LandArea of relatively small size, inhabited 325 | by a community of people, and having some sort of political structure. 326 | Note that this class includes both large cities and small settlements 327 | like towns, villages, hamlets, etc. 328 | 329 | 330 | Attributes of people, overlapping with the class hierarchy under suo:Group: this is unsatisfactory. 331 | Human attribute 332 | 333 | 334 | Residency attribute 335 | 336 | The attribute of living in a particular City or Province. Unlike Ethnicity, which is permanent, Residency can change. 337 | 338 | 339 | Ethnicity attribute 340 | The attribute of belonging to a particular ethnic group, or originating from a GeographicArea. Unlike Residency, which can change, Ethnicity is considered permanent. 341 | 342 | 343 | 344 | Woman 345 | SUO 1.55: July 14, 2003 346 | The class of &%Female &%Humans. 347 | 348 | 349 | 350 | 351 | 352 | 353 | 354 | 355 | 356 | 357 | 358 | 359 | 360 | 361 | 362 | 363 | 364 | 365 | 366 | Evil Supernatural Being 367 | Class of malevolent supernatural beings, whose instances include Satan and demons. 368 | 369 | 370 | 371 | 372 | 373 | Based on SUMO, http://reliant.teknowledge.com/DAML/SUMO.owl#SaltWaterArea 374 | SUO 1.55: July 14, 2003 375 | A &%WaterArea whose &%Water is saline, e.g. 376 | oceans and seas. 377 | 378 | 379 | Salt Water Area 380 | 381 | 382 | Political belief system 383 | 384 | 385 | 386 | Self-documenting 387 | 388 | God 389 | 390 | 391 | 392 | 393 | 394 | Comparable to http://reliant.teknowledge.com/DAML/SUMO.owl#Human 395 | SUO 1.55: July 14, 2003 396 | Modern man, the only remaining species of the Homo genus. 397 | Human 398 | 399 | 400 | Would be a subclass of http://reliant.teknowledge.com/DAML/SUMO.owl#TimeInterval, but is specified within MILO. 401 | MILO: &%FixedHoliday is the class of &%Holidays 402 | whose observance is fixed to recurrences of the calendar day that the 403 | holiday commemorates. 404 | Fixed holiday 405 | 406 | 407 | Geographic Location 408 | A collection of properties describing geographic location. 410 | 411 | 412 | Broadly the same as http://reliant.teknowledge.com/DAML/SUMO.owl#ContentBearingObject 413 | SUO 1.55: July 14, 2003 414 | Any &%SelfConnectedObject that expresses 415 | information. 416 | Content Bearing Object 417 | 418 | 419 | 420 | Political attribute 421 | The attribute of ascribing to a PoliticalBeliefSystem, or belonging to a political party or system. 422 | 423 | 424 | 425 | Religious Organization 426 | Comparable to http://reliant.teknowledge.com/DAML/SUMO.owl#ReligiousOrganization 427 | SUO 1.55: July 14, 2003 428 | An &%Organization whose members 429 | share a set of religious beliefs. 430 | 431 | 432 | 433 | 434 | 435 | 436 | Comparable to http://reliant.teknowledge.com/DAML/SUMO.owl#BeliefGroup 437 | SUO 1.55: July 14, 2003 438 | A &%Group whose &%members share a belief or 439 | set of beliefs. 440 | For NTN, this covers groups defined by a particular set of beliefs (orthodox or heretical) which are informal, rather than formal, in membership and activity. 441 | 442 | Belief Group 443 | 444 | 445 | 446 | Based on SUMO, http://reliant.teknowledge.com/DAML/SUMO.owl#LandArea 447 | SUO 1.55: July 14, 2003 448 | An area which is predominantly solid ground, 449 | e.g. a &%Nation, a mountain, a desert, etc. Note that a &%LandArea may 450 | contain some relatively small &%WaterAreas. For example, Australia is 451 | a &%LandArea even though it contains various rivers and lakes. 452 | Land Area 453 | 454 | 455 | 456 | SUO 1.55: July 14, 2003 457 | The class of &%Male &%Humans. 458 | 459 | 460 | 461 | 462 | 463 | 464 | 465 | 466 | 467 | 468 | Man 469 | 470 | 471 | Natural Language 472 | 473 | Broadly the same as http://reliant.teknowledge.com/DAML/SUMO.owl#NaturalLanguage 474 | SUO 1.55: July 14, 2003 475 | The &%subclass of &%HumanLanguages which 476 | are not designed and which evolve from generation to generation. This 477 | &%Class includes all of the national languages, e.g. English, Spanish, 478 | Japanese, etc. Note that this class includes dialects of natural 479 | languages. 480 | 481 | 482 | 483 | 484 | 485 | enemy of 486 | "A person towards whom this person feels hatred, intends injury to, or opposes the interests of", similar to http://purl.org/vocab/relationship vocabulary, but with different domain and range. For clarity, <X, enemyOf, Y> means X feels hatred, etc. towards Y, and also (by inference) <Y, hasEnemy, X>. However, it does _not_ necessarily mean <Y, enemyOf, X>, i.e. it is not necessarily reciprocal. 487 | 488 | 489 | 490 | 491 | 492 | 493 | Places that a human visited. For current purposes, only instances which are explicitly mentioned in Scripture are included, not those that might be inferred (e.g. if going from from A to B implies visiting C, C would not be listed). 494 | 495 | 496 | 497 | 498 | 499 | 500 | 501 | 502 | 503 | 504 | 505 | visited place 506 | 507 | 508 | 509 | 510 | 511 | 512 | 513 | 514 | 515 | 516 | Having a ReligiousBelief as an attribute 517 | 518 | 519 | 520 | 521 | religious belief 522 | 523 | 524 | 525 | 526 | Similar to http://purl.org/vocab/relationship vocabulary, but with different domain and range. 527 | parent of 528 | 529 | 530 | 531 | 532 | 533 | 534 | 535 | 536 | The ethnicity or, more generally, cultural heritage of a person. This can overlap with both religiousBelief (which may, however, change over time) and nativePlace (which, like ethnicity, does not change, though residency might). Whether a given property represents ethnicity or citizenship (nativePlace) can be a difficult decision, but in general, ethnic identities like "Jewish" or "Greek" take precedence. For example, we consider the Apostle Paul to have Jewish ethnicity, though he was a citizen of Tarsus, because he was raised as a Jew. Ethnicity is not specified without specific evidence, either textual or reliable tradition: for example, having a Greek name is not sufficient. 537 | 538 | 539 | 540 | 541 | 542 | ethnicity 543 | 544 | 545 | 546 | member 547 | 548 | 549 | 550 | 551 | Group has member Human. Inverse of memberOf. No provision for membership changes over time. 552 | 553 | 554 | Human is a memberOf a Group. Inverse of member. There are subtleties about Collections in SUMO that i'm omiting here. 555 | 556 | 557 | 558 | member of 559 | 560 | 561 | 562 | 563 | 564 | 565 | 566 | 567 | 568 | 569 | 570 | 571 | 572 | The location a person or group of people resides in. Range values may change over time: no attempt is made to capture this. Transient residence of very short duration is assumed to be visited, not resident. People addressed in a letter bound for a specific destination (e.g. the epistle of Paul to the Romans) are assumed to be resident there unless there is indication to the contrary (since the timing of a letter's arrival could not be determined with high precision). 573 | resident place 574 | 575 | 576 | 577 | 578 | "A person who opposes and contends against this person", similar to http://purl.org/vocab/relationship vocabulary, but with different domain and range. For clarity, <X antagonistOf Y> means X opposes, etc. Y, and also (by inference) <Y hasAntagonist X>. However, it does _not_ necessarily mean <Y antagonistOf X>, i.e. it is not necessarily reciprocal. 579 | antagonist of 580 | 581 | 582 | 583 | 584 | 585 | 586 | 587 | 588 | inverse of antagonistOf, which is not necessarily reciprocal 589 | 590 | 591 | 592 | 593 | 594 | has antagonist 595 | 596 | 597 | Holding to a PoliticalBelief 598 | political belief 599 | 600 | 601 | 602 | 603 | 604 | 605 | 606 | 607 | 608 | 609 | 610 | 611 | 612 | 613 | 614 | 615 | 616 | 617 | 618 | 619 | 620 | religious belief of 621 | 622 | 623 | 624 | 625 | Similar to http://purl.org/vocab/relationship vocabulary, but with different domain and range. In-laws are considered relatives. 626 | 627 | 628 | 629 | 630 | child of 631 | 632 | 633 | 634 | 635 | 636 | 637 | inverse of enemyOf, which is not necessarily reciprocal 638 | 639 | 640 | has enemy 641 | 642 | 643 | 644 | 645 | 646 | ethnicity of 647 | 648 | 649 | 650 | 651 | 652 | 653 | 654 | 655 | 656 | 657 | 658 | 659 | 660 | 661 | 662 | 663 | 664 | 665 | 666 | 667 | 668 | 669 | 670 | 671 | 672 | 673 | 674 | 675 | 676 | 677 | 678 | 679 | 680 | 681 | 682 | 683 | 684 | 685 | 686 | Greek name 687 | The human language name of an Object in Koine (not Modern) Greek, in the standard dictionary form (nominative case). 688 | Since Protege (3.0 build 141) doesn't seem to support loading and saving xml:lang attributes on properties, different subproperties are used for representing names in different languages. "grc" is the three-letter ISO-639-2 standard designator for Koine Greek. 689 | 690 | 691 | 692 | English name 693 | 694 | 695 | 696 | 697 | 698 | 699 | 700 | 701 | 702 | 703 | 704 | The human language name of an Object in English. 705 | Since Protege (3.0 build 141) doesn't seem to support loading and saving xml:lang attributes on properties, different subproperties are used for representing names in different languages. 706 | 707 | 708 | altitude 709 | 710 | The altitude component of a GeographicLocation 711 | 712 | 713 | 714 | The latitude component of a GeographicLocation 715 | latitude 716 | 717 | 718 | 719 | 720 | A brief description of the salient aspects of a Human, based on their being mentioned in Scripture. This is not the way to enter dictionary-style definitions. 721 | description 722 | 723 | 724 | 725 | 726 | 727 | occupation 728 | 729 | 730 | 731 | longitude 732 | 733 | 734 | The longiitude component of a GeographicLocation 735 | 736 | 737 | 738 | sibling of 739 | 740 | 741 | 742 | 743 | 744 | 745 | Similar to http://purl.org/vocab/relationship vocabulary, but with different domain and range. 746 | 747 | 748 | 749 | subregion 750 | 751 | 752 | 753 | 754 | 755 | 756 | Inverse of subregionOf 757 | 758 | 759 | 760 | subregion of 761 | 762 | 763 | 764 | A smaller GeographicArea is a subregionOf a larger one (e.g. Jerusalem is a subregionOf Israel). 765 | 766 | 767 | A person who is related by kinship to this person. No attempt is made to delineate precisely which kinship relations qualify: this is used when a description indicates two people are "related". parent/child/siblingOf are subproperties of this, properly speaking. 768 | 769 | 770 | 771 | relative of 772 | 773 | 774 | 775 | 776 | 777 | 778 | 779 | 780 | 781 | 782 | "A person who works toward a common goal with this person", similar to http://purl.org/vocab/relationship vocabulary, but with different domain and range. Those to whom the author of a New Testament Epistle send greetings are assumed to be collaborators, though this is perhaps broader than the general sense of the word. However, simple Christian fellowship or conversion do not constitute collaboration in this sense. 783 | collaborates with 784 | 785 | 786 | 787 | 788 | knows 789 | 790 | 791 | "A person known by this person (indicating some level of reciprocated interaction between the parties)", similar to http://purl.org/vocab/relationship vocabulary, but with different domain and range. Therefore this is a symmetric relationship: if I know you, you also know me (or else we don't "know" each other in this sense). 792 | 793 | 794 | 795 | spouse of 796 | 797 | 798 | 799 | Similar to http://purl.org/vocab/relationship vocabulary, but with different domain and range. Multiple spouses are all included, whether sequential (Herodias) or simultaneous (the woman at the well). 800 | 801 | 802 | 803 | This person may be the same as the other person, though there isn't enough evidence to definitively say so. Typically the individuals will have the same name, and some overlap of circumstances that makes it possible. 804 | possibly same person as 805 | 806 | 807 | 808 | 809 | 810 | 811 | Louw-Nida identifier 812 | Louw-Nida identifier, keying specific Greek terms (and their English translations) to their taxonomy of semantic domains. A string like "33.X'.439" identifies the term sumballo, which can be translated as "to express differences of opinion in a forceful way". In their scheme, this has domain index 33 (Communication), with sub-domain index X' (Dispute, Debate). The final integer index uniquely defines this term (but the same term may have multiple senses). The sub-domain index can be determined from the term index, but it seems helpful to include both. Note the possible values of the sub-domain index are A-Z, then A'-Z', etc. 813 | 814 | 815 | 816 | 817 | 818 | 819 | 820 | 821 | 822 | 823 | 824 | 825 | 826 | 827 | 828 | 829 | 830 | Birthplace, or place in which a person grows up. Unlike residentOf, only one possible value. residentPlace is to be preferred unless the birthplace relationship is clearly identified. 831 | native place 832 | 833 | 834 | 835 | 836 | The only mention of this person in the New Testament text is the genealogies of Jesus recorded in Matthew 1 and/or Luke 3. Since only limited information (their ancestry) is available about this special subset of names, this property exists to support filtering them out (or in). 837 | has only genealogy mention 838 | 839 | 840 | 841 | 842 | 843 | 844 | 845 | 846 | 847 | 848 | 849 | 850 | 851 | 852 | 853 | 854 | 855 | 856 | 857 | 858 | 859 | 860 | 861 | 862 | 863 | The location property relates a GeographicArea to a GeographicLocation. Each GeographicArea is assumed to have only one location, and no GeographicAreas share a location. 864 | 865 | 866 | 867 | 868 | location 869 | 870 | 871 | 872 | 873 | 874 | --------------------------------------------------------------------------------