implementing ontologies as ruby gems e. lynette rayle cornell university march 24,2015

26
Implementing Ontologies as RUBY GEMS E. Lynette Rayle Cornell University March 24,2015

Upload: giles-webb

Post on 18-Jan-2016

218 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Implementing Ontologies as RUBY GEMS E. Lynette Rayle Cornell University March 24,2015

Implementing Ontologies as RUBY GEMS

E. Lynette Rayle

Cornell University

March 24,2015

Page 2: Implementing Ontologies as RUBY GEMS E. Lynette Rayle Cornell University March 24,2015

ORE Ontologyhttp://www.openarchives.org/ore/1.0/primer

2

Page 3: Implementing Ontologies as RUBY GEMS E. Lynette Rayle Cornell University March 24,2015

ORE Sets

3

ORE:Aggregation

agg11

resource_1

resource_2

resource_3

aggr

egat

es

aggregates

aggregates

Page 4: Implementing Ontologies as RUBY GEMS E. Lynette Rayle Cornell University March 24,2015

Set Triples

<http://localhost/agg11> a <http://www.openarchives.org/ore/terms/Aggregation>; <http://purl.org/dc/terms/title> "My Resources"; <http://purl.org/dc/terms/creator> <http://localhost/p4>; <http://purl.org/dc/terms/description> "Resources that I like"; <http://www.openarchives.org/ore/terms/aggregates> "http://exmple.org/resource_1", "http://exmple.org/resource_2", "http://exmple.org/resource_3" .

4

Page 5: Implementing Ontologies as RUBY GEMS E. Lynette Rayle Cornell University March 24,2015

Set Triples

<http://localhost/agg11> a <http://www.openarchives.org/ore/terms/Aggregation>; <http://purl.org/dc/terms/title> "My Resources"; <http://purl.org/dc/terms/creator> <http://localhost/p4>; <http://purl.org/dc/terms/description> "Resources that I like"; <http://www.openarchives.org/ore/terms/aggregates> "http://exmple.org/resource_1", "http://exmple.org/resource_2", "http://exmple.org/resource_3" .

5

Page 6: Implementing Ontologies as RUBY GEMS E. Lynette Rayle Cornell University March 24,2015

Set Triples

<http://localhost/agg11> a <http://www.openarchives.org/ore/terms/Aggregation>; <http://purl.org/dc/terms/title> "My Resources"; <http://purl.org/dc/terms/creator> <http://localhost/p4>; <http://purl.org/dc/terms/description> "Resources that I like"; <http://www.openarchives.org/ore/terms/aggregates> "http://exmple.org/resource_1", "http://exmple.org/resource_2", "http://exmple.org/resource_3" .

6

Page 7: Implementing Ontologies as RUBY GEMS E. Lynette Rayle Cornell University March 24,2015

ORE Sets

7

ORE:Aggregation

agg11

resource_1

resource_2

resource_3

ORE:Proxy5736d50cb2b3

ORE:Proxyd99d023c1e0b

ORE:Proxyd3973a1bef89

aggr

egat

es

proxyFor

proxyIn

proxyIn

proxyIn

proxyFor

proxyFor

aggregates

Page 8: Implementing Ontologies as RUBY GEMS E. Lynette Rayle Cornell University March 24,2015

Proxy Triples

<http://localhost/px2b0a58fb-2dfa-4c8d-9e37-d99d023c1e0b> a <http://www.openarchives.org/ore/terms/Proxy>; <http://www.openarchives.org/ore/terms/proxyFor> "http://exmple.org/resource_2"; <http://www.openarchives.org/ore/terms/proxyIn> <http://localhost/agg11> .

8

Page 9: Implementing Ontologies as RUBY GEMS E. Lynette Rayle Cornell University March 24,2015

Proxy Triples

<http://localhost/px2b0a58fb-2dfa-4c8d-9e37-d99d023c1e0b> a <http://www.openarchives.org/ore/terms/Proxy>; <http://www.openarchives.org/ore/terms/proxyFor> "http://exmple.org/resource_2"; <http://www.openarchives.org/ore/terms/proxyIn> <http://localhost/agg11> .

9

Page 10: Implementing Ontologies as RUBY GEMS E. Lynette Rayle Cornell University March 24,2015

Proxy Triples

<http://localhost/px2b0a58fb-2dfa-4c8d-9e37-d99d023c1e0b> a <http://www.openarchives.org/ore/terms/Proxy>; <http://www.openarchives.org/ore/terms/proxyFor> "http://exmple.org/resource_2"; <http://www.openarchives.org/ore/terms/proxyIn> <http://localhost/agg11> .

