1 package de.dhbwloe.campusapp.search;
6 * Created by pk910 on 19.01.2016.
8 public class SearchIndices {
9 private String keyname = null;
10 private StringBuffer keywordsBuffer = new StringBuffer();
11 protected boolean isStatic = false;
12 protected String target = new String();
13 protected String keywords = null;
14 protected String title = null;
15 protected String description = null;
16 protected long updateTime = 0;
18 public SearchIndices(String keyname) {
19 this.keyname = keyname;
20 this.updateTime = (new Date()).getTime()/1000;
23 public SearchIndices(String keyname, boolean isStatic) {
24 this.keyname = keyname;
25 this.isStatic = isStatic;
28 public void addKeyWord(String words) {
29 if(keywordsBuffer.length() > 0)
30 keywordsBuffer.append('\n');
31 keywordsBuffer.append(words);
34 public void setTarget(String target) {
38 public void setDescription(String description) {
39 this.description = description;
42 public void setTitle(String title) {
46 public void setUpdateTime(long updateTime) {
47 this.updateTime = updateTime;
50 public String getKeyName() {
54 public String getKeyWords() {
55 return (this.keywords != null ? this.keywords : "") + this.keywordsBuffer.toString();
58 public boolean getIsStatic() {
62 public String getTarget() {
66 public String getDescription() {
67 return this.description;
70 public String getTitle() {
74 public long getUpdateTime() {
75 return this.updateTime;