changeset 56:dd8348304dba

Topic synchronization with extraction-interface. new tables in LGService database
author Zoe Hong <zhong@mpiwg-berlin.mpg.de>
date Tue, 16 Feb 2016 15:14:18 +0100
parents 95bf4ac726e6
children 5cbe567a9c52
files src/main/java/de/mpiwg/gazetteer/bo/LGTaglist.java src/main/java/de/mpiwg/gazetteer/bo/LGTopicTagRelation.java src/main/webapp/resources/images/.DS_Store
diffstat 3 files changed, 205 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/main/java/de/mpiwg/gazetteer/bo/LGTaglist.java	Tue Feb 16 15:14:18 2016 +0100
@@ -0,0 +1,103 @@
+package de.mpiwg.gazetteer.bo;
+
+import java.io.Serializable;
+import java.sql.SQLException;
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.persistence.Column;
+import javax.persistence.Entity;
+import javax.persistence.Inheritance;
+import javax.persistence.InheritanceType;
+import javax.persistence.Table;
+import javax.persistence.Transient;
+
+import org.json.JSONArray;
+
+import cl.maps.duplex.DuplexKey;
+import de.mpiwg.gazetteer.dataverse.DataverseUtils;
+import de.mpiwg.gazetteer.db.DBBook;
+import de.mpiwg.gazetteer.db.DBSection;
+import de.mpiwg.gazetteer.utils.DBService;
+import de.mpiwg.gazetteer.utils.DataProvider;
+
+
+@Entity
+@Table(name="Taglist")
+@Inheritance(strategy=InheritanceType.TABLE_PER_CLASS)
+public class LGTaglist extends DBEntry implements Cloneable, Serializable {
+	private static final long serialVersionUID = 7805209462045170778L;
+
+
+	@Column(name="name")
+	private String name;
+
+	@Column(name="tag")
+	private String tag;
+	
+	@Column(name="color")
+	private String color;
+
+
+	
+	
+	public boolean isEmpty() {
+		if (name.equals("")) {
+			return true;
+		} else {
+			return false;
+		}
+	}
+
+
+	public String getName() {
+		return name;
+	}
+
+	public void setName(String name) {
+		this.name = name;
+	}
+
+
+	public String getTag() {
+		return tag;
+	}
+
+
+	public void setTag(String tag) {
+		this.tag = tag;
+	}
+
+
+	public String getColor() {
+		return color;
+	}
+
+	public void setColor(String color) {
+		this.color = color;
+	}
+
+
+
+
+
+	public DuplexKey<String, Long> getKey(){
+		return new DuplexKey<String, Long>(this.tag, this.id);
+	}
+
+	public String info() {
+		return name;
+	}
+
+	
+	
+	
+	@Override
+	public String toString(){
+		return "LGTaglist[name=" + name + ", tag=" + tag + "]";
+	}
+
+	
+
+	
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/main/java/de/mpiwg/gazetteer/bo/LGTopicTagRelation.java	Tue Feb 16 15:14:18 2016 +0100
@@ -0,0 +1,102 @@
+package de.mpiwg.gazetteer.bo;
+
+import java.io.Serializable;
+import java.sql.SQLException;
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+
+import javax.persistence.Column;
+import javax.persistence.Entity;
+import javax.persistence.Inheritance;
+import javax.persistence.InheritanceType;
+import javax.persistence.Table;
+import javax.persistence.Temporal;
+import javax.persistence.TemporalType;
+import javax.persistence.Transient;
+
+import org.json.JSONArray;
+
+import cl.maps.duplex.DuplexKey;
+import de.mpiwg.gazetteer.dataverse.DataverseUtils;
+import de.mpiwg.gazetteer.db.DBBook;
+import de.mpiwg.gazetteer.db.DBSection;
+import de.mpiwg.gazetteer.utils.DBService;
+import de.mpiwg.gazetteer.utils.DataProvider;
+
+
+@Entity
+@Table(name="TopicTagRelation")
+@Inheritance(strategy=InheritanceType.TABLE_PER_CLASS)
+public class LGTopicTagRelation extends DBEntry implements Cloneable, Serializable {
+
+	private static final long serialVersionUID = 7805209462045170778L;
+
+	
+	@Column(name="tagId")
+	protected Long tagId;
+
+	@Column(name="topicId")
+	protected Long topicId;
+
+
+	
+	public boolean isEmpty() {
+		if (topicId == 0) {
+			return true;
+		} else {
+			return false;
+		}
+	}
+
+
+
+
+	public Long getTagId() {
+		return tagId;
+	}
+
+
+
+
+	public void setTagId(Long tagId) {
+		this.tagId = tagId;
+	}
+
+
+
+
+	public Long getTopicId() {
+		return topicId;
+	}
+
+
+
+
+	public void setTopicId(Long topicId) {
+		this.topicId = topicId;
+	}
+
+
+
+
+	public DuplexKey<Long, Long> getKey(){
+		return new DuplexKey<Long, Long>(this.tagId, this.id);
+	}
+
+	public String info() {
+		return "topicId= "+ topicId+ ", tagId=" + tagId;
+	}
+
+	
+	
+	
+	@Override
+	public String toString(){
+		return "LGTopicTagRelation[topicId=" + topicId + ", tagId=" + tagId + "]";
+	}
+
+	
+
+	
+}
Binary file src/main/webapp/resources/images/.DS_Store has changed