10

Page 11: Implementing Ontologies as RUBY GEMS E. Lynette Rayle Cornell University March 24,2015

Proxy Triples

<http://localhost/px2b0a58fb-2dfa-4c8d-9e37-d99d023c1e0b> a <http://www.openarchives.org/ore/terms/Proxy>; <http://www.openarchives.org/ore/terms/proxyFor> "http://exmple.org/resource_2"; <http://www.openarchives.org/ore/terms/proxyIn> <http://localhost/agg11> .

11

Page 12: Implementing Ontologies as RUBY GEMS E. Lynette Rayle Cornell University March 24,2015

ORE Sets

12

ORE:Aggregation

agg11

resource_1

resource_2

resource_3

ORE:Proxy5736d50cb2b3

ORE:Proxyd99d023c1e0b

ORE:Proxyd3973a1bef89

aggr

egat

es

proxyFor

proxyIn

proxyIn

proxyIn

proxyFor

proxyFor

aggregates

Page 13: Implementing Ontologies as RUBY GEMS E. Lynette Rayle Cornell University March 24,2015

ORE Ordered Lists

13

ORE:Aggregation

agg11

resource_1

resource_2

resource_3

ORE:Proxy5736d50cb2b3

ORE:Proxyd99d023c1e0b

ORE:Proxyd3973a1bef89

prev

next

next

prev

aggr

egat

es

first

last

proxyFor

proxyIn

proxyIn

proxyIn

proxyFor

proxyFor

aggregates

Page 14: Implementing Ontologies as RUBY GEMS E. Lynette Rayle Cornell University March 24,2015

Ordered List - Aggregation Triples

<http://localhost/agg11> a <http://www.openarchives.org/ore/terms/Aggregation>; <http://purl.org/dc/terms/title> "My Resources"; <http://purl.org/dc/terms/creator> <http://localhost/p4>; <http://purl.org/dc/terms/description> "Resources that I like"; <http://www.openarchives.org/ore/terms/aggregates> "http://exmple.org/resource_1", "http://exmple.org/resource_2", "http://exmple.org/resource_3" ; <http://www.iana.org/assignments/relation/first> <http://localhost/pxf1d9414f-4395-4a2d-98a0-d3973a1bef89>; <http://www.iana.org/assignments/relation/last> <http://localhost/px94c45dd7-28c8-45ce-be40-5736d50cb2b3>.

14

Page 15: Implementing Ontologies as RUBY GEMS E. Lynette Rayle Cornell University March 24,2015

Ordered List - Aggregation Triples

<http://localhost/agg11> a <http://www.openarchives.org/ore/terms/Aggregation>; <http://purl.org/dc/terms/title> "My Resources"; <http://purl.org/dc/terms/creator> <http://localhost/p4>; <http://purl.org/dc/terms/description> "Resources that I like"; <http://www.openarchives.org/ore/terms/aggregates> "http://exmple.org/resource_1", "http://exmple.org/resource_2", "http://exmple.org/resource_3" ; <http://www.iana.org/assignments/relation/first> <http://localhost/pxf1d9414f-4395-4a2d-98a0-d3973a1bef89>; <http://www.iana.org/assignments/relation/last> <http://localhost/px94c45dd7-28c8-45ce-be40-5736d50cb2b3>.

15

Page 16: Implementing Ontologies as RUBY GEMS E. Lynette Rayle Cornell University March 24,2015

Ordered List - Aggregation Triples

<http://localhost/agg11> a <http://www.openarchives.org/ore/terms/Aggregation>; <http://purl.org/dc/terms/title> "My Resources"; <http://purl.org/dc/terms/creator> <http://localhost/p4>; <http://purl.org/dc/terms/description> "Resources that I like"; <http://www.openarchives.org/ore/terms/aggregates> "http://exmple.org/resource_1", "http://exmple.org/resource_2", "http://exmple.org/resource_3" ; <http://www.iana.org/assignments/relation/first> <http://localhost/pxf1d9414f-4395-4a2d-98a0-d3973a1bef89>; <http://www.iana.org/assignments/relation/last> <http://localhost/px94c45dd7-28c8-45ce-be40-5736d50cb2b3>.

16

Page 17: Implementing Ontologies as RUBY GEMS E. Lynette Rayle Cornell University March 24,2015

Ordered List - Proxy Triples

