Preliminary work on text siglen support
diff --git a/dev/js/src/api.js b/dev/js/src/api.js
index eeddc58..8da1934 100644
--- a/dev/js/src/api.js
+++ b/dev/js/src/api.js
@@ -18,9 +18,12 @@
// match is a KorAP.Match object
var url = KorAP.URL;
url += '/corpus';
+/*
url += '/' + match.corpusID;
url += '/' + match.docID;
url += '/' + match.textID;
+*/
+ url += '/' + match.textSigle;
url += '/' + match.matchID;
// { spans: true, layer:x, foundry : y}
diff --git a/dev/js/src/match.js b/dev/js/src/match.js
index 88c87fb..07a46ec 100644
--- a/dev/js/src/match.js
+++ b/dev/js/src/match.js
@@ -20,7 +20,8 @@
loc.SHOWINFO = loc.SHOWINFO || 'Show information';
loc.CLOSE = loc.CLOSE || 'Close';
- var _matchTerms = ['corpusID', 'docID', 'textID', 'matchID', 'available'];
+ // 'corpusID', 'docID', 'textID'
+ var _matchTerms = ['textSigle', 'matchID', 'available'];
/**
* Match object
@@ -57,10 +58,23 @@
// Circular reference !!
match["_match"] = this;
+/*
this.corpusID = match.getAttribute('data-corpus-id'),
this.docID = match.getAttribute('data-doc-id'),
this.textID = match.getAttribute('data-text-id'),
- this.matchID = match.getAttribute('data-match-id')
+*/
+ if (match.hasAttribute('data-text-sigle')) {
+ this.textSigle = match.getAttribute('data-text-sigle')
+ }
+ else {
+ this.textSigle = match.getAttribute('data-corpus-id') +
+ '/' +
+ match.getAttribute('data-doc-id') +
+ '/' +
+ match.getAttribute('data-text-id');
+ };
+
+ this.matchID = match.getAttribute('data-match-id');
// List of available annotations
this.available = match.getAttribute('data-available-info').split(' ');
diff --git a/dev/js/src/vc.js b/dev/js/src/vc.js
index 0bc7284..e551d63 100644
--- a/dev/js/src/vc.js
+++ b/dev/js/src/vc.js
@@ -14,6 +14,8 @@
/*
TODO: Disable "and" or "or" in case it's followed
by an unspecified document
+ TODO: Add "and"-method to root to add further constraints based on match-
+ input (like clicking on a pubDate timestamp in a match)
TODO: Implement "persistence"-Option,
injecting the current creation date stamp
TODO: Implement vec-Type for document-id vectors