Added README.txt and GPL Header to Source Files
[DHBWCampusApp.git] / app / src / main / java / de / dhbwloe / campusapp / search / SearchIndices.java
index fe1db98bb2d81a3adddf8d408ddcbbcef2e38d73..0f65c850957aafdd24175c3de598da309c4c1199 100644 (file)
@@ -1,13 +1,31 @@
+/* SearchIndices.java
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
 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 +49,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 +65,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;
     }