1 |
eff8ec56
|
Vojtěch Bartička
|
using Models.Annotations;
|
2 |
830652de
|
Vojtěch Bartička
|
using Models.Documents;
|
3 |
a6675a6d
|
Vojtěch Bartička
|
using Models.Enums;
|
4 |
eff8ec56
|
Vojtěch Bartička
|
using System;
|
5 |
|
|
using System.Collections.Generic;
|
6 |
|
|
using System.Linq;
|
7 |
|
|
using System.Text;
|
8 |
|
|
using System.Threading.Tasks;
|
9 |
|
|
|
10 |
|
|
namespace Core.Services.AnnotationService
|
11 |
|
|
{
|
12 |
|
|
public interface IAnnotationService
|
13 |
|
|
{
|
14 |
a35cb648
|
Vojtěch Bartička
|
/// <summary>
|
15 |
|
|
/// Assign users to documents
|
16 |
|
|
/// </summary>
|
17 |
|
|
/// <param name="request"></param>
|
18 |
|
|
/// <param name="userId"></param>
|
19 |
eff8ec56
|
Vojtěch Bartička
|
public void CreateDocumentAnnotations(AnnotationsAddRequest request, Guid userId);
|
20 |
a35cb648
|
Vojtěch Bartička
|
/// <summary>
|
21 |
|
|
/// Given user, return their annotations
|
22 |
|
|
/// </summary>
|
23 |
|
|
/// <param name="userId"></param>
|
24 |
|
|
/// <returns></returns>
|
25 |
6bdb3d95
|
Vojtěch Bartička
|
public AnnotationListResponse GetUserAnnotations(Guid userId);
|
26 |
a35cb648
|
Vojtěch Bartička
|
/// <summary>
|
27 |
|
|
/// Return given annotation
|
28 |
|
|
/// </summary>
|
29 |
|
|
/// <param name="annotationId"></param>
|
30 |
|
|
/// <param name="userId"></param>
|
31 |
|
|
/// <param name="userRole"></param>
|
32 |
|
|
/// <param name="isFinal">is it final annotation or standard annotation</param>
|
33 |
|
|
/// <returns></returns>
|
34 |
83d4581e
|
Vojtěch Bartička
|
public AnnotationInfo GetAnnotation(Guid annotationId, Guid userId, ERole userRole, bool isFinal);
|
35 |
a35cb648
|
Vojtěch Bartička
|
/// <summary>
|
36 |
|
|
/// Adds a tag to an annotation
|
37 |
|
|
/// </summary>
|
38 |
|
|
/// <param name="annotationId"></param>
|
39 |
|
|
/// <param name="userId"></param>
|
40 |
|
|
/// <param name="userRole"></param>
|
41 |
|
|
/// <param name="request"></param>
|
42 |
|
|
/// <param name="isFinal">is it final annotation or standard annotation</param>
|
43 |
83d4581e
|
Vojtěch Bartička
|
public void AddAnnotationInstance(Guid annotationId, Guid userId, ERole userRole, AnnotationInstanceAddRequest request, bool isFinal);
|
44 |
a35cb648
|
Vojtěch Bartička
|
/// <summary>
|
45 |
|
|
/// Remove a tag from annotation
|
46 |
|
|
/// </summary>
|
47 |
|
|
/// <param name="annotationId"></param>
|
48 |
|
|
/// <param name="tagInstanceId"></param>
|
49 |
|
|
/// <param name="loggedUserId"></param>
|
50 |
|
|
/// <param name="userRole"></param>
|
51 |
|
|
/// <param name="isFinal">is it final annotation or standard annotation</param>
|
52 |
83d4581e
|
Vojtěch Bartička
|
public void DeleteAnnotationInstance(Guid annotationId, Guid tagInstanceId, Guid loggedUserId, ERole userRole, bool isFinal);
|
53 |
a35cb648
|
Vojtěch Bartička
|
/// <summary>
|
54 |
|
|
/// Add note to annotation
|
55 |
|
|
/// </summary>
|
56 |
|
|
/// <param name="annotationId"></param>
|
57 |
|
|
/// <param name="userId"></param>
|
58 |
|
|
/// <param name="userRole"></param>
|
59 |
|
|
/// <param name="request"></param>
|
60 |
|
|
/// <param name="isFinal">is it final annotation or standard annotation</param>
|
61 |
83d4581e
|
Vojtěch Bartička
|
public void AddNoteToAnnotation(Guid annotationId, Guid userId, ERole userRole, AddNoteToAnnotationRequest request, bool isFinal);
|
62 |
a35cb648
|
Vojtěch Bartička
|
/// <summary>
|
63 |
|
|
/// Set sentiment of a tag
|
64 |
|
|
/// </summary>
|
65 |
|
|
/// <param name="annotationId"></param>
|
66 |
|
|
/// <param name="instanceId"></param>
|
67 |
|
|
/// <param name="userId"></param>
|
68 |
|
|
/// <param name="userRole"></param>
|
69 |
|
|
/// <param name="sentiment"></param>
|
70 |
|
|
/// <param name="isFinal">is it final annotation or standard annotation</param>
|
71 |
83d4581e
|
Vojtěch Bartička
|
public void SetTagInstanceSentiment(Guid annotationId, Guid instanceId, Guid userId, ERole userRole, ETagSentiment sentiment, bool isFinal);
|
72 |
a35cb648
|
Vojtěch Bartička
|
/// <summary>
|
73 |
|
|
/// Set the annotation state to DONE or IN_PROGRESS
|
74 |
|
|
/// </summary>
|
75 |
|
|
/// <param name="annotationId"></param>
|
76 |
|
|
/// <param name="userId"></param>
|
77 |
|
|
/// <param name="userRole"></param>
|
78 |
|
|
/// <param name="done">is it DONE or not</param>
|
79 |
|
|
/// <param name="isFinal"is it final annotation or standard annotation></param>
|
80 |
83d4581e
|
Vojtěch Bartička
|
public void MarkAnnotationAsDone(Guid annotationId, Guid userId, ERole userRole, bool done, bool isFinal);
|
81 |
a35cb648
|
Vojtěch Bartička
|
/// <summary>
|
82 |
|
|
/// Creates a final annotation
|
83 |
|
|
/// </summary>
|
84 |
|
|
/// <param name="documentId"></param>
|
85 |
|
|
/// <param name="userId"></param>
|
86 |
|
|
/// <returns>ID of the final annotation</returns>
|
87 |
440997e0
|
Vojtěch Bartička
|
public Guid CreateFinalAnnotation(Guid documentId, Guid userId);
|
88 |
a35cb648
|
Vojtěch Bartička
|
/// <summary>
|
89 |
|
|
/// Performs an export
|
90 |
|
|
/// </summary>
|
91 |
|
|
/// <param name="request"></param>
|
92 |
|
|
/// <returns>ZIP memory stream</returns>
|
93 |
830652de
|
Vojtěch Bartička
|
public MemoryStream Export(ExportRequest request);
|
94 |
a35cb648
|
Vojtěch Bartička
|
/// <summary>
|
95 |
|
|
/// Marks tag as final
|
96 |
|
|
/// </summary>
|
97 |
|
|
/// <param name="annotationId"></param>
|
98 |
|
|
/// <param name="occurenceId"></param>
|
99 |
|
|
/// <param name="isFinal">is the tag final or not</param>
|
100 |
df202176
|
Vojtěch Bartička
|
public void SetTagIsFinal(Guid annotationId, Guid occurenceId, bool isFinal);
|
101 |
eff8ec56
|
Vojtěch Bartička
|
}
|
102 |
|
|
}
|