Mrs. Clark’s Class. Introducing…Mrs. Clark Introducing… Mrs. Lieberman Max.
Introducing FSter
-
Upload
itsmesrl -
Category
Technology
-
view
682 -
download
2
description
Transcript of Introducing FSter
FSterGuglielmo’s Hyper File System
Lorenzo Bellini, Roberto Guido,Marco Loregian, Michele Tameni
<name.surname>@itsme.it
Itsme – Fster: Guglielmo's Hyper File System 2
What is FSter?
➔FSter is a virtual file system implementation, based on Fuse technology and exploiting Tracker metadata technology to allow access to files according to the metadata they’re associated to
Itsme – Fster: Guglielmo's Hyper File System 3
Sample scenarios
➔Browsing the content of a drive, according to a user-defined hierarchy based on metadata;
➔Associating metadata to files whenever operations are performed on them;
➔Generating “virtual” files from metadata, e.g., a vCard file dynamically built from metadata
Itsme – Fster: Guglielmo's Hyper File System 4
Requirements anddomain architecture
FSter uses libtracker-client to build and execute sparql query on tracker-store
Queries are built according to a user-defined (XML) filesystem hierarchy
Itsme – Fster: Guglielmo's Hyper File System 5
Configuration file
➔A configuration file defines what the user will see in FSter directories
➔Configuration files must follow XML 1.0 standards➔An XML schema of the configuration file is avalaible (Fster.xsd)
Itsme – Fster: Guglielmo's Hyper File System 6
Xml element: folder
➔Shows each RDF subject matching with defined conditions as a folder and:
➔defines both inheritable and self conditions➔Allows generating a folder name from metadata➔allows nesting content object inside it➔defines editing policies for the content
Itsme – Fster: Guglielmo's Hyper File System 7
Xml element: set_folder
➔Shows each RDF object used with a specific RDF predicate as a folder and:
➔defines a RDF predicate to get the set of RDF objects used with it➔defines inheritable conditions➔allows nesting content objects inside it➔defines the editing policies of the content
Itsme – Fster: Guglielmo's Hyper File System 8
Xml element: file
➔Shows each RDF subject matching with defined conditions as a file and:
➔defines self conditions➔Allows generating a file name from metadata➔defines whether to expose the real file or a dump of file metadata from the repository
Itsme – Fster: Guglielmo's Hyper File System 9
Examples: Fster media library (1)➔Media grouped by images, audio and video
Itsme – Fster: Guglielmo's Hyper File System 10
Examples: Fster media library (2)➔Building the SPARQL query for folder element
static GList* collect_children_from_storage (HierarchyNode *node, ItemHandler *parent){
(..)
more_statements = condition_policy_to_sparql (&(node->priv->self_policy), parent, &values_offset);statements = g_list_concat (statements, more_statements);if (node->priv->child_policy.inherit == TRUE) { parent_node = node->priv->node; while (parent_node != NULL) { more_statements = condition_policy_to_sparql (&(parent_node->priv->child_policy), parent, &values_offset); statements = g_list_concat (statements, more_statements); if (parent_node->priv->child_policy.inherit == TRUE) parent_node = parent_node->priv->node; else break; } } sparql = build_sparql_query (NULL, var, statements);
(..)
}
Itsme – Fster: Guglielmo's Hyper File System 11
Examples: Fster media library (3)➔ <condition metadata="rdf:type" value="nfo:Audio" />
<name value="$self{nie:title}" />
SELECT ?item ?a WHERE { ?item nie:title ?a . ?item rdf:type nfo:Audio }
➔ <condition metadata="rdf:type" value="nfo:Image" /><name value="$self{nfo:fileName}" />
SELECT ?item ?a WHERE { ?item nfo:fileName ?a . ?item rdf:type nfo:Image }
➔ <condition metadata="rdf:type" value="nfo:Video" /><name value="$self{nfo:fileName}" />
SELECT ?item ?a WHERE { ?item nfo:fileName ?a . ?item rdf:type nfo:Video }
Itsme – Fster: Guglielmo's Hyper File System 12
Examples: Fster music library (1)➔Music grouped by artist, album or genre
Itsme – Fster: Guglielmo's Hyper File System 13
Examples: Fster music library (2)➔Building the SPARQL query for folder_set element
static GList* collect_children_set (HierarchyNode *node, ItemHandler *parent){
(..)
statements = g_list_append (statements, g_strdup_printf ("?item %s ?a", node->priv->additional_option));more_statements = condition_policy_to_sparql (&(node->priv->self_policy), parent, &values_offset);statements = g_list_concat (statements, more_statements);if (node->priv->child_policy.inherit == TRUE) { parent_node = node->priv->node; while (parent_node != NULL) { more_statements = condition_policy_to_sparql (&(parent_node->priv->child_policy), parent, &values_offset); statements = g_list_concat (statements, more_statements); if (parent_node->priv->child_policy.inherit == TRUE) parent_node = parent_node->priv->node; else break; }}sparql = build_sparql_query ("SELECT DISTINCT(?a)", 'a', statements);
(..)
}
Itsme – Fster: Guglielmo's Hyper File System 14
Examples: Fster music library (3)➔ <folder>
<condition metadata="rdf:type" value=" nmm:MusicAlbum" />
SELECT ?item ?a WHERE { ?item nmm:albumTitle ?a . ?item rdf:type nmm:MusicAlbum }
➔ <condition metadata="nmm:musicAlbum" value="$parent{/subject}" />
SELECT ?item ?a WHERE { ?item nie:title ?a . ?item nmm:musicAlbum "urn:album:Ci%20Vuole%20Orecchio" }
➔ <set_folder metadata="nfo:genre">
SELECT DISTINCT(?a) WHERE { ?item nfo:genre ?a }
➔ <condition metadata="nfo:genre" value="$parent{nfo:genre}" />
SELECT ?item ?a WHERE { ?item nie:title ?a . ?item nfo:genre "Folk" }
Itsme – Fster: Guglielmo's Hyper File System 15
Examples: Fster music library (4)
Itsme – Fster: Guglielmo's Hyper File System 16
Future development
➔SparQL in the <condition> tag
➔Plugin architecture allowing FSter to render metadata exposing them in standard format files (e.g., vcard, ...);
➔User-friendly configuration editing interface
➔Creation of folders
Itsme – Fster: Guglielmo's Hyper File System 17
References
➔Code: http://gitorious.org/itsme/fster
➔Wiki: http://gitorious.org/itsme/pages/Fster
➔Mailing lists: http://lists.itsme.it/
➔Support: #itsme-dev on irc.freenode.net
Thank you for your attention
www.itsme.it
Lorenzo Bellini, Roberto Guido,Marco Loregian, Michele Tameni<name.surname>@itsme.it