1
|
using Models.Annotations;
|
2
|
using Models.Documents;
|
3
|
using Models.Enums;
|
4
|
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
|
/// <summary>
|
15
|
/// Assign users to documents
|
16
|
/// </summary>
|
17
|
/// <param name="request"></param>
|
18
|
/// <param name="userId"></param>
|
19
|
public void CreateDocumentAnnotations(AnnotationsAddRequest request, Guid userId);
|
20
|
/// <summary>
|
21
|
/// Given user, return their annotations
|
22
|
/// </summary>
|
23
|
/// <param name="userId"></param>
|
24
|
/// <returns></returns>
|
25
|
public AnnotationListResponse GetUserAnnotations(Guid userId);
|
26
|
/// <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
|
public AnnotationInfo GetAnnotation(Guid annotationId, Guid userId, ERole userRole, bool isFinal);
|
35
|
/// <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
|
public void AddAnnotationInstance(Guid annotationId, Guid userId, ERole userRole, AnnotationInstanceAddRequest request, bool isFinal);
|
44
|
/// <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
|
public void DeleteAnnotationInstance(Guid annotationId, Guid tagInstanceId, Guid loggedUserId, ERole userRole, bool isFinal);
|
53
|
/// <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
|
public void AddNoteToAnnotation(Guid annotationId, Guid userId, ERole userRole, AddNoteToAnnotationRequest request, bool isFinal);
|
62
|
/// <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
|
public void SetTagInstanceSentiment(Guid annotationId, Guid instanceId, Guid userId, ERole userRole, ETagSentiment sentiment, bool isFinal);
|
72
|
/// <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
|
public void MarkAnnotationAsDone(Guid annotationId, Guid userId, ERole userRole, bool done, bool isFinal);
|
81
|
/// <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
|
public Guid CreateFinalAnnotation(Guid documentId, Guid userId);
|
88
|
/// <summary>
|
89
|
/// Performs an export
|
90
|
/// </summary>
|
91
|
/// <param name="request"></param>
|
92
|
/// <returns>ZIP memory stream</returns>
|
93
|
public MemoryStream Export(ExportRequest request);
|
94
|
/// <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
|
public void SetTagIsFinal(Guid annotationId, Guid occurenceId, bool isFinal);
|
101
|
}
|
102
|
}
|