-
Notifications
You must be signed in to change notification settings - Fork 32
/
Copy pathClusteringDataAccess_v1.6.avdl
196 lines (164 loc) · 6.81 KB
/
ClusteringDataAccess_v1.6.avdl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
/**
* Copyright (c) 2013 Oculus Info Inc.
* http://www.oculusinfo.com/
*
* Released under the MIT License.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (the "Software"), to deal in
* the Software without restriction, including without limitation the rights to
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
* of the Software, and to permit persons to whom the Software is furnished to do
* so, subject to the following conditions:
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
@namespace("influent.idl")
/**
Data Access for clusters
*/
protocol FL_ClusteringDataAccess {
import idl "DataTypes_v1.6.avdl";
/**
Sort type for transactions
*/
enum FL_SortBy {
DATE, // date, in ascending order
AMOUNT // amount, in descending order
}
/**
Direction of desired links
*/
enum FL_DirectionFilter {
SOURCE,
DESTINATION,
BOTH
}
/**
Returns a set of clusters by uid.
Service URL: /cluster/list
HTTP Method: POST and GET
@param entities uids of clusters to retrieve
@param contextId the context to retrieve the clusters from
@param sessionId the user session the clusters are associated with
@return cluster entities
*/
array<FL_Cluster> getClusters(array<string> entities, string contextId, string sessionId);
/**
Returns a set of cluster summaries by uid.
Service URL: /clustersummary/list
HTTP Method: POST and GET
@param entities uids of clusters to retrieve
@return cluster entities
*/
array<FL_Cluster> getClusterSummary(array<string> entities);
/**
Removes entities from a cluster
Service URL: /cluster/remove
HTTP Method: POST and GET
@param entities uids of entities to remove
@param contextId the context of the cluster to remove entities from
@param sessionId the user session the clusters are associated with
@return number of entities removed
*/
long removeMembers(array<string> entities, string contextId, string sessionId);
/**
Returns all clusters in a context.
Service URL: /cluster/context
HTTP Method: POST and GET
@param contextId the context to retrieve the clusters fr om
@param computeSummaries specifies whether to calculate summary properties for each cluster
@param sessionId the user session the clusters are associated with
@return cluster entities
*/
array<FL_Cluster> getContext(string contextId, string sessionId, boolean computeSummaries);
/**
Deletes all clusters in a context.
Service URL: /cluster/context/remove
HTTP Method: POST or GET
@param contextId the context to retrieve the clusters from
@param sessionId the user session the clusters are associated with
@return boolean indicating if any clusters were deleted
*/
boolean clearContext(string contextId, string sessionId);
/**
Returns links to other entities related to specify entities. Each Link returned should
represent multiple records, used for displaying flow.
See the specification for the Flow Data View.
@param entities uids of entities to retrieve links for
@param focusEntities uids of focus entities (may be null)
@param direction one of: SOURCE, DESTINATION, BOTH
@param tag one of: FINANCIAL, SOCIAL, COMMUNICATION
@param date in the given date range
@param entitiesContextId the context to compute flow from entities
@param focusContextId the context to compute flow from focus entities (if null a new context is created for dst)
@param sessionId the user session the clusters are associated with
@return map of input entity IDs to an array of the links for that cluster entity
*/
map<array<FL_Link>> getFlowAggregation(
array<string> entities,
union {array<string>, null} focusEntities,
FL_DirectionFilter direction,
union {FL_LinkTag, null} tag,
union {FL_DateRange, null} date,
string entitiesContextId,
union {string, null} focusContextId,
string sessionId);
/**
Returns links to other entities related to specify entities. Each Link returned should
represent multiple records, used for displaying time series.
See the specification for the Time Series Data View.
Service URL: /cluster/link/series
HTTP Method: POST and GET
@param entities uids of entities to retrieve links for
@param focusEntities uids of focus entities (may be null)
@param tag one of: FINANCIAL, SOCIAL, COMMUNICATION
@param date in the given date range
@param entitiesContextId the context to compute flow between clusters from
@param focusContextId the context to compute flow between clusters from (if null a new context is created for dst)
@param sessionId the user session the clusters are associated with
@return map of input entity IDs to an array of the links for that cluster entity
*/
map<array<FL_Link>> getTimeSeriesAggregation(
array<string> entities,
union {array<string>, null} focusEntities,
union {FL_LinkTag, null} tag,
FL_DateRange date,
string entitiesContextId,
union {string, null} focusContextId,
string sessionId);
/**
Returns links to other entities related to specify entities. Each link returned should
represent one raw transaction. For financial data, these transactions will form a ledger.
For communications or social data, these are un-aggregated links for drill down by the user.
CHANGED IN 1.4
Service URL: /link/transactions
HTTP Method: POST and GET
@param entities uids of entities to retrieve links for
@param direction one of: SOURCE, DESTINATION, BOTH
@param tag one of: FINANCIAL, SOCIAL, COMMUNICATION
@param date in the given date range
@param order Sort order for transactions
@param max Trim the number of results this this value.
@param contextId the context to retrieve the clusters from
@param sessionId the user session the clusters are associated with
@return map of input entity IDs to an array of the transactions for that cluster entity
*/
map<array<FL_Link>> getAllTransactions(
array<string> entities,
union {FL_LinkTag, null} tag,
union {FL_DateRange, null} date,
union {FL_SortBy, null} sort,
union {array<string>, null} linkFilter, // ADDED IN 1.4
long max = -1,
string contextId,
string sessionId
);
}