diff --git a/distribution/mysql-init/0002create-schemas.sql b/distribution/mysql-init/0002create-schemas.sql index eba00226..51d391ba 100644 --- a/distribution/mysql-init/0002create-schemas.sql +++ b/distribution/mysql-init/0002create-schemas.sql @@ -113,17 +113,6 @@ CREATE TABLE COLLABORATION ( ) 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) - ON DELETE CASCADE - ON UPDATE NO ACTION -) - CHARACTER SET utf8; - CREATE TABLE ACCESS_AUDITORY ( id INTEGER NOT NULL PRIMARY KEY AUTO_INCREMENT, login_date DATE, diff --git a/wise-webapp/src/main/java/com/wisemapping/model/Collaboration.java b/wise-webapp/src/main/java/com/wisemapping/model/Collaboration.java index 630776f9..40d892b8 100644 --- a/wise-webapp/src/main/java/com/wisemapping/model/Collaboration.java +++ b/wise-webapp/src/main/java/com/wisemapping/model/Collaboration.java @@ -19,8 +19,6 @@ package com.wisemapping.model; -import org.hibernate.annotations.Fetch; -import org.hibernate.annotations.FetchMode; import org.jetbrains.annotations.Nullable; import javax.persistence.*; diff --git a/wise-webapp/src/main/java/com/wisemapping/model/Collaborator.java b/wise-webapp/src/main/java/com/wisemapping/model/Collaborator.java index bf1d1c2e..02e507b7 100755 --- a/wise-webapp/src/main/java/com/wisemapping/model/Collaborator.java +++ b/wise-webapp/src/main/java/com/wisemapping/model/Collaborator.java @@ -105,7 +105,7 @@ public class Collaborator implements Serializable { int id = this.getId(); String email = this.getEmail(); - int result = (int) (id ^ (id >>> 32)); + int result = id ^ (id >>> 32); result = 31 * result + (email != null ? email.hashCode() : 0); return result; } diff --git a/wise-webapp/src/main/java/com/wisemapping/model/Mindmap.java b/wise-webapp/src/main/java/com/wisemapping/model/Mindmap.java index 0b2052ff..e134d514 100644 --- a/wise-webapp/src/main/java/com/wisemapping/model/Mindmap.java +++ b/wise-webapp/src/main/java/com/wisemapping/model/Mindmap.java @@ -83,13 +83,9 @@ public class Mindmap implements Serializable { @Basic(fetch = FetchType.LAZY) private byte[] zippedXml; - //~ Constructors ......................................................................................... - public Mindmap() { } - //~ Methods .............................................................................................. - public void setUnzipXml(@NotNull byte[] value) { try { final byte[] zip = ZipUtils.bytesToZip(value); @@ -318,11 +314,20 @@ public class Mindmap implements Serializable { final StringBuilder result = new StringBuilder(); result.append(""); result.append(""); return result.toString(); } + static private String escapeXmlAttribute(String attValue) { + // Hack: Find out of the box function. + String result = attValue.replace("&", "&"); + result = result.replace("<", "<"); + result = result.replace("gt", ">"); + result = result.replace("\"", """); + return result; + } + public Mindmap shallowClone() { final Mindmap result = new Mindmap(); result.setDescription(this.getDescription()); @@ -353,18 +358,6 @@ public class Mindmap implements Serializable { return false; } - @Nullable - public Label findLabel(int labelId) { - Label result = null; - for (Label label : this.labels) { - if (label.getId() == labelId) { - result = label; - break; - } - } - return result; - } - public void removeLabel(@NotNull final Label label) { this.labels.remove(label); }