@girs/tracker-2.0 2.0.0-3.0.0-beta.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +33 -0
- package/package.json +54 -0
- package/tracker-2.0.cjs +9 -0
- package/tracker-2.0.d.cts +1174 -0
- package/tracker-2.0.d.ts +1179 -0
- package/tracker-2.0.js +8 -0
- package/tsconfig.doc.json +19 -0
|
@@ -0,0 +1,1174 @@
|
|
|
1
|
+
|
|
2
|
+
/*
|
|
3
|
+
* Type Definitions for Gjs (https://gjs.guide/)
|
|
4
|
+
*
|
|
5
|
+
* These type definitions are automatically generated, do not edit them by hand.
|
|
6
|
+
* If you found a bug fix it in `ts-for-gir` or create a bug report on https://github.com/gjsify/ts-for-gjs
|
|
7
|
+
*/
|
|
8
|
+
/**
|
|
9
|
+
* Tracker-2.0
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
import type Gio from '@girs/gio-2.0';
|
|
13
|
+
import type GObject from '@girs/gobject-2.0';
|
|
14
|
+
import type GLib from '@girs/glib-2.0';
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Notifier event types.
|
|
18
|
+
*/
|
|
19
|
+
export enum NotifierEventType {
|
|
20
|
+
/**
|
|
21
|
+
* An element was created.
|
|
22
|
+
*/
|
|
23
|
+
CREATE,
|
|
24
|
+
/**
|
|
25
|
+
* An element was deleted.
|
|
26
|
+
*/
|
|
27
|
+
DELETE,
|
|
28
|
+
/**
|
|
29
|
+
* An element was updated.
|
|
30
|
+
*/
|
|
31
|
+
UPDATE,
|
|
32
|
+
}
|
|
33
|
+
export enum SparqlConnectionFlags {
|
|
34
|
+
NONE,
|
|
35
|
+
READONLY,
|
|
36
|
+
}
|
|
37
|
+
export enum SparqlValueType {
|
|
38
|
+
UNBOUND,
|
|
39
|
+
URI,
|
|
40
|
+
STRING,
|
|
41
|
+
INTEGER,
|
|
42
|
+
DOUBLE,
|
|
43
|
+
DATETIME,
|
|
44
|
+
BLANK_NODE,
|
|
45
|
+
BOOLEAN,
|
|
46
|
+
}
|
|
47
|
+
export enum SparqlError {
|
|
48
|
+
PARSE,
|
|
49
|
+
UNKNOWN_CLASS,
|
|
50
|
+
UNKNOWN_PROPERTY,
|
|
51
|
+
TYPE,
|
|
52
|
+
CONSTRAINT,
|
|
53
|
+
NO_SPACE,
|
|
54
|
+
INTERNAL,
|
|
55
|
+
UNSUPPORTED,
|
|
56
|
+
}
|
|
57
|
+
export enum SparqlBuilderState {
|
|
58
|
+
UPDATE,
|
|
59
|
+
INSERT,
|
|
60
|
+
DELETE,
|
|
61
|
+
SUBJECT,
|
|
62
|
+
PREDICATE,
|
|
63
|
+
OBJECT,
|
|
64
|
+
BLANK,
|
|
65
|
+
WHERE,
|
|
66
|
+
EMBEDDED_INSERT,
|
|
67
|
+
GRAPH,
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* Flags affecting #TrackerNotifier behavior.
|
|
71
|
+
* @bitfield
|
|
72
|
+
*/
|
|
73
|
+
export enum NotifierFlags {
|
|
74
|
+
/**
|
|
75
|
+
* No flags
|
|
76
|
+
*/
|
|
77
|
+
NONE,
|
|
78
|
+
/**
|
|
79
|
+
* Query URN of notified elements
|
|
80
|
+
*/
|
|
81
|
+
QUERY_URN,
|
|
82
|
+
/**
|
|
83
|
+
* Query location of notified elements
|
|
84
|
+
*/
|
|
85
|
+
QUERY_LOCATION,
|
|
86
|
+
/**
|
|
87
|
+
* Added/updated Elements are
|
|
88
|
+
* notified in 2 steps (a CREATE/UPDATE event after the file is first
|
|
89
|
+
* known, and an UPDATE event after metadata is extracted). The default
|
|
90
|
+
* #TrackerNotifier behavior coalesces those events in one.
|
|
91
|
+
*/
|
|
92
|
+
NOTIFY_UNEXTRACTED,
|
|
93
|
+
}
|
|
94
|
+
export const DBUS_SERVICE: string | null
|
|
95
|
+
export const DBUS_INTERFACE_RESOURCES: string | null
|
|
96
|
+
export const DBUS_OBJECT_RESOURCES: string | null
|
|
97
|
+
export const DBUS_INTERFACE_STATISTICS: string | null
|
|
98
|
+
export const DBUS_OBJECT_STATISTICS: string | null
|
|
99
|
+
export const DBUS_INTERFACE_STATUS: string | null
|
|
100
|
+
export const DBUS_OBJECT_STATUS: string | null
|
|
101
|
+
export const DBUS_INTERFACE_STEROIDS: string | null
|
|
102
|
+
export const DBUS_OBJECT_STEROIDS: string | null
|
|
103
|
+
/**
|
|
104
|
+
* Checks that the Tracker library in use is compatible with the
|
|
105
|
+
* given version. Generally you would pass in the constants
|
|
106
|
+
* #TRACKER_MAJOR_VERSION, #TRACKER_MINOR_VERSION, #TRACKER_MICRO_VERSION
|
|
107
|
+
* as the three arguments to this function; that produces
|
|
108
|
+
* a check that the library in use is compatible with
|
|
109
|
+
* the version of Tracker the application or module was compiled
|
|
110
|
+
* against.
|
|
111
|
+
*
|
|
112
|
+
* Compatibility is defined by two things: first the version
|
|
113
|
+
* of the running library is newer than the version
|
|
114
|
+
* `required_major`.required_minor.`required_micro`. Second
|
|
115
|
+
* the running library must be binary compatible with the
|
|
116
|
+
* version `required_major`.required_minor.`required_micro`
|
|
117
|
+
* (same major version.)
|
|
118
|
+
* @param required_major the required major version.
|
|
119
|
+
* @param required_minor the required minor version.
|
|
120
|
+
* @param required_micro the required micro version.
|
|
121
|
+
* @returns %NULL if the Tracker library is compatible with the given version, or a string describing the version mismatch. The returned string is owned by Tracker and must not be modified or freed.
|
|
122
|
+
*/
|
|
123
|
+
export function check_version(required_major: number, required_minor: number, required_micro: number): string | null
|
|
124
|
+
export function sparql_escape_uri(uri: string | null): string | null
|
|
125
|
+
export function sparql_escape_string(literal: string | null): string | null
|
|
126
|
+
export function sparql_get_uuid_urn(): string | null
|
|
127
|
+
export module NamespaceManager {
|
|
128
|
+
|
|
129
|
+
// Constructor properties interface
|
|
130
|
+
|
|
131
|
+
export interface ConstructorProperties extends GObject.Object.ConstructorProperties {
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
export interface NamespaceManager {
|
|
137
|
+
|
|
138
|
+
// Owm methods of Tracker-2.0.Tracker.NamespaceManager
|
|
139
|
+
|
|
140
|
+
/**
|
|
141
|
+
* Adds `prefix` as the recognised abbreviaton of `namespace`.
|
|
142
|
+
*
|
|
143
|
+
* Only one prefix is allowed for a given namespace, and all prefixes must
|
|
144
|
+
* be unique.
|
|
145
|
+
* @param prefix a short, unique prefix to identify `namespace`
|
|
146
|
+
* @param ns the URL of the given namespace
|
|
147
|
+
*/
|
|
148
|
+
add_prefix(prefix: string | null, ns: string | null): void
|
|
149
|
+
/**
|
|
150
|
+
* If `compact_uri` begins with one of the prefixes known to this
|
|
151
|
+
* #TrackerNamespaceManager, then the return value will be the
|
|
152
|
+
* expanded URI. Otherwise, a copy of `compact_uri` will be returned.
|
|
153
|
+
* @param compact_uri a URI or compact URI
|
|
154
|
+
* @returns a newly-allocated string
|
|
155
|
+
*/
|
|
156
|
+
expand_uri(compact_uri: string | null): string | null
|
|
157
|
+
/**
|
|
158
|
+
* Calls `func` for each known prefix / URI pair.
|
|
159
|
+
* @param func the function to call for each prefix / URI pair
|
|
160
|
+
*/
|
|
161
|
+
foreach(func: GLib.HFunc): void
|
|
162
|
+
has_prefix(prefix: string | null): boolean
|
|
163
|
+
/**
|
|
164
|
+
* Looks up the namespace URI corresponding to `prefix,` or %NULL if the prefix
|
|
165
|
+
* is not known.
|
|
166
|
+
* @param prefix a string
|
|
167
|
+
* @returns a string owned by the #TrackerNamespaceManager, or %NULL
|
|
168
|
+
*/
|
|
169
|
+
lookup_prefix(prefix: string | null): string | null
|
|
170
|
+
/**
|
|
171
|
+
* Writes out all namespaces as Turtle `prefix` statements.
|
|
172
|
+
* @returns a newly-allocated string
|
|
173
|
+
*/
|
|
174
|
+
print_turtle(): string | null
|
|
175
|
+
|
|
176
|
+
// Class property signals of Tracker-2.0.Tracker.NamespaceManager
|
|
177
|
+
|
|
178
|
+
connect(sigName: string, callback: (...args: any[]) => void): number
|
|
179
|
+
connect_after(sigName: string, callback: (...args: any[]) => void): number
|
|
180
|
+
emit(sigName: string, ...args: any[]): void
|
|
181
|
+
disconnect(id: number): void
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
export class NamespaceManager extends GObject.Object {
|
|
185
|
+
|
|
186
|
+
// Own properties of Tracker-2.0.Tracker.NamespaceManager
|
|
187
|
+
|
|
188
|
+
static name: string
|
|
189
|
+
static $gtype: GObject.GType<NamespaceManager>
|
|
190
|
+
|
|
191
|
+
// Constructors of Tracker-2.0.Tracker.NamespaceManager
|
|
192
|
+
|
|
193
|
+
constructor(config?: NamespaceManager.ConstructorProperties)
|
|
194
|
+
/**
|
|
195
|
+
* Creates a new #TrackerNamespaceManager instance.
|
|
196
|
+
* @constructor
|
|
197
|
+
* @returns a new #TrackerNamespaceManager instance
|
|
198
|
+
*/
|
|
199
|
+
constructor()
|
|
200
|
+
/**
|
|
201
|
+
* Creates a new #TrackerNamespaceManager instance.
|
|
202
|
+
* @constructor
|
|
203
|
+
* @returns a new #TrackerNamespaceManager instance
|
|
204
|
+
*/
|
|
205
|
+
static new(): NamespaceManager
|
|
206
|
+
_init(config?: NamespaceManager.ConstructorProperties): void
|
|
207
|
+
/**
|
|
208
|
+
* Returns the global #TrackerNamespaceManager that contains a set of well-known
|
|
209
|
+
* namespaces and prefixes, such as rdf:, rdfs:, nie:, tracker:, etc.
|
|
210
|
+
*
|
|
211
|
+
* Note that the list of prefixes and namespaces is hardcoded in
|
|
212
|
+
* libtracker-sparql. It may not correspond with the installed set of
|
|
213
|
+
* ontologies, if they have been modified since they were installed.
|
|
214
|
+
* @returns a global, shared #TrackerNamespaceManager instance
|
|
215
|
+
*/
|
|
216
|
+
static get_default(): NamespaceManager
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
export module Notifier {
|
|
220
|
+
|
|
221
|
+
// Signal callback interfaces
|
|
222
|
+
|
|
223
|
+
/**
|
|
224
|
+
* Signal callback interface for `events`
|
|
225
|
+
*/
|
|
226
|
+
export interface EventsSignalCallback {
|
|
227
|
+
($obj: Notifier, events: NotifierEvent[]): void
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
|
|
231
|
+
// Constructor properties interface
|
|
232
|
+
|
|
233
|
+
export interface ConstructorProperties extends Gio.Initable.ConstructorProperties, GObject.Object.ConstructorProperties {
|
|
234
|
+
|
|
235
|
+
// Own constructor properties of Tracker-2.0.Tracker.Notifier
|
|
236
|
+
|
|
237
|
+
/**
|
|
238
|
+
* RDF classes to listen notifications about.
|
|
239
|
+
*/
|
|
240
|
+
classes?: string[] | null
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
export interface Notifier extends Gio.Initable {
|
|
246
|
+
|
|
247
|
+
// Own properties of Tracker-2.0.Tracker.Notifier
|
|
248
|
+
|
|
249
|
+
/**
|
|
250
|
+
* RDF classes to listen notifications about.
|
|
251
|
+
*/
|
|
252
|
+
readonly classes: string[]
|
|
253
|
+
|
|
254
|
+
// Own fields of Tracker-2.0.Tracker.Notifier
|
|
255
|
+
|
|
256
|
+
parent_instance: GObject.Object
|
|
257
|
+
|
|
258
|
+
// Own signals of Tracker-2.0.Tracker.Notifier
|
|
259
|
+
|
|
260
|
+
connect(sigName: "events", callback: Notifier.EventsSignalCallback): number
|
|
261
|
+
connect_after(sigName: "events", callback: Notifier.EventsSignalCallback): number
|
|
262
|
+
emit(sigName: "events", events: NotifierEvent[], ...args: any[]): void
|
|
263
|
+
|
|
264
|
+
// Class property signals of Tracker-2.0.Tracker.Notifier
|
|
265
|
+
|
|
266
|
+
connect(sigName: "notify::classes", callback: (($obj: Notifier, pspec: GObject.ParamSpec) => void)): number
|
|
267
|
+
connect_after(sigName: "notify::classes", callback: (($obj: Notifier, pspec: GObject.ParamSpec) => void)): number
|
|
268
|
+
emit(sigName: "notify::classes", ...args: any[]): void
|
|
269
|
+
connect(sigName: string, callback: (...args: any[]) => void): number
|
|
270
|
+
connect_after(sigName: string, callback: (...args: any[]) => void): number
|
|
271
|
+
emit(sigName: string, ...args: any[]): void
|
|
272
|
+
disconnect(id: number): void
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
export class Notifier extends GObject.Object {
|
|
276
|
+
|
|
277
|
+
// Own properties of Tracker-2.0.Tracker.Notifier
|
|
278
|
+
|
|
279
|
+
static name: string
|
|
280
|
+
static $gtype: GObject.GType<Notifier>
|
|
281
|
+
|
|
282
|
+
// Constructors of Tracker-2.0.Tracker.Notifier
|
|
283
|
+
|
|
284
|
+
constructor(config?: Notifier.ConstructorProperties)
|
|
285
|
+
/**
|
|
286
|
+
* Creates a new notifier, events can be listened through the
|
|
287
|
+
* TrackerNotifier::events signal.
|
|
288
|
+
* @constructor
|
|
289
|
+
* @param classes Array of RDF classes to receive notifications from, or %NULL for all.
|
|
290
|
+
* @param flags flags affecting the notifier behavior
|
|
291
|
+
* @param cancellable Cancellable for the operation
|
|
292
|
+
* @returns a newly created #TrackerNotifier, %NULL on error.
|
|
293
|
+
*/
|
|
294
|
+
constructor(classes: string[] | null, flags: NotifierFlags, cancellable: Gio.Cancellable | null)
|
|
295
|
+
/**
|
|
296
|
+
* Creates a new notifier, events can be listened through the
|
|
297
|
+
* TrackerNotifier::events signal.
|
|
298
|
+
* @constructor
|
|
299
|
+
* @param classes Array of RDF classes to receive notifications from, or %NULL for all.
|
|
300
|
+
* @param flags flags affecting the notifier behavior
|
|
301
|
+
* @param cancellable Cancellable for the operation
|
|
302
|
+
* @returns a newly created #TrackerNotifier, %NULL on error.
|
|
303
|
+
*/
|
|
304
|
+
static new(classes: string[] | null, flags: NotifierFlags, cancellable: Gio.Cancellable | null): Notifier
|
|
305
|
+
_init(config?: Notifier.ConstructorProperties): void
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
export module Resource {
|
|
309
|
+
|
|
310
|
+
// Constructor properties interface
|
|
311
|
+
|
|
312
|
+
export interface ConstructorProperties extends GObject.Object.ConstructorProperties {
|
|
313
|
+
|
|
314
|
+
// Own constructor properties of Tracker-2.0.Tracker.Resource
|
|
315
|
+
|
|
316
|
+
/**
|
|
317
|
+
* The URI identifier for this class, or %NULL for a
|
|
318
|
+
* blank node.
|
|
319
|
+
*/
|
|
320
|
+
identifier?: string | null
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
}
|
|
324
|
+
|
|
325
|
+
export interface Resource {
|
|
326
|
+
|
|
327
|
+
// Own properties of Tracker-2.0.Tracker.Resource
|
|
328
|
+
|
|
329
|
+
/**
|
|
330
|
+
* The URI identifier for this class, or %NULL for a
|
|
331
|
+
* blank node.
|
|
332
|
+
*/
|
|
333
|
+
identifier: string | null
|
|
334
|
+
|
|
335
|
+
// Own fields of Tracker-2.0.Tracker.Resource
|
|
336
|
+
|
|
337
|
+
parent_instance: GObject.Object
|
|
338
|
+
|
|
339
|
+
// Owm methods of Tracker-2.0.Tracker.Resource
|
|
340
|
+
|
|
341
|
+
/**
|
|
342
|
+
* Adds a boolean object to a multi-valued property.
|
|
343
|
+
* @param property_uri a string identifying the property to modify
|
|
344
|
+
* @param value the property object
|
|
345
|
+
*/
|
|
346
|
+
add_boolean(property_uri: string | null, value: boolean): void
|
|
347
|
+
/**
|
|
348
|
+
* Adds a double object to a multi-valued property.
|
|
349
|
+
* @param property_uri a string identifying the property to modify
|
|
350
|
+
* @param value the property object
|
|
351
|
+
*/
|
|
352
|
+
add_double(property_uri: string | null, value: number): void
|
|
353
|
+
/**
|
|
354
|
+
* Add 'value' to the list of values for given property.
|
|
355
|
+
*
|
|
356
|
+
* You can pass any kind of GValue for `value,` but serialization functions will
|
|
357
|
+
* normally only be able to serialize URIs/relationships and fundamental value
|
|
358
|
+
* types (string, int, etc.).
|
|
359
|
+
* @param property_uri a string identifying the property to set
|
|
360
|
+
* @param value an initialised #GValue
|
|
361
|
+
*/
|
|
362
|
+
add_gvalue(property_uri: string | null, value: any): void
|
|
363
|
+
/**
|
|
364
|
+
* Adds an integer object to a multi-valued property.
|
|
365
|
+
* @param property_uri a string identifying the property to modify
|
|
366
|
+
* @param value the property object
|
|
367
|
+
*/
|
|
368
|
+
add_int(property_uri: string | null, value: number): void
|
|
369
|
+
/**
|
|
370
|
+
* Adds an integer object to a multi-valued property.
|
|
371
|
+
* @param property_uri a string identifying the property to modify
|
|
372
|
+
* @param value the property object
|
|
373
|
+
*/
|
|
374
|
+
add_int64(property_uri: string | null, value: number): void
|
|
375
|
+
/**
|
|
376
|
+
* Adds a resource object to a multi-valued property. This
|
|
377
|
+
* function produces similar RDF to tracker_resource_add_uri(),
|
|
378
|
+
* although in this function the URI will depend on the identifier
|
|
379
|
+
* set on `resource`.
|
|
380
|
+
* @param property_uri a string identifying the property to modify
|
|
381
|
+
* @param resource the property object
|
|
382
|
+
*/
|
|
383
|
+
add_relation(property_uri: string | null, resource: Resource): void
|
|
384
|
+
/**
|
|
385
|
+
* Adds a string object to a multi-valued property.
|
|
386
|
+
* @param property_uri a string identifying the property to modify
|
|
387
|
+
* @param value the property object
|
|
388
|
+
*/
|
|
389
|
+
add_string(property_uri: string | null, value: string | null): void
|
|
390
|
+
/**
|
|
391
|
+
* Adds a resource object to a multi-valued property. This function
|
|
392
|
+
* produces similar RDF to tracker_resource_add_relation(), although
|
|
393
|
+
* it requires that the URI is previously known.
|
|
394
|
+
* @param property_uri a string identifying the property to modify
|
|
395
|
+
* @param value the property object
|
|
396
|
+
*/
|
|
397
|
+
add_uri(property_uri: string | null, value: string | null): void
|
|
398
|
+
/**
|
|
399
|
+
* Returns the first boolean object previously assigned to a property.
|
|
400
|
+
* @param property_uri a string identifying the property to look up
|
|
401
|
+
* @returns the first boolean object
|
|
402
|
+
*/
|
|
403
|
+
get_first_boolean(property_uri: string | null): boolean
|
|
404
|
+
/**
|
|
405
|
+
* Returns the first double object previously assigned to a property.
|
|
406
|
+
* @param property_uri a string identifying the property to look up
|
|
407
|
+
* @returns the first double object
|
|
408
|
+
*/
|
|
409
|
+
get_first_double(property_uri: string | null): number
|
|
410
|
+
/**
|
|
411
|
+
* Returns the first integer object previously assigned to a property.
|
|
412
|
+
* @param property_uri a string identifying the property to look up
|
|
413
|
+
* @returns the first integer object
|
|
414
|
+
*/
|
|
415
|
+
get_first_int(property_uri: string | null): number
|
|
416
|
+
/**
|
|
417
|
+
* Returns the first integer object previously assigned to a property.
|
|
418
|
+
* @param property_uri a string identifying the property to look up
|
|
419
|
+
* @returns the first integer object
|
|
420
|
+
*/
|
|
421
|
+
get_first_int64(property_uri: string | null): number
|
|
422
|
+
/**
|
|
423
|
+
* Returns the first resource object previously assigned to a property.
|
|
424
|
+
* @param property_uri a string identifying the property to look up
|
|
425
|
+
* @returns the first resource object
|
|
426
|
+
*/
|
|
427
|
+
get_first_relation(property_uri: string | null): Resource
|
|
428
|
+
/**
|
|
429
|
+
* Returns the first string object previously assigned to a property.
|
|
430
|
+
* @param property_uri a string identifying the property to look up
|
|
431
|
+
* @returns the first string object
|
|
432
|
+
*/
|
|
433
|
+
get_first_string(property_uri: string | null): string | null
|
|
434
|
+
/**
|
|
435
|
+
* Returns the first resource object previously assigned to a property.
|
|
436
|
+
* @param property_uri a string identifying the property to look up
|
|
437
|
+
* @returns the first resource object as an URI.
|
|
438
|
+
*/
|
|
439
|
+
get_first_uri(property_uri: string | null): string | null
|
|
440
|
+
/**
|
|
441
|
+
* Returns the identifier of a resource.
|
|
442
|
+
*
|
|
443
|
+
* If the identifier was set to NULL, the identifier returned will be a unique
|
|
444
|
+
* SPARQL blank node identifier, such as "_:123".
|
|
445
|
+
* @returns a string owned by the resource
|
|
446
|
+
*/
|
|
447
|
+
get_identifier(): string | null
|
|
448
|
+
/**
|
|
449
|
+
* Returns the list of all known values of the given property.
|
|
450
|
+
* @param property_uri a string identifying the property to look up
|
|
451
|
+
* @returns a #GList of #GValue instances, which must be freed by the caller.
|
|
452
|
+
*/
|
|
453
|
+
get_values(property_uri: string | null): any[]
|
|
454
|
+
identifier_compare_func(identifier: string | null): number
|
|
455
|
+
/**
|
|
456
|
+
* Serialize all the information in `resource` as a JSON-LD document.
|
|
457
|
+
*
|
|
458
|
+
* See <http://www.jsonld.org/> for more information on the JSON-LD
|
|
459
|
+
* serialization format.
|
|
460
|
+
*
|
|
461
|
+
* The `namespaces` object is used to expand any compact URI values. In most
|
|
462
|
+
* cases you should pass %NULL, which means the set of namespaces returned by
|
|
463
|
+
* tracker_namespace_manager_get_default() will be used. This defines the
|
|
464
|
+
* usual prefixes for all of the ontologies that Tracker ships with by default.
|
|
465
|
+
* @param namespaces a set of prefixed URLs, or %NULL to use the default set
|
|
466
|
+
* @returns a newly-allocated string containing JSON-LD data.
|
|
467
|
+
*/
|
|
468
|
+
print_jsonld(namespaces: NamespaceManager | null): string | null
|
|
469
|
+
/**
|
|
470
|
+
* Generates a SPARQL command to update a database with the information
|
|
471
|
+
* stored in `resource`.
|
|
472
|
+
*
|
|
473
|
+
* The `namespaces` object is used to expand any compact URI values. In most
|
|
474
|
+
* cases you should pass %NULL, which means the set of namespaces returned by
|
|
475
|
+
* tracker_namespace_manager_get_default() will be used. This defines the
|
|
476
|
+
* usual prefixes for all of the ontologies that Tracker ships with by default.
|
|
477
|
+
* @param namespaces a set of prefixed URLs, or %NULL to use the default set
|
|
478
|
+
* @param graph_id the URN of the graph the data should be added to, or %NULL
|
|
479
|
+
* @returns a newly-allocated string containing a SPARQL update command.
|
|
480
|
+
*/
|
|
481
|
+
print_sparql_update(namespaces: NamespaceManager | null, graph_id: string | null): string | null
|
|
482
|
+
/**
|
|
483
|
+
* Serialize all the information in `resource` as a Turtle document.
|
|
484
|
+
*
|
|
485
|
+
* The generated Turtle should correspond to this standard:
|
|
486
|
+
* <https://www.w3.org/TR/2014/REC-turtle-20140225/>
|
|
487
|
+
*
|
|
488
|
+
* The `namespaces` object is used to expand any compact URI values. In most
|
|
489
|
+
* cases you should pass %NULL, which means the set of namespaces returned by
|
|
490
|
+
* tracker_namespace_manager_get_default() will be used. This defines the
|
|
491
|
+
* usual prefixes for all of the ontologies that Tracker ships with by default.
|
|
492
|
+
* @param namespaces a set of prefixed URLs, or %NULL to use the default set
|
|
493
|
+
* @returns a newly-allocated string
|
|
494
|
+
*/
|
|
495
|
+
print_turtle(namespaces: NamespaceManager | null): string | null
|
|
496
|
+
/**
|
|
497
|
+
* Sets a single-valued boolean object.
|
|
498
|
+
* @param property_uri a string identifying the property to modify
|
|
499
|
+
* @param value the property object
|
|
500
|
+
*/
|
|
501
|
+
set_boolean(property_uri: string | null, value: boolean): void
|
|
502
|
+
/**
|
|
503
|
+
* Sets a single-valued double object.
|
|
504
|
+
* @param property_uri a string identifying the property to modify
|
|
505
|
+
* @param value the property object
|
|
506
|
+
*/
|
|
507
|
+
set_double(property_uri: string | null, value: number): void
|
|
508
|
+
/**
|
|
509
|
+
* State that the only value for the given property is 'value'. Any existing
|
|
510
|
+
* values for 'property' will be removed.
|
|
511
|
+
*
|
|
512
|
+
* When serialising to SPARQL, any properties that were set with this function
|
|
513
|
+
* will get a corresponding DELETE statement to remove any existing values in
|
|
514
|
+
* the database.
|
|
515
|
+
*
|
|
516
|
+
* You can pass any kind of GValue for `value,` but serialization functions will
|
|
517
|
+
* normally only be able to serialize URIs/relationships and fundamental value
|
|
518
|
+
* types (string, int, etc.).
|
|
519
|
+
* @param property_uri a string identifying the property to set
|
|
520
|
+
* @param value an initialised #GValue
|
|
521
|
+
*/
|
|
522
|
+
set_gvalue(property_uri: string | null, value: any): void
|
|
523
|
+
/**
|
|
524
|
+
* Changes the identifier of a #TrackerResource. The identifier should be a
|
|
525
|
+
* URI or compact URI, but this is not necessarily enforced. Invalid
|
|
526
|
+
* identifiers may cause errors when serializing the resource or trying to
|
|
527
|
+
* insert the results in a database.
|
|
528
|
+
*
|
|
529
|
+
* If the identifier is set to NULL, a SPARQL blank node identifier such as
|
|
530
|
+
* "_:123" is assigned to the resource.
|
|
531
|
+
* @param identifier a string identifying the resource
|
|
532
|
+
*/
|
|
533
|
+
set_identifier(identifier: string | null): void
|
|
534
|
+
/**
|
|
535
|
+
* Sets a single-valued integer object.
|
|
536
|
+
* @param property_uri a string identifying the property to modify
|
|
537
|
+
* @param value the property object
|
|
538
|
+
*/
|
|
539
|
+
set_int(property_uri: string | null, value: number): void
|
|
540
|
+
/**
|
|
541
|
+
* Sets a single-valued integer object.
|
|
542
|
+
* @param property_uri a string identifying the property to modify
|
|
543
|
+
* @param value the property object
|
|
544
|
+
*/
|
|
545
|
+
set_int64(property_uri: string | null, value: number): void
|
|
546
|
+
/**
|
|
547
|
+
* Sets a single-valued resource object as a #TrackerResource. This
|
|
548
|
+
* function produces similar RDF to tracker_resource_set_uri(),
|
|
549
|
+
* although in this function the URI will depend on the identifier
|
|
550
|
+
* set on `resource`.
|
|
551
|
+
* @param property_uri a string identifying the property to modify
|
|
552
|
+
* @param resource the property object
|
|
553
|
+
*/
|
|
554
|
+
set_relation(property_uri: string | null, resource: Resource): void
|
|
555
|
+
/**
|
|
556
|
+
* Sets a single-valued string object.
|
|
557
|
+
* @param property_uri a string identifying the property to modify
|
|
558
|
+
* @param value the property object
|
|
559
|
+
*/
|
|
560
|
+
set_string(property_uri: string | null, value: string | null): void
|
|
561
|
+
/**
|
|
562
|
+
* Sets a single-valued resource object as a string URI. This function
|
|
563
|
+
* produces similar RDF to tracker_resource_set_relation(), although
|
|
564
|
+
* it requires that the URI is previously known.
|
|
565
|
+
* @param property_uri a string identifying the property to modify
|
|
566
|
+
* @param value the property object
|
|
567
|
+
*/
|
|
568
|
+
set_uri(property_uri: string | null, value: string | null): void
|
|
569
|
+
|
|
570
|
+
// Class property signals of Tracker-2.0.Tracker.Resource
|
|
571
|
+
|
|
572
|
+
connect(sigName: "notify::identifier", callback: (($obj: Resource, pspec: GObject.ParamSpec) => void)): number
|
|
573
|
+
connect_after(sigName: "notify::identifier", callback: (($obj: Resource, pspec: GObject.ParamSpec) => void)): number
|
|
574
|
+
emit(sigName: "notify::identifier", ...args: any[]): void
|
|
575
|
+
connect(sigName: string, callback: (...args: any[]) => void): number
|
|
576
|
+
connect_after(sigName: string, callback: (...args: any[]) => void): number
|
|
577
|
+
emit(sigName: string, ...args: any[]): void
|
|
578
|
+
disconnect(id: number): void
|
|
579
|
+
}
|
|
580
|
+
|
|
581
|
+
/**
|
|
582
|
+
* The <structname>TrackerResource</structname> object represents information
|
|
583
|
+
* about a given resource.
|
|
584
|
+
* @class
|
|
585
|
+
*/
|
|
586
|
+
export class Resource extends GObject.Object {
|
|
587
|
+
|
|
588
|
+
// Own properties of Tracker-2.0.Tracker.Resource
|
|
589
|
+
|
|
590
|
+
static name: string
|
|
591
|
+
static $gtype: GObject.GType<Resource>
|
|
592
|
+
|
|
593
|
+
// Constructors of Tracker-2.0.Tracker.Resource
|
|
594
|
+
|
|
595
|
+
constructor(config?: Resource.ConstructorProperties)
|
|
596
|
+
/**
|
|
597
|
+
* Creates a TrackerResource instance.
|
|
598
|
+
* @constructor
|
|
599
|
+
* @param identifier A string containing a URI
|
|
600
|
+
* @returns a newly created #TrackerResource. Free with g_object_unref() when done
|
|
601
|
+
*/
|
|
602
|
+
constructor(identifier: string | null)
|
|
603
|
+
/**
|
|
604
|
+
* Creates a TrackerResource instance.
|
|
605
|
+
* @constructor
|
|
606
|
+
* @param identifier A string containing a URI
|
|
607
|
+
* @returns a newly created #TrackerResource. Free with g_object_unref() when done
|
|
608
|
+
*/
|
|
609
|
+
static new(identifier: string | null): Resource
|
|
610
|
+
_init(config?: Resource.ConstructorProperties): void
|
|
611
|
+
}
|
|
612
|
+
|
|
613
|
+
export module SparqlBuilder {
|
|
614
|
+
|
|
615
|
+
// Constructor properties interface
|
|
616
|
+
|
|
617
|
+
export interface ConstructorProperties extends GObject.Object.ConstructorProperties {
|
|
618
|
+
|
|
619
|
+
// Own constructor properties of Tracker-2.0.Tracker.SparqlBuilder
|
|
620
|
+
|
|
621
|
+
length?: number | null
|
|
622
|
+
}
|
|
623
|
+
|
|
624
|
+
}
|
|
625
|
+
|
|
626
|
+
export interface SparqlBuilder {
|
|
627
|
+
|
|
628
|
+
// Own properties of Tracker-2.0.Tracker.SparqlBuilder
|
|
629
|
+
|
|
630
|
+
readonly result: string | null
|
|
631
|
+
length: number
|
|
632
|
+
readonly state: any
|
|
633
|
+
|
|
634
|
+
// Owm methods of Tracker-2.0.Tracker.SparqlBuilder
|
|
635
|
+
|
|
636
|
+
insert_open(graph: string | null): void
|
|
637
|
+
insert_silent_open(graph: string | null): void
|
|
638
|
+
insert_close(): void
|
|
639
|
+
delete_open(graph: string | null): void
|
|
640
|
+
delete_close(): void
|
|
641
|
+
graph_open(graph: string | null): void
|
|
642
|
+
graph_close(): void
|
|
643
|
+
where_open(): void
|
|
644
|
+
where_close(): void
|
|
645
|
+
subject_variable(var_name: string | null): void
|
|
646
|
+
object_variable(var_name: string | null): void
|
|
647
|
+
subject_iri(iri: string | null): void
|
|
648
|
+
subject(s: string | null): void
|
|
649
|
+
predicate_iri(iri: string | null): void
|
|
650
|
+
predicate(s: string | null): void
|
|
651
|
+
object_iri(iri: string | null): void
|
|
652
|
+
object(s: string | null): void
|
|
653
|
+
object_string(literal: string | null): void
|
|
654
|
+
object_unvalidated(value: string | null): void
|
|
655
|
+
object_boolean(literal: boolean): void
|
|
656
|
+
object_int64(literal: number): void
|
|
657
|
+
object_date(literal: number): /* literal */ number
|
|
658
|
+
object_double(literal: number): void
|
|
659
|
+
object_blank_open(): void
|
|
660
|
+
object_blank_close(): void
|
|
661
|
+
prepend(raw: string | null): void
|
|
662
|
+
append(raw: string | null): void
|
|
663
|
+
get_result(): string | null
|
|
664
|
+
get_length(): number
|
|
665
|
+
get_state(): any
|
|
666
|
+
|
|
667
|
+
// Class property signals of Tracker-2.0.Tracker.SparqlBuilder
|
|
668
|
+
|
|
669
|
+
connect(sigName: "notify::result", callback: (($obj: SparqlBuilder, pspec: GObject.ParamSpec) => void)): number
|
|
670
|
+
connect_after(sigName: "notify::result", callback: (($obj: SparqlBuilder, pspec: GObject.ParamSpec) => void)): number
|
|
671
|
+
emit(sigName: "notify::result", ...args: any[]): void
|
|
672
|
+
connect(sigName: "notify::length", callback: (($obj: SparqlBuilder, pspec: GObject.ParamSpec) => void)): number
|
|
673
|
+
connect_after(sigName: "notify::length", callback: (($obj: SparqlBuilder, pspec: GObject.ParamSpec) => void)): number
|
|
674
|
+
emit(sigName: "notify::length", ...args: any[]): void
|
|
675
|
+
connect(sigName: "notify::state", callback: (($obj: SparqlBuilder, pspec: GObject.ParamSpec) => void)): number
|
|
676
|
+
connect_after(sigName: "notify::state", callback: (($obj: SparqlBuilder, pspec: GObject.ParamSpec) => void)): number
|
|
677
|
+
emit(sigName: "notify::state", ...args: any[]): void
|
|
678
|
+
connect(sigName: string, callback: (...args: any[]) => void): number
|
|
679
|
+
connect_after(sigName: string, callback: (...args: any[]) => void): number
|
|
680
|
+
emit(sigName: string, ...args: any[]): void
|
|
681
|
+
disconnect(id: number): void
|
|
682
|
+
}
|
|
683
|
+
|
|
684
|
+
export class SparqlBuilder extends GObject.Object {
|
|
685
|
+
|
|
686
|
+
// Own properties of Tracker-2.0.Tracker.SparqlBuilder
|
|
687
|
+
|
|
688
|
+
static name: string
|
|
689
|
+
static $gtype: GObject.GType<SparqlBuilder>
|
|
690
|
+
|
|
691
|
+
// Constructors of Tracker-2.0.Tracker.SparqlBuilder
|
|
692
|
+
|
|
693
|
+
constructor(config?: SparqlBuilder.ConstructorProperties)
|
|
694
|
+
static update(): SparqlBuilder
|
|
695
|
+
static embedded_insert(): SparqlBuilder
|
|
696
|
+
constructor()
|
|
697
|
+
static new(): SparqlBuilder
|
|
698
|
+
_init(config?: SparqlBuilder.ConstructorProperties): void
|
|
699
|
+
}
|
|
700
|
+
|
|
701
|
+
export module SparqlConnection {
|
|
702
|
+
|
|
703
|
+
// Constructor properties interface
|
|
704
|
+
|
|
705
|
+
export interface ConstructorProperties extends GObject.Object.ConstructorProperties {
|
|
706
|
+
}
|
|
707
|
+
|
|
708
|
+
}
|
|
709
|
+
|
|
710
|
+
export interface SparqlConnection {
|
|
711
|
+
|
|
712
|
+
// Owm methods of Tracker-2.0.Tracker.SparqlConnection
|
|
713
|
+
|
|
714
|
+
query(sparql: string | null, cancellable: Gio.Cancellable | null): any
|
|
715
|
+
query_async(sparql: string | null, cancellable: Gio.Cancellable | null, _callback_: Gio.AsyncReadyCallback<this> | null): void
|
|
716
|
+
query_finish(_res_: Gio.AsyncResult): any
|
|
717
|
+
update(sparql: string | null, priority: number, cancellable: Gio.Cancellable | null): void
|
|
718
|
+
update_async(sparql: string | null, priority: number, cancellable: Gio.Cancellable | null, _callback_: Gio.AsyncReadyCallback<this> | null): void
|
|
719
|
+
update_finish(_res_: Gio.AsyncResult): void
|
|
720
|
+
update_array_async(sparql: string[], priority: number, cancellable: Gio.Cancellable | null, _callback_: Gio.AsyncReadyCallback<this> | null): void
|
|
721
|
+
update_array_finish(_res_: Gio.AsyncResult): any[] | null
|
|
722
|
+
update_blank(sparql: string | null, priority: number, cancellable: Gio.Cancellable | null): GLib.Variant | null
|
|
723
|
+
update_blank_async(sparql: string | null, priority: number, cancellable: Gio.Cancellable | null, _callback_: Gio.AsyncReadyCallback<this> | null): void
|
|
724
|
+
update_blank_finish(_res_: Gio.AsyncResult): GLib.Variant | null
|
|
725
|
+
load(file: Gio.File, cancellable: Gio.Cancellable | null): void
|
|
726
|
+
load_async(file: Gio.File, cancellable: Gio.Cancellable | null, _callback_: Gio.AsyncReadyCallback<this> | null): void
|
|
727
|
+
load_finish(_res_: Gio.AsyncResult): void
|
|
728
|
+
statistics(cancellable: Gio.Cancellable | null): any | null
|
|
729
|
+
statistics_async(cancellable: Gio.Cancellable | null, _callback_: Gio.AsyncReadyCallback<this> | null): void
|
|
730
|
+
statistics_finish(_res_: Gio.AsyncResult): any | null
|
|
731
|
+
get_namespace_manager(): NamespaceManager | null
|
|
732
|
+
query_statement(sparql: string | null, cancellable: Gio.Cancellable | null): any | null
|
|
733
|
+
|
|
734
|
+
// Own virtual methods of Tracker-2.0.Tracker.SparqlConnection
|
|
735
|
+
|
|
736
|
+
vfunc_query(sparql: string | null, cancellable: Gio.Cancellable | null): any
|
|
737
|
+
vfunc_query_async(sparql: string | null, cancellable: Gio.Cancellable | null, _callback_: Gio.AsyncReadyCallback<this> | null): void
|
|
738
|
+
vfunc_query_finish(_res_: Gio.AsyncResult): any
|
|
739
|
+
vfunc_update(sparql: string | null, priority: number, cancellable: Gio.Cancellable | null): void
|
|
740
|
+
vfunc_update_async(sparql: string | null, priority: number, cancellable: Gio.Cancellable | null, _callback_: Gio.AsyncReadyCallback<this> | null): void
|
|
741
|
+
vfunc_update_finish(_res_: Gio.AsyncResult): void
|
|
742
|
+
vfunc_update_array_async(sparql: string[], priority: number, cancellable: Gio.Cancellable | null, _callback_: Gio.AsyncReadyCallback<this> | null): void
|
|
743
|
+
vfunc_update_array_finish(_res_: Gio.AsyncResult): any[] | null
|
|
744
|
+
vfunc_update_blank(sparql: string | null, priority: number, cancellable: Gio.Cancellable | null): GLib.Variant | null
|
|
745
|
+
vfunc_update_blank_async(sparql: string | null, priority: number, cancellable: Gio.Cancellable | null, _callback_: Gio.AsyncReadyCallback<this> | null): void
|
|
746
|
+
vfunc_update_blank_finish(_res_: Gio.AsyncResult): GLib.Variant | null
|
|
747
|
+
vfunc_load(file: Gio.File, cancellable: Gio.Cancellable | null): void
|
|
748
|
+
vfunc_load_async(file: Gio.File, cancellable: Gio.Cancellable | null, _callback_: Gio.AsyncReadyCallback<this> | null): void
|
|
749
|
+
vfunc_load_finish(_res_: Gio.AsyncResult): void
|
|
750
|
+
vfunc_statistics(cancellable: Gio.Cancellable | null): any | null
|
|
751
|
+
vfunc_statistics_async(cancellable: Gio.Cancellable | null, _callback_: Gio.AsyncReadyCallback<this> | null): void
|
|
752
|
+
vfunc_statistics_finish(_res_: Gio.AsyncResult): any | null
|
|
753
|
+
vfunc_get_namespace_manager(): NamespaceManager | null
|
|
754
|
+
vfunc_query_statement(sparql: string | null, cancellable: Gio.Cancellable | null): any | null
|
|
755
|
+
|
|
756
|
+
// Class property signals of Tracker-2.0.Tracker.SparqlConnection
|
|
757
|
+
|
|
758
|
+
connect(sigName: string, callback: (...args: any[]) => void): number
|
|
759
|
+
connect_after(sigName: string, callback: (...args: any[]) => void): number
|
|
760
|
+
emit(sigName: string, ...args: any[]): void
|
|
761
|
+
disconnect(id: number): void
|
|
762
|
+
}
|
|
763
|
+
|
|
764
|
+
export class SparqlConnection extends GObject.Object {
|
|
765
|
+
|
|
766
|
+
// Own properties of Tracker-2.0.Tracker.SparqlConnection
|
|
767
|
+
|
|
768
|
+
static name: string
|
|
769
|
+
static $gtype: GObject.GType<SparqlConnection>
|
|
770
|
+
|
|
771
|
+
// Constructors of Tracker-2.0.Tracker.SparqlConnection
|
|
772
|
+
|
|
773
|
+
constructor(config?: SparqlConnection.ConstructorProperties)
|
|
774
|
+
_init(config?: SparqlConnection.ConstructorProperties): void
|
|
775
|
+
static get_async(cancellable: Gio.Cancellable | null, _callback_: Gio.AsyncReadyCallback<SparqlConnection> | null): void
|
|
776
|
+
static get_finish(_res_: Gio.AsyncResult): any
|
|
777
|
+
static get(cancellable: Gio.Cancellable | null): any
|
|
778
|
+
static remote_new(uri_base: string | null): any
|
|
779
|
+
static local_new(flags: any, store: Gio.File, journal: Gio.File | null, ontology: Gio.File | null, cancellable: Gio.Cancellable | null): any
|
|
780
|
+
static local_new_async(flags: any, store: Gio.File, journal: Gio.File | null, ontology: Gio.File | null, cancellable: Gio.Cancellable | null, _callback_: Gio.AsyncReadyCallback<SparqlConnection> | null): void
|
|
781
|
+
static local_new_finish(_res_: Gio.AsyncResult): any
|
|
782
|
+
static set_domain(domain: string | null): void
|
|
783
|
+
static get_domain(): string | null
|
|
784
|
+
static set_dbus_connection(dbus_connection: Gio.DBusConnection): void
|
|
785
|
+
static get_dbus_connection(): Gio.DBusConnection | null
|
|
786
|
+
}
|
|
787
|
+
|
|
788
|
+
export module SparqlCursor {
|
|
789
|
+
|
|
790
|
+
// Constructor properties interface
|
|
791
|
+
|
|
792
|
+
export interface ConstructorProperties extends GObject.Object.ConstructorProperties {
|
|
793
|
+
|
|
794
|
+
// Own constructor properties of Tracker-2.0.Tracker.SparqlCursor
|
|
795
|
+
|
|
796
|
+
connection?: any | null
|
|
797
|
+
}
|
|
798
|
+
|
|
799
|
+
}
|
|
800
|
+
|
|
801
|
+
export interface SparqlCursor {
|
|
802
|
+
|
|
803
|
+
// Own properties of Tracker-2.0.Tracker.SparqlCursor
|
|
804
|
+
|
|
805
|
+
connection: any
|
|
806
|
+
readonly n_columns: number
|
|
807
|
+
|
|
808
|
+
// Owm methods of Tracker-2.0.Tracker.SparqlCursor
|
|
809
|
+
|
|
810
|
+
get_value_type(column: number): any
|
|
811
|
+
get_variable_name(column: number): string | null
|
|
812
|
+
get_string(column: number): [ /* returnType */ string | null, /* length */ number ]
|
|
813
|
+
next(cancellable: Gio.Cancellable | null): boolean
|
|
814
|
+
next_async(cancellable: Gio.Cancellable | null, _callback_: Gio.AsyncReadyCallback<this> | null): void
|
|
815
|
+
next_finish(_res_: Gio.AsyncResult): boolean
|
|
816
|
+
rewind(): void
|
|
817
|
+
close(): void
|
|
818
|
+
get_integer(column: number): number
|
|
819
|
+
get_double(column: number): number
|
|
820
|
+
get_boolean(column: number): boolean
|
|
821
|
+
is_bound(column: number): boolean
|
|
822
|
+
get_connection(): any
|
|
823
|
+
set_connection(value: any): void
|
|
824
|
+
get_n_columns(): number
|
|
825
|
+
|
|
826
|
+
// Own virtual methods of Tracker-2.0.Tracker.SparqlCursor
|
|
827
|
+
|
|
828
|
+
vfunc_get_value_type(column: number): any
|
|
829
|
+
vfunc_get_variable_name(column: number): string | null
|
|
830
|
+
vfunc_get_string(column: number): [ /* returnType */ string | null, /* length */ number ]
|
|
831
|
+
vfunc_next(cancellable: Gio.Cancellable | null): boolean
|
|
832
|
+
vfunc_next_async(cancellable: Gio.Cancellable | null, _callback_: Gio.AsyncReadyCallback<this> | null): void
|
|
833
|
+
vfunc_next_finish(_res_: Gio.AsyncResult): boolean
|
|
834
|
+
vfunc_rewind(): void
|
|
835
|
+
vfunc_close(): void
|
|
836
|
+
vfunc_get_integer(column: number): number
|
|
837
|
+
vfunc_get_double(column: number): number
|
|
838
|
+
vfunc_get_boolean(column: number): boolean
|
|
839
|
+
vfunc_is_bound(column: number): boolean
|
|
840
|
+
vfunc_get_n_columns(): number
|
|
841
|
+
|
|
842
|
+
// Class property signals of Tracker-2.0.Tracker.SparqlCursor
|
|
843
|
+
|
|
844
|
+
connect(sigName: "notify::connection", callback: (($obj: SparqlCursor, pspec: GObject.ParamSpec) => void)): number
|
|
845
|
+
connect_after(sigName: "notify::connection", callback: (($obj: SparqlCursor, pspec: GObject.ParamSpec) => void)): number
|
|
846
|
+
emit(sigName: "notify::connection", ...args: any[]): void
|
|
847
|
+
connect(sigName: "notify::n-columns", callback: (($obj: SparqlCursor, pspec: GObject.ParamSpec) => void)): number
|
|
848
|
+
connect_after(sigName: "notify::n-columns", callback: (($obj: SparqlCursor, pspec: GObject.ParamSpec) => void)): number
|
|
849
|
+
emit(sigName: "notify::n-columns", ...args: any[]): void
|
|
850
|
+
connect(sigName: string, callback: (...args: any[]) => void): number
|
|
851
|
+
connect_after(sigName: string, callback: (...args: any[]) => void): number
|
|
852
|
+
emit(sigName: string, ...args: any[]): void
|
|
853
|
+
disconnect(id: number): void
|
|
854
|
+
}
|
|
855
|
+
|
|
856
|
+
export class SparqlCursor extends GObject.Object {
|
|
857
|
+
|
|
858
|
+
// Own properties of Tracker-2.0.Tracker.SparqlCursor
|
|
859
|
+
|
|
860
|
+
static name: string
|
|
861
|
+
static $gtype: GObject.GType<SparqlCursor>
|
|
862
|
+
|
|
863
|
+
// Constructors of Tracker-2.0.Tracker.SparqlCursor
|
|
864
|
+
|
|
865
|
+
constructor(config?: SparqlCursor.ConstructorProperties)
|
|
866
|
+
_init(config?: SparqlCursor.ConstructorProperties): void
|
|
867
|
+
}
|
|
868
|
+
|
|
869
|
+
export module SparqlStatement {
|
|
870
|
+
|
|
871
|
+
// Constructor properties interface
|
|
872
|
+
|
|
873
|
+
export interface ConstructorProperties extends GObject.Object.ConstructorProperties {
|
|
874
|
+
|
|
875
|
+
// Own constructor properties of Tracker-2.0.Tracker.SparqlStatement
|
|
876
|
+
|
|
877
|
+
sparql?: string | null
|
|
878
|
+
connection?: any | null
|
|
879
|
+
}
|
|
880
|
+
|
|
881
|
+
}
|
|
882
|
+
|
|
883
|
+
export interface SparqlStatement {
|
|
884
|
+
|
|
885
|
+
// Own properties of Tracker-2.0.Tracker.SparqlStatement
|
|
886
|
+
|
|
887
|
+
sparql: string | null
|
|
888
|
+
connection: any
|
|
889
|
+
|
|
890
|
+
// Owm methods of Tracker-2.0.Tracker.SparqlStatement
|
|
891
|
+
|
|
892
|
+
bind_int(name: string | null, value: number): void
|
|
893
|
+
bind_boolean(name: string | null, value: boolean): void
|
|
894
|
+
bind_string(name: string | null, value: string | null): void
|
|
895
|
+
bind_double(name: string | null, value: number): void
|
|
896
|
+
execute(cancellable: Gio.Cancellable | null): any
|
|
897
|
+
execute_async(cancellable: Gio.Cancellable | null, _callback_: Gio.AsyncReadyCallback<this> | null): void
|
|
898
|
+
execute_finish(_res_: Gio.AsyncResult): any
|
|
899
|
+
get_sparql(): string | null
|
|
900
|
+
set_sparql(value: string | null): void
|
|
901
|
+
get_connection(): any
|
|
902
|
+
set_connection(value: any): void
|
|
903
|
+
|
|
904
|
+
// Own virtual methods of Tracker-2.0.Tracker.SparqlStatement
|
|
905
|
+
|
|
906
|
+
vfunc_bind_int(name: string | null, value: number): void
|
|
907
|
+
vfunc_bind_boolean(name: string | null, value: boolean): void
|
|
908
|
+
vfunc_bind_string(name: string | null, value: string | null): void
|
|
909
|
+
vfunc_bind_double(name: string | null, value: number): void
|
|
910
|
+
vfunc_execute(cancellable: Gio.Cancellable | null): any
|
|
911
|
+
vfunc_execute_async(cancellable: Gio.Cancellable | null, _callback_: Gio.AsyncReadyCallback<this> | null): void
|
|
912
|
+
vfunc_execute_finish(_res_: Gio.AsyncResult): any
|
|
913
|
+
|
|
914
|
+
// Class property signals of Tracker-2.0.Tracker.SparqlStatement
|
|
915
|
+
|
|
916
|
+
connect(sigName: "notify::sparql", callback: (($obj: SparqlStatement, pspec: GObject.ParamSpec) => void)): number
|
|
917
|
+
connect_after(sigName: "notify::sparql", callback: (($obj: SparqlStatement, pspec: GObject.ParamSpec) => void)): number
|
|
918
|
+
emit(sigName: "notify::sparql", ...args: any[]): void
|
|
919
|
+
connect(sigName: "notify::connection", callback: (($obj: SparqlStatement, pspec: GObject.ParamSpec) => void)): number
|
|
920
|
+
connect_after(sigName: "notify::connection", callback: (($obj: SparqlStatement, pspec: GObject.ParamSpec) => void)): number
|
|
921
|
+
emit(sigName: "notify::connection", ...args: any[]): void
|
|
922
|
+
connect(sigName: string, callback: (...args: any[]) => void): number
|
|
923
|
+
connect_after(sigName: string, callback: (...args: any[]) => void): number
|
|
924
|
+
emit(sigName: string, ...args: any[]): void
|
|
925
|
+
disconnect(id: number): void
|
|
926
|
+
}
|
|
927
|
+
|
|
928
|
+
export class SparqlStatement extends GObject.Object {
|
|
929
|
+
|
|
930
|
+
// Own properties of Tracker-2.0.Tracker.SparqlStatement
|
|
931
|
+
|
|
932
|
+
static name: string
|
|
933
|
+
static $gtype: GObject.GType<SparqlStatement>
|
|
934
|
+
|
|
935
|
+
// Constructors of Tracker-2.0.Tracker.SparqlStatement
|
|
936
|
+
|
|
937
|
+
constructor(config?: SparqlStatement.ConstructorProperties)
|
|
938
|
+
_init(config?: SparqlStatement.ConstructorProperties): void
|
|
939
|
+
}
|
|
940
|
+
|
|
941
|
+
export interface NamespaceManagerClass {
|
|
942
|
+
|
|
943
|
+
// Own fields of Tracker-2.0.Tracker.NamespaceManagerClass
|
|
944
|
+
|
|
945
|
+
parent_class: GObject.ObjectClass
|
|
946
|
+
}
|
|
947
|
+
|
|
948
|
+
export abstract class NamespaceManagerClass {
|
|
949
|
+
|
|
950
|
+
// Own properties of Tracker-2.0.Tracker.NamespaceManagerClass
|
|
951
|
+
|
|
952
|
+
static name: string
|
|
953
|
+
}
|
|
954
|
+
|
|
955
|
+
export interface NotifierClass {
|
|
956
|
+
|
|
957
|
+
// Own fields of Tracker-2.0.Tracker.NotifierClass
|
|
958
|
+
|
|
959
|
+
parent_class: GObject.ObjectClass
|
|
960
|
+
padding: any[]
|
|
961
|
+
}
|
|
962
|
+
|
|
963
|
+
export abstract class NotifierClass {
|
|
964
|
+
|
|
965
|
+
// Own properties of Tracker-2.0.Tracker.NotifierClass
|
|
966
|
+
|
|
967
|
+
static name: string
|
|
968
|
+
}
|
|
969
|
+
|
|
970
|
+
export interface NotifierEvent {
|
|
971
|
+
|
|
972
|
+
// Owm methods of Tracker-2.0.Tracker.NotifierEvent
|
|
973
|
+
|
|
974
|
+
/**
|
|
975
|
+
* Returns the event type.
|
|
976
|
+
* @returns The event type
|
|
977
|
+
*/
|
|
978
|
+
get_event_type(): NotifierEventType
|
|
979
|
+
/**
|
|
980
|
+
* Returns the tracker:id of the element being notified upon.
|
|
981
|
+
* @returns the resource ID
|
|
982
|
+
*/
|
|
983
|
+
get_id(): number
|
|
984
|
+
/**
|
|
985
|
+
* Returns the location (e.g. an URI) of the element if the notifier
|
|
986
|
+
* has the flag %TRACKER_NOTIFIER_FLAG_QUERY_LOCATION, and it can
|
|
987
|
+
* be obtained at the time of emission.
|
|
988
|
+
* @returns The element location, or %NULL
|
|
989
|
+
*/
|
|
990
|
+
get_location(): string | null
|
|
991
|
+
/**
|
|
992
|
+
* Returns the RDF type that this notification event relates to, in their
|
|
993
|
+
* expanded forms (for example,
|
|
994
|
+
* <http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#Audio>).
|
|
995
|
+
*
|
|
996
|
+
* A resource may have multiple RDF types. In the case of changes to a
|
|
997
|
+
* resource with multiple types, one event will be notified for each
|
|
998
|
+
* RDF type the notifier is subscribed to.
|
|
999
|
+
*
|
|
1000
|
+
* For performance reasons, Tracker only sends notifications for events that
|
|
1001
|
+
* are explicitly marked with the tracker:notify property in their ontology.
|
|
1002
|
+
* @returns the RDF type of the element
|
|
1003
|
+
*/
|
|
1004
|
+
get_type(): string | null
|
|
1005
|
+
/**
|
|
1006
|
+
* Returns the Uniform Resource Name of the element if the
|
|
1007
|
+
* notifier has the flag %TRACKER_NOTIFIER_FLAG_QUERY_URN enabled.
|
|
1008
|
+
*
|
|
1009
|
+
* This URN is an unique string identifier for the resource being
|
|
1010
|
+
* notified upon, typically of the form "urn:uuid:...".
|
|
1011
|
+
* @returns The element URN
|
|
1012
|
+
*/
|
|
1013
|
+
get_urn(): string | null
|
|
1014
|
+
}
|
|
1015
|
+
|
|
1016
|
+
export class NotifierEvent {
|
|
1017
|
+
|
|
1018
|
+
// Own properties of Tracker-2.0.Tracker.NotifierEvent
|
|
1019
|
+
|
|
1020
|
+
static name: string
|
|
1021
|
+
}
|
|
1022
|
+
|
|
1023
|
+
export interface ResourceClass {
|
|
1024
|
+
|
|
1025
|
+
// Own fields of Tracker-2.0.Tracker.ResourceClass
|
|
1026
|
+
|
|
1027
|
+
parent_class: GObject.ObjectClass
|
|
1028
|
+
}
|
|
1029
|
+
|
|
1030
|
+
export abstract class ResourceClass {
|
|
1031
|
+
|
|
1032
|
+
// Own properties of Tracker-2.0.Tracker.ResourceClass
|
|
1033
|
+
|
|
1034
|
+
static name: string
|
|
1035
|
+
}
|
|
1036
|
+
|
|
1037
|
+
export interface SparqlBuilderClass {
|
|
1038
|
+
}
|
|
1039
|
+
|
|
1040
|
+
export abstract class SparqlBuilderClass {
|
|
1041
|
+
|
|
1042
|
+
// Own properties of Tracker-2.0.Tracker.SparqlBuilderClass
|
|
1043
|
+
|
|
1044
|
+
static name: string
|
|
1045
|
+
}
|
|
1046
|
+
|
|
1047
|
+
export interface SparqlBuilderPrivate {
|
|
1048
|
+
}
|
|
1049
|
+
|
|
1050
|
+
export class SparqlBuilderPrivate {
|
|
1051
|
+
|
|
1052
|
+
// Own properties of Tracker-2.0.Tracker.SparqlBuilderPrivate
|
|
1053
|
+
|
|
1054
|
+
static name: string
|
|
1055
|
+
}
|
|
1056
|
+
|
|
1057
|
+
export interface SparqlConnectionClass {
|
|
1058
|
+
|
|
1059
|
+
// Own fields of Tracker-2.0.Tracker.SparqlConnectionClass
|
|
1060
|
+
|
|
1061
|
+
query: (self: any, sparql: string | null, cancellable: Gio.Cancellable | null) => any
|
|
1062
|
+
query_async: (self: any, sparql: string | null, cancellable: Gio.Cancellable | null, _callback_: Gio.AsyncReadyCallback | null) => void
|
|
1063
|
+
query_finish: (self: any, _res_: Gio.AsyncResult) => any
|
|
1064
|
+
update: (self: any, sparql: string | null, priority: number, cancellable: Gio.Cancellable | null) => void
|
|
1065
|
+
update_async: (self: any, sparql: string | null, priority: number, cancellable: Gio.Cancellable | null, _callback_: Gio.AsyncReadyCallback | null) => void
|
|
1066
|
+
update_finish: (self: any, _res_: Gio.AsyncResult) => void
|
|
1067
|
+
update_array_async: (self: any, sparql: string[], priority: number, cancellable: Gio.Cancellable | null, _callback_: Gio.AsyncReadyCallback | null) => void
|
|
1068
|
+
update_array_finish: (self: any, _res_: Gio.AsyncResult) => any[] | null
|
|
1069
|
+
update_blank: (self: any, sparql: string | null, priority: number, cancellable: Gio.Cancellable | null) => GLib.Variant | null
|
|
1070
|
+
update_blank_async: (self: any, sparql: string | null, priority: number, cancellable: Gio.Cancellable | null, _callback_: Gio.AsyncReadyCallback | null) => void
|
|
1071
|
+
update_blank_finish: (self: any, _res_: Gio.AsyncResult) => GLib.Variant | null
|
|
1072
|
+
load: (self: any, file: Gio.File, cancellable: Gio.Cancellable | null) => void
|
|
1073
|
+
load_async: (self: any, file: Gio.File, cancellable: Gio.Cancellable | null, _callback_: Gio.AsyncReadyCallback | null) => void
|
|
1074
|
+
load_finish: (self: any, _res_: Gio.AsyncResult) => void
|
|
1075
|
+
statistics: (self: any, cancellable: Gio.Cancellable | null) => any | null
|
|
1076
|
+
statistics_async: (self: any, cancellable: Gio.Cancellable | null, _callback_: Gio.AsyncReadyCallback | null) => void
|
|
1077
|
+
statistics_finish: (self: any, _res_: Gio.AsyncResult) => any | null
|
|
1078
|
+
get_namespace_manager: (self: any) => NamespaceManager | null
|
|
1079
|
+
query_statement: (self: any, sparql: string | null, cancellable: Gio.Cancellable | null) => any | null
|
|
1080
|
+
}
|
|
1081
|
+
|
|
1082
|
+
export abstract class SparqlConnectionClass {
|
|
1083
|
+
|
|
1084
|
+
// Own properties of Tracker-2.0.Tracker.SparqlConnectionClass
|
|
1085
|
+
|
|
1086
|
+
static name: string
|
|
1087
|
+
}
|
|
1088
|
+
|
|
1089
|
+
export interface SparqlConnectionPrivate {
|
|
1090
|
+
}
|
|
1091
|
+
|
|
1092
|
+
export class SparqlConnectionPrivate {
|
|
1093
|
+
|
|
1094
|
+
// Own properties of Tracker-2.0.Tracker.SparqlConnectionPrivate
|
|
1095
|
+
|
|
1096
|
+
static name: string
|
|
1097
|
+
}
|
|
1098
|
+
|
|
1099
|
+
export interface SparqlCursorClass {
|
|
1100
|
+
|
|
1101
|
+
// Own fields of Tracker-2.0.Tracker.SparqlCursorClass
|
|
1102
|
+
|
|
1103
|
+
get_value_type: (self: any, column: number) => any
|
|
1104
|
+
get_variable_name: (self: any, column: number) => string | null
|
|
1105
|
+
get_string: (self: any, column: number) => [ /* returnType */ string | null, /* length */ number ]
|
|
1106
|
+
next: (self: any, cancellable: Gio.Cancellable | null) => boolean
|
|
1107
|
+
next_async: (self: any, cancellable: Gio.Cancellable | null, _callback_: Gio.AsyncReadyCallback | null) => void
|
|
1108
|
+
next_finish: (self: any, _res_: Gio.AsyncResult) => boolean
|
|
1109
|
+
rewind: (self: any) => void
|
|
1110
|
+
close: (self: any) => void
|
|
1111
|
+
get_integer: (self: any, column: number) => number
|
|
1112
|
+
get_double: (self: any, column: number) => number
|
|
1113
|
+
get_boolean: (self: any, column: number) => boolean
|
|
1114
|
+
is_bound: (self: any, column: number) => boolean
|
|
1115
|
+
}
|
|
1116
|
+
|
|
1117
|
+
export abstract class SparqlCursorClass {
|
|
1118
|
+
|
|
1119
|
+
// Own properties of Tracker-2.0.Tracker.SparqlCursorClass
|
|
1120
|
+
|
|
1121
|
+
static name: string
|
|
1122
|
+
}
|
|
1123
|
+
|
|
1124
|
+
export interface SparqlCursorPrivate {
|
|
1125
|
+
}
|
|
1126
|
+
|
|
1127
|
+
export class SparqlCursorPrivate {
|
|
1128
|
+
|
|
1129
|
+
// Own properties of Tracker-2.0.Tracker.SparqlCursorPrivate
|
|
1130
|
+
|
|
1131
|
+
static name: string
|
|
1132
|
+
}
|
|
1133
|
+
|
|
1134
|
+
export interface SparqlStatementClass {
|
|
1135
|
+
|
|
1136
|
+
// Own fields of Tracker-2.0.Tracker.SparqlStatementClass
|
|
1137
|
+
|
|
1138
|
+
bind_int: (self: any, name: string | null, value: number) => void
|
|
1139
|
+
bind_boolean: (self: any, name: string | null, value: boolean) => void
|
|
1140
|
+
bind_string: (self: any, name: string | null, value: string | null) => void
|
|
1141
|
+
bind_double: (self: any, name: string | null, value: number) => void
|
|
1142
|
+
execute: (self: any, cancellable: Gio.Cancellable | null) => any
|
|
1143
|
+
execute_async: (self: any, cancellable: Gio.Cancellable | null, _callback_: Gio.AsyncReadyCallback | null) => void
|
|
1144
|
+
execute_finish: (self: any, _res_: Gio.AsyncResult) => any
|
|
1145
|
+
}
|
|
1146
|
+
|
|
1147
|
+
export abstract class SparqlStatementClass {
|
|
1148
|
+
|
|
1149
|
+
// Own properties of Tracker-2.0.Tracker.SparqlStatementClass
|
|
1150
|
+
|
|
1151
|
+
static name: string
|
|
1152
|
+
}
|
|
1153
|
+
|
|
1154
|
+
export interface SparqlStatementPrivate {
|
|
1155
|
+
}
|
|
1156
|
+
|
|
1157
|
+
export class SparqlStatementPrivate {
|
|
1158
|
+
|
|
1159
|
+
// Own properties of Tracker-2.0.Tracker.SparqlStatementPrivate
|
|
1160
|
+
|
|
1161
|
+
static name: string
|
|
1162
|
+
}
|
|
1163
|
+
|
|
1164
|
+
/**
|
|
1165
|
+
* Name of the imported GIR library
|
|
1166
|
+
* @see https://gitlab.gnome.org/GNOME/gjs/-/blob/master/gi/ns.cpp#L188
|
|
1167
|
+
*/
|
|
1168
|
+
export const __name__: string
|
|
1169
|
+
/**
|
|
1170
|
+
* Version of the imported GIR library
|
|
1171
|
+
* @see https://gitlab.gnome.org/GNOME/gjs/-/blob/master/gi/ns.cpp#L189
|
|
1172
|
+
*/
|
|
1173
|
+
export const __version__: string
|
|
1174
|
+
// END
|