Add rewrite test as method to vc
Change-Id: I87ac48fdbf9d4c75ce09c4456460d1ede56b9034
diff --git a/dev/js/src/vc/doc.js b/dev/js/src/vc/doc.js
index 7c4f98a..2d38b56 100644
--- a/dev/js/src/vc/doc.js
+++ b/dev/js/src/vc/doc.js
@@ -42,6 +42,7 @@
if (obj === undefined) {
console.log(json);
+ return;
};
// Bind the parent
diff --git a/dev/js/src/vc/docgroupref.js b/dev/js/src/vc/docgroupref.js
index f1c1851..905faf8 100644
--- a/dev/js/src/vc/docgroupref.js
+++ b/dev/js/src/vc/docgroupref.js
@@ -9,6 +9,9 @@
'util'
], function (jsonldClass, rewriteListClass, stringValClass) {
+ // TODO:
+ // Does not support rewrites currently
+
const loc = KorAP.Locale;
loc.EMPTY = loc.EMPTY || '⋯';
diff --git a/dev/js/src/vc/jsonld.js b/dev/js/src/vc/jsonld.js
index 545652b..600a5bb 100644
--- a/dev/js/src/vc/jsonld.js
+++ b/dev/js/src/vc/jsonld.js
@@ -95,6 +95,10 @@
};
},
+ rewrites : function () {
+ return null;
+ },
+
toQuery : function () {
return '';
}
diff --git a/dev/js/src/vc/rewritelist.js b/dev/js/src/vc/rewritelist.js
index 8e68fa0..9a87e4e 100644
--- a/dev/js/src/vc/rewritelist.js
+++ b/dev/js/src/vc/rewritelist.js
@@ -23,6 +23,10 @@
return this;
},
+ length : function () {
+ return this._list.length;
+ },
+
/**
* Get element.
*/