SlideShare a Scribd company logo
Empire: RDF & SPARQL Meet
         Java & JPA
        2010 Semantic Technology
               Conference

                       Michael Grove
             Director of Software Development
                    Clark & Parsia, LLC.
                   mike@clarkparsia.com
  http://clarkparsia.com -- http://www.twitter.com/candp
Background
RDF & SPARQL
   You know what these are...
Java Persistence API (JPA)
   Standard ORM API for Java developers
      Provides a way to map Java beans to relational
      data
   Part of Java SE and EE editions
   Implementations: Hibernate and Toplink.
Empire
   Implements JPA for RDF databases
   Uses SPARQL rather than JPQL
      We're considering adding JPQL support
   Apache 2.0 License -- released in Feb 2010.
Why?
Empire bridges the gap between traditional web apps &
the semantic web
   JPA helps abstract away (most) of the RDF details
   Helps lower learning curve for new developers
API, database, & query language independence
   Application code is written w/r/t to JPA API
       Developers only need to learn the domain API
       Sesame/Jena/Other bindings are injected at
       runtime -- invisible to the developer
Helps open up the Semantic Web toolkit
   Can integrate semweb apps, like Pelorus, with
   traditional webapps
   Conversely, can integrate traditional Java web
   frameworks with the Semantic Web
Why do this...
Graph aGraph = new GraphImpl();

URI aBook = aGraph.getValueFactory().createURI("urn:oreilly.com:product:9780596514129.IP");

aGraph.add(aBook,
      aGraph.getValueFactory().createURI("http://purl.org/dc/terms/publisher"),
      aGraph.getValueFactory().createLiteral("O'Reilly Media / Pogue Press"));

aGraph.add(aBook,
      aGraph.getValueFactory().createURI("http://purl.org/dc/terms/title"),
      aGraph.getValueFactory().createLiteral("Switching to the Mac: The Missing Manual, Leopard Edition"));

// ... setting the additional properties here ...

aGraph.add(aBook,
      RDF.TYPE,
      aGraph.getValueFactory().createURI("http://vocab.org/frbr/core#Expression"));
When you can do this.
Book aBook = new Book();
aBook.setTitle("Switching to the Mac: The Missing Manual, Leopard Edition");
aBook.setPublisher("O'Reilly Media / Pogue Press");
aBook.setIssueDate("2008-02-26");

// And so on...



This code is...
   More clear
   More concise
   Easier to understand and maintain
   API independent
Advantages
Rapid prototypes
   Lowers the learning curve by simplifying the codebase
       No more triples and graphs littering your code
   Utilities can generate your domain from your ontology
   Lets you concentrate on the more important things
API independence
   Need to switch from Sesame Memory Store to
   TDB? Change one line of code and you're done.
   We standardize on the standards, RDF & SPARQL
   (and JPA), not a particular API like Sesame or Jena.
Plays nicely with others...
   Can work alongside normal JPA implementations
   Provides a straightforward migration to a more
   semantic-web based infrastructure
Obligatory Technical Fu

Provides support for Jena, Sesame & 4Store
   This includes TDB, SDB, Sesame Native, etc.
   Support planned for Mulgara, Bigdata, Virtuoso and
   others.
Dialect implementations for both SPARQL and SeRQL.
No complicated configuration and mappings
   Mappings use standard JPA annotations
   Configuration are basic Java properties files.
Google Guice used to manage plugin architecture
Javassist for bytecode enhancement
In case you're still awake...
Really? JPA? All of it?
  Not quite... We don't support things that are obviously
  relational, such as @Table or @Column.
  We also don't support parts such as
  @SqlSetResultMapping or JPQL, but we're planning
  on doing that Real Soon Now
  And we're still a little fuzzy on transactions and locking
      Most RDF stores don't neatly support these, or do
      so inconsistently
      We provide a naive approach, but that too will
      improve
Questions?
For more information...
A detailed overview:
   http://semanticuniverse.com/articles-empire-
   rdf-sparql-meet-jpa.html

The WIKI:
   http://wiki.github.com/clarkparsia/Empire/

The mailing list:
   http://groups.google.com/group/empire-rdf

More Related Content

PPTX
PySpark dataframe
PPTX
Spark for big data analytics
PPTX
Big data Processing with Apache Spark & Scala
PDF
PySpark Programming | PySpark Concepts with Hands-On | PySpark Training | Edu...
PPTX
Scalable Machine Learning with PySpark
PDF
Big Data Processing with Spark and Scala
PPTX
Apache Spark MLlib - Random Foreset and Desicion Trees
PDF
PySpark Training | PySpark Tutorial for Beginners | Apache Spark with Python ...
PySpark dataframe
Spark for big data analytics
Big data Processing with Apache Spark & Scala
PySpark Programming | PySpark Concepts with Hands-On | PySpark Training | Edu...
Scalable Machine Learning with PySpark
Big Data Processing with Spark and Scala
Apache Spark MLlib - Random Foreset and Desicion Trees
PySpark Training | PySpark Tutorial for Beginners | Apache Spark with Python ...

