Remove trunk directory

This commit is contained in:
Paulo Gustavo Veiga
2009-11-06 23:30:29 -02:00
parent 2494133fed
commit 75470a91fd
715 changed files with 0 additions and 0 deletions

View File

@@ -0,0 +1,100 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* $Id: file 64488 2006-03-10 17:32:09Z paulo $
*/
package com.wisemapping.ws.test;
import org.testng.annotations.Test;
import javax.xml.bind.JAXBContext;
import javax.xml.bind.JAXBException;
import javax.xml.bind.Marshaller;
import java.net.MalformedURLException;
import java.io.StringWriter;
import java.util.List;
import com.wisemapping.ws.*;
@Test(groups = {"wsintegration"})
public class WiseWebServicesTest {
@Test(dependsOnMethods = "addMapTest")
public void loadMapTest() throws MalformedURLException, JAXBException {
final WiseServicesPortTypeService portTypeService = new WiseServicesPortTypeService();
final WiseServicesPortType servicesPortType = portTypeService.getWiseServicesPortTypeSoap11();
final LoadMindmapRequest request = new LoadMindmapRequest();
request.setMapdId(1);
LoadMindmapResponse response = servicesPortType.loadMindmap(request);
JAXBContext jc = JAXBContext.newInstance("com.wisemapping.ws.test");
Marshaller marshaller = jc.createMarshaller();
final StringWriter xmlContext = new StringWriter();
marshaller.marshal(response,xmlContext);
System.out.println("Response:"+xmlContext);
}
public void addMapTest() throws MalformedURLException, JAXBException {
final WiseServicesPortTypeService portTypeService = new WiseServicesPortTypeService();
final WiseServicesPortType servicesPortType = portTypeService.getWiseServicesPortTypeSoap11();
final AddMindmapRequest request = new AddMindmapRequest();
request.setCreator("test@wisemapping.org");
request.setTitle("MyFirstMap");
request.setDescription("My First Map Description");
// Set Map ...
MapType sampleMap = createMockMap();
request.setMap(sampleMap);
AddMindmapResponse response = servicesPortType.addMindmap(request);
JAXBContext jc = JAXBContext.newInstance("com.wisemapping.ws.test");
Marshaller marshaller = jc.createMarshaller();
final StringWriter xmlContext = new StringWriter();
marshaller.marshal(response,xmlContext);
System.out.println("Response:"+xmlContext);
}
private MapType createMockMap() {
ObjectFactory factory = new ObjectFactory();
MapType mapType = factory.createMapType();
mapType.setName("map name");
TopicType topicType = factory.createTopicType();
topicType.setCentral(true);
topicType.setText("Central topic value");
List<TopicType> topics = mapType.getTopic();
topics.add(topicType);
return mapType;
}
}

View File

@@ -0,0 +1,75 @@
CREATE TABLE COLABORATOR (
id INTEGER NOT NULL IDENTITY PRIMARY KEY,
email varchar(255) NOT NULL,
creation_date date
);
CREATE TABLE USER (
id INTEGER NOT NULL IDENTITY PRIMARY KEY,
colaborator_id INTEGER NOT NULL,
username varchar(255) NOT NULL,
firstname varchar(255) NOT NULL,
lastname varchar(255) NOT NULL,
password varchar(255) NOT NULL,
activationCode BIGINT NOT NULL,
activation_date DATE,
allowSendEmail CHAR(1) NOT NULL,
FOREIGN KEY(colaborator_id) REFERENCES colaborator(id)
) ;
CREATE TABLE MINDMAP (
id INTEGER NOT NULL IDENTITY PRIMARY KEY,
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,
tags varchar(1014) ,
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,
xml LONGVARBINARY NOT NULL,
mindmap_id INTEGER NOT NULL,
creation_date datetime,
creator_user varchar(255)
) ;
CREATE TABLE MINDMAP_COLABORATOR (
id INTEGER NOT NULL IDENTITY PRIMARY KEY,
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,
name varchar(255) 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
) ;
COMMIT;
SHUTDOWN;

