1 | /** |
---|
2 | * This software is copyright (c) 2012-2022 by |
---|
3 | * - Leibniz-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 Leibniz-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 | import java.util.List; |
---|
20 | |
---|
21 | import eu.clarin.sru.client.SRURecordData; |
---|
22 | |
---|
23 | |
---|
24 | /** |
---|
25 | * A record data implementation for legacy CLARIN-FCS. |
---|
26 | * |
---|
27 | * @deprecated Only use to talk to legacy clients |
---|
28 | */ |
---|
29 | @Deprecated |
---|
30 | public final class LegacyClarinFCSRecordData implements SRURecordData { |
---|
31 | /** |
---|
32 | * The legacy record schema for CLARIN-FCS records. |
---|
33 | * |
---|
34 | */ |
---|
35 | public static final String RECORD_SCHEMA = "http://clarin.eu/fcs/1.0"; |
---|
36 | private final Resource resource; |
---|
37 | |
---|
38 | |
---|
39 | LegacyClarinFCSRecordData(String pid, String ref, List<DataView> dataviews, |
---|
40 | List<Resource.ResourceFragment> resourceFragments) { |
---|
41 | this.resource = new Resource(pid, ref, dataviews, resourceFragments); |
---|
42 | } |
---|
43 | |
---|
44 | |
---|
45 | @Override |
---|
46 | public boolean isTransient() { |
---|
47 | return false; |
---|
48 | } |
---|
49 | |
---|
50 | |
---|
51 | @Override |
---|
52 | public String getRecordSchema() { |
---|
53 | return RECORD_SCHEMA; |
---|
54 | } |
---|
55 | |
---|
56 | |
---|
57 | /** |
---|
58 | * Get the CLARIN-FCS record resource. |
---|
59 | * |
---|
60 | * @return a {@link Resource} object |
---|
61 | */ |
---|
62 | public Resource getResource() { |
---|
63 | return resource; |
---|
64 | } |
---|
65 | |
---|
66 | } // class LegacyClarinFCSRecordData |
---|