summaryrefslogtreecommitdiff
path: root/docs/reference/libtracker-sparql/nie-introduction.md
diff options
context:
space:
mode:
Diffstat (limited to 'docs/reference/libtracker-sparql/nie-introduction.md')
-rw-r--r--docs/reference/libtracker-sparql/nie-introduction.md65
1 files changed, 40 insertions, 25 deletions
diff --git a/docs/reference/libtracker-sparql/nie-introduction.md b/docs/reference/libtracker-sparql/nie-introduction.md
index f79535281..8d7478e7e 100644
--- a/docs/reference/libtracker-sparql/nie-introduction.md
+++ b/docs/reference/libtracker-sparql/nie-introduction.md
@@ -9,22 +9,33 @@ and content of a piece of data. Their specialized subclasses (defined
in the other ontologies) can be used to classify
a wide array of desktop resources and express them in RDF.
-[nie:DataObject](nie-ontology.html#nie:DataObject) class represents a bunch of
+[nie:DataObject](nie-ontology.html#nie:DataObject) class represents a collection of
bytes somewhere (local or remote), the physical entity that contain
-data. The *meaning* (interpretation) of that entity, the
-information for the user contained in those bytes (e.g. a music file,
+data. The *meaning* (interpretation) of that entity (e.g. a music file,
a picture) is represented on the
[nie:InformationElement](nie-ontology.html#nie:InformationElement) side of the
ontology.
-Both sides are linked using the
-property [nie:interpretedAs](nie-ontology.html#nie:interpretedAs) (and its reverse
-[nie:isStoredAs](nie-ontology.html#nie:isStoredAs)), indicating the correspondence
-between the physical element and its interpretation. There is also a
-property to
-link [nie:InformationElement](nie-ontology.html#nie:InformationElement)s,
-representing the logical containment between them (like a picture and
-its album).
+All resources on the desktop are basically related to each other with two most fundamental types
+of relations: interpretation, Expressed through [nie:interpretedAs](nie-ontology.html#nie:interpretedAs) and its reverse
+[nie:isStoredAs](nie-ontology.html#nie:isStoredAs).
+
+![](interpretation.svg)
+
+And containment, expressed through [nie:hasPart](nie-ontology.html#nie:hasPart) and its reverse
+[nie:isPartOf](nie-ontology.html#nie:isPartOf).
+
+![](containment.svg)
+
+These properties (or their subproperties with a more specific semantic meaning) provide
+the scaffolding to give an uniform view of the data with an arbitrary level of detail.
+For a more thorough example, the figure below represents an image in an archive in the
+attachment of a PDF document in the filesystem:
+
+![](example-interpretation-containment.svg)
+
+The horizontal edges express interpretation, the diagonal edges express containment.
+This approach gives a uniform overview of data regardless of how it's represented.
## Common properties
@@ -57,26 +68,30 @@ One of the most common resources in a desktop is a file. Given the split between
1. Every file (local or remote) should generate one DataObject instance and an InformationElement instance.
2. Even when Data Objects and Information Elements are different entities.
3. The URI of the DataObject is the real location of the item (e.g. ''file://path/to/file.mp3'')
- 3. The URI of the InformationElement(s) will be autogenerated IDs.
+ 3. The URI of the InformationElement(s) will be generated IDs.
4. Every DataObject must have the property [nie:url](nie-ontology.html#nie:url), that points to the location of the resource, and should be used by any program that wants to access it.
- 5. The InformationElement and DataObject are related via the nie:isStoredAs / nie:interpretedAs properties.
+ 5. The InformationElement and DataObject are related via the [nie:isStoredAs](nie-ontology.html#nie:isStoredAs) / [nie:interpretedAs](nie-ontology.html#nie:interpretedAs) properties.
-Here comes an example, for the image file /home/user/a.jpeg:
+Here comes an example, for the image file `/home/user/a.jpeg`:
-```
+```turtle
# Properties as nmm:Photo
<urn:uuid:10293801928301293> a nmm:Photo ;
- nie:isStoredAs <file:///home/user/a.jpeg> ;
- nfo:width 49 ;
- nfo:height 36 ;
- nmm:flash &lt;nmm:flash-off&gt;;
- nmm:whiteBalance <nmm:white-balance-automatic> ;
- nfo:equipment [ a nfo:Equipment ; nfo:make 'Nokia'; nfo:model 'N900'; nfo:equipmentSoftware 'Tracknon' ] .
+ nie:isStoredAs <file:///home/user/a.jpeg> ;
+ nfo:width 49 ;
+ nfo:height 36 ;
+ nmm:flash nmm:flash-off;
+ nmm:whiteBalance nmm:white-balance-automatic ;
+ nfo:equipment [
+ a nfo:Equipment ;
+ nfo:make 'Nokia';
+ nfo:model 'N900';
+ nfo:equipmentSoftware 'Tracknon'
+ ] .
# Properties from nfo:FileDataObject
<file:///home/user/a.jpeg> a nfo:FileDataObject ;
- nie:interpretedAs <urn:uuid:10293801928301293> ;
- nfo:fileSize 12341234 ;
- # Mandatory for any nfo:DataObject
- nie:url <file:///home/user/a.jpeg> .
+ nie:interpretedAs <urn:uuid:10293801928301293> ;
+ nfo:fileSize 12341234 ;
+ nie:url 'file:///home/user/a.jpeg' .
```