Hi,
i want to bind some models as follows :
Ontology Model (Business Ontology) -> Instances Model (Business instances)
->
IHM Model (IHM Ontology + IHM Rules)
Communication Model (External Ontology)
Only the last model needs a reasoner, others are only data models.
When I add or remove a statement in a data model, i expect that it will be
propagated to the right.
So if i add statement in the Instances Model i want to be informed using search
methods on the IHM Model but also to be notified by subscription
(IhmModel.register(ModelChangeListener)). The last model should also add or
remove its deductions according to propagated data.
I’ve tried an implementation based on ModelFactory.defaultModel() for de data
models, ModelFactory.createInfModel(polyReasoner, dataModel) for the inference
model, Union and MultiUnion graphs:
Model ontologyDataModel = ModelFactory.createDefaultModel();
Model instancesDataModel = ModelFactory.createDefaultModel();
Model instancesModel = ModelFactory.createUnion(instancesDataModel,
ontologyDataModel);
Model comDataModel = ModelFactory.createDefaultModel();
Model ihmDataModel = ModelFactory.createDefaultModel();
Model ihmUnionModel = ModelFactory.createModelForGraph(new
MultiUnion(graphs)); // graphs of ihmDataModel, instancesModel and comDataModel
Reasoner ihmReasoner = createReasonerFromStrings(new String[] {
"[rule: (subject predicate value1) -> (subject predicate
inf1)]",
"[rule: (subject predicate value2) -> (subject predicate
inf2)]" });
Model ihmModel = ModelFactory.createInfModel(ihmReasoner,
ihmUnionModel);
I add the triple (subject, predicate, value1) in the Instances Data Model and
(subject, predicate, value2) in the Communication Data Model.
I have two problems :
1. When i remove (subject, predicate, value1) from the Instances Data Model
and (subject, predicate, value2) from the Communication Data Model then the
inferences (subject, predicate, inf1) and (subject, predicate, inf2) are not
removed from the IHM Model,
2. I Can’t subscribe to the IHM Model to be notified of added and removed
statements.
Is there any way to do this ?
Thank you in advance.
Olivier TORRES
Ingénieur R&D
intactile DESIGN
Création d’interfaces + subtiles
+33 (0)4 67 52 88 61
+33 (0)9 50 12 05 66
20 rue du carré du roi
34000 MONTPELLIER
France
www.intactile.com
Les informations contenues dans cet email et ses documents attachés sont
confidentielles. Elles sont exclusivement adressées aux destinataires
explicitement désignés ci-dessus et ne peuvent être divulguées sans
consentement de son auteur. Si vous n'êtes pas le destinataire de cet email
vous ne devez pas employer, révéler, distribuer, copier, imprimer ou
transmettre le contenu de cet email et devez le détruire immédiatement.