<http://localhost/px2b0a58fb-2dfa-4c8d-9e37-d99d023c1e0b> a <http://www.openarchives.org/ore/terms/Proxy>; <http://www.openarchives.org/ore/terms/proxyFor> "http://exmple.org/resource_2"; <http://www.openarchives.org/ore/terms/proxyIn> <http://localhost/agg11> ; <http://www.iana.org/assignments/relation/next> <http://localhost/px94c45dd7-28c8-45ce-be40-5736d50cb2b3>; <http://www.iana.org/assignments/relation/prev> <http://localhost/pxf1d9414f-4395-4a2d-98a0-d3973a1bef89>.

17

Page 18: Implementing Ontologies as RUBY GEMS E. Lynette Rayle Cornell University March 24,2015

Ordered List - Proxy Triples

<http://localhost/px2b0a58fb-2dfa-4c8d-9e37-d99d023c1e0b> a <http://www.openarchives.org/ore/terms/Proxy>; <http://www.openarchives.org/ore/terms/proxyFor> "http://exmple.org/resource_2"; <http://www.openarchives.org/ore/terms/proxyIn> <http://localhost/agg11> ; <http://www.iana.org/assignments/relation/next> <http://localhost/px94c45dd7-28c8-45ce-be40-5736d50cb2b3>; <http://www.iana.org/assignments/relation/prev> <http://localhost/pxf1d9414f-4395-4a2d-98a0-d3973a1bef89>.

18

Page 19: Implementing Ontologies as RUBY GEMS E. Lynette Rayle Cornell University March 24,2015

Ordered List - Proxy Triples

<http://localhost/px2b0a58fb-2dfa-4c8d-9e37-d99d023c1e0b> a <http://www.openarchives.org/ore/terms/Proxy>; <http://www.openarchives.org/ore/terms/proxyFor> "http://exmple.org/resource_2"; <http://www.openarchives.org/ore/terms/proxyIn> <http://localhost/agg11> ; <http://www.iana.org/assignments/relation/next> <http://localhost/px94c45dd7-28c8-45ce-be40-5736d50cb2b3>; <http://www.iana.org/assignments/relation/prev> <http://localhost/pxf1d9414f-4395-4a2d-98a0-d3973a1bef89>.

19

Page 20: Implementing Ontologies as RUBY GEMS E. Lynette Rayle Cornell University March 24,2015

ORE GEMhttps://github.com/ld4l/ore_rdf

20

Page 21: Implementing Ontologies as RUBY GEMS E. Lynette Rayle Cornell University March 24,2015

Using ORE Gem

agg11 = LD4L::OreRDF::CreateAggregation.call( :id=>'agg11', :title=>'More Resources', :description=>'More resources that I like')

resources = [ 'http://exmple.org/resource_1', 'http://exmple.org/resource_2', 'http://exmple.org/resource_3' ] LD4L::OreRDF::AddAggregatedResources.call( agg11,resources)

LD4L::OreRDF::PersistAggregation.call(agg11)

21

Page 22: Implementing Ontologies as RUBY GEMS E. Lynette Rayle Cornell University March 24,2015

Use Case

Ordered list for items in a Virtual Collection

22

Page 23: Implementing Ontologies as RUBY GEMS E. Lynette Rayle Cornell University March 24,2015

23

ORE Ontology Gem

Open AnnotationOntology Gem

Works Ontology Agnostic

Gem

Virtual CollectionEngine

ActiveTriples Gem

Resource (class) Repository (class)

RDF::Graph RDF::Repository

Uses

Uses

Uses Uses

UsesUses

Extends Maintains list of

Cornell Access and Discovery

Uses

Page 24: Implementing Ontologies as RUBY GEMS E. Lynette Rayle Cornell University March 24,2015

Similar Work

• projecthydra-labs/rdf-proxy_list

• curationexperts/activefedora-aggregation

24

Page 25: Implementing Ontologies as RUBY GEMS E. Lynette Rayle Cornell University March 24,2015

Resources

• RDF Ruby Development:

• ruby-rdf - rdf, linkeddata, rdf-do

• ActiveTriples - manipulate triples as objects

• LD4L

• ORE Gem - aggregations representing lists with items

• OA Gem - comment, tag, and semantic tag annotations

• Works Gem - ontology agnostic providing multiple models for works, metadata extraction into a simplified set of display metadata

• Virtual Collection Engine - UI for Virtual Collections25

Page 26: Implementing Ontologies as RUBY GEMS E. Lynette Rayle Cornell University March 24,2015

26