Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

using dcterms #11

Merged
merged 4 commits into from

2 participants

@ja-fra
Collaborator

switched from dc-elements to dcterms.

@tkurz tkurz merged commit ef06692 into from
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Aug 6, 2012
  1. @ja-fra

    restore testcase baseURI

    Thomas Kurz authored ja-fra committed
  2. @ja-fra

    - Added title to index.html

    ja-fra authored
    - fixed firebug-warning of missing charset header
  3. @ja-fra
Commits on Aug 13, 2012
  1. @ja-fra
This page is out of date. Refresh to see the latest.
View
1  .gitignore
@@ -0,0 +1 @@
+*~
View
4 extension/lmf/user.js
@@ -24,14 +24,14 @@ function UserService(editor, host) {
var self = this;
function handleUpdate(event) {
var uris = event.data.uris;
- var prop = "http://purl.org/dc/elements/1.1/contributor";
+ var prop = "http://purl.org/dc/terms/contributor";
update(self, uris, prop, false, function() {
self.editor.event.fire(editor.EventCode.VIEW.RELOAD, {uris: [prop]});
});
}
function handleCreate(event) {
var uris = event.data.uri;
- var prop = "http://purl.org/dc/elements/1.1/creator";
+ var prop = "http://purl.org/dc/terms/creator";
update(self, uris, prop, true, function() {
self.editor.event.fire(editor.EventCode.VIEW.RELOAD, {uris: [prop]});
});
View
3  index.html
@@ -25,7 +25,8 @@
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
- <title></title>
+ <title>SKOSjs Thesaurus Manager</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<!-- TODO -->
<script type="text/javascript" src="http://code.jquery.com/jquery-1.7.2.min.js"></script>
<script type="text/javascript" src="js/md5.js"></script>
View
9 js/skos-client.js
@@ -31,7 +31,6 @@ function SKOSClient(options) {
SKOS : "http://www.w3.org/2004/02/skos/core#",
RDF : "http://www.w3.org/1999/02/22-rdf-syntax-ns#",
RDFS: "http://www.w3.org/2000/01/rdf-schema#",
- DC : "http://purl.org/dc/elements/1.1/",
DC_TERMS : "http://purl.org/dc/terms/",
SKOSJS : "http://tkurz.github.com/skosjs/ns/2012/03/"
}
@@ -69,7 +68,7 @@ function SKOSClient(options) {
var query1 = "CREATE GRAPH<" + uri + ">";
if(OPTIONS.DEBUG)console.debug(query1);
sparqlClient.update(query1, function(){
- var query2 = "INSERT DATA {GRAPH <" + uri + "> {<" + uri + "> <" + namespaces.DC + "title>\"" + title + "\";<"+ namespaces.RDF +"type><"+namespaces.SKOSJS+"Project>;<"+ namespaces.DC_TERMS+"created>\""+datetime+"\"^^<http://www.w3.org/2001/XMLSchema#date>;<"+ namespaces.DC_TERMS+"modified>\""+datetime+"\"^^<http://www.w3.org/2001/XMLSchema#date>. }}";
+ var query2 = "INSERT DATA {GRAPH <" + uri + "> {<" + uri + "> <" + namespaces.DC_TERMS + "title>\"" + title + "\";<"+ namespaces.RDF +"type><"+namespaces.SKOSJS+"Project>;<"+ namespaces.DC_TERMS+"created>\""+datetime+"\"^^<http://www.w3.org/2001/XMLSchema#date>;<"+ namespaces.DC_TERMS+"modified>\""+datetime+"\"^^<http://www.w3.org/2001/XMLSchema#date>. }}";
if(OPTIONS.DEBUG)console.debug(query2);
sparqlClient.update(query2, onsuccess, onfailure);
}, onfailure);
@@ -246,7 +245,7 @@ function SKOSClient(options) {
graph : function(graph,onsuccess, onfailure) {
var language = "";
- var query = "SELECT DISTINCT ?title WHERE { {GRAPH <"+graph+"> { <"+graph+"> <"+ namespaces.RDF +"type><"+namespaces.SKOSJS+"Project> }}UNION {GRAPH <"+graph+"> { ?a <"+ namespaces.RDF +"type><" + namespaces.SKOS + "Concept> }}OPTIONAL {<"+graph+"> <" + namespaces.DC + "title> ?title.FILTER (lang(?title) = '" + language + "')}}";
+ var query = "SELECT DISTINCT ?title WHERE { {GRAPH <"+graph+"> { <"+graph+"> <"+ namespaces.RDF +"type><"+namespaces.SKOSJS+"Project> }}UNION {GRAPH <"+graph+"> { ?a <"+ namespaces.RDF +"type><" + namespaces.SKOS + "Concept> }}OPTIONAL {<"+graph+"> <" + namespaces.DC_TERMS + "title> ?title.FILTER (lang(?title) = '" + language + "')}}";
if(OPTIONS.DEBUG)console.debug(query);
sparqlClient.select(query, onsuccess, onfailure);
},
@@ -272,8 +271,8 @@ function SKOSClient(options) {
this.list = {
graphs : function(onsuccess, onfailure) {
var language = OPTIONS.LANGUAGE=='none'?"":OPTIONS.LANGUAGE;
- //var query = "SELECT DISTINCT ?uri ?title {GRAPH ?uri{?uri <"+ namespaces.RDF +"type><"+namespaces.SKOSJS+"Project>. Optional {?uri <" + namespaces.DC + "title> ?title. FILTER (lang(?title) = '" + language + "')}}}";
- var query = "SELECT DISTINCT ?uri ?title WHERE { {GRAPH ?uri { ?uri <"+ namespaces.RDF +"type><"+namespaces.SKOSJS+"Project> }}UNION {GRAPH ?uri { ?a <"+ namespaces.RDF +"type><" + namespaces.SKOS + "Concept> }}OPTIONAL {?uri <" + namespaces.DC + "title> ?title.FILTER (lang(?title) = '')}}";
+ //var query = "SELECT DISTINCT ?uri ?title {GRAPH ?uri{?uri <"+ namespaces.RDF +"type><"+namespaces.SKOSJS+"Project>. Optional {?uri <" + namespaces.DC_TERMS + "title> ?title. FILTER (lang(?title) = '" + language + "')}}}";
+ var query = "SELECT DISTINCT ?uri ?title WHERE { {GRAPH ?uri { ?uri <"+ namespaces.RDF +"type><"+namespaces.SKOSJS+"Project> }}UNION {GRAPH ?uri { ?a <"+ namespaces.RDF +"type><" + namespaces.SKOS + "Concept> }}OPTIONAL {?uri <" + namespaces.DC_TERMS + "title> ?title.FILTER (lang(?title) = '')}}";
if(OPTIONS.DEBUG)console.debug(query);
sparqlClient.select(query, onsuccess, onfailure);
},
View
30 skos-editor.0.2.0.js
@@ -35,15 +35,15 @@ function SKOSEditor(options) {
var PROPERTIES = {
graph : {
left:[
- {title:"Title",property:"http://purl.org/dc/elements/1.1/title",type:"string",multivalue:false,multilingual:false,editable:true},
- {title:"Subject",property:"http://purl.org/dc/elements/1.1/subject",type:"string",multivalue:false,multilingual:true,editable:true},
- {title:"Description",property:"http://purl.org/dc/elements/1.1/description",type:"text",multivalue:false,multilingual:true,editable:true}
+ {title:"Title",property:"http://purl.org/dc/terms/title",type:"string",multivalue:false,multilingual:false,editable:true},
+ {title:"Subject",property:"http://purl.org/dc/terms/subject",type:"string",multivalue:false,multilingual:true,editable:true},
+ {title:"Description",property:"http://purl.org/dc/terms/description",type:"text",multivalue:false,multilingual:true,editable:true}
],
right:[
- {title:"Author",property:"http://purl.org/dc/elements/1.1/creator",type:"uri",multivalue:false,multilingual:false,editable:false},
+ {title:"Author",property:"http://purl.org/dc/terms/creator",type:"uri",multivalue:false,multilingual:false,editable:false},
{title:"Created",property:"http://purl.org/dc/terms/created",type:"string",multivalue:false,multilingual:false,editable:false},
- {title:"Publisher (Organisation)",property:"http://purl.org/dc/elements/1.1/publisher",type:"string",multivalue:true,multilingual:false,editable:true},
- {title:"Contributors",property:"http://purl.org/dc/elements/1.1/contributor",type:"uri",multivalue:true,multilingual:false,editable:false}
+ {title:"Publisher (Organisation)",property:"http://purl.org/dc/terms/publisher",type:"string",multivalue:true,multilingual:false,editable:true},
+ {title:"Contributors",property:"http://purl.org/dc/terms/contributor",type:"uri",multivalue:true,multilingual:false,editable:false}
]
},
scheme : {
@@ -52,12 +52,12 @@ function SKOSEditor(options) {
],
right:[
{title:"Title",property:"http://www.w3.org/2000/01/rdf-schema#label",type:"string",multivalue:false,multilingual:true,editable:true},
- {title:"Description",property:"http://purl.org/dc/elements/1.1/description",type:"text",multivalue:false,multilingual:true,editable:true},
- {title:"Author",property:"http://purl.org/dc/elements/1.1/creator",type:"uri",multivalue:false,multilingual:false,editable:false},
+ {title:"Description",property:"http://purl.org/dc/terms/description",type:"text",multivalue:false,multilingual:true,editable:true},
+ {title:"Author",property:"http://purl.org/dc/terms/creator",type:"uri",multivalue:false,multilingual:false,editable:false},
{title:"Created",property:"http://purl.org/dc/terms/created",type:"string",multivalue:false,multilingual:false,editable:false},
{title:"Modified",property:"http://purl.org/dc/terms/modified",type:"string",multivalue:false,multilingual:false,editable:false},
- {title:"Publisher (Organisation)",property:"http://purl.org/dc/elements/1.1/publisher",type:"string",multivalue:true,multilingual:false,editable:true},
- {title:"Contributors",property:"http://purl.org/dc/elements/1.1/contributor",type:"uri",multivalue:true,multilingual:false,editable:false},
+ {title:"Publisher (Organisation)",property:"http://purl.org/dc/terms/publisher",type:"string",multivalue:true,multilingual:false,editable:true},
+ {title:"Contributors",property:"http://purl.org/dc/terms/contributor",type:"uri",multivalue:true,multilingual:false,editable:false},
{title:"License",property:"http://purl.org/dc/terms/license",type:"uri",multivalue:true,droppable:false,editable:true}
]
},
@@ -75,10 +75,10 @@ function SKOSEditor(options) {
{title:"Preferred Label",property:"http://www.w3.org/2004/02/skos/core#prefLabel",type:"string",multivalue:false,multilingual:true,editable:true},
{title:"Alternative Label",property:"http://www.w3.org/2004/02/skos/core#altLabel",type:"string",multivalue:true,multilingual:true,editable:true},
{title:"Hidden Label",property:"http://www.w3.org/2004/02/skos/core#hiddenLabel",type:"string",multivalue:true,multilingual:true,editable:true},
- {title:"Author",property:"http://purl.org/dc/elements/1.1/creator",type:"uri",multivalue:false,multilingual:false,editable:false},
+ {title:"Author",property:"http://purl.org/dc/terms/creator",type:"uri",multivalue:false,multilingual:false,editable:false},
{title:"Created",property:"http://purl.org/dc/terms/created",type:"string",multivalue:false,multilingual:false,editable:false},
{title:"Modified",property:"http://purl.org/dc/terms/modified",type:"string",multivalue:false,multilingual:false,editable:false},
- {title:"Contributors",property:"http://purl.org/dc/elements/1.1/contributor",type:"uri",multivalue:true,multilingual:false,editable:false},
+ {title:"Contributors",property:"http://purl.org/dc/terms/contributor",type:"uri",multivalue:true,multilingual:false,editable:false},
{title:"Definition",property:"http://www.w3.org/2004/02/skos/core#definition",type:"text",multivalue:false,multilingual:true,editable:true},
{title:"Hidden Label",property:"http://www.w3.org/2004/02/skos/core#hiddenLabel",type:"string",multivalue:true,multilingual:true,editable:true}
]
@@ -486,7 +486,7 @@ function SKOSEditor(options) {
if(event.data.property=="http://www.w3.org/2004/02/skos/core#prefLabel" || event.data.property=="http://www.w3.org/2000/01/rdf-schema#label") {
$(".concept_"+event.data.uri.md5()).text(event.data.value);
}
- } else if(event.data.property=="http://purl.org/dc/elements/1.1/title") {
+ } else if(event.data.property=="http://purl.org/dc/terms/title") {
$(".concept_"+event.data.uri.md5()).text(event.data.value);
}
});
@@ -495,7 +495,7 @@ function SKOSEditor(options) {
if(event.data.property=="http://www.w3.org/2004/02/skos/core#prefLabel" || event.data.property=="http://www.w3.org/2000/01/rdf-schema#label") {
$(".concept_"+event.data.uri.md5()).text(event.data.uri);
}
- } else if(event.data.property=="http://purl.org/dc/elements/1.1/title") {
+ } else if(event.data.property=="http://purl.org/dc/terms/title") {
$(".concept_"+event.data.uri.md5()).text(event.data.value);
}
});
@@ -504,7 +504,7 @@ function SKOSEditor(options) {
if(event.data.property=="http://www.w3.org/2004/02/skos/core#prefLabel" || event.data.property=="http://www.w3.org/2000/01/rdf-schema#label") {
$(".concept_"+event.data.uri.md5()).text(event.data.value);
}
- } else if(event.data.property=="http://purl.org/dc/elements/1.1/title") {
+ } else if(event.data.property=="http://purl.org/dc/terms/title") {
$(".concept_"+event.data.uri.md5()).text(event.data.value);
}
});
Something went wrong with that request. Please try again.