1 | /* |
---|
2 | * Copyright (C) 2013 DASISH |
---|
3 | * |
---|
4 | * This program is free software; you can redistribute it and/or |
---|
5 | * modify it under the terms of the GNU General Public License |
---|
6 | * as published by the Free Software Foundation; either version 2 |
---|
7 | * of the License, or (at your option) any later version. |
---|
8 | * |
---|
9 | * This program is distributed in the hope that it will be useful, |
---|
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
---|
12 | * GNU General Public License for more details. |
---|
13 | * |
---|
14 | * You should have received a copy of the GNU General Public License |
---|
15 | * along with this program; if not, write to the Free Software |
---|
16 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
---|
17 | */ |
---|
18 | package eu.dasish.annotation.backend.dao; |
---|
19 | |
---|
20 | import java.util.UUID; |
---|
21 | |
---|
22 | /** |
---|
23 | * |
---|
24 | * @author olhsha |
---|
25 | */ |
---|
26 | public interface ResourceDao { |
---|
27 | |
---|
28 | |
---|
29 | public void setServiceURI(String serviceURI); |
---|
30 | |
---|
31 | /** |
---|
32 | * |
---|
33 | * @param externalID |
---|
34 | * @return internal identifier of the reTarget with externalID, or null if there is no reTarget with this identifier |
---|
35 | */ |
---|
36 | public Number getInternalID(UUID externalId); |
---|
37 | |
---|
38 | |
---|
39 | /** |
---|
40 | * |
---|
41 | * @param uri |
---|
42 | * @return internal identifier of the reTarget with uri, or null if there is no reTarget with this uri |
---|
43 | */ |
---|
44 | public Number getInternalIDFromURI(String uri); |
---|
45 | |
---|
46 | /** |
---|
47 | * |
---|
48 | * @param internalId |
---|
49 | * @return the UUID (external ID) of the reTarget with the "internalID". |
---|
50 | */ |
---|
51 | public UUID getExternalID(Number internalId); |
---|
52 | |
---|
53 | /** |
---|
54 | * |
---|
55 | * @param externalID |
---|
56 | * @return returns the URI which is a concatenation of the serviceURI and externalID |
---|
57 | */ |
---|
58 | public String externalIDtoURI(String externalID); |
---|
59 | |
---|
60 | /** |
---|
61 | * |
---|
62 | * @param stringURI |
---|
63 | * @return returns the extranlID which is a suffix of stringURI |
---|
64 | */ |
---|
65 | public String stringURItoExternalID(String stringURI); |
---|
66 | |
---|
67 | /** |
---|
68 | * |
---|
69 | * @param internalID |
---|
70 | * @return URI string of the resource )of the type set in resourceTableName) with internalID |
---|
71 | */ |
---|
72 | public String getURIFromInternalID(Number internalID); |
---|
73 | } |
---|