solang - sparqling your photo managersolang sparqling your photo manager debarshi ray department of...

16
Introduction Search Tags Meta-data Conclusion Solang SPARQLing Your Photo Manager Debarshi Ray Department of Computer Science, University of Helsinki FOSDEM 2010 Debarshi Ray Solang

Upload: others

Post on 30-Sep-2020

0 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Solang - SPARQLing Your Photo ManagerSolang SPARQLing Your Photo Manager Debarshi Ray Department of Computer Science, University of Helsinki FOSDEM 2010 Debarshi Ray Solang Introduction

IntroductionSearch

TagsMeta-dataConclusion

SolangSPARQLing Your Photo Manager

Debarshi Ray

Department of Computer Science, University of Helsinki

FOSDEM 2010

Debarshi Ray Solang

Page 2: Solang - SPARQLing Your Photo ManagerSolang SPARQLing Your Photo Manager Debarshi Ray Department of Computer Science, University of Helsinki FOSDEM 2010 Debarshi Ray Solang Introduction

IntroductionSearch

TagsMeta-dataConclusion

Presented by:Philip Van Hoof

Debarshi Ray Solang

Page 3: Solang - SPARQLing Your Photo ManagerSolang SPARQLing Your Photo Manager Debarshi Ray Department of Computer Science, University of Helsinki FOSDEM 2010 Debarshi Ray Solang Introduction

IntroductionSearch

TagsMeta-dataConclusion

Debarshi Ray Solang

Page 4: Solang - SPARQLing Your Photo ManagerSolang SPARQLing Your Photo Manager Debarshi Ray Department of Computer Science, University of Helsinki FOSDEM 2010 Debarshi Ray Solang Introduction

IntroductionSearch

TagsMeta-dataConclusion

What Do We Need?

Search

Tags

Meta-data

Debarshi Ray Solang

Page 5: Solang - SPARQLing Your Photo ManagerSolang SPARQLing Your Photo Manager Debarshi Ray Department of Computer Science, University of Helsinki FOSDEM 2010 Debarshi Ray Solang Introduction

IntroductionSearch

TagsMeta-dataConclusion

Find All Photos

SPARQL query

SELECT ?photo ?mimeWHERE {

?photo a nmm:Photo ;nie:mimeType ?mime .

}

Debarshi Ray Solang

Page 6: Solang - SPARQLing Your Photo ManagerSolang SPARQLing Your Photo Manager Debarshi Ray Department of Computer Science, University of Helsinki FOSDEM 2010 Debarshi Ray Solang Introduction

IntroductionSearch

TagsMeta-dataConclusion

Find Photos Based On Tags

SPARQL query

SELECT ?photo ?mimeWHERE {

?photo a nmm:Photo ;nie:mimeType ?mime .{?photo nao:hasTag <urn:uuid:2680792f-...-dcc7780de246> .}

}

Debarshi Ray Solang

Page 7: Solang - SPARQLing Your Photo ManagerSolang SPARQLing Your Photo Manager Debarshi Ray Department of Computer Science, University of Helsinki FOSDEM 2010 Debarshi Ray Solang Introduction

IntroductionSearch

TagsMeta-dataConclusion

Find Photos Based On URLs (fake free text search)

SPARQL query

SELECT ?photo ?mimeWHERE {

?photo a nmm:Photo ;nie:mimeType ?mime .{?photo nie:url ?url . FILTER REGEX (?url, ’deolti’, ’i’)}

}

Debarshi Ray Solang

Page 8: Solang - SPARQLing Your Photo ManagerSolang SPARQLing Your Photo Manager Debarshi Ray Department of Computer Science, University of Helsinki FOSDEM 2010 Debarshi Ray Solang Introduction

IntroductionSearch

TagsMeta-dataConclusion

Find Photos Based On Multiple Criteria

SPARQL query

SELECT ?photo ?mimeWHERE {

?photo a nmm:Photo ;nie:mimeType ?mime .{?photo nao:hasTag <urn:uuid:2680792f-...-dcc7780de246> .}{?photo nmm:fnumber ’4.6’ .}

}

Debarshi Ray Solang

