code generation - drools programmatically generate a fact model -
i need generate enormous fact model using ontology external drools. now, write script/program pull off. approach generate java bean each ontology class contains appropriate fields, methods, , references other java objects based on ontological relationships (probably in map). question whether drools has more elegant way approach problem. figure must common problem fact model derivable resource available outside of drools, i'm wondering if maybe drools(or guvnor) has built in method of generating fact model given structured input.
i did find discussion in following thread: http://drools.46999.n3.nabble.com/rules-users-using-an-owl-ontology-in-drools-advice-td3724566.html
unfortunately wasn't able far following conversation.
update:
the traits article linked @alikok helpful. @ least provides framework ontology can fit. summarize, 1 of big problems fitting ontology java bean class model java doesn't multiple inheritance. ontology require this, , mine no exception. traits solve proxy classes, in background allowing define new "traits" in drl files.
i still have problem of converting ontology fact model. main issue post (programmatically generating fact model) don't want check answered yet. @ compile time through custom program describe above. @ runtime, though use case compile time better. i'm hoping, however, has tackled problem , can offer insights approach used.
Comments
Post a Comment