1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.codelibs.fess.ingest;
17
18 import java.util.Map;
19
20 import org.codelibs.fess.crawler.entity.AccessResult;
21 import org.codelibs.fess.crawler.entity.ResponseData;
22 import org.codelibs.fess.crawler.entity.ResultData;
23 import org.codelibs.fess.util.ComponentUtil;
24
25 public abstract class Ingester {
26
27 protected int priority = 99;
28
29 public int getPriority() {
30 return priority;
31 }
32
33 public void setPriority(final int priority) {
34 this.priority = priority;
35 }
36
37 public void register() {
38 ComponentUtil.getIngestFactory().add(this);
39 }
40
41
42 public ResultData process(final ResultData target, final ResponseData responseData) {
43 return target;
44 }
45
46
47 public Map<String, Object> process(final Map<String, Object> target, final AccessResult<String> accessResult) {
48 return process(target);
49 }
50
51
52 public Map<String, Object> process(final Map<String, Object> target, final Map<String, String> params) {
53 return process(target);
54 }
55
56 protected Map<String, Object> process(final Map<String, Object> target) {
57 return target;
58 }
59
60 }