├── .babelrc ├── .gitignore ├── CODE_OF_CONDUCT.md ├── CONTRIBUTING.md ├── LICENSE ├── README.md ├── concept-listing.png ├── concept-narrower.png ├── design.svg ├── example.ttl ├── index.html ├── index.js ├── package.json ├── skos.jsonld ├── skos.rdf ├── skos.ttl └── src ├── concept-filter-link.vue ├── concept-form.vue ├── concept-scheme-filter-link.vue ├── concept-scheme-form.vue ├── concept-scheme.vue ├── concept-table.vue ├── concept.vue ├── context-form.vue ├── rdf-item.vue ├── utils.js ├── viewer.vue ├── vue-levelgraph.js └── vue-semantic-multi-select.vue /.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": ["es2015"] 3 | } 4 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules/ 2 | dist/ 3 | 4 | # localhost friendly security certs 5 | *.pem 6 | -------------------------------------------------------------------------------- /CODE_OF_CONDUCT.md: -------------------------------------------------------------------------------- 1 | # Contributor Covenant Code of Conduct 2 | 3 | ## Our Pledge 4 | 5 | In the interest of fostering an open and welcoming environment, we as 6 | contributors and maintainers pledge to making participation in our project and 7 | our community a harassment-free experience for everyone, regardless of age, body 8 | size, disability, ethnicity, gender identity and expression, level of experience, 9 | nationality, personal appearance, race, religion, or sexual identity and 10 | orientation. 11 | 12 | ## Our Standards 13 | 14 | Examples of behavior that contributes to creating a positive environment 15 | include: 16 | 17 | * Using welcoming and inclusive language 18 | * Being respectful of differing viewpoints and experiences 19 | * Gracefully accepting constructive criticism 20 | * Focusing on what is best for the community 21 | * Showing empathy towards other community members 22 | 23 | Examples of unacceptable behavior by participants include: 24 | 25 | * The use of sexualized language or imagery and unwelcome sexual attention or 26 | advances 27 | * Trolling, insulting/derogatory comments, and personal or political attacks 28 | * Public or private harassment 29 | * Publishing others' private information, such as a physical or electronic 30 | address, without explicit permission 31 | * Other conduct which could reasonably be considered inappropriate in a 32 | professional setting 33 | 34 | ## Our Responsibilities 35 | 36 | Project maintainers are responsible for clarifying the standards of acceptable 37 | behavior and are expected to take appropriate and fair corrective action in 38 | response to any instances of unacceptable behavior. 39 | 40 | Project maintainers have the right and responsibility to remove, edit, or 41 | reject comments, commits, code, wiki edits, issues, and other contributions 42 | that are not aligned to this Code of Conduct, or to ban temporarily or 43 | permanently any contributor for other behaviors that they deem inappropriate, 44 | threatening, offensive, or harmful. 45 | 46 | ## Scope 47 | 48 | This Code of Conduct applies both within project spaces and in public spaces 49 | when an individual is representing the project or its community. Examples of 50 | representing a project or community include using an official project e-mail 51 | address, posting via an official social media account, or acting as an appointed 52 | representative at an online or offline event. Representation of a project may be 53 | further defined and clarified by project maintainers. 54 | 55 | ## Enforcement 56 | 57 | Instances of abusive, harassing, or otherwise unacceptable behavior may be 58 | reported by contacting the project team at byoung2@wiley.com. All 59 | complaints will be reviewed and investigated and will result in a response that 60 | is deemed necessary and appropriate to the circumstances. The project team is 61 | obligated to maintain confidentiality with regard to the reporter of an incident. 62 | Further details of specific enforcement policies may be posted separately. 63 | 64 | Project maintainers who do not follow or enforce the Code of Conduct in good 65 | faith may face temporary or permanent repercussions as determined by other 66 | members of the project's leadership. 67 | 68 | ## Attribution 69 | 70 | This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, 71 | available at [http://contributor-covenant.org/version/1/4][version] 72 | 73 | [homepage]: http://contributor-covenant.org 74 | [version]: http://contributor-covenant.org/version/1/4/ 75 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contriuting to WileyLabs Projects 2 | 3 | [Wiley](http://wiley.com/) Open Source Software projects are managed under the 4 | [WileyLabs](https://github.com/WileyLabs/) organization on GitHub. 5 | 6 | Thank you for your interest in contributing to this project! We use GitHub's 7 | Pull Request (PR) system to review incoming changes. 8 | 9 | Any changes sent via a PR will be reviewed by current project contributors for 10 | provenance, code quality, and license concerns. Once approved, the PR will be 11 | merged and become part of this "upstream" project. Any contributions should be 12 | licensed under the same license as the project itself. 13 | 14 | Please be sure any contributions are owned by you or are within your means to 15 | contribute. 16 | 17 | Thank you again for your interest! 18 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2017-2020 John Wiley & Sons, Inc. 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # A SKOS browser and editor 2 | 3 | Early stage [SKOS](https://www.w3.org/TR/skos-primer/) browser and editor. 4 | 5 | Built with [Vue.js](https://vuejs.org/), [LevelGraph](https://levelgraph.io/), 6 | and [Semantic-UI](https://semantic-ui.com/). 7 | 8 | ## Usage 9 | 10 | ```sh 11 | $ npm i 12 | $ npm run dev 13 | ``` 14 | 15 | The `dev` script will build, watch, and serve Askos making it available at 16 | `http://localhost:8888/`. 17 | 18 | ## Design Drafts 19 | 20 | Early drafts of the overall intent of the design...highly subject to change. 21 | 22 | ![Concept Listing](concept-listing.png) 23 | ![Browsing to a Narrower Concept](concept-narrower.png) 24 | 25 | See also the [design.svg](design.svg) file--which you're welcome to contribute 26 | to! 27 | 28 | ## License 29 | 30 | MIT 31 | -------------------------------------------------------------------------------- /concept-listing.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WileyLabs/askos/b5ba83105a31bcac8721357afaa30ea5969b8ae7/concept-listing.png -------------------------------------------------------------------------------- /concept-narrower.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WileyLabs/askos/b5ba83105a31bcac8721357afaa30ea5969b8ae7/concept-narrower.png -------------------------------------------------------------------------------- /design.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 19 | 21 | 42 | 46 | 47 | 49 | 50 | 52 | image/svg+xml 53 | 55 | 56 | 57 | 58 | 59 | 66 | 73 | 82 | 89 | ex:Animata 100 | ex:OtherAnima 111 | 118 | ex:animals 130 | definition Cute fuzzy things...typically.prefLabel animalsaltLabel creaturesprefLabel animauxaltLabel créatureshiddenLabel betes 184 | en fr jp 196 | related ex:OtherAnimabroader ex:thingnarrower ex:humaninScheme ex:AnimatatopConceptOf ex:Animata 248 | 259 | en 271 | fr 283 | 292 | + 303 | 308 | ex:human 320 | ex:thing 332 | Concepts 344 | dc:title en 372 | Extensive list of animals fr 397 | Liste exhaustive des animaux Concept Schemes 422 | 423 | 572 | 573 | -------------------------------------------------------------------------------- /example.ttl: -------------------------------------------------------------------------------- 1 | @prefix dct: . 2 | @prefix ex1: . 3 | @prefix ex2: . 4 | @prefix rdf: . 5 | @prefix skos: . 6 | 7 | ex1:animal a skos:Concept; 8 | skos:inScheme ex1:referenceAnimalScheme; 9 | skos:prefLabel "animal"@en . 10 | 11 | ex1:platypus a skos:Concept; 12 | skos:inScheme ex1:referenceAnimalScheme; 13 | skos:prefLabel "platypus"@en . 14 | 15 | ex2:animals a skos:Concept; 16 | skos:inScheme ex2:eggSellerScheme; 17 | skos:prefLabel "animals"@en . 18 | 19 | ex2:eggLayingAnimals a skos:Concept; 20 | skos:inScheme ex2:eggSellerScheme; 21 | skos:prefLabel "animals that lay eggs"@en . 22 | 23 | ex2:eggs a skos:Concept; 24 | skos:inScheme ex2:eggSellerScheme; 25 | skos:prefLabel "eggs"@en . 26 | 27 | ex1:referenceAnimalScheme a skos:ConceptScheme; 28 | skos:prefLabel "Extensive list of animals"@en . 29 | 30 | ex2:eggSellerScheme a skos:ConceptScheme; 31 | skos:prefLabel "Obsessed egg-seller's vocabulary"@en . 32 | -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | askos 7 | 8 | 9 | 10 | 11 | 12 | 24 | 25 | 26 |

27 |
28 | 29 |
30 |
31 |

32 | Askos 33 |
34 | A SKOS browser and editor. 35 |
36 |

