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 | |
---|
21 | import eu.dasish.annotation.schema.Permission; |
---|
22 | import eu.dasish.annotation.schema.ReferenceList; |
---|
23 | import eu.dasish.annotation.schema.Notebook; |
---|
24 | import eu.dasish.annotation.schema.NotebookInfo; |
---|
25 | import java.util.List; |
---|
26 | import java.util.UUID; |
---|
27 | |
---|
28 | /** |
---|
29 | * Created on : Jun 12, 2013, 1:40:09 PM |
---|
30 | * |
---|
31 | * @author Peter Withers <peter.withers@mpi.nl> |
---|
32 | */ |
---|
33 | |
---|
34 | // TODO: not yet fully updated. |
---|
35 | |
---|
36 | public interface NotebookDao extends ResourceDao { |
---|
37 | |
---|
38 | |
---|
39 | /** |
---|
40 | * |
---|
41 | * GETTERS |
---|
42 | * |
---|
43 | */ |
---|
44 | // Returns a list of notebook Ids for the notebooks for which the given user "userID' has "permission" access. |
---|
45 | List<Number> getNotebookIDs(Number userID, Permission acessMode); |
---|
46 | |
---|
47 | // Returns a list of notebook Ids for the notebooks for which the given user "userID" is the owner. |
---|
48 | List<Number> getOwnerNotebookIDs(Number userID); |
---|
49 | |
---|
50 | /** |
---|
51 | * |
---|
52 | * @param notebookID |
---|
53 | * @return the notebook info for the notebook with notebookID |
---|
54 | */ |
---|
55 | NotebookInfo getNotebookInfo(Number notebookID); |
---|
56 | |
---|
57 | /** |
---|
58 | * |
---|
59 | * @param notebookID |
---|
60 | * @return notebook metadata for the notebook with notebookID |
---|
61 | */ |
---|
62 | Notebook getNotebookWithoutAnnotationsAndPermissions(Number notebookID); |
---|
63 | |
---|
64 | |
---|
65 | // Returns the list of all notebooks owned by the current logged user. |
---|
66 | //List<Notebook> getUsersNotebooks(UUID userID); |
---|
67 | |
---|
68 | |
---|
69 | // Returns the list of annotation Id-s for the notebook id. |
---|
70 | //public List<Number> getAnnotationIDs(Number notebookID); |
---|
71 | |
---|
72 | /*Returns the list of annotation info-s for the notebook id. |
---|
73 | /List<AnnotationInfo> getAnnotationInfosOfNotebook(Number notebookID); */ |
---|
74 | |
---|
75 | // Returns the list of annotations Id-s for the notebook id. |
---|
76 | //public List<String> getAnnotationREFsOfNotebook(Number notebookID); |
---|
77 | |
---|
78 | // Returns the Annotations object for the notebook id. |
---|
79 | //public ReferenceList getAnnotations(Number notebookID); |
---|
80 | |
---|
81 | /** |
---|
82 | * |
---|
83 | * @param notebookID |
---|
84 | * @return the Notebook information (title, owner (?), time_stamp(?), amount of annotations(?), their headlines (?) // TODO: discuss changing in the schema |
---|
85 | * user in getting the metadata of a notebook |
---|
86 | */ |
---|
87 | //NotebookInfo getNotebookInfo(Number notebookID); |
---|
88 | |
---|
89 | |
---|
90 | |
---|
91 | /** |
---|
92 | * @param notebookId |
---|
93 | * @return returns the externalIds of the annotations contained in the notebookId |
---|
94 | */ |
---|
95 | //List<UUID> getAnnotationExternalIDs(UUID notebookId); |
---|
96 | |
---|
97 | |
---|
98 | /** |
---|
99 | * |
---|
100 | * ADDERS |
---|
101 | */ |
---|
102 | |
---|
103 | // Creates a new notebook and returns the _nid_ of the created Notebook |
---|
104 | //UUID addNotebook(UUID userID, String title); |
---|
105 | |
---|
106 | // Adds an annotation _aid_ to the list of annotations of _nid_. |
---|
107 | //public int addAnnotation(UUID notebookId, UUID annotationId); |
---|
108 | |
---|
109 | |
---|
110 | |
---|
111 | /** |
---|
112 | * |
---|
113 | * DELETE |
---|
114 | * |
---|
115 | */ |
---|
116 | |
---|
117 | // Delete _nid_. Annotations stay, they just lose connection to _nid_.<br> |
---|
118 | // returns the number of records deleted |
---|
119 | //public int deleteNotebook(UUID notebookId); |
---|
120 | /** |
---|
121 | * |
---|
122 | * @param annotationID |
---|
123 | * @return removes the rows with annotationID from notebooks_annotations table |
---|
124 | */ |
---|
125 | //int removeAnnotation(Number annotationID); |
---|
126 | } |
---|