alpha 0.0.2
[DHBWCampusApp.git] / app / src / main / java / de / dhbwloe / campusapp / search / SearchIndices.java
index fe1db98bb2d81a3adddf8d408ddcbbcef2e38d73..9b4cab5c65667be862449375059d6909c7e0cc14 100644 (file)
@@ -1,13 +1,16 @@
 package de.dhbwloe.campusapp.search;
 
+import java.util.ArrayList;
 import java.util.Date;
 
+import de.dhbwloe.campusapp.CampusAppContext;
+
 /**
  * Created by pk910 on 19.01.2016.
  */
 public class SearchIndices {
     private String keyname = null;
-    private StringBuffer keywordsBuffer = new StringBuffer();
+    private StringBuilder keywordsBuffer = new StringBuilder();
     protected boolean isStatic = false;
     protected String target = new String();
     protected String keywords = null;
@@ -31,6 +34,10 @@ public class SearchIndices {
         keywordsBuffer.append(words);
     }
 
+    public void addKeyWord(int words) {
+        addKeyWord(CampusAppContext.getInstance().getResString(words));
+    }
+
     public void setTarget(String target) {
         this.target = target;
     }
@@ -43,6 +50,14 @@ public class SearchIndices {
         this.title = title;
     }
 
+    public void setDescription(int description) {
+        this.description = CampusAppContext.getInstance().getResString(description);
+    }
+
+    public void setTitle(int title) {
+        this.title = CampusAppContext.getInstance().getResString(title);
+    }
+
     public void setUpdateTime(long updateTime) {
         this.updateTime = updateTime;
     }