View File

@@ -0,0 +1,10 @@
DROP TABLE TAG;
DROP TABLE MINDMAP_NATIVE;
DROP TABLE MINDMAP_COLABORATOR;
DROP TABLE MINDMAP_HISTORY;
DROP TABLE MINDMAP;
DROP TABLE USER;
DROP TABLE COLABORATOR;
DROP TABLE USER_LOGIN;
COMMIT;
SHUTDOWN;

View File

@@ -0,0 +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', 'test',1237,CURDATE(),1);
COMMIT;
SHUTDOWN;

View File

@@ -0,0 +1,74 @@
CREATE TABLE COLABORATOR (
id INTEGER NOT NULL PRIMARY KEY AUTO_INCREMENT,
email varchar(255) CHARACTER SET utf8 NOT NULL UNIQUE,
creation_date date
) CHARACTER SET utf8;
CREATE TABLE USER (
id INTEGER NOT NULL PRIMARY KEY AUTO_INCREMENT,
colaborator_id INTEGER NOT NULL,
username varchar(255) CHARACTER SET utf8 NOT NULL,
firstname varchar(255) CHARACTER SET utf8 NOT NULL,
lastname varchar(255) CHARACTER SET utf8 NOT NULL,
password varchar(255) CHARACTER SET utf8 NOT NULL,
activationCode BIGINT(20) NOT NULL,
activation_date date,
allowSendEmail char(1) CHARACTER SET utf8 NOT NULL default 0,
FOREIGN KEY(colaborator_id) REFERENCES colaborator(id)
) CHARACTER SET utf8 ;
CREATE TABLE MINDMAP (
id INTEGER NOT NULL PRIMARY KEY AUTO_INCREMENT,
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,
tags varchar(1014) CHARACTER SET utf8 ,
last_editor varchar(255) CHARACTER SET utf8 ,
creator_user varchar(255) CHARACTER SET utf8 ,
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,
xml blob NOT NULL,
mindmap_id INTEGER NOT NULL,
creation_date datetime,
creator_user varchar(255) CHARACTER SET utf8
) CHARACTER SET utf8 ;
CREATE TABLE MINDMAP_COLABORATOR (
id INTEGER NOT NULL PRIMARY KEY AUTO_INCREMENT,
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)
) CHARACTER SET utf8 ;
CREATE TABLE TAG(
id INTEGER NOT NULL PRIMARY KEY AUTO_INCREMENT,
name varchar(255) CHARACTER SET utf8 NOT NULL,
user_id INTEGER NOT NULL,
FOREIGN KEY(user_id) REFERENCES user(colaborator_id)
) CHARACTER SET utf8 ;
CREATE TABLE USER_LOGIN (
id INTEGER NOT NULL PRIMARY KEY AUTO_INCREMENT,
email varchar(255) CHARACTER SET utf8 ,
login_date date
) CHARACTER SET utf8 ;
COMMIT;

View File

@@ -0,0 +1,9 @@
DROP TABLE TAG;
DROP TABLE MINDMAP_NATIVE;
DROP TABLE MINDMAP_COLABORATOR;
DROP TABLE MINDMAP_HISTORY;
DROP TABLE MINDMAP;
DROP TABLE USER;
DROP TABLE COLABORATOR;
DROP TABLE USER_LOGIN;
COMMIT;

View File

@@ -0,0 +1,4 @@
INSERT INTO COLABORATOR(id,email,creation_date) values (1,'test@wisemapping.com',CURRENT_DATE());
INSERT INTO USER (colaborator_id,username,firstname, lastname, password, activationCode,activation_date,allowSendEmail)
values(1,'Wise Mapping Test User','Wise','Test', 'test',1237,CURRENT_DATE(),1);
COMMIT;