What's hot (20)

PDF
Performance of Spark vs MapReduce
PDF
Apache Spark beyond Hadoop MapReduce
PDF
Big Data Processing With Spark
PPTX
Intro to Apache Spark by CTO of Twingo
PDF
Pyspark Tutorial | Introduction to Apache Spark with Python | PySpark Trainin...
PPTX
5 reasons why spark is in demand!
PDF
Spark Streaming
PPTX
Pyspark vs Spark Let's Unravel the Bond!
PDF
High Performance PL/SQL
PPTX
Apache spark
PDF
Drupal & Apache Solr
PDF
Introduction to Apache Spark
PDF
SystemML - Declarative Machine Learning
PDF
Writing Apache Spark and Apache Flink Applications Using Apache Bahir
PDF
Luciano Resende's keynote at Apache big data conference
PDF
Spark SQL | Apache Spark
PPTX
Apache spark
PDF
Why Scala Is Taking Over the Big Data World
PPTX
Oracle Database Management REST API
PDF
How mentoring can help you start contributing to open source
Performance of Spark vs MapReduce
Apache Spark beyond Hadoop MapReduce
Big Data Processing With Spark
Intro to Apache Spark by CTO of Twingo
Pyspark Tutorial | Introduction to Apache Spark with Python | PySpark Trainin...
5 reasons why spark is in demand!
Spark Streaming
Pyspark vs Spark Let's Unravel the Bond!
High Performance PL/SQL
Apache spark
Drupal & Apache Solr
Introduction to Apache Spark
SystemML - Declarative Machine Learning
Writing Apache Spark and Apache Flink Applications Using Apache Bahir
Luciano Resende's keynote at Apache big data conference
Spark SQL | Apache Spark
Apache spark
Why Scala Is Taking Over the Big Data World
Oracle Database Management REST API
How mentoring can help you start contributing to open source
Ad

Similar to Empire: JPA for RDF & SPARQL (20)

PDF
Eclipse RDF4J - Working with RDF in Java
PDF
Rdf Processing Tools In Java
PPTX
Introducing JDBC for SPARQL
PDF
Rdf Processing On The Java Platform
PDF
Got bored by the relational database? Switch to a RDF store!
PDF
Comparative Study That Aims Rdf Processing For The Java Platform
PDF
RDF_API_Java_Stefan_Apostoaie
PPT
Re-using Media on the Web: Media fragment re-mixing and playout
ODP
Publishing RDF SKOS with microservices
PPT
ORM Concepts and JPA 2.0 Specifications
PDF
PPTX
Triplestore and SPARQL
PDF
Comparative Survey-Java APIs For RDF
PPTX
Madrid SPARQL handson
PPTX
Saveface - Save your Facebook content as RDF data
PDF
Graphs, Stores and API
PDF
Boost your APIs with GraphQL 1.0
PPTX
Introduction to dotNetRDF
PDF
Using JPA applications in the era of NoSQL: Introducing Hibernate OGM
PDF
RDF and Java
Eclipse RDF4J - Working with RDF in Java
Rdf Processing Tools In Java
Introducing JDBC for SPARQL
Rdf Processing On The Java Platform
Got bored by the relational database? Switch to a RDF store!
Comparative Study That Aims Rdf Processing For The Java Platform
RDF_API_Java_Stefan_Apostoaie
Re-using Media on the Web: Media fragment re-mixing and playout
Publishing RDF SKOS with microservices
ORM Concepts and JPA 2.0 Specifications
Triplestore and SPARQL
Comparative Survey-Java APIs For RDF
Madrid SPARQL handson
Saveface - Save your Facebook content as RDF data
Graphs, Stores and API
Boost your APIs with GraphQL 1.0
Introduction to dotNetRDF
Using JPA applications in the era of NoSQL: Introducing Hibernate OGM
RDF and Java
Ad

More from Clark & Parsia LLC (11)

PDF
Stardog Linked Data Catalog
PDF
Stardog 1.1: Easier, Smarter, Faster RDF Database
PDF
Stardog talk-dc-march-17
PDF
RR2010 Keynote
PDF
Validating Linked Data with OWL
PDF
Sem tech 2010_integrity_constraints
PDF
Terp: An OWL-friendly SPARQL
PDF
PelletServer: REST and Semantic Technologies
PDF
PelletDb: Scalable Reasoning for Enterprise Semantics
PDF
Automated Planning as a Semantic Technology
PDF
SemTech 2010: Pelorus Platform
Stardog Linked Data Catalog
Stardog 1.1: Easier, Smarter, Faster RDF Database
Stardog talk-dc-march-17
RR2010 Keynote
Validating Linked Data with OWL
Sem tech 2010_integrity_constraints
Terp: An OWL-friendly SPARQL
PelletServer: REST and Semantic Technologies
PelletDb: Scalable Reasoning for Enterprise Semantics
Automated Planning as a Semantic Technology
SemTech 2010: Pelorus Platform

Recently uploaded (20)

PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PDF
NewMind AI Weekly Chronicles - August'25 Week I
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PPTX
sap open course for s4hana steps from ECC to s4
DOCX
The AUB Centre for AI in Media Proposal.docx
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PDF
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
PDF
Spectral efficient network and resource selection model in 5G networks
PPT
Teaching material agriculture food technology
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PDF
Machine learning based COVID-19 study performance prediction
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
“AI and Expert System Decision Support & Business Intelligence Systems”
NewMind AI Weekly Chronicles - August'25 Week I
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
Reach Out and Touch Someone: Haptics and Empathic Computing
Chapter 3 Spatial Domain Image Processing.pdf
sap open course for s4hana steps from ECC to s4
The AUB Centre for AI in Media Proposal.docx
Diabetes mellitus diagnosis method based random forest with bat algorithm
Mobile App Security Testing_ A Comprehensive Guide.pdf
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
Spectral efficient network and resource selection model in 5G networks
Teaching material agriculture food technology
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
Machine learning based COVID-19 study performance prediction
The Rise and Fall of 3GPP – Time for a Sabbatical?
Per capita expenditure prediction using model stacking based on satellite ima...
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
Build a system with the filesystem maintained by OSTree @ COSCUP 2025

Empire: JPA for RDF & SPARQL

  • 1. Empire: RDF & SPARQL Meet Java & JPA 2010 Semantic Technology Conference Michael Grove Director of Software Development Clark & Parsia, LLC. mike@clarkparsia.com http://clarkparsia.com -- http://www.twitter.com/candp
  • 2. Background RDF & SPARQL You know what these are... Java Persistence API (JPA) Standard ORM API for Java developers Provides a way to map Java beans to relational data Part of Java SE and EE editions Implementations: Hibernate and Toplink. Empire Implements JPA for RDF databases Uses SPARQL rather than JPQL We're considering adding JPQL support Apache 2.0 License -- released in Feb 2010.
  • 3. Why? Empire bridges the gap between traditional web apps & the semantic web JPA helps abstract away (most) of the RDF details Helps lower learning curve for new developers API, database, & query language independence Application code is written w/r/t to JPA API Developers only need to learn the domain API Sesame/Jena/Other bindings are injected at runtime -- invisible to the developer Helps open up the Semantic Web toolkit Can integrate semweb apps, like Pelorus, with traditional webapps Conversely, can integrate traditional Java web frameworks with the Semantic Web
  • 4. Why do this... Graph aGraph = new GraphImpl(); URI aBook = aGraph.getValueFactory().createURI("urn:oreilly.com:product:9780596514129.IP"); aGraph.add(aBook, aGraph.getValueFactory().createURI("http://purl.org/dc/terms/publisher"), aGraph.getValueFactory().createLiteral("O'Reilly Media / Pogue Press")); aGraph.add(aBook, aGraph.getValueFactory().createURI("http://purl.org/dc/terms/title"), aGraph.getValueFactory().createLiteral("Switching to the Mac: The Missing Manual, Leopard Edition")); // ... setting the additional properties here ... aGraph.add(aBook, RDF.TYPE, aGraph.getValueFactory().createURI("http://vocab.org/frbr/core#Expression"));
  • 5. When you can do this. Book aBook = new Book(); aBook.setTitle("Switching to the Mac: The Missing Manual, Leopard Edition"); aBook.setPublisher("O'Reilly Media / Pogue Press"); aBook.setIssueDate("2008-02-26"); // And so on... This code is... More clear More concise Easier to understand and maintain API independent
  • 6. Advantages Rapid prototypes Lowers the learning curve by simplifying the codebase No more triples and graphs littering your code Utilities can generate your domain from your ontology Lets you concentrate on the more important things API independence Need to switch from Sesame Memory Store to TDB? Change one line of code and you're done. We standardize on the standards, RDF & SPARQL (and JPA), not a particular API like Sesame or Jena. Plays nicely with others... Can work alongside normal JPA implementations Provides a straightforward migration to a more semantic-web based infrastructure
  • 7. Obligatory Technical Fu Provides support for Jena, Sesame & 4Store This includes TDB, SDB, Sesame Native, etc. Support planned for Mulgara, Bigdata, Virtuoso and others. Dialect implementations for both SPARQL and SeRQL. No complicated configuration and mappings Mappings use standard JPA annotations Configuration are basic Java properties files. Google Guice used to manage plugin architecture Javassist for bytecode enhancement
  • 8. In case you're still awake... Really? JPA? All of it? Not quite... We don't support things that are obviously relational, such as @Table or @Column. We also don't support parts such as @SqlSetResultMapping or JPQL, but we're planning on doing that Real Soon Now And we're still a little fuzzy on transactions and locking Most RDF stores don't neatly support these, or do so inconsistently We provide a naive approach, but that too will improve
  • 10. For more information... A detailed overview: http://semanticuniverse.com/articles-empire- rdf-sparql-meet-jpa.html The WIKI: http://wiki.github.com/clarkparsia/Empire/ The mailing list: http://groups.google.com/group/empire-rdf