001
014
015 package com.liferay.portal.kernel.search;
016
017 import java.io.File;
018 import java.io.IOException;
019 import java.io.InputStream;
020 import java.io.Serializable;
021
022 import java.text.ParseException;
023
024 import java.util.Date;
025 import java.util.Locale;
026 import java.util.Map;
027
028
032 public interface Document extends Serializable {
033
034 public void add(Field field);
035
036 public void addDate(String name, Date value);
037
038 public void addFile(String name, byte[] bytes, String fileExt)
039 throws IOException;
040
041 public void addFile(String name, File file, String fileExt)
042 throws IOException;
043
044 public void addFile(String name, InputStream is, String fileExt)
045 throws IOException;
046
047 public void addKeyword(String name, boolean value);
048
049 public void addKeyword(String name, Boolean value);
050
051 public void addKeyword(String name, boolean[] values);
052
053 public void addKeyword(String name, Boolean[] values);
054
055 public void addKeyword(String name, double value);
056
057 public void addKeyword(String name, Double value);
058
059 public void addKeyword(String name, double[] values);
060
061 public void addKeyword(String name, Double[] values);
062
063 public void addKeyword(String name, float value);
064
065 public void addKeyword(String name, Float value);
066
067 public void addKeyword(String name, float[] values);
068
069 public void addKeyword(String name, Float[] values);
070
071 public void addKeyword(String name, int value);
072
073 public void addKeyword(String name, int[] values);
074
075 public void addKeyword(String name, Integer value);
076
077 public void addKeyword(String name, Integer[] values);
078
079 public void addKeyword(String name, long value);
080
081 public void addKeyword(String name, Long value);
082
083 public void addKeyword(String name, long[] values);
084
085 public void addKeyword(String name, Long[] values);
086
087 public void addKeyword(String name, short value);
088
089 public void addKeyword(String name, Short value);
090
091 public void addKeyword(String name, short[] values);
092
093 public void addKeyword(String name, Short[] values);
094
095 public void addKeyword(String name, String value);
096
097 public void addKeyword(String name, String value, boolean lowerCase);
098
099 public void addKeyword(String name, String[] values);
100
101 public void addLocalizedKeyword(String name, Map<Locale, String> values);
102
103 public void addLocalizedKeyword(
104 String name, Map<Locale, String> values, boolean lowerCase);
105
106 public void addLocalizedText(String name, Map<Locale, String> values);
107
108
111 public void addModifiedDate();
112
113
116 public void addModifiedDate(Date modifiedDate);
117
118 public void addNumber(String name, double value);
119
120 public void addNumber(String name, Double value);
121
122 public void addNumber(String name, double[] values);
123
124 public void addNumber(String name, Double[] values);
125
126 public void addNumber(String name, float value);
127
128 public void addNumber(String name, Float value);
129
130 public void addNumber(String name, float[] values);
131
132 public void addNumber(String name, Float[] values);
133
134 public void addNumber(String name, int value);
135
136 public void addNumber(String name, int[] values);
137
138 public void addNumber(String name, Integer value);
139
140 public void addNumber(String name, Integer[] values);
141
142 public void addNumber(String name, long value);
143
144 public void addNumber(String name, Long value);
145
146 public void addNumber(String name, long[] values);
147
148 public void addNumber(String name, Long[] values);
149
150 public void addNumber(String name, String value);
151
152 public void addNumber(String name, String[] values);
153
154 public void addText(String name, String value);
155
156 public void addText(String name, String[] values);
157
158 public void addUID(String portletId, long field1);
159
160 public void addUID(String portletId, long field1, String field2);
161
162 public void addUID(String portletId, Long field1);
163
164 public void addUID(String portletId, Long field1, String field2);
165
166 public void addUID(String portletId, String field1);
167
168 public void addUID(String portletId, String field1, String field2);
169
170 public void addUID(
171 String portletId, String field1, String field2, String field3);
172
173 public void addUID(
174 String portletId, String field1, String field2, String field3,
175 String field4);
176
177 public String get(Locale locale, String name);
178
179 public String get(String name);
180
181 public Date getDate(String name) throws ParseException;
182
183 public Map<String, Field> getFields();
184
185 public String getPortletId();
186
187 public String getUID();
188
189 public String[] getValues(String name);
190
191 public void remove(String name);
192
193 }