Remove deprecated checkRewrite() function
Change-Id: I7c9abbe37ac56b7c35966406777bda21f7c2c3dc
diff --git a/dev/js/spec/vcSpec.js b/dev/js/spec/vcSpec.js
index 87442bd..b60dc5d 100644
--- a/dev/js/spec/vcSpec.js
+++ b/dev/js/spec/vcSpec.js
@@ -2372,56 +2372,6 @@
});
});
- // Check class method
- xdescribe('KorAP.VC.checkRewrite', function () {
-
- // Class method is deprecated!
-
- it('should check for simple rewrites', function () {
- expect(vcClass.checkRewrite(
- {
- "@type" : "koral:doc",
- "rewrites" : [{
- "@type" : "koral:rewrite",
- "operation" : "operation:modification",
- "src" : "querySerializer",
- "scope" : "tree"
- }]
- }
- )).toBeTruthy();
-
- var nested = {
- "@type" : "koral:docGroup",
- "operands" : [
- {
- "@type" : "koral:doc"
- },
- {
- "@type" : "koral:docGroup",
- "operands" : [
- {
- "@type": "koral:doc"
- },
- {
- "@type": "koral:doc"
- }
- ]
- }
- ]
- };
-
- expect(vcClass.checkRewrite(nested)).toBe(false);
-
- nested["operands"][1]["operands"][1]["rewrites"] = [{
- "@type" : "koral:rewrite",
- "operation" : "operation:modification",
- "src" : "querySerializer",
- "scope" : "tree"
- }];
-
- expect(vcClass.checkRewrite(nested)).toBeTruthy();
- });
- });
describe('KorAP.Rewrite', function () {
it('should be initializable', function () {
diff --git a/dev/js/src/vc.js b/dev/js/src/vc.js
index 3259083..985b64b 100644
--- a/dev/js/src/vc.js
+++ b/dev/js/src/vc.js
@@ -236,33 +236,8 @@
return false;
},
+
- // Check if the virtual corpus contains a rewrite
- // This is a class method
- checkRewrite : function(json) {
-
- // There is a rewrite attribute
- if (json['rewrites'] !== undefined) {
- return true;
- }
-
- // There is a group to check for rewrites
- else if (json['@type'] === 'koral:docGroup') {
- var ops = json['operands'];
- if (ops === undefined)
- return false;
-
- for ( var i in ops) {
-
- // "this" is the class
- if (this.checkRewrite(ops[i])) {
- return true;
- };
- };
- };
- return false;
- },
-
/**
* Clean the virtual document to uspecified doc.
*/