37 |
38 |
39 | 44 |
45 | 51 |
52 | 53 | 58 | 59 |
60 | 61 |
62 |
63 | 64 |
65 |
66 | 67 | 68 | 69 | 70 | 71 | 72 |
{{triple.subject}}{{triple.predicate}}{{triple.object}}
73 |
74 | 75 |
76 | 77 | 78 | 79 | 80 | -------------------------------------------------------------------------------- /index.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @copyright 2017-2020 John Wiley & Sons, Inc. 3 | * @license MIT 4 | **/ 5 | 6 | const N3 = require('n3'); 7 | const VueX = require('vuex'); 8 | const Vue = require('vue'); 9 | Vue.use(VueX); 10 | 11 | const VueLevelGraph = require('./src/vue-levelgraph.js'); 12 | Vue.use(VueLevelGraph, {name: 'askos'}); 13 | 14 | const term = require('./src/utils.js').term; 15 | 16 | // Use futuristic Fetch() API 17 | require('es6-promise').polyfill(); 18 | require('isomorphic-fetch'); 19 | 20 | let context = { 21 | "@context": { 22 | "dcterms": "http://purl.org/dc/terms/", 23 | "foaf": "http://xmlns.com/foaf/0.1/", 24 | "owl": "http://www.w3.org/2002/07/owl#", 25 | "prov": "http://www.w3.org/ns/prov#", 26 | "rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#", 27 | "rdfs": "http://www.w3.org/2000/01/rdf-schema#", 28 | "skos": "http://www.w3.org/2004/02/skos/core#", 29 | "xml": "http://www.w3.org/XML/1998/namespace", 30 | "xsd": "http://www.w3.org/2001/XMLSchema#", 31 | "@base": "https://vocabulary.wiley.com/PublicationType/", 32 | "@language": "en" 33 | } 34 | }; 35 | window.context = context; 36 | 37 | let curie = function(v) { 38 | // we may not have a value yet 39 | if (undefined === v) return v; 40 | 41 | let found = Object.entries(context['@context']) 42 | .filter((el) => v.startsWith(el[1])); 43 | if (found.length > 0) { 44 | return found[0][0] + ':' + v.replace(found[0][1], ''); 45 | } else { 46 | // curie-ing failed...return passed in value... 47 | return v; 48 | } 49 | }; 50 | 51 | let uncurie = function(v) { 52 | return N3.Util.expandPrefixedName(v, context['@context']); 53 | }; 54 | 55 | window.curie = curie; 56 | window.uncurie = uncurie; 57 | Vue.filter('curie', curie); 58 | Vue.mixin({methods: {curie, uncurie}}); 59 | 60 | // clean up @value objects + (optional) @language selection 61 | Vue.filter('@value', (v, lang) => { 62 | if (Array.isArray(v) && v.length === 1) { 63 | // TODO: ...yeah...there's more stuff to happen here... 64 | if (v[0]['@language'] === lang) { 65 | return v[0]['@value']; 66 | } else { 67 | // TODO: should this fall back to an unknown lang? 68 | return v[0]['@value']; 69 | } 70 | } else if (typeof v === 'object') { 71 | // this one's a real object...not an array 72 | return v['@value']; 73 | } 74 | }); 75 | 76 | const store = new VueX.Store({ 77 | strict: true, 78 | state: { 79 | current_scheme: '', // URI of ConceptScheme 80 | current_concept: '' // URI of Concept 81 | }, 82 | mutations: { 83 | setActiveScheme(state, payload) { 84 | state.current_scheme = payload.scheme; 85 | }, 86 | setActiveConcept(state, payload) { 87 | state.current_concept = payload.concept; 88 | } 89 | }, 90 | actions: { 91 | setActiveScheme({ commit }, payload) { 92 | commit('setActiveConcept', ''); 93 | commit('setActiveScheme', payload); 94 | } 95 | } 96 | }); 97 | 98 | Vue.component('vue-semantic-multi-select', require('./src/vue-semantic-multi-select.vue')); 99 | 100 | Vue.component('skos-viewer', require('./src/viewer.vue')); 101 | Vue.component('rdf-item', require('./src/rdf-item.vue')); 102 | Vue.component('skos-concept-scheme', require('./src/concept-scheme.vue')); 103 | Vue.component('skos-concept-scheme-form', require('./src/concept-scheme-form.vue')); 104 | Vue.component('skos-concept-scheme-filter-link', require('./src/concept-scheme-filter-link.vue')); 105 | Vue.component('skos-concept', require('./src/concept.vue')); 106 | Vue.component('skos-concept-form', require('./src/concept-form.vue')); 107 | Vue.component('skos-concept-table', require('./src/concept-table.vue')); 108 | Vue.component('skos-concept-filter-link', require('./src/concept-filter-link.vue')); 109 | 110 | function removeEmpties(spo) { 111 | // TODO: certainly there's a better way to "clean" this object...later...maybe 112 | if (spo.subject === '') delete spo.subject; 113 | if (spo.predicate === '') delete spo.predicate; 114 | if (spo.object === '') delete spo.object; 115 | return spo; 116 | } 117 | 118 | // from https://stackoverflow.com/a/42389266 119 | Vue.directive('click-outside', { 120 | bind: function (el, binding, vnode) { 121 | el.event = function (event) { 122 | // here I check that click was outside the el and his childrens 123 | if (!(el == event.target || el.contains(event.target))) { 124 | // and if it did, call method provided in attribute value 125 | vnode.context[binding.expression](event); 126 | } 127 | }; 128 | document.body.addEventListener('click', el.event) 129 | }, 130 | unbind: function (el) { 131 | document.body.removeEventListener('click', el.event) 132 | }, 133 | }); 134 | 135 | window.app = new Vue({ 136 | el: '#app', 137 | store, 138 | data: { 139 | config: { 140 | jsonld: { 141 | base: '', 142 | overwrite: false 143 | }, 144 | n3: {} 145 | }, 146 | context, 147 | table: [], 148 | active_tab: 'editor', 149 | filter: { 150 | subject: '', 151 | predicate: '', 152 | object: '' 153 | }, 154 | limit: 100, 155 | offset: 0, 156 | filtered: false, 157 | output_jsonld: '', 158 | output_n3: '' 159 | }, 160 | watch: { 161 | active_tab(v) { 162 | if (v === 'triples') { 163 | this.displayTriples(); 164 | } 165 | } 166 | }, 167 | computed: { 168 | actual_filter: function() { 169 | var object = this.filter.object.trim(); 170 | if (object !== '' && !isNaN(object)) { 171 | // search for the RDF materialized integer 172 | object = '"' + String(object) + '"^^http://www.w3.org/2001/XMLSchema#integer'; 173 | } 174 | var spo = { 175 | subject: this.filter.subject.trim(), 176 | predicate: this.filter.predicate.trim(), 177 | object: object 178 | }; 179 | 180 | spo = removeEmpties(spo); 181 | 182 | return spo; 183 | }, 184 | actual_table: function() { 185 | return this.table.slice(this.offset, this.limit+this.offset); 186 | }, 187 | unique_predicates() { 188 | let rv = {}; 189 | this.table.forEach((triple) => { 190 | rv[triple.predicate] = ''; 191 | }); 192 | return Object.keys(rv); 193 | }, 194 | unique_subjects() { 195 | let rv = {}; 196 | this.table.forEach((triple) => { 197 | rv[triple.subject] = ''; 198 | }); 199 | return Object.keys(rv); 200 | } 201 | 202 | }, 203 | methods: { 204 | isActiveTab(tab) { 205 | return (tab === this.active_tab); 206 | }, 207 | displayTriples: function(spo) { 208 | if (!(spo)) spo = {}; 209 | var self = this; 210 | self.$db.get(spo, function(err, list) { 211 | self.table = list; 212 | // TODO: ugh...context collapse... 213 | self.$refs.skos.getSchemes(); 214 | }); 215 | }, 216 | importSKOS(ev) { 217 | let self = this; 218 | 219 | // determine the file extension 220 | let filename = ev.target.files[0].name; 221 | let ext = filename.substring(filename.lastIndexOf('.')+1, filename.length) || undefined; 222 | // pick the right parser/loader 223 | let processor = (ext === 'json' || ext === 'jsonld') ? 'jsonld' : 'n3'; 224 | // do the loading/importing 225 | let reader = new FileReader(); 226 | reader.onload = (load_event) => { 227 | let text = load_event.target.result; 228 | // load any existing additions into the local state 229 | let additions = {}; 230 | if ('askos-context' in localStorage) { 231 | additions = JSON.parse(localStorage['askos-context']); 232 | } 233 | // extract prefixes and persist them 234 | if (processor === 'jsonld') { 235 | // pull them straight out of the @context 236 | // TODO: ...this assumes a single, top-level @context...probably 237 | // should use jsonld.js to find stuff 238 | let temp = JSON.parse(text)['@context']; 239 | Object.keys(temp).forEach((key) => { 240 | additions[key] = temp[key]; 241 | }); 242 | localStorage['askos-context'] = JSON.stringify(additions); 243 | } else { 244 | let parser = N3.Parser(); 245 | parser.parse(text, (error, triple, _prefixes) => { 246 | if (!triple) { 247 | // remove the base/default namespace 248 | // TODO: probably check to be sure it's also mapped to something 249 | // else...maybe make one up? 250 | console.log('_prefixes', _prefixes); 251 | delete _prefixes['']; 252 | // TODO: this overwrites existing prefixes... 253 | Object.keys(_prefixes).forEach((key) => { 254 | additions[key] = _prefixes[key]; 255 | }); 256 | localStorage['askos-context'] = JSON.stringify(additions); 257 | } 258 | }); 259 | } 260 | // add additional prefixes 261 | self.$db[processor].put(text, (err) => { 262 | if (err) console.error(err); 263 | // TODO: more context collapse...also...hits the DB twice... 264 | self.$refs.skos.getSchemes(); 265 | self.$refs.skos.getConcepts(); 266 | }); 267 | }; 268 | reader.readAsText(ev.target.files[0], 'UTF-8'); 269 | }, 270 | put: function() { 271 | var self = this; 272 | // TODO: refs are handy, but this feels "off" 273 | if (this.input_type === 'jsonld') { 274 | this.$db[this.input_type].put( 275 | this.$refs[this.input_type].value, 276 | this.config[this.input_type], 277 | function(err, obj) { 278 | // do something after the obj is inserted 279 | self.displayTriples({}); 280 | }); 281 | } else { 282 | // ...the new .put() signatures no longer match between JSON-LD & N3 extensions 283 | // TODO: help make them match (again) 284 | this.$db[this.input_type].put( 285 | this.$refs[this.input_type].value, 286 | function(err, obj) { 287 | // do something after the obj is inserted 288 | self.displayTriples({}); 289 | }); 290 | } 291 | }, 292 | del: function() { 293 | var self = this; 294 | // TODO: this is JSON-LD only...time to move stuff around... 295 | this.$db[this.input_type].del( 296 | this.$refs[this.input_type].value, 297 | this.config[this.input_type], 298 | function(err, obj) { 299 | // do something after the obj is inserted 300 | self.displayTriples(); 301 | }); 302 | }, 303 | empty: function() { 304 | var self = this; 305 | // this...is dangerous...unless demo 306 | if (confirm("Really? You're sure?")) { 307 | self.$db.get({}, function(err, list) { 308 | if (err) console.error(err); 309 | self.$db.del(list, function(err) { 310 | if (err) console.error(err); 311 | self.displayTriples(); 312 | }); 313 | }); 314 | } 315 | }, 316 | applyFilter: function() { 317 | // always reset offset so we start at the beginning 318 | this.offset = 0; 319 | if (this.filter.subject === '' 320 | && this.filter.predicate === '' 321 | && this.filter.object === '') { 322 | this.filtered = false; 323 | } else { 324 | this.filtered = true; 325 | } 326 | this.displayTriples(this.actual_filter); 327 | }, 328 | removeFilter: function(filter) { 329 | if (undefined === filter) { 330 | this.filter = { 331 | subject: '', 332 | predicate: '', 333 | object: '' 334 | }; 335 | } else { 336 | this.filter[filter] = ''; 337 | } 338 | this.applyFilter(); 339 | }, 340 | setFilter: function(spo) { 341 | // TODO: add some error handling and such 342 | this.filter.subject = spo.subject; 343 | this.filter.predicate = spo.predicate; 344 | this.filter.object = spo.object; 345 | }, 346 | addSPO: function() { 347 | var self = this; 348 | if (self.filter.subject !== '' && self.filter.predicate !== '' && self.filter.object !== '') { 349 | self.$db.put(self.filter, function(err) { 350 | if (err) { 351 | console.error(err); 352 | } else { 353 | self.table.unshift(self.filter); 354 | self.filter = { 355 | subject: '', 356 | predicate: '', 357 | object: '' 358 | }; 359 | self.applyFilter(); 360 | } 361 | }); 362 | } 363 | }, 364 | removeSPO: function(spo, idx) { 365 | var self = this; 366 | // remove it from the database 367 | self.$db.del(spo, function(err) { 368 | if (err) { 369 | console.error(err); 370 | } else { 371 | // remove it from the page/app state 372 | self.table.splice(idx, 1); 373 | } 374 | }); 375 | // TODO: switch to the changes feed once that's a thing 376 | }, 377 | output: function(type) { 378 | var self = this; 379 | var filter = removeEmpties(JSON.parse(JSON.stringify(this.filter))); 380 | if (type === 'n3') { 381 | self.$db.n3.get(filter, function(err, rv) { 382 | self.output_n3 = rv; 383 | // TODO: hackilicious...we should fix this... 384 | self.$refs['output-n3'].editor.setValue(self.output_n3); 385 | self.$refs['output-n3'].refresh(); 386 | }); 387 | } else { 388 | self.$db.get(filter, function(err, rv) { 389 | if (err) throw err; 390 | var graphs = []; 391 | rv.forEach((triple) => { 392 | graphs.push({ 393 | subject: term(triple.subject), 394 | predicate: term(triple.predicate), 395 | object: term(triple.object) 396 | }); 397 | }); 398 | jsonld.fromRDF({'@default': graphs}, function(err, rv) { 399 | self.output_jsonld = JSON.stringify(rv, null, ' '); 400 | // TODO: hackilicious...we should fix this... 401 | self.$refs['output-jsonld'].editor.setValue(self.output_jsonld); 402 | self.$refs['output-jsonld'].refresh(); 403 | }); 404 | }); 405 | } 406 | } 407 | }, 408 | components: { 409 | 'context-form': require('./src/context-form.vue') 410 | } 411 | }); 412 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "askos", 3 | "version": "0.0.1", 4 | "description": "A SKOS browser and editor.", 5 | "repository": "https://github.com/WileyLabs/askos", 6 | "main": "index.js", 7 | "browser": { 8 | "vue": "vue/dist/vue.common" 9 | }, 10 | "dependencies": { 11 | "isomorphic-fetch": "^2.2.1", 12 | "level-js": "^5.0.1", 13 | "leveldown": "^5.4.1", 14 | "levelgraph": "^2.0.0", 15 | "levelgraph-jsonld": "^1.0.3", 16 | "levelgraph-n3": "^2.0.0", 17 | "levelup": "^4.3.2", 18 | "n3": "^0.10.0", 19 | "vue": "^2.3.4", 20 | "vuex": "^2.3.0" 21 | }, 22 | "devDependencies": { 23 | "babel-core": "^6.22.1", 24 | "babel-preset-env": "^1.6.0", 25 | "babelify": "^7.3.0", 26 | "browserify": "^14.3.0", 27 | "deep-diff": "^0.3.8", 28 | "http-server": "^0.12.1", 29 | "npm-run-all": "^4.0.2", 30 | "vueify": "^9.4.1", 31 | "watchify": "^3.9.0" 32 | }, 33 | "browserify": { 34 | "transform": [ 35 | "babelify", 36 | "vueify" 37 | ] 38 | }, 39 | "scripts": { 40 | "build": "browserify index.js --debug -o dist/index.js", 41 | "watch": "watchify index.js -vdo dist/index.js", 42 | "serve": "http-server -c 1 -a localhost -p 8888", 43 | "serve-secure": "http-server -c 1 -a localhost -p 8888 --ssl", 44 | "dev": "npm-run-all --parallel watch serve", 45 | "dev-secure": "npm-run-all --parallel watch serve-secure", 46 | "test": "echo \"Error: no test specified\" && exit 1" 47 | }, 48 | "keywords": [ 49 | "SKOS", 50 | "Vue.js", 51 | "LevelGraph", 52 | "JSON-LD", 53 | "Turtle", 54 | "RDF" 55 | ], 56 | "author": "John Wiley & Sons, Inc.", 57 | "contributors": [ 58 | { 59 | "name": "Benjamin Young", 60 | "email": "byoung2@wiley.com" 61 | } 62 | ], 63 | "license": "MIT" 64 | } 65 | -------------------------------------------------------------------------------- /skos.jsonld: -------------------------------------------------------------------------------- 1 | { 2 | "@context": { 3 | "dct": "http://purl.org/dc/terms/", 4 | "owl": "http://www.w3.org/2002/07/owl#", 5 | "rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#", 6 | "rdfs": "http://www.w3.org/2000/01/rdf-schema#", 7 | "skos": "http://www.w3.org/2004/02/skos/core#" 8 | }, 9 | "@graph": [ 10 | { 11 | "@id": "_:g70065055804700", 12 | "@type": "owl:Class", 13 | "owl:unionOf": { 14 | "@list": [ 15 | { 16 | "@id": "skos:Concept" 17 | }, 18 | { 19 | "@id": "skos:Collection" 20 | } 21 | ] 22 | } 23 | }, 24 | { 25 | "@id": "http://www.w3.org/2004/02/skos/core", 26 | "@type": "owl:Ontology", 27 | "dct:contributor": [ 28 | "Dave Beckett", 29 | "Nikki Rogers", 30 | "Participants in W3C's Semantic Web Deployment Working Group." 31 | ], 32 | "dct:creator": [ 33 | "Sean Bechhofer", 34 | "Alistair Miles" 35 | ], 36 | "dct:description": { 37 | "@value": "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.", 38 | "@language": "en" 39 | }, 40 | "dct:title": { 41 | "@value": "SKOS Vocabulary", 42 | "@language": "en" 43 | }, 44 | "rdfs:seeAlso": { 45 | "@id": "http://www.w3.org/TR/skos-reference/" 46 | } 47 | }, 48 | { 49 | "@id": "skos:Collection", 50 | "@type": "owl:Class", 51 | "owl:disjointWith": [ 52 | { 53 | "@id": "skos:Concept" 54 | }, 55 | { 56 | "@id": "skos:ConceptScheme" 57 | } 58 | ], 59 | "rdfs:isDefinedBy": { 60 | "@id": "http://www.w3.org/2004/02/skos/core" 61 | }, 62 | "rdfs:label": { 63 | "@value": "Collection", 64 | "@language": "en" 65 | }, 66 | "skos:definition": { 67 | "@value": "A meaningful collection of concepts.", 68 | "@language": "en" 69 | }, 70 | "skos:scopeNote": { 71 | "@value": "Labelled collections can be used where you would like a set of concepts to be displayed under a 'node label' in the hierarchy.", 72 | "@language": "en" 73 | } 74 | }, 75 | { 76 | "@id": "skos:Concept", 77 | "@type": "owl:Class", 78 | "rdfs:isDefinedBy": { 79 | "@id": "http://www.w3.org/2004/02/skos/core" 80 | }, 81 | "rdfs:label": { 82 | "@value": "Concept", 83 | "@language": "en" 84 | }, 85 | "skos:definition": { 86 | "@value": "An idea or notion; a unit of thought.", 87 | "@language": "en" 88 | } 89 | }, 90 | { 91 | "@id": "skos:ConceptScheme", 92 | "@type": "owl:Class", 93 | "owl:disjointWith": { 94 | "@id": "skos:Concept" 95 | }, 96 | "rdfs:isDefinedBy": { 97 | "@id": "http://www.w3.org/2004/02/skos/core" 98 | }, 99 | "rdfs:label": { 100 | "@value": "Concept Scheme", 101 | "@language": "en" 102 | }, 103 | "skos:definition": { 104 | "@value": "A set of concepts, optionally including statements about semantic relationships between those concepts.", 105 | "@language": "en" 106 | }, 107 | "skos:example": { 108 | "@value": "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.", 109 | "@language": "en" 110 | }, 111 | "skos:scopeNote": { 112 | "@value": "A concept scheme may be defined to include concepts from different sources.", 113 | "@language": "en" 114 | } 115 | }, 116 | { 117 | "@id": "skos:OrderedCollection", 118 | "@type": "owl:Class", 119 | "rdfs:isDefinedBy": { 120 | "@id": "http://www.w3.org/2004/02/skos/core" 121 | }, 122 | "rdfs:label": { 123 | "@value": "Ordered Collection", 124 | "@language": "en" 125 | }, 126 | "rdfs:subClassOf": { 127 | "@id": "skos:Collection" 128 | }, 129 | "skos:definition": { 130 | "@value": "An ordered collection of concepts, where both the grouping and the ordering are meaningful.", 131 | "@language": "en" 132 | }, 133 | "skos:scopeNote": { 134 | "@value": "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'.", 135 | "@language": "en" 136 | } 137 | }, 138 | { 139 | "@id": "skos:altLabel", 140 | "@type": [ 141 | "owl:AnnotationProperty", 142 | "rdf:Property" 143 | ], 144 | "rdfs:comment": [ 145 | { 146 | "@value": "The range of skos:altLabel is the class of RDF plain literals.", 147 | "@language": "en" 148 | }, 149 | { 150 | "@value": "skos:prefLabel, skos:altLabel and skos:hiddenLabel are pairwise disjoint properties.", 151 | "@language": "en" 152 | } 153 | ], 154 | "rdfs:isDefinedBy": { 155 | "@id": "http://www.w3.org/2004/02/skos/core" 156 | }, 157 | "rdfs:label": { 158 | "@value": "alternative label", 159 | "@language": "en" 160 | }, 161 | "rdfs:subPropertyOf": { 162 | "@id": "rdfs:label" 163 | }, 164 | "skos:definition": { 165 | "@value": "An alternative lexical label for a resource.", 166 | "@language": "en" 167 | }, 168 | "skos:example": { 169 | "@value": "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).", 170 | "@language": "en" 171 | } 172 | }, 173 | { 174 | "@id": "skos:broadMatch", 175 | "@type": [ 176 | "rdf:Property", 177 | "owl:ObjectProperty" 178 | ], 179 | "owl:inverseOf": { 180 | "@id": "skos:narrowMatch" 181 | }, 182 | "rdfs:isDefinedBy": { 183 | "@id": "http://www.w3.org/2004/02/skos/core" 184 | }, 185 | "rdfs:label": { 186 | "@value": "has broader match", 187 | "@language": "en" 188 | }, 189 | "rdfs:subPropertyOf": [ 190 | { 191 | "@id": "skos:broader" 192 | }, 193 | { 194 | "@id": "skos:mappingRelation" 195 | } 196 | ], 197 | "skos:definition": { 198 | "@value": "skos:broadMatch is used to state a hierarchical mapping link between two conceptual resources in different concept schemes.", 199 | "@language": "en" 200 | } 201 | }, 202 | { 203 | "@id": "skos:broader", 204 | "@type": [ 205 | "rdf:Property", 206 | "owl:ObjectProperty" 207 | ], 208 | "owl:inverseOf": { 209 | "@id": "skos:narrower" 210 | }, 211 | "rdfs:comment": { 212 | "@value": "Broader concepts are typically rendered as parents in a concept hierarchy (tree).", 213 | "@language": "en" 214 | }, 215 | "rdfs:isDefinedBy": { 216 | "@id": "http://www.w3.org/2004/02/skos/core" 217 | }, 218 | "rdfs:label": { 219 | "@value": "has broader", 220 | "@language": "en" 221 | }, 222 | "rdfs:subPropertyOf": { 223 | "@id": "skos:broaderTransitive" 224 | }, 225 | "skos:definition": { 226 | "@value": "Relates a concept to a concept that is more general in meaning.", 227 | "@language": "en" 228 | }, 229 | "skos:scopeNote": { 230 | "@value": "By convention, skos:broader is only used to assert an immediate (i.e. direct) hierarchical link between two conceptual resources.", 231 | "@language": "en" 232 | } 233 | }, 234 | { 235 | "@id": "skos:broaderTransitive", 236 | "@type": [ 237 | "owl:TransitiveProperty", 238 | "rdf:Property", 239 | "owl:ObjectProperty" 240 | ], 241 | "owl:inverseOf": { 242 | "@id": "skos:narrowerTransitive" 243 | }, 244 | "rdfs:isDefinedBy": { 245 | "@id": "http://www.w3.org/2004/02/skos/core" 246 | }, 247 | "rdfs:label": { 248 | "@value": "has broader transitive", 249 | "@language": "en" 250 | }, 251 | "rdfs:subPropertyOf": { 252 | "@id": "skos:semanticRelation" 253 | }, 254 | "skos:definition": "skos:broaderTransitive is a transitive superproperty of skos:broader.", 255 | "skos:scopeNote": { 256 | "@value": "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.", 257 | "@language": "en" 258 | } 259 | }, 260 | { 261 | "@id": "skos:changeNote", 262 | "@type": [ 263 | "owl:AnnotationProperty", 264 | "rdf:Property" 265 | ], 266 | "rdfs:isDefinedBy": { 267 | "@id": "http://www.w3.org/2004/02/skos/core" 268 | }, 269 | "rdfs:label": { 270 | "@value": "change note", 271 | "@language": "en" 272 | }, 273 | "rdfs:subPropertyOf": { 274 | "@id": "skos:note" 275 | }, 276 | "skos:definition": { 277 | "@value": "A note about a modification to a concept.", 278 | "@language": "en" 279 | } 280 | }, 281 | { 282 | "@id": "skos:closeMatch", 283 | "@type": [ 284 | "rdf:Property", 285 | "owl:SymmetricProperty", 286 | "owl:ObjectProperty" 287 | ], 288 | "rdfs:isDefinedBy": { 289 | "@id": "http://www.w3.org/2004/02/skos/core" 290 | }, 291 | "rdfs:label": { 292 | "@value": "has close match", 293 | "@language": "en" 294 | }, 295 | "rdfs:subPropertyOf": { 296 | "@id": "skos:mappingRelation" 297 | }, 298 | "skos:definition": { 299 | "@value": "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.", 300 | "@language": "en" 301 | } 302 | }, 303 | { 304 | "@id": "skos:definition", 305 | "@type": [ 306 | "owl:AnnotationProperty", 307 | "rdf:Property" 308 | ], 309 | "rdfs:isDefinedBy": { 310 | "@id": "http://www.w3.org/2004/02/skos/core" 311 | }, 312 | "rdfs:label": { 313 | "@value": "definition", 314 | "@language": "en" 315 | }, 316 | "rdfs:subPropertyOf": { 317 | "@id": "skos:note" 318 | }, 319 | "skos:definition": { 320 | "@value": "A statement or formal explanation of the meaning of a concept.", 321 | "@language": "en" 322 | } 323 | }, 324 | { 325 | "@id": "skos:editorialNote", 326 | "@type": [ 327 | "owl:AnnotationProperty", 328 | "rdf:Property" 329 | ], 330 | "rdfs:isDefinedBy": { 331 | "@id": "http://www.w3.org/2004/02/skos/core" 332 | }, 333 | "rdfs:label": { 334 | "@value": "editorial note", 335 | "@language": "en" 336 | }, 337 | "rdfs:subPropertyOf": { 338 | "@id": "skos:note" 339 | }, 340 | "skos:definition": { 341 | "@value": "A note for an editor, translator or maintainer of the vocabulary.", 342 | "@language": "en" 343 | } 344 | }, 345 | { 346 | "@id": "skos:exactMatch", 347 | "@type": [ 348 | "owl:TransitiveProperty", 349 | "rdf:Property", 350 | "owl:SymmetricProperty", 351 | "owl:ObjectProperty" 352 | ], 353 | "rdfs:comment": { 354 | "@value": "skos:exactMatch is disjoint with each of the properties skos:broadMatch and skos:relatedMatch.", 355 | "@language": "en" 356 | }, 357 | "rdfs:isDefinedBy": { 358 | "@id": "http://www.w3.org/2004/02/skos/core" 359 | }, 360 | "rdfs:label": { 361 | "@value": "has exact match", 362 | "@language": "en" 363 | }, 364 | "rdfs:subPropertyOf": { 365 | "@id": "skos:closeMatch" 366 | }, 367 | "skos:definition": { 368 | "@value": "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.", 369 | "@language": "en" 370 | } 371 | }, 372 | { 373 | "@id": "skos:example", 374 | "@type": [ 375 | "owl:AnnotationProperty", 376 | "rdf:Property" 377 | ], 378 | "rdfs:isDefinedBy": { 379 | "@id": "http://www.w3.org/2004/02/skos/core" 380 | }, 381 | "rdfs:label": { 382 | "@value": "example", 383 | "@language": "en" 384 | }, 385 | "rdfs:subPropertyOf": { 386 | "@id": "skos:note" 387 | }, 388 | "skos:definition": { 389 | "@value": "An example of the use of a concept.", 390 | "@language": "en" 391 | } 392 | }, 393 | { 394 | "@id": "skos:hasTopConcept", 395 | "@type": [ 396 | "rdf:Property", 397 | "owl:ObjectProperty" 398 | ], 399 | "owl:inverseOf": { 400 | "@id": "skos:topConceptOf" 401 | }, 402 | "rdfs:domain": { 403 | "@id": "skos:ConceptScheme" 404 | }, 405 | "rdfs:isDefinedBy": { 406 | "@id": "http://www.w3.org/2004/02/skos/core" 407 | }, 408 | "rdfs:label": { 409 | "@value": "has top concept", 410 | "@language": "en" 411 | }, 412 | "rdfs:range": { 413 | "@id": "skos:Concept" 414 | }, 415 | "skos:definition": { 416 | "@value": "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.", 417 | "@language": "en" 418 | } 419 | }, 420 | { 421 | "@id": "skos:hiddenLabel", 422 | "@type": [ 423 | "owl:AnnotationProperty", 424 | "rdf:Property" 425 | ], 426 | "rdfs:comment": [ 427 | { 428 | "@value": "The range of skos:hiddenLabel is the class of RDF plain literals.", 429 | "@language": "en" 430 | }, 431 | { 432 | "@value": "skos:prefLabel, skos:altLabel and skos:hiddenLabel are pairwise disjoint properties.", 433 | "@language": "en" 434 | } 435 | ], 436 | "rdfs:isDefinedBy": { 437 | "@id": "http://www.w3.org/2004/02/skos/core" 438 | }, 439 | "rdfs:label": { 440 | "@value": "hidden label", 441 | "@language": "en" 442 | }, 443 | "rdfs:subPropertyOf": { 444 | "@id": "rdfs:label" 445 | }, 446 | "skos:definition": { 447 | "@value": "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.", 448 | "@language": "en" 449 | } 450 | }, 451 | { 452 | "@id": "skos:historyNote", 453 | "@type": [ 454 | "owl:AnnotationProperty", 455 | "rdf:Property" 456 | ], 457 | "rdfs:isDefinedBy": { 458 | "@id": "http://www.w3.org/2004/02/skos/core" 459 | }, 460 | "rdfs:label": { 461 | "@value": "history note", 462 | "@language": "en" 463 | }, 464 | "rdfs:subPropertyOf": { 465 | "@id": "skos:note" 466 | }, 467 | "skos:definition": { 468 | "@value": "A note about the past state/use/meaning of a concept.", 469 | "@language": "en" 470 | } 471 | }, 472 | { 473 | "@id": "skos:inScheme", 474 | "@type": [ 475 | "rdf:Property", 476 | "owl:ObjectProperty" 477 | ], 478 | "rdfs:isDefinedBy": { 479 | "@id": "http://www.w3.org/2004/02/skos/core" 480 | }, 481 | "rdfs:label": { 482 | "@value": "is in scheme", 483 | "@language": "en" 484 | }, 485 | "rdfs:range": { 486 | "@id": "skos:ConceptScheme" 487 | }, 488 | "skos:definition": { 489 | "@value": "Relates a resource (for example a concept) to a concept scheme in which it is included.", 490 | "@language": "en" 491 | }, 492 | "skos:scopeNote": { 493 | "@value": "A concept may be a member of more than one concept scheme.", 494 | "@language": "en" 495 | } 496 | }, 497 | { 498 | "@id": "skos:mappingRelation", 499 | "@type": [ 500 | "rdf:Property", 501 | "owl:ObjectProperty" 502 | ], 503 | "rdfs:comment": { 504 | "@value": "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.", 505 | "@language": "en" 506 | }, 507 | "rdfs:isDefinedBy": { 508 | "@id": "http://www.w3.org/2004/02/skos/core" 509 | }, 510 | "rdfs:label": { 511 | "@value": "is in mapping relation with", 512 | "@language": "en" 513 | }, 514 | "rdfs:subPropertyOf": { 515 | "@id": "skos:semanticRelation" 516 | }, 517 | "skos:definition": { 518 | "@value": "Relates two concepts coming, by convention, from different schemes, and that have comparable meanings", 519 | "@language": "en" 520 | } 521 | }, 522 | { 523 | "@id": "skos:member", 524 | "@type": [ 525 | "rdf:Property", 526 | "owl:ObjectProperty" 527 | ], 528 | "rdfs:domain": { 529 | "@id": "skos:Collection" 530 | }, 531 | "rdfs:isDefinedBy": { 532 | "@id": "http://www.w3.org/2004/02/skos/core" 533 | }, 534 | "rdfs:label": { 535 | "@value": "has member", 536 | "@language": "en" 537 | }, 538 | "rdfs:range": { 539 | "@id": "_:g70065055804700" 540 | }, 541 | "skos:definition": { 542 | "@value": "Relates a collection to one of its members.", 543 | "@language": "en" 544 | } 545 | }, 546 | { 547 | "@id": "skos:memberList", 548 | "@type": [ 549 | "owl:FunctionalProperty", 550 | "rdf:Property", 551 | "owl:ObjectProperty" 552 | ], 553 | "rdfs:comment": { 554 | "@value": "For any resource, every item in the list given as the value of the\n skos:memberList property is also a value of the skos:member property.", 555 | "@language": "en" 556 | }, 557 | "rdfs:domain": { 558 | "@id": "skos:OrderedCollection" 559 | }, 560 | "rdfs:isDefinedBy": { 561 | "@id": "http://www.w3.org/2004/02/skos/core" 562 | }, 563 | "rdfs:label": { 564 | "@value": "has member list", 565 | "@language": "en" 566 | }, 567 | "rdfs:range": { 568 | "@id": "rdf:List" 569 | }, 570 | "skos:definition": { 571 | "@value": "Relates an ordered collection to the RDF list containing its members.", 572 | "@language": "en" 573 | } 574 | }, 575 | { 576 | "@id": "skos:narrowMatch", 577 | "@type": [ 578 | "rdf:Property", 579 | "owl:ObjectProperty" 580 | ], 581 | "owl:inverseOf": { 582 | "@id": "skos:broadMatch" 583 | }, 584 | "rdfs:isDefinedBy": { 585 | "@id": "http://www.w3.org/2004/02/skos/core" 586 | }, 587 | "rdfs:label": { 588 | "@value": "has narrower match", 589 | "@language": "en" 590 | }, 591 | "rdfs:subPropertyOf": [ 592 | { 593 | "@id": "skos:narrower" 594 | }, 595 | { 596 | "@id": "skos:mappingRelation" 597 | } 598 | ], 599 | "skos:definition": { 600 | "@value": "skos:narrowMatch is used to state a hierarchical mapping link between two conceptual resources in different concept schemes.", 601 | "@language": "en" 602 | } 603 | }, 604 | { 605 | "@id": "skos:narrower", 606 | "@type": [ 607 | "rdf:Property", 608 | "owl:ObjectProperty" 609 | ], 610 | "owl:inverseOf": { 611 | "@id": "skos:broader" 612 | }, 613 | "rdfs:comment": { 614 | "@value": "Narrower concepts are typically rendered as children in a concept hierarchy (tree).", 615 | "@language": "en" 616 | }, 617 | "rdfs:isDefinedBy": { 618 | "@id": "http://www.w3.org/2004/02/skos/core" 619 | }, 620 | "rdfs:label": { 621 | "@value": "has narrower", 622 | "@language": "en" 623 | }, 624 | "rdfs:subPropertyOf": { 625 | "@id": "skos:narrowerTransitive" 626 | }, 627 | "skos:definition": { 628 | "@value": "Relates a concept to a concept that is more specific in meaning.", 629 | "@language": "en" 630 | }, 631 | "skos:scopeNote": { 632 | "@value": "By convention, skos:broader is only used to assert an immediate (i.e. direct) hierarchical link between two conceptual resources.", 633 | "@language": "en" 634 | } 635 | }, 636 | { 637 | "@id": "skos:narrowerTransitive", 638 | "@type": [ 639 | "owl:TransitiveProperty", 640 | "rdf:Property", 641 | "owl:ObjectProperty" 642 | ], 643 | "owl:inverseOf": { 644 | "@id": "skos:broaderTransitive" 645 | }, 646 | "rdfs:isDefinedBy": { 647 | "@id": "http://www.w3.org/2004/02/skos/core" 648 | }, 649 | "rdfs:label": { 650 | "@value": "has narrower transitive", 651 | "@language": "en" 652 | }, 653 | "rdfs:subPropertyOf": { 654 | "@id": "skos:semanticRelation" 655 | }, 656 | "skos:definition": "skos:narrowerTransitive is a transitive superproperty of skos:narrower.", 657 | "skos:scopeNote": { 658 | "@value": "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.", 659 | "@language": "en" 660 | } 661 | }, 662 | { 663 | "@id": "skos:notation", 664 | "@type": [ 665 | "owl:DatatypeProperty", 666 | "rdf:Property" 667 | ], 668 | "rdfs:isDefinedBy": { 669 | "@id": "http://www.w3.org/2004/02/skos/core" 670 | }, 671 | "rdfs:label": { 672 | "@value": "notation", 673 | "@language": "en" 674 | }, 675 | "skos:definition": { 676 | "@value": "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.", 677 | "@language": "en" 678 | }, 679 | "skos:scopeNote": { 680 | "@value": "By convention, skos:notation is used with a typed literal in the object position of the triple.", 681 | "@language": "en" 682 | } 683 | }, 684 | { 685 | "@id": "skos:note", 686 | "@type": [ 687 | "owl:AnnotationProperty", 688 | "rdf:Property" 689 | ], 690 | "rdfs:isDefinedBy": { 691 | "@id": "http://www.w3.org/2004/02/skos/core" 692 | }, 693 | "rdfs:label": { 694 | "@value": "note", 695 | "@language": "en" 696 | }, 697 | "skos:definition": { 698 | "@value": "A general note, for any purpose.", 699 | "@language": "en" 700 | }, 701 | "skos:scopeNote": { 702 | "@value": "This property may be used directly, or as a super-property for more specific note types.", 703 | "@language": "en" 704 | } 705 | }, 706 | { 707 | "@id": "skos:prefLabel", 708 | "@type": [ 709 | "owl:AnnotationProperty", 710 | "rdf:Property" 711 | ], 712 | "rdfs:comment": [ 713 | { 714 | "@value": "skos:prefLabel, skos:altLabel and skos:hiddenLabel are pairwise\n disjoint properties.", 715 | "@language": "en" 716 | }, 717 | { 718 | "@value": "The range of skos:prefLabel is the class of RDF plain literals.", 719 | "@language": "en" 720 | }, 721 | { 722 | "@value": "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.", 723 | "@language": "en" 724 | } 725 | ], 726 | "rdfs:isDefinedBy": { 727 | "@id": "http://www.w3.org/2004/02/skos/core" 728 | }, 729 | "rdfs:label": { 730 | "@value": "preferred label", 731 | "@language": "en" 732 | }, 733 | "rdfs:subPropertyOf": { 734 | "@id": "rdfs:label" 735 | }, 736 | "skos:definition": { 737 | "@value": "The preferred lexical label for a resource, in a given language.", 738 | "@language": "en" 739 | } 740 | }, 741 | { 742 | "@id": "skos:related", 743 | "@type": [ 744 | "rdf:Property", 745 | "owl:SymmetricProperty", 746 | "owl:ObjectProperty" 747 | ], 748 | "rdfs:comment": { 749 | "@value": "skos:related is disjoint with skos:broaderTransitive", 750 | "@language": "en" 751 | }, 752 | "rdfs:isDefinedBy": { 753 | "@id": "http://www.w3.org/2004/02/skos/core" 754 | }, 755 | "rdfs:label": { 756 | "@value": "has related", 757 | "@language": "en" 758 | }, 759 | "rdfs:subPropertyOf": { 760 | "@id": "skos:semanticRelation" 761 | }, 762 | "skos:definition": { 763 | "@value": "Relates a concept to a concept with which there is an associative semantic relationship.", 764 | "@language": "en" 765 | } 766 | }, 767 | { 768 | "@id": "skos:relatedMatch", 769 | "@type": [ 770 | "rdf:Property", 771 | "owl:SymmetricProperty", 772 | "owl:ObjectProperty" 773 | ], 774 | "rdfs:isDefinedBy": { 775 | "@id": "http://www.w3.org/2004/02/skos/core" 776 | }, 777 | "rdfs:label": { 778 | "@value": "has related match", 779 | "@language": "en" 780 | }, 781 | "rdfs:subPropertyOf": [ 782 | { 783 | "@id": "skos:mappingRelation" 784 | }, 785 | { 786 | "@id": "skos:related" 787 | } 788 | ], 789 | "skos:definition": { 790 | "@value": "skos:relatedMatch is used to state an associative mapping link between two conceptual resources in different concept schemes.", 791 | "@language": "en" 792 | } 793 | }, 794 | { 795 | "@id": "skos:scopeNote", 796 | "@type": [ 797 | "owl:AnnotationProperty", 798 | "rdf:Property" 799 | ], 800 | "rdfs:isDefinedBy": { 801 | "@id": "http://www.w3.org/2004/02/skos/core" 802 | }, 803 | "rdfs:label": { 804 | "@value": "scope note", 805 | "@language": "en" 806 | }, 807 | "rdfs:subPropertyOf": { 808 | "@id": "skos:note" 809 | }, 810 | "skos:definition": { 811 | "@value": "A note that helps to clarify the meaning and/or the use of a concept.", 812 | "@language": "en" 813 | } 814 | }, 815 | { 816 | "@id": "skos:semanticRelation", 817 | "@type": [ 818 | "rdf:Property", 819 | "owl:ObjectProperty" 820 | ], 821 | "rdfs:domain": { 822 | "@id": "skos:Concept" 823 | }, 824 | "rdfs:isDefinedBy": { 825 | "@id": "http://www.w3.org/2004/02/skos/core" 826 | }, 827 | "rdfs:label": { 828 | "@value": "is in semantic relation with", 829 | "@language": "en" 830 | }, 831 | "rdfs:range": { 832 | "@id": "skos:Concept" 833 | }, 834 | "skos:definition": { 835 | "@value": "Links a concept to a concept related by meaning.", 836 | "@language": "en" 837 | }, 838 | "skos:scopeNote": { 839 | "@value": "This property should not be used directly, but as a super-property for all properties denoting a relationship of meaning between concepts.", 840 | "@language": "en" 841 | } 842 | }, 843 | { 844 | "@id": "skos:topConceptOf", 845 | "@type": [ 846 | "rdf:Property", 847 | "owl:ObjectProperty" 848 | ], 849 | "owl:inverseOf": { 850 | "@id": "skos:hasTopConcept" 851 | }, 852 | "rdfs:domain": { 853 | "@id": "skos:Concept" 854 | }, 855 | "rdfs:isDefinedBy": { 856 | "@id": "http://www.w3.org/2004/02/skos/core" 857 | }, 858 | "rdfs:label": { 859 | "@value": "is top concept in scheme", 860 | "@language": "en" 861 | }, 862 | "rdfs:range": { 863 | "@id": "skos:ConceptScheme" 864 | }, 865 | "rdfs:subPropertyOf": { 866 | "@id": "skos:inScheme" 867 | }, 868 | "skos:definition": { 869 | "@value": "Relates a concept to the concept scheme that it is a top level concept of.", 870 | "@language": "en" 871 | } 872 | } 873 | ] 874 | } -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /skos.ttl: -------------------------------------------------------------------------------- 1 | @base . 2 | @prefix dct: . 3 | @prefix owl: . 4 | @prefix rdf: . 5 | @prefix rdfs: . 6 | @prefix skos: . 7 | @prefix xsd: . 8 | 9 | skos:altLabel a owl:AnnotationProperty, 10 | rdf:Property; 11 | rdfs:label "alternative label"@en; 12 | rdfs:comment "The range of skos:altLabel is the class of RDF plain literals."@en, 13 | "skos:prefLabel, skos:altLabel and skos:hiddenLabel are pairwise disjoint properties."@en; 14 | rdfs:isDefinedBy ; 15 | rdfs:subPropertyOf rdfs:label; 16 | skos:definition "An alternative lexical label for a resource."@en; 17 | skos:example "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)."@en . 18 | 19 | skos:changeNote a owl:AnnotationProperty, 20 | rdf:Property; 21 | rdfs:label "change note"@en; 22 | rdfs:isDefinedBy ; 23 | rdfs:subPropertyOf skos:note; 24 | skos:definition "A note about a modification to a concept."@en . 25 | 26 | skos:definition a owl:AnnotationProperty, 27 | rdf:Property; 28 | rdfs:label "definition"@en; 29 | rdfs:isDefinedBy ; 30 | rdfs:subPropertyOf skos:note; 31 | skos:definition "A statement or formal explanation of the meaning of a concept."@en . 32 | 33 | skos:editorialNote a owl:AnnotationProperty, 34 | rdf:Property; 35 | rdfs:label "editorial note"@en; 36 | rdfs:isDefinedBy ; 37 | rdfs:subPropertyOf skos:note; 38 | skos:definition "A note for an editor, translator or maintainer of the vocabulary."@en . 39 | 40 | skos:exactMatch a owl:ObjectProperty, 41 | rdf:Property, 42 | owl:TransitiveProperty, 43 | owl:SymmetricProperty; 44 | rdfs:label "has exact match"@en; 45 | rdfs:comment "skos:exactMatch is disjoint with each of the properties skos:broadMatch and skos:relatedMatch."@en; 46 | rdfs:isDefinedBy ; 47 | rdfs:subPropertyOf skos:closeMatch; 48 | skos:definition "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."@en . 49 | 50 | skos:example a owl:AnnotationProperty, 51 | rdf:Property; 52 | rdfs:label "example"@en; 53 | rdfs:isDefinedBy ; 54 | rdfs:subPropertyOf skos:note; 55 | skos:definition "An example of the use of a concept."@en . 56 | 57 | skos:hiddenLabel a owl:AnnotationProperty, 58 | rdf:Property; 59 | rdfs:label "hidden label"@en; 60 | rdfs:comment "skos:prefLabel, skos:altLabel and skos:hiddenLabel are pairwise disjoint properties."@en, 61 | "The range of skos:hiddenLabel is the class of RDF plain literals."@en; 62 | rdfs:isDefinedBy ; 63 | rdfs:subPropertyOf rdfs:label; 64 | skos:definition "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."@en . 65 | 66 | skos:historyNote a owl:AnnotationProperty, 67 | rdf:Property; 68 | rdfs:label "history note"@en; 69 | rdfs:isDefinedBy ; 70 | rdfs:subPropertyOf skos:note; 71 | skos:definition "A note about the past state/use/meaning of a concept."@en . 72 | 73 | skos:member a owl:ObjectProperty, 74 | rdf:Property; 75 | rdfs:label "has member"@en; 76 | rdfs:domain skos:Collection; 77 | rdfs:isDefinedBy ; 78 | rdfs:range [ 79 | a owl:Class; 80 | owl:unionOf (skos:Concept skos:Collection) 81 | ]; 82 | skos:definition "Relates a collection to one of its members."@en . 83 | 84 | skos:memberList a owl:ObjectProperty, 85 | rdf:Property, 86 | owl:FunctionalProperty; 87 | rdfs:label "has member list"@en; 88 | rdfs:comment """For any resource, every item in the list given as the value of the 89 | skos:memberList property is also a value of the skos:member property."""@en; 90 | rdfs:domain skos:OrderedCollection; 91 | rdfs:isDefinedBy ; 92 | rdfs:range rdf:List; 93 | skos:definition "Relates an ordered collection to the RDF list containing its members."@en . 94 | 95 | skos:notation a rdf:Property, 96 | owl:DatatypeProperty; 97 | rdfs:label "notation"@en; 98 | rdfs:isDefinedBy ; 99 | skos:definition "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."@en; 100 | skos:scopeNote "By convention, skos:notation is used with a typed literal in the object position of the triple."@en . 101 | 102 | skos:prefLabel a owl:AnnotationProperty, 103 | rdf:Property; 104 | rdfs:label "preferred label"@en; 105 | rdfs:comment """skos:prefLabel, skos:altLabel and skos:hiddenLabel are pairwise 106 | disjoint properties."""@en, 107 | "The range of skos:prefLabel is the class of RDF plain literals."@en, 108 | "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."@en; 109 | rdfs:isDefinedBy ; 110 | rdfs:subPropertyOf rdfs:label; 111 | skos:definition "The preferred lexical label for a resource, in a given language."@en . 112 | 113 | skos:relatedMatch a owl:ObjectProperty, 114 | rdf:Property, 115 | owl:SymmetricProperty; 116 | rdfs:label "has related match"@en; 117 | rdfs:isDefinedBy ; 118 | rdfs:subPropertyOf skos:mappingRelation, 119 | skos:related; 120 | skos:definition "skos:relatedMatch is used to state an associative mapping link between two conceptual resources in different concept schemes."@en . 121 | 122 | skos:scopeNote a owl:AnnotationProperty, 123 | rdf:Property; 124 | rdfs:label "scope note"@en; 125 | rdfs:isDefinedBy ; 126 | rdfs:subPropertyOf skos:note; 127 | skos:definition "A note that helps to clarify the meaning and/or the use of a concept."@en . 128 | 129 | skos:OrderedCollection a owl:Class; 130 | rdfs:label "Ordered Collection"@en; 131 | rdfs:isDefinedBy ; 132 | rdfs:subClassOf skos:Collection; 133 | skos:definition "An ordered collection of concepts, where both the grouping and the ordering are meaningful."@en; 134 | skos:scopeNote "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'."@en . 135 | 136 | skos:broadMatch a owl:ObjectProperty, 137 | rdf:Property; 138 | rdfs:label "has broader match"@en; 139 | rdfs:isDefinedBy ; 140 | rdfs:subPropertyOf skos:mappingRelation, 141 | skos:broader; 142 | owl:inverseOf skos:narrowMatch; 143 | skos:definition "skos:broadMatch is used to state a hierarchical mapping link between two conceptual resources in different concept schemes."@en . 144 | 145 | skos:closeMatch a owl:ObjectProperty, 146 | rdf:Property, 147 | owl:SymmetricProperty; 148 | rdfs:label "has close match"@en; 149 | rdfs:isDefinedBy ; 150 | rdfs:subPropertyOf skos:mappingRelation; 151 | skos:definition "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."@en . 152 | 153 | skos:hasTopConcept a owl:ObjectProperty, 154 | rdf:Property; 155 | rdfs:label "has top concept"@en; 156 | rdfs:domain skos:ConceptScheme; 157 | rdfs:isDefinedBy ; 158 | rdfs:range skos:Concept; 159 | owl:inverseOf skos:topConceptOf; 160 | skos:definition "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."@en . 161 | 162 | skos:inScheme a owl:ObjectProperty, 163 | rdf:Property; 164 | rdfs:label "is in scheme"@en; 165 | rdfs:isDefinedBy ; 166 | rdfs:range skos:ConceptScheme; 167 | skos:definition "Relates a resource (for example a concept) to a concept scheme in which it is included."@en; 168 | skos:scopeNote "A concept may be a member of more than one concept scheme."@en . 169 | 170 | skos:narrowMatch a owl:ObjectProperty, 171 | rdf:Property; 172 | rdfs:label "has narrower match"@en; 173 | rdfs:isDefinedBy ; 174 | rdfs:subPropertyOf skos:mappingRelation, 175 | skos:narrower; 176 | owl:inverseOf skos:broadMatch; 177 | skos:definition "skos:narrowMatch is used to state a hierarchical mapping link between two conceptual resources in different concept schemes."@en . 178 | 179 | skos:related a owl:ObjectProperty, 180 | rdf:Property, 181 | owl:SymmetricProperty; 182 | rdfs:label "has related"@en; 183 | rdfs:comment "skos:related is disjoint with skos:broaderTransitive"@en; 184 | rdfs:isDefinedBy ; 185 | rdfs:subPropertyOf skos:semanticRelation; 186 | skos:definition "Relates a concept to a concept with which there is an associative semantic relationship."@en . 187 | 188 | skos:topConceptOf a owl:ObjectProperty, 189 | rdf:Property; 190 | rdfs:label "is top concept in scheme"@en; 191 | rdfs:domain skos:Concept; 192 | rdfs:isDefinedBy ; 193 | rdfs:range skos:ConceptScheme; 194 | rdfs:subPropertyOf skos:inScheme; 195 | owl:inverseOf skos:hasTopConcept; 196 | skos:definition "Relates a concept to the concept scheme that it is a top level concept of."@en . 197 | 198 | skos:broader a owl:ObjectProperty, 199 | rdf:Property; 200 | rdfs:label "has broader"@en; 201 | rdfs:comment "Broader concepts are typically rendered as parents in a concept hierarchy (tree)."@en; 202 | rdfs:isDefinedBy ; 203 | rdfs:subPropertyOf skos:broaderTransitive; 204 | owl:inverseOf skos:narrower; 205 | skos:definition "Relates a concept to a concept that is more general in meaning."@en; 206 | skos:scopeNote "By convention, skos:broader is only used to assert an immediate (i.e. direct) hierarchical link between two conceptual resources."@en . 207 | 208 | skos:broaderTransitive a owl:ObjectProperty, 209 | rdf:Property, 210 | owl:TransitiveProperty; 211 | rdfs:label "has broader transitive"@en; 212 | rdfs:isDefinedBy ; 213 | rdfs:subPropertyOf skos:semanticRelation; 214 | owl:inverseOf skos:narrowerTransitive; 215 | skos:definition "skos:broaderTransitive is a transitive superproperty of skos:broader."; 216 | skos:scopeNote "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."@en . 217 | 218 | skos:narrower a owl:ObjectProperty, 219 | rdf:Property; 220 | rdfs:label "has narrower"@en; 221 | rdfs:comment "Narrower concepts are typically rendered as children in a concept hierarchy (tree)."@en; 222 | rdfs:isDefinedBy ; 223 | rdfs:subPropertyOf skos:narrowerTransitive; 224 | owl:inverseOf skos:broader; 225 | skos:definition "Relates a concept to a concept that is more specific in meaning."@en; 226 | skos:scopeNote "By convention, skos:broader is only used to assert an immediate (i.e. direct) hierarchical link between two conceptual resources."@en . 227 | 228 | skos:narrowerTransitive a owl:ObjectProperty, 229 | rdf:Property, 230 | owl:TransitiveProperty; 231 | rdfs:label "has narrower transitive"@en; 232 | rdfs:isDefinedBy ; 233 | rdfs:subPropertyOf skos:semanticRelation; 234 | owl:inverseOf skos:broaderTransitive; 235 | skos:definition "skos:narrowerTransitive is a transitive superproperty of skos:narrower."; 236 | skos:scopeNote "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."@en . 237 | 238 | skos:Collection a owl:Class; 239 | rdfs:label "Collection"@en; 240 | rdfs:isDefinedBy ; 241 | owl:disjointWith skos:ConceptScheme, 242 | skos:Concept; 243 | skos:definition "A meaningful collection of concepts."@en; 244 | skos:scopeNote "Labelled collections can be used where you would like a set of concepts to be displayed under a 'node label' in the hierarchy."@en . 245 | 246 | skos:ConceptScheme a owl:Class; 247 | rdfs:label "Concept Scheme"@en; 248 | rdfs:isDefinedBy ; 249 | owl:disjointWith skos:Concept; 250 | skos:definition "A set of concepts, optionally including statements about semantic relationships between those concepts."@en; 251 | skos:example "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."@en; 252 | skos:scopeNote "A concept scheme may be defined to include concepts from different sources."@en . 253 | 254 | skos:mappingRelation a owl:ObjectProperty, 255 | rdf:Property; 256 | rdfs:label "is in mapping relation with"@en; 257 | rdfs:comment "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."@en; 258 | rdfs:isDefinedBy ; 259 | rdfs:subPropertyOf skos:semanticRelation; 260 | skos:definition "Relates two concepts coming, by convention, from different schemes, and that have comparable meanings"@en . 261 | 262 | skos:semanticRelation a owl:ObjectProperty, 263 | rdf:Property; 264 | rdfs:label "is in semantic relation with"@en; 265 | rdfs:domain skos:Concept; 266 | rdfs:isDefinedBy ; 267 | rdfs:range skos:Concept; 268 | skos:definition "Links a concept to a concept related by meaning."@en; 269 | skos:scopeNote "This property should not be used directly, but as a super-property for all properties denoting a relationship of meaning between concepts."@en . 270 | 271 | skos:note a owl:AnnotationProperty, 272 | rdf:Property; 273 | rdfs:label "note"@en; 274 | rdfs:isDefinedBy ; 275 | skos:definition "A general note, for any purpose."@en; 276 | skos:scopeNote "This property may be used directly, or as a super-property for more specific note types."@en . 277 | 278 | skos:Concept a owl:Class; 279 | rdfs:label "Concept"@en; 280 | rdfs:isDefinedBy ; 281 | skos:definition "An idea or notion; a unit of thought."@en . 282 | 283 | a owl:Ontology; 284 | dct:title "SKOS Vocabulary"@en; 285 | dct:contributor "Dave Beckett", 286 | "Nikki Rogers", 287 | "Participants in W3C's Semantic Web Deployment Working Group."; 288 | dct:creator "Alistair Miles", 289 | "Sean Bechhofer"; 290 | dct:description "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."@en; 291 | rdfs:seeAlso . 292 | -------------------------------------------------------------------------------- /src/concept-filter-link.vue: -------------------------------------------------------------------------------- 1 | 7 | 8 | 20 | -------------------------------------------------------------------------------- /src/concept-form.vue: -------------------------------------------------------------------------------- 1 | 43 | 44 | 111 | -------------------------------------------------------------------------------- /src/concept-scheme-filter-link.vue: -------------------------------------------------------------------------------- 1 | 7 | 8 | 20 | -------------------------------------------------------------------------------- /src/concept-scheme-form.vue: -------------------------------------------------------------------------------- 1 | 33 | 34 | 71 | -------------------------------------------------------------------------------- /src/concept-scheme.vue: -------------------------------------------------------------------------------- 1 | 14 | 15 | 83 | -------------------------------------------------------------------------------- /src/concept-table.vue: -------------------------------------------------------------------------------- 1 | 36 | 37 | 120 | -------------------------------------------------------------------------------- /src/concept.vue: -------------------------------------------------------------------------------- 1 | 21 | 22 | 91 | -------------------------------------------------------------------------------- /src/context-form.vue: -------------------------------------------------------------------------------- 1 | 48 | 49 | 126 | -------------------------------------------------------------------------------- /src/rdf-item.vue: -------------------------------------------------------------------------------- 1 | 34 | 35 | 45 | -------------------------------------------------------------------------------- /src/utils.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @copyright 2017-2020 John Wiley & Sons, Inc. 3 | * @license MIT 4 | **/ 5 | 6 | var N3 = require('n3'); 7 | 8 | var term = function (str) { 9 | if (N3.Util.isBlank(str)) { 10 | return { 11 | type: 'blank node', 12 | value: str 13 | }; 14 | } else if (N3.Util.isLiteral(str)) { 15 | var ret = { 16 | type: 'literal', 17 | value: N3.Util.getLiteralValue(str), 18 | datatype: N3.Util.getLiteralType(str), 19 | }; 20 | 21 | var language = N3.Util.getLiteralLanguage(str); 22 | if (language !== '') { 23 | ret.language = language; 24 | } 25 | 26 | return ret; 27 | } else { 28 | return { 29 | type: 'IRI', 30 | value: str 31 | }; 32 | } 33 | }; 34 | 35 | exports.term = term; 36 | -------------------------------------------------------------------------------- /src/viewer.vue: -------------------------------------------------------------------------------- 1 | 46 | 47 | 134 | -------------------------------------------------------------------------------- /src/vue-levelgraph.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @copyright 2017-2020 John Wiley & Sons, Inc. 3 | * @license MIT 4 | **/ 5 | 6 | const levelgraph = require('levelgraph'); 7 | const leveljs = require('level-js'); 8 | const levelup = require('levelup'); 9 | const levelgraphJSONLD = require('levelgraph-jsonld'); 10 | const levelgraphN3 = require('levelgraph-n3'); 11 | 12 | export function install(Vue, options) { 13 | const factory = function (location) { return new leveljs(location) }; 14 | // TODO: should db_name default? 15 | let db_name = options.name || 'levelgraph'; 16 | Vue.prototype.$db = levelgraphN3( 17 | levelgraphJSONLD( 18 | levelgraph( 19 | levelup(db_name, {db: factory}) 20 | ) 21 | ) 22 | ); 23 | 24 | Vue.mixin({ 25 | methods: { 26 | getInto(keypath, filter) { 27 | let self = this; 28 | // avoids getting {}...which returns *everything* 29 | if (Object.keys(filter).length > 0) { 30 | self.$db.get(filter, (err, rv) => { 31 | if (err) throw err; 32 | else { 33 | self[keypath] = rv; 34 | } 35 | }); 36 | } 37 | } 38 | } 39 | }); 40 | }; 41 | -------------------------------------------------------------------------------- /src/vue-semantic-multi-select.vue: -------------------------------------------------------------------------------- 1 | 22 | 23 | 107 | --------------------------------------------------------------------------------