Questions tagged [apache-jena]

Apache Jena is a free and open source Java framework for building Semantic Web and Linked Data applications.

This is a synonym for the Jena tag.

Apache Jena Homepage

Links

185 questions
0
votes
3 answers

I am not able to update ontology model

I have made an Ontologu in Protege and imported in Eclipse.My ontology already 10 instances and i want to add more instances.The following piece of code adds instances to existing class (Noun) of ontology. After excecution it do not update…
ALee
  • 53
  • 1
  • 8
0
votes
0 answers

Writing Jena Models to Tar.Gz archives

I am working with RDF models at the moment. Therefore I query data from a database, generate models using Apache Jena and work with them. Although, I don't want to have to query the models every time I use them, so I thought about storing them…
Obererpel
  • 55
  • 14
0
votes
0 answers

com.hp.hpl.jena.rdf.model.Literal and com.hp.hpl.jena.rdf.model.ResourceFactory not present in 9.2.3 jar or other recent jars?

I added the jena arq 2.9.3 jar file to my code to be able to run sparql queries for DBpedia but it says that the literal and resource factory classes are not present. Do I need to add another version of the jar file or do I need to make changes to…
serendipity
  • 852
  • 13
  • 32
0
votes
0 answers

SPARQL Apache Jena - Execution Limit on queries in DBpedia?

I'm dealing with a problem that I can't execute the same query (see Example below) multiple times against DBpedia, because the execution freezes after like 4-5 queries. The thing is, with the same Apache Jena Code, I can execute hundreds of same…
grajkowski
  • 349
  • 1
  • 3
  • 14
0
votes
1 answer

How to make my Fuseki server read the inference rules from a file?

I'm new to Apache Jena and Fuseki. I've installed Apache Jena Fuseki as a standalone server and I'm trying to define a very simple inference rule and seemingly, I'm not configuring it correctly. My configuration file config_new.ttl looks like…
Jimo
  • 143
  • 2
  • 14
0
votes
1 answer

Lambda expression Java 1.8 code to Java 1.6

This program returns all the synonyms for a given input. But this code is for java 1.8. How to convert this code for Java 1.6. model.listIndividuals().forEachRemaining(ind -> { if(((Resource)ind).getLocalName().toString().equalsIgnoreCase(input)){ …
ALee
  • 53
  • 1
  • 8
0
votes
0 answers

Converting turtle to json in java

I'm trying to parse turtle format data into json format. I've searched about Apache Jena, but it's still clear if Jena is the solution. Is there any Turtle parser already implemented in Java that allows me do this job?
Saulo Ricci
  • 776
  • 1
  • 8
  • 27
0
votes
1 answer

turtle.bat: command not found (apache jena)

I was trying to check if a turtle file is valid and was also trying to produce results obatained from parsing. Could you guys help me figure out why turtle.bat is not working. MacBook-Pro:~ name$ export JENAROOT=/Users/name/Desktop MacBook-Pro:~…
user3295864
  • 49
  • 2
  • 9
0
votes
1 answer

Maven Plugin Signature Check Error

I am using the following library as dependency: org.apache.jena apache-jena-libs pom 3.2.0
Noor
  • 19,638
  • 38
  • 136
  • 254
0
votes
1 answer

Jena - Sort elements

Morning all, I'm currently developing a viewer for the ontologies I made. I want to colorize the elements (OntPropery, ObjectProperty, Individuals, …) based on their types. Here is my idea to implement this : public Paint transform(RDFNode i) { …
Gilles-Antoine Nys
  • 1,481
  • 16
  • 21
0
votes
1 answer

How to get nicknames and e-mails of all people in the database using SPARQL?

I have an Apache Jena database with some VCARD data. I want to formulate a query, which would return the e-mail address and nick name for every user in the database. I tried this: SELECT ?nick ?email WHERE { ?x…
Glory to Russia
  • 17,289
  • 56
  • 182
  • 325
0
votes
1 answer

How can I get the value (object) of a Resource's property?

I have the following code, in which I find a resource by its e-mail. val varn = "x" val query = createQuery("""SELECT ?${varn} WHERE { ?x "${email}" }""") val qexec =…
Glory to Russia
  • 17,289
  • 56
  • 182
  • 325
0
votes
1 answer

model.read(inputStream,baseIRI,mimeType) throws java.lang.Exception: com.hp.hpl.jena.shared.NoReaderForLangException: application/ld+json

Here is my function to read Model (In Apache Jena) from HttpResponse body data 1)public static Model accessModelFromResponse(HttpResponse response) throws Exception { 2) Header contentType = response.getFirstHeader("Content-Type"); 3) …
Badman
  • 407
  • 5
  • 17
0
votes
1 answer

Can't fetch data from dbpedia using SPARQL Query

I'm trying to fetch information about countries from dbpedia using the following code. However, I dont get any. Also the way to find such information of possible. public void getCountriesInformation() throws FileNotFoundException, IOException { …
0
votes
1 answer

How do I save a record in Apache Jena?

I want to create a person with nick name jd and e-mail john.doe@provider.com in a persistent Apache Jena database. I wrote following code: var dataSet:Dataset? = null val Dir = "data/MyDataSet" dataSet =…
Glory to Russia
  • 17,289
  • 56
  • 182
  • 325