]> arthur.barton.de Git - netatalk.git/blobdiff - etc/afpd/spotlight_SPARQL_map.h
Set Tracker environment
[netatalk.git] / etc / afpd / spotlight_SPARQL_map.h
index 1ea6736fc47f057748ea791d5b65a3845f9dcef3..250894b1094ad12e4c18ea028915f61199e5575b 100644 (file)
@@ -24,7 +24,14 @@ enum ssm_type {
     ssmt_num,    /* a numeric value that requires a SPARQL FILTER */
     ssmt_str,    /* a string value that requieres a SPARQL FILTER */
     ssmt_fts,    /* a string value that will be queried with SPARQL 'fts:match' */
-    ssmt_date    /* date values are handled in a special map function map_daterange() */
+    ssmt_date,   /* date values are handled in a special map function map_daterange() */
+    ssmt_type    /* kMDItemContentType, requires special mapping */
+};
+
+enum kMDTypeMap {
+    kMDTypeMapNotSup,           /* not supported */
+    kMDTypeMapRDF,              /* query with rdf:type */
+    kMDTypeMapMime              /* query with nie:mimeType */
 };
 
 struct spotlight_sparql_map {
@@ -33,7 +40,13 @@ struct spotlight_sparql_map {
     const char *ssm_sparql_attr;
 };
 
+struct MDTypeMap {
+    const char *mdtm_value;     /* MD query value of attributes '_kMDItemGroupId' and 'kMDItemContentTypeTree' */
+    enum kMDTypeMap mdtm_type;   /* whether SPARQL query must search attribute rdf:type or nie:mime_Type */
+    const char *mdtm_sparql;    /* the SPARQL query match string */
+};
+
 extern struct spotlight_sparql_map spotlight_sparql_map[];
 extern struct spotlight_sparql_map spotlight_sparql_date_map[];
-
+extern struct MDTypeMap MDTypeMap[];
 #endif