| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Creating a single query for all values to delete can only work if
all values have a match. As soon as a value is already missing,
the query would just bail out as there's no real match.
We want to delete every value individually regardless of other
properties, so decompose the single delete into multiple individual
deletes.
Fixes "Unable to insert multiple values for subject..." warnings
as the insertion queries would rely on single-valued properties being
cleared beforehand.
https://gitlab.gnome.org/GNOME/tracker/issues/28
Closes: #28
|
|
|
|
|
| |
This also adds `tracker extract -o json` to dump resources in JSON-LD,
in anticipation of corresponding updates in tracker-miners.git.
|
|
|
|
|
| |
These are C helper functions, so users may create trees of TrackerResources
without having to manually unref all non-root ones.
|
|
|
|
|
| |
The gir-scanner doesn't actually run for these files at the moment
(see bug#782091) which is why the mistakes didn't get caught until now.
|
|
|
|
|
| |
The gir-scanner doesn't actually run for these files at the moment, so
the mistakes didn't get caught until now.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
TrackerResource was creating bad SPARQL & Turtle from GDateTime values.
If you saw this...
GDBus.Error:org.freedesktop.Tracker1.SparqlError.Type: Not a ISO
8601 date string. Allowed form is [-]CCYY-MM-DDThh:mm:ss[Z|(+|-)hh:mm]
...it's because in the arguments for g_date_time_format() I confused %S
(seconds since the last minute) with %s (seconds since 1st January
1970). That's a lot of extra seconds.
|
| |
|
|
|
|
|
|
|
| |
Those were not being printed, just referenced in the parent resource.
Fixes properties like slo:location being lost on newly indexed photos.
https://bugzilla.gnome.org/show_bug.cgi?id=776723
|
|
|
|
|
|
|
| |
We don't need to generate sparql/turtle for builtin classes
(eg. nmm:flash-on).
https://bugzilla.gnome.org/show_bug.cgi?id=776723
|
|
|
|
|
|
|
|
| |
It doesn't really apply. The DELETE DATA { pattern } query requires
the exact given triples, and won't work on variables. As it's not
nice or possible to query the current values just to perform a better
looking DELETE DATA {} query, just stick to the DELETE {} WHERE {}
one, and don't insinuate that we have a better option.
|
|
|
|
| |
Multiline statements get braces around.
|
|
|
|
|
| |
The context is reused, so the list must be freed again after the
second use.
|
|
|
|
| |
And document the missing functions.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
For a long time, all the Tracker extractors have manually constructed a
SPARQL update command using TrackerSparqlBuilder to represent their
output. This commit changes all of them to use the TrackerResource
class instead, which makes the code a lot more concise and readable.
This introduces some API breaks in the internal libtracker-extract
library. This has been a private library since Tracker 0.16 or earlier,
so it's fine.
If the extractors only output SPARQL then they are only useful to
people who are using a SPARQL store. Now we can output a serialization
format like Turtle as well. This will hopefully make the extract modules
useful outside of Tracker itself.
I've tried to preserve the behaviour of the extractors as much as
possible, but there are two things that are now handled differently:
* nao:Tag resources are given a fixed URI based on the tag label, such
as <urn:tag:My_Tag>. Previously they were inserted as blank nodes,
so tracker-store would give them unique IDs like <urn:uuid:1234...>
* All extractors created nco:Contact resources for content publishers,
but previously some would assign fixed URIs based on the name
<urn:contact:James%20Joyce>, while others would insert them as blank
nodes so they would be assigned unique IDs like <urn:uuid:1234...>.
Now, all extractors create nco:Contact resources with fixed URIs
based on the content creator's name.
https://bugzilla.gnome.org/show_bug.cgi?id=767472
|
|
This provides a "resource-oriented" API for inserting and updating the
database. Rather than having to generate SPARQL queries, you can use the
TrackerResource abstraction to prepare information about a set of
resources, then generate a SPARQL query automatically.
TrackerResource can also serialize to Turtle directly.
https://bugzilla.gnome.org/show_bug.cgi?id=767472
|