Questions tagged [jena-rules]

Jena rules is Java-based framework for building Semantic Web applications. An environment for RDF, RDFS and OWL, SPARQL and includes a rule-based inference engine. Three kind of rules (according with their execution model): forward rules, backward rules and hybrid rules.

Jena Rules provides three mechanism of rule execution:

  1. Backward Chaining Rules - are identified by using <-. These rules are interpreted as queries and the rule head (the conclusion part) contains a single atom which cannot be a built-in. The body (the condition part) is a conjunction between one or more triple patterns and/or built-ins.

  2. Forward Chaining Rules - are identified by using ->. They are executed by a forward engine and both the head and body may contain of conjunction of atoms.

  3. Hybrid Rules - consists in using one or more backward chaining rules in the head of a forward chaining rule.

Official documentation.

81 questions
4
votes
1 answer

How to define very simple own rule in fuseki step by step?

I'm asking your help to understand how to create my own property rules in fuseki. I've read the documentation of Jena and Fuseki about reasoners and rules but I don't understand how to create (step by step) simple rules. And the examples that I've…
Cyril
  • 435
  • 3
  • 13
3
votes
2 answers

Jena Rule for Validation af a Ontology

I want to validate an ontology and throw an error if anything is incorrect. The most validation I have to do looks like this: I have a class like this:
msc
  • 43
  • 6
2
votes
0 answers

How can I determine if a Jena Reasoner is a Rule capable reasoner

Jena provides a generic Reasoner interface when returning the reasoner of a model. How can I determine if it is a Rule based, so I can cast it to a GenericRuleReasoner and use the methods for manipulating rules? Note: without using instanceof…
Azder
  • 4,408
  • 6
  • 34
  • 56
2
votes
1 answer

Jena Reasoning and Rule Syntax

I have a questions regarding to the Jena API. I wrote some rules that are working perfectly but with one thing I still have a problem. I hope you can help me with it. Comparison of two integer In my rules I need a comparison like "GreaterThan". I…
Jan Wagner
  • 21
  • 2
2
votes
3 answers

printing InfModel earlier changes printed representation later?

I'm getting a strange effect in Jena 2.5.5 (on Linux) where I am playing around with the inference API. The following code is a stripped down version. I am creating an initially empty Model and a generic rule reasoner. I add a reflexivity rule for a…
Thomas
2
votes
1 answer

How can I retrieve the URI of an ontology from a Jena Model?

this is a very simple question, but I don't seem to find an answer in forums/docs. I have an OntModel that imports other ontologies, and I simply want to retrieve the URI of the root ontology. Looking directly at statements won't work in my case:…
2
votes
1 answer

Create multiple skolems with Jena rules

What is an easy way to create multiple skolems without copying the rule multiple times? [ AddingMother: makeSkolem(?mother, "a mother") -> (?mother rdf:title "mother") (?mother rdf:type _:Mother) ] [ AddingChild: (?mother rdf:type…
user1091344
  • 552
  • 4
  • 24
2
votes
2 answers

Does Jena support enforcing OWL constraints during a SPARQL Update query?

I'm trying to figure out if Jena (or any other SPARQL Update server) will enforce ontological constraints. For example, I want to enforce that only entities which have type x are allowed to have property y and the value of the property must have…
Zach Dwiel
  • 517
  • 4
  • 18
2
votes
1 answer

Ho to achieve Mapping between namespaces in Apache Jena thru Reasoning?

Goal: I wan´t to achieve a rule based Mapping between ontologies in order to fulfill a common task of data migration. Way to achieve the goal: To achieve this i developed a abstract data structure which is capable to store all information provided…
Macilias
  • 2,132
  • 1
  • 24
  • 35
2
votes
1 answer

Problems with inference examples from Apache Jena framework

I have a serious problem to get any reasoner up and running. Also the examples from the documentation: https://jena.apache.org/documentation/inference/ does not work here. I transferred the example into a unit test, so that the problem might be…
Macilias
  • 2,132
  • 1
  • 24
  • 35
2
votes
1 answer

OWL reasoning: alternative to NOT

I'm doing a project in JENA using OWL rules. In my ontology I have an entity named PEGI_RATING. A PEGI_RATING can have multiple descriptors. Example: a vocab:PEGI_RATING ; rdfs:label…
Christophe De Troyer
  • 2,660
  • 2
  • 26
  • 41
2
votes
1 answer

Once I've written a builtin, what do I need to do to make the reasoners aware of it?

I have written a custom builtin to use in my Project but I do not really know how I can use it. I have written two classes. In one of them there is the builtin I have made (using BaseBuiltin) and in the other one I have registered the new builtin…
user3563844
  • 103
  • 1
  • 7
2
votes
1 answer

Create Individuals inside of Jena Rules

I have an ontology with a lot of individuals and use the Jena reasoner to get information about them. My goal is to create new individuals based on the given information inside of that rules and assign properties to them. The individuals don't have…
ImmaCute
  • 57
  • 6
2
votes
2 answers

Jena Rule Engine with TDB

I am having my data loaded in TDB model and have written some rule using Jena in order to apply into TDB. Then I am storing the inferred data into a new TDB. I applied the case above in a small dataset ~200kb and worded just fine. HOWEVER, my…
Dr.AdeeB
  • 31
  • 4
2
votes
1 answer

Backward chaining Jena reasoner

I have been reading through the Jena documentation in order to try and create a simple pure backward chaining reasoner. I have a simple backward chaining rule that I am applying to a small ontology. I was wondering if there was anyway to do backward…
Colin
  • 267
  • 4
  • 11
1
2 3 4 5 6