Associate anchor to schema set

- db schema updated
- db layer tests provided for ancor create and reading by dataspace
- anchor model is removed from rest api as extra
- api/spi updated to use string references instead of object

Issue-ID: CPS-99
Change-Id: Ideeb83fa9e91ec1816308d8327a6589b999c64c5
Signed-off-by: Ruslan Kashapov <ruslan.kashapov@pantheon.tech>
diff --git a/cps-ri/src/test/resources/data/anchor.sql b/cps-ri/src/test/resources/data/anchor.sql
new file mode 100644
index 0000000..5507559
--- /dev/null
+++ b/cps-ri/src/test/resources/data/anchor.sql
@@ -0,0 +1,9 @@
+INSERT INTO DATASPACE (ID, NAME) VALUES
+    (1001, 'DATASPACE-001'), (1002, 'DATASPACE-002');
+
+INSERT INTO SCHEMA_SET (ID, NAME, DATASPACE_ID) VALUES
+    (2001, 'SCHEMA-SET-001', 1001), (2002, 'SCHEMA-SET-002', 1001);
+
+INSERT INTO FRAGMENT (ID, XPATH, ANCHOR_NAME, DATASPACE_ID, SCHEMA_SET_ID) VALUES
+    (3001, 'ANCHOR-001', 'ANCHOR-001', 1001, 2001),
+    (3002, 'ANCHOR-002', 'ANCHOR-002', 1001, 2002);
\ No newline at end of file
diff --git a/cps-ri/src/test/resources/data/clear-all.sql b/cps-ri/src/test/resources/data/clear-all.sql
index 3d93825..522f9e6 100644
--- a/cps-ri/src/test/resources/data/clear-all.sql
+++ b/cps-ri/src/test/resources/data/clear-all.sql
@@ -1,3 +1,4 @@
+DELETE FROM FRAGMENT;
 -- clear all via dataspace table cleanup
 -- all other data will be removed by cascade
 DELETE FROM DATASPACE;