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
0
votes
0 answers

Jena: How to update (not added) RDF triple in ontology graph using jena rules

How to update the RDF triple (not added new one) using jena rule. I am using generic rule reasoner and rules are in separate file as shown case 1: @prefix fa: http://www.smarthome_haier.com#. Rule1: (?a fa:setTimer “0”)(?a fa:windvolume…
Ehsanur
  • 21
  • 5
0
votes
0 answers

SPARQL delete triples if other direction exists

I want to make an update for the following: Delete the triple (o,p,s) if the other direction (s,p,o) exists. My query looks as follows: DELETE {?s ?p ?o} where { ?s ?o . FILTER (EXISTS {?o ?s } && (str(?s) > str(?o) )) …
Philip Frerk
  • 91
  • 1
  • 1
  • 11
0
votes
0 answers

Can fuseki be config to use two different type of dataset to created a unioned dataset?

I'm thinking that to create two dataset, one is in memory, which frequently changed, another is tdb, which is read-only, can be created as one dataset, but in the back, which in memory remain in memory, and which in tdb remain in tdb. If not, can…
Gao
  • 912
  • 6
  • 16
0
votes
1 answer

Is there any opportunities to find specific class from exsisting ontology and add equivalent class to it using jena

Im trying to find a specific class from ontology and add equivalent class to it. I have a list of classes where i want to add equivalent class, but im not sure how do find them from ontology and then not writing all the ontology but just adding…
user3699711
  • 49
  • 1
  • 8
0
votes
0 answers

SPARQL query with filter not exists

I want to make a query that delivers all triples (s,p,o) fulfilling the following: There is a path from s to o via the predicate p of length of at least 2 edges, but the triple (s,p,o) does not exist. My query looks as follows (p is…
Philip Frerk
  • 91
  • 1
  • 1
  • 11
0
votes
1 answer

Is there a way to upload a ttl file to Fuseki programatically?

Hi I have created a java program where I take a ttl file and update the turtle statements. Since I have a web interface that connects to fuseki to query the ttl file, I would like to reupload the ttl file with the new data. Is there a way to do this…
Mario
  • 1
  • 3
0
votes
0 answers

Update two version of owl file in fuseki

I have some trouble about uploading files on fuseki. If I have an owl file (ontov1.owl) and I uploaded it in my_dataset on fuseki. Then I have a new version of the same owl file ( ontov2.owl ) , maybe I added some triples and deleted others in…
mee
  • 688
  • 8
  • 18
0
votes
1 answer

How do get data from example owl data using sparql query

This is my example owl : 10
user3699711
  • 49
  • 1
  • 8
0
votes
0 answers

SPARQL delete not deleting anything

I executed the sparql update delete { ?s ?p ?o } WHERE { ?s /+ ?o. ?s ?o } on the following model: . .
Philip Frerk
  • 91
  • 1
  • 1
  • 11
0
votes
0 answers

Apache Jena - QueryFactory.create() extremely slow

I am using Apache Jena's QueryFactory class to transform my SPARQL query string into a Query object for manipulation. The problem I have is that the single snippet of code shown below takes 5 seconds to run, which is unacceptable. Query query =…
Ponsietta
  • 315
  • 6
  • 17
0
votes
1 answer

How to combine two different but correlated result sets of a Sparql query into one?

I am working on a project that finds a correlation between the voting trends in American elections to the demographic data of a state and to their respective voting preferences. I have three separate rdf documents which contain the same keys, but…
0
votes
0 answers

How can I specify paths in Fuseki?

I have a Fuseki server running (fuseki-server --mem /ds) with a dataset at path /ds. So far I can upload new models to that dataset and execute queries on it. When I browse to http://localhost:3030/ds/, it has all the triple from the model (as…
0
votes
1 answer

jena Result in Html(servlets/jsp)

List results = new ArrayList(); I tried the above code from Print the jena result set in html(servlet/jsp) post and got the following error: RowObject cannot be resolved to a type I also want to do exactly same as given in…
ProgramME
  • 653
  • 3
  • 12
  • 23
0
votes
0 answers

Cannot get the results of CONSTRUCT query

I am running through different .ttl files and executing a query to extract the needed information. I need the result in .rdf format. The query works perfectly with SELECT statement with showing all the results, but when I change to CONSTRUCT it does…
Aram
  • 123
  • 1
  • 8
0
votes
1 answer

How to write a Jena QuerySolution result to RDF/XML file?

I need to export/write the .ttl QuerySolution results to RDF/XML file. I have tried the code below, but I am getting the following error with RDFDataMgr.write: The method write(OutputStream, Model, Lang) in the type RDFDataMgr is not applicable for…
Aram
  • 123
  • 1
  • 8
1 2 3
99
100