Page 9: Solang - SPARQLing Your Photo ManagerSolang SPARQLing Your Photo Manager Debarshi Ray Department of Computer Science, University of Helsinki FOSDEM 2010 Debarshi Ray Solang Introduction

IntroductionSearch

TagsMeta-dataConclusion

Retrieve All Tags

SPARQL query

SELECT DISTINCT ?tag ?desc ?urnWHERE {

?urn a nao:Tag ;nao:prefLabel ?tag .OPTIONAL {

?urn a nie:InformationElement ;nie:comment ?desc .

}}ORDER BY ASC(?tag)

Debarshi Ray Solang

Page 10: Solang - SPARQLing Your Photo ManagerSolang SPARQLing Your Photo Manager Debarshi Ray Department of Computer Science, University of Helsinki FOSDEM 2010 Debarshi Ray Solang Introduction

IntroductionSearch

TagsMeta-dataConclusion

Create A Tag

SPARQL query

INSERT { :tag a nao:Tag ; nao:prefLabel ’favourites’ ;a nie:InformationElement ; nie:comment ’All those...’ .

} WHERE { OPTIONAL {?tag a nao:Tag ; nao:prefLabel ’favourites’ ;a nie:InformationElement ; nie:comment ’All those...’ . }FILTER (!bound(?tag))

}

Debarshi Ray Solang

Page 11: Solang - SPARQLing Your Photo ManagerSolang SPARQLing Your Photo Manager Debarshi Ray Department of Computer Science, University of Helsinki FOSDEM 2010 Debarshi Ray Solang Introduction

IntroductionSearch

TagsMeta-dataConclusion

Delete A Tag

SPARQL query

DELETE {<urn:uuid:2680792f-...-dcc7780de246> a rdfs:Resource .

}

Debarshi Ray Solang

Page 12: Solang - SPARQLing Your Photo ManagerSolang SPARQLing Your Photo Manager Debarshi Ray Department of Computer Science, University of Helsinki FOSDEM 2010 Debarshi Ray Solang Introduction

IntroductionSearch

TagsMeta-dataConclusion

Attach Tags To Photos

SPARQL query

INSERT {?photo nao:hasTag <urn:uuid:2680792f-...-dcc7780de246> .

}WHERE {

?photo nie:url ’file:///home/.../class.jpg’ .}

Debarshi Ray Solang

Page 13: Solang - SPARQLing Your Photo ManagerSolang SPARQLing Your Photo Manager Debarshi Ray Department of Computer Science, University of Helsinki FOSDEM 2010 Debarshi Ray Solang Introduction

IntroductionSearch

TagsMeta-dataConclusion

Detach Tags From Photos

SPARQL query

DELETE {?photo nao:hasTag <urn:uuid:2680792f-...-dcc7780de246> .

}WHERE {

?photo nie:url ’file:///home/.../class.jpg’ .}

Debarshi Ray Solang

Page 14: Solang - SPARQLing Your Photo ManagerSolang SPARQLing Your Photo Manager Debarshi Ray Department of Computer Science, University of Helsinki FOSDEM 2010 Debarshi Ray Solang Introduction

IntroductionSearch

TagsMeta-dataConclusion

Extract Meta-data

SPARQL query

SELECT nmm:exposureTime(?photo)WHERE {

?photo a nmm:Photo ;nie:url ’file:///home/.../class.jpg’ .

}

Debarshi Ray Solang

Page 15: Solang - SPARQLing Your Photo ManagerSolang SPARQLing Your Photo Manager Debarshi Ray Department of Computer Science, University of Helsinki FOSDEM 2010 Debarshi Ray Solang Introduction

IntroductionSearch

TagsMeta-dataConclusion

That’s all, folks.Any questions?

Debarshi Ray Solang

Page 16: Solang - SPARQLing Your Photo ManagerSolang SPARQLing Your Photo Manager Debarshi Ray Department of Computer Science, University of Helsinki FOSDEM 2010 Debarshi Ray Solang Introduction

IntroductionSearch

TagsMeta-dataConclusion

Solang

http://projects.gnome.org/solang#solang on irc.freenode.net

Debarshi Ray Solang