Questions tagged [jena]

Apache Jena is an open-source Java library for processing "Resource-Description-Framework" (RDF) data in semantic web and linked-data applications. This includes command-line tools for RDF-based applications.

Apache Jena is an open-source Java library for processing Resource-Description-Framework (RDF) data in semantic web and linked-data applications. This includes command-line tools for RDF-based applications.

Links

Summary

Jena is an open-source Java library for processing RDF data. Originally developed by HP Labs, the project was accepted by Apache as an incubator project in 2010, and graduated from the incubator to become Apache Jena in April 2012. RDF is a standard notation for representing information about things in the world, and especially resources on the World Wide Web. RDF was developed by the W3C as part of its semantic web activity. Related W3C standards include the query language SPARQL and ontology language OWL.

RDF builds representations from a simple basic propositional structure, in which some object stands in some named relation to some subject. For example,

StackOverflow is-about programming-questions

Here, StackOverflow is the subject, the category programming questions is the object, and the named predicate denoting the relationship between subject and object is is about. In order to work effectively with resources on the WWW, names of things, including names of predicates, are URI's, so we might actually write the previous example using http://www.stackoverflow.com as the subject, the Dublin Core property has subject as the predicate and the DBPedia resource for computer programming as the object. Thus:

<http://www.stackoverflow.com>
   <http://purl.org/dc/terms/subject>
       <http://dbpedia.org/resource/Category:Computer_programming>

This basic building block of RDF representations has three elements, subject, predicate and object, and so is often referred to as a triple, and a data structure for storing triples is typically called a triplestore. Since the object of one triple can be the subject of another, a graph structure can be built to represent quite complex descriptions.

Jena includes parsers for all of the main encoding syntaxes for RDF triples: RDF/XML, Turtle, N-Triples and RDFa, and generators for the first three (RDFa is embedded in an HTML document, so cannot be generated simply by serializing an RDF graph). Jena has a complete implementation of the SPARQL query language for RDF, and tracks recent decisions by the relevant W3C working groups. Jena also includes a convenience API and rule-based reasoner for handling OWL ontologies, though is currently restricted to version 1 of OWL. The rule engine can also be used with custom rule-sets developed by the user. Jena's storage strategies for RDF graphs range from simple in-memory data structures to custom persistent stores using B-trees or building on top of existing relational engines. Jena also includes a range of command-line tools to assist developers with a variety of standard tasks, from checking RDF documents to initializing persistent stores.

Questions tagged with the Jena tag can be about any aspect of programming semantic web applications using the Jena library. General questions about the semantic web, or about linked data applications, but not involving Jena per se should not use this tag.

2388 questions
46
votes
4 answers

Triple Stores vs Relational Databases

I was wondering what are the advantages of using Triple Stores over a relational database?
Sam
  • 1,479
  • 3
  • 14
  • 16
35
votes
2 answers

Jena/ARQ: Difference between Model, Graph and DataSet

I'm starting to work with the Jena Engine and I think I got a grasp of what semantics are. However I'm having a hard time understanding the different ways to represent a bunch of triples in Jena and ARQ: The first thing you stumble upon when…
Droggl
  • 619
  • 5
  • 7
28
votes
1 answer

OWL API, Jena API, Protege API, which one to use

I am trying to implement an eclipse based application working with ontologies. (My topic is semantic annotation). I will need to display the ontology to the user (as a tree) and to establish links between ontology classes and some schema. As I only…
Sabina
  • 306
  • 1
  • 4
  • 6
22
votes
2 answers

Where do I test my queries for my RDF written in SPARQL

I am a beginner with Semantic Web technologies, My question might be a very basic one but I am really stuck figuring it out. I have a RDF file I created from an XML and have validated it using w3.org RDF VALIDATOR. My question is how can I run…
Yaba
  • 304
  • 1
  • 3
  • 15
17
votes
2 answers

How to write SPARQL query that efficiently matches string literals while ignoring case

I am using Jena ARQ to write a SPARQL query against a large ontology being read from Jena TDB in order to find the types associated with concepts based on rdfs label: SELECT DISTINCT ?type WHERE { ?x
lmsurprenant
  • 1,723
  • 2
  • 14
  • 28
16
votes
1 answer

Filter by date range in SPARQL

I am using Jena's SPARQL engine and trying to write a query to filter on a date range as I need to find the value of a property after a fixed date. My date property is in the following format: Fri May 23 10:20:13 IST 2014 How do I write a SPARQL…
cooljohny
  • 656
  • 5
  • 13
  • 31
15
votes
2 answers

CONSTRUCT into a named graph

I am attempting to use a SPARQL Construct query to create a new named graph from an existing one. The database I am querying contains http://graph.com/old as an existing named graph. I am using Jena TDB as the database, accessed through a Jena…
Yoav Zimmerman
  • 588
  • 4
  • 11
11
votes
2 answers

SPARQL Querying Transitive

I am a beginner to SPARQL and was wondering if there was a query which could help me return transitive relations. For example the n3 file below I would want a query that would return "a is the sameas c" or something along those lines. Thanks…
Sam
  • 1,479
  • 3
  • 14
  • 16
11
votes
2 answers

SPARQL Type Conversion?

I have the following SPARQL query: PREFIX ssn: PREFIX dtp: PREFIX dbp: SELECT ?value ?time WHERE { dtp:CD7514 ssn:madeObservation…
Bailz
  • 605
  • 2
  • 8
  • 17
11
votes
2 answers

Apache Jena vs Apache Marmotta

What's the difference between Apache Jena and Apache Marmotta? According to my readings both can be used for semantic web purposes. Both supports RDF,Triple store and so on. Both are based on Java. I hope this question will be valuable for those…
Techie
  • 44,706
  • 42
  • 157
  • 243
10
votes
3 answers

Is there a Java open source implementation of R2RML?

I want to generate RDF data from tabular data, in particular: CSV, TSV, spreadsheets (either Excel or OpenOffice) and, eventually, tables in RDBMS. I am aware of the "RDB to RDF Mapping Language" (R2RML) (http://www.w3.org/TR/r2rml/) current…
castagna
  • 1,349
  • 10
  • 12
10
votes
2 answers

DBpedia SPARQL Querying for a specific rdfs:label

Basically I have a query (shown below) which works efficiently. However, I want my search to be more precise where the label is the actual string 'yago' rather than containing the string 'yago'. I want to try to do it without filters if possible as…
Sam
  • 1,479
  • 3
  • 14
  • 16
10
votes
5 answers

How to create an ontology in Java?

I've some data triplets that I want to write in some sort of basic OWL ontology. I've triplets like: Delhi is part of India or India is an Asian country Note that I've relations like "is-a", "part-of", or "related-to". What's the simplest way to…
wasimbhalli
  • 5,122
  • 8
  • 45
  • 63
10
votes
4 answers

Creating Java Classes from Ontology

I have an ontology file (in RDF) which expresses the entities in the app that I am writing. I am using Jena, and can access the Concepts and create/access the resources by directly manipulating triples. To make things easier, I created a set of Java…
Animesh
  • 1,765
  • 2
  • 22
  • 36
9
votes
1 answer

Apache Jena and Python

I have been working on various relationship extraction models in python and all the relationships are currently saved in dataframes or csv files. Eventually I would like to create an RDF graph. Since I am working in python I was going to create the…
Joe124
  • 189
  • 1
  • 6
1
2 3
99 100