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…
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…
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…
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…
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…
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)){ …
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?
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:~…
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) {
…
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…
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 =…
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) …
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 {
…
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 =…