Update to HSQLDB driver
Remove DWR Remove native SVG tables Add new REST services for persistence.
This commit is contained in:
@@ -73,7 +73,6 @@ public class ExportTest {
|
||||
|
||||
final MindMap result = new MindMap();
|
||||
result.setXml(content.toString().getBytes("UTF-8"));
|
||||
result.setNativeXml(content.toString());
|
||||
return result;
|
||||
}
|
||||
|
||||
|
@@ -42,11 +42,11 @@ public class ImportExportTest {
|
||||
final String recContent = readFile(wiseFile);
|
||||
|
||||
// Export mile content ...
|
||||
Assert.assertEquals(mindMap.getUnzippedXml(), recContent);
|
||||
Assert.assertEquals(mindMap.getXmlStr(), recContent);
|
||||
|
||||
} else {
|
||||
final FileOutputStream fos = new FileOutputStream(wiseFile);
|
||||
fos.write(mindMap.getUnzippedXml().getBytes("UTF-8"));
|
||||
fos.write(mindMap.getXmlStr().getBytes("UTF-8"));
|
||||
fos.close();
|
||||
}
|
||||
|
||||
|
@@ -0,0 +1,22 @@
|
||||
package com.wisemapping.test.model;
|
||||
|
||||
|
||||
import com.wisemapping.rest.model.RestMindmap;
|
||||
import org.codehaus.jackson.map.DeserializationConfig;
|
||||
import org.codehaus.jackson.map.ObjectMapper;
|
||||
import org.testng.annotations.Test;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
@Test
|
||||
public class JsonTest {
|
||||
|
||||
@Test
|
||||
void deserialize() throws IOException {
|
||||
String json = "{\"id\":\"1\",\"xml\":\"<map name=\\\"1\\\" version=\\\"tango\\\"><topic central=\\\"true\\\" text=\\\"ss\\\" id=\\\"1\\\"/></map>\",\"properties\":\"{\\\"zoom\\\":0.85}\"}";
|
||||
ObjectMapper mapper = new ObjectMapper();
|
||||
final RestMindmap restMindmap = mapper.readValue(json, RestMindmap.class);
|
||||
|
||||
}
|
||||
|
||||
}
|
@@ -1,11 +1,10 @@
|
||||
CREATE TABLE COLABORATOR (
|
||||
id INTEGER NOT NULL IDENTITY PRIMARY KEY,
|
||||
id INTEGER NOT NULL IDENTITY,
|
||||
email varchar(255) NOT NULL,
|
||||
creation_date date
|
||||
);
|
||||
creation_date date);
|
||||
|
||||
CREATE TABLE USER (
|
||||
id INTEGER NOT NULL IDENTITY PRIMARY KEY,
|
||||
id INTEGER NOT NULL IDENTITY,
|
||||
colaborator_id INTEGER NOT NULL,
|
||||
username varchar(255) NOT NULL,
|
||||
firstname varchar(255) NOT NULL,
|
||||
@@ -18,12 +17,11 @@ FOREIGN KEY(colaborator_id) REFERENCES colaborator(id)
|
||||
) ;
|
||||
|
||||
CREATE TABLE MINDMAP (
|
||||
id INTEGER NOT NULL IDENTITY PRIMARY KEY,
|
||||
id INTEGER NOT NULL IDENTITY,
|
||||
title VARCHAR(255) NOT NULL,
|
||||
description VARCHAR(255) NOT NULL,
|
||||
xml LONGVARBINARY NOT NULL,
|
||||
public BOOLEAN not null,
|
||||
mindMapNative_id INTEGER NOT NULL,
|
||||
creation_date date,
|
||||
edition_date date,
|
||||
owner_id INTEGER not null,
|
||||
@@ -32,44 +30,34 @@ last_editor varchar(255) ,
|
||||
creator_user varchar(255) ,
|
||||
editor_properties varchar(512)
|
||||
--FOREIGN KEY(owner_id) REFERENCES USER(colaborator_id)
|
||||
) ;
|
||||
|
||||
CREATE TABLE MINDMAP_NATIVE
|
||||
(
|
||||
id INTEGER NOT NULL IDENTITY PRIMARY KEY,
|
||||
svg_xml LONGVARBINARY,
|
||||
vml_xml LONGVARBINARY
|
||||
) ;
|
||||
);
|
||||
|
||||
CREATE TABLE MINDMAP_HISTORY
|
||||
(
|
||||
id INTEGER NOT NULL IDENTITY PRIMARY KEY,
|
||||
(id INTEGER NOT NULL IDENTITY,
|
||||
xml LONGVARBINARY NOT NULL,
|
||||
mindmap_id INTEGER NOT NULL,
|
||||
creation_date datetime,
|
||||
creator_user varchar(255)
|
||||
) ;
|
||||
creator_user varchar(255));
|
||||
|
||||
CREATE TABLE MINDMAP_COLABORATOR (
|
||||
id INTEGER NOT NULL IDENTITY PRIMARY KEY,
|
||||
CREATE TABLE MINDMAP_COLABORATOR
|
||||
(id INTEGER NOT NULL IDENTITY,
|
||||
colaborator_id INTEGER NOT NULL,
|
||||
mindmap_id INTEGER NOT NULL,
|
||||
role_id INTEGER NOT NULL,
|
||||
FOREIGN KEY(colaborator_id) REFERENCES colaborator(id),
|
||||
FOREIGN KEY(mindmap_id) REFERENCES mindmap(id)
|
||||
) ;
|
||||
);
|
||||
|
||||
CREATE TABLE TAG(
|
||||
id INTEGER NOT NULL IDENTITY PRIMARY KEY,
|
||||
CREATE TABLE TAG
|
||||
(id INTEGER NOT NULL IDENTITY,
|
||||
name varchar(255) NOT NULL,
|
||||
user_id INTEGER NOT NULL
|
||||
user_id INTEGER NOT NULL,
|
||||
--FOREIGN KEY(user_id) REFERENCES user(colaborator_id)
|
||||
);
|
||||
|
||||
CREATE TABLE USER_LOGIN (
|
||||
id INTEGER NOT NULL IDENTITY PRIMARY KEY,
|
||||
email varchar(255) ,
|
||||
login_date date
|
||||
) ;
|
||||
CREATE TABLE USER_LOGIN
|
||||
(id INTEGER NOT NULL IDENTITY,
|
||||
email varchar(255),
|
||||
login_date date);
|
||||
COMMIT;
|
||||
SHUTDOWN;
|
@@ -1,5 +1,4 @@
|
||||
DROP TABLE TAG;
|
||||
DROP TABLE MINDMAP_NATIVE;
|
||||
DROP TABLE MINDMAP_COLABORATOR;
|
||||
DROP TABLE MINDMAP_HISTORY;
|
||||
DROP TABLE MINDMAP;
|
||||
|
@@ -1,5 +1,5 @@
|
||||
INSERT INTO COLABORATOR(id,email,creation_date) values (1,'test@wisemapping.org',CURDATE());
|
||||
INSERT INTO USER (colaborator_id,username,firstname, lastname, password, activationCode,activation_date,allowSendEmail)
|
||||
values(1,'Wise Mapping Test User','Wise','test', 'ENC:a94a8fe5ccb19ba61c4c0873d391e987982fbbd3',1237,CURDATE(),1);
|
||||
values(1,'WiseMapping Test User','Wise','test', 'ENC:a94a8fe5ccb19ba61c4c0873d391e987982fbbd3',1237,CURDATE(),1);
|
||||
COMMIT;
|
||||
SHUTDOWN;
|
@@ -23,7 +23,6 @@ title varchar(255) CHARACTER SET utf8 NOT NULL,
|
||||
description varchar(255) CHARACTER SET utf8 NOT NULL,
|
||||
xml blob NOT NULL,
|
||||
public BOOL not null default 0,
|
||||
mindMapNative_id INTEGER NOT NULL default 0,
|
||||
creation_date date,
|
||||
edition_date date,
|
||||
owner_id INTEGER not null,
|
||||
@@ -34,13 +33,6 @@ editor_properties varchar(512) CHARACTER SET utf8 ,
|
||||
FOREIGN KEY(owner_id) REFERENCES USER(colaborator_id)
|
||||
) CHARACTER SET utf8 ;
|
||||
|
||||
CREATE TABLE MINDMAP_NATIVE
|
||||
(
|
||||
id INTEGER NOT NULL PRIMARY KEY AUTO_INCREMENT,
|
||||
svg_xml blob,
|
||||
vml_xml blob
|
||||
) CHARACTER SET utf8 ;
|
||||
|
||||
CREATE TABLE MINDMAP_HISTORY
|
||||
(
|
||||
id INTEGER NOT NULL PRIMARY KEY AUTO_INCREMENT,
|
||||
|
@@ -1,5 +1,4 @@
|
||||
DROP TABLE TAG;
|
||||
DROP TABLE MINDMAP_NATIVE;
|
||||
DROP TABLE MINDMAP_COLABORATOR;
|
||||
DROP TABLE MINDMAP_HISTORY;
|
||||
DROP TABLE MINDMAP;
|
||||
|
@@ -1,4 +1,4 @@
|
||||
INSERT INTO COLABORATOR(id,email,creation_date) values (1,'test@wisemapping.org',CURRENT_DATE());
|
||||
INSERT INTO USER (colaborator_id,username,firstname, lastname, password, activationCode,activation_date,allowSendEmail)
|
||||
values(1,'Wise Mapping Test User','Wise','Test', 'ENC:a94a8fe5ccb19ba61c4c0873d391e987982fbbd3',1237,CURRENT_DATE(),1);
|
||||
values(1,'WiseMapping Test User','Wise','Test', 'ENC:a94a8fe5ccb19ba61c4c0873d391e987982fbbd3',1237,CURRENT_DATE(),1);
|
||||
COMMIT;
|
||||
|
Reference in New Issue
Block a user