1 | /** |
---|
2 | * This software is copyright (c) 2012-2013 by |
---|
3 | * - Institut fuer Deutsche Sprache (http://www.ids-mannheim.de) |
---|
4 | * This is free software. You can redistribute it |
---|
5 | * and/or modify it under the terms described in |
---|
6 | * the GNU General Public License v3 of which you |
---|
7 | * should have received a copy. Otherwise you can download |
---|
8 | * it from |
---|
9 | * |
---|
10 | * http://www.gnu.org/licenses/gpl-3.0.txt |
---|
11 | * |
---|
12 | * @copyright Institut fuer Deutsche Sprache (http://www.ids-mannheim.de) |
---|
13 | * |
---|
14 | * @license http://www.gnu.org/licenses/gpl-3.0.txt |
---|
15 | * GNU General Public License v3 |
---|
16 | */ |
---|
17 | package eu.clarin.sru.client.fcs; |
---|
18 | |
---|
19 | /** |
---|
20 | * A CLARIN-FCS KWIC DataView. |
---|
21 | */ |
---|
22 | public final class DataViewKWIC extends DataView { |
---|
23 | /** |
---|
24 | * The MIME type for CLARIN-FCS KWIC data views. |
---|
25 | */ |
---|
26 | public static final String TYPE = "application/x-clarin-fcs-kwic+xml"; |
---|
27 | private final String left; |
---|
28 | private final String keyword; |
---|
29 | private final String right; |
---|
30 | |
---|
31 | |
---|
32 | /** |
---|
33 | * Constructor. |
---|
34 | * |
---|
35 | * @param pid |
---|
36 | * a persistent identifier or <code>null</code> |
---|
37 | * @param ref |
---|
38 | * a reference URI or <code>null</code> |
---|
39 | * @param left |
---|
40 | * the left KWIC context |
---|
41 | * @param keyword |
---|
42 | * the matched KWIC context |
---|
43 | * @param right |
---|
44 | * the right KWIC context |
---|
45 | */ |
---|
46 | DataViewKWIC(String pid, String ref, String left, String keyword, |
---|
47 | String right) { |
---|
48 | super(TYPE, pid, ref); |
---|
49 | this.left = (left != null) ? left : ""; |
---|
50 | this.keyword = (keyword != null) ? keyword : ""; |
---|
51 | this.right = (right != null) ? right : ""; |
---|
52 | } |
---|
53 | |
---|
54 | |
---|
55 | /** |
---|
56 | * Get the left KWIC context. |
---|
57 | * |
---|
58 | * @return the left KWIC context |
---|
59 | */ |
---|
60 | public String getLeft() { |
---|
61 | return left; |
---|
62 | } |
---|
63 | |
---|
64 | |
---|
65 | /** |
---|
66 | * Get the matched KWIC context. |
---|
67 | * |
---|
68 | * @return the matched KWIC context |
---|
69 | */ |
---|
70 | public String getKeyword() { |
---|
71 | return keyword; |
---|
72 | } |
---|
73 | |
---|
74 | |
---|
75 | /** |
---|
76 | * Get the right KWIC context. |
---|
77 | * |
---|
78 | * @return the right KWIC context |
---|
79 | */ |
---|
80 | public String getRight() { |
---|
81 | return right; |
---|
82 | } |
---|
83 | |
---|
84 | } // class DataViewKWIC |
---|