Java Doc for FRuleEngine.java in  » RSS-RDF » Jena-2.5.5 » com » hp » hpl » jena » reasoner » rulesys » impl » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » RSS RDF » Jena 2.5.5 » com.hp.hpl.jena.reasoner.rulesys.impl 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   com.hp.hpl.jena.reasoner.rulesys.impl.FRuleEngine

FRuleEngine
public class FRuleEngine implements FRuleEngineI(Code)
The processing engine for forward production rules. It neeeds to reference an enclosing ForwardInfGraphI which holds the raw data and deductions.
author:
   Dave Reynolds
version:
   $Revision: 1.28 $ on $Date: 2008/01/02 12:06:16 $

Inner Class :protected static class ClausePointer
Inner Class :public static class RuleStore

Field Summary
protected  OneToManyMapclauseIndex
    
protected  ForwardRuleInfGraphIinfGraph
    
protected static  Loglogger
    
 longnAxiomRulesFired
    
 longnRulesFired
    
 intnRulesTriggered
    
protected  HashSetpredicatesUsed
    
 booleanprocessedAxioms
    
protected  booleanrecordDerivations
    
protected  Listrules
    
protected  booleanwildcardRule
    

Constructor Summary
public  FRuleEngine(ForwardRuleInfGraphI parent, List rules)
     Constructor.
public  FRuleEngine(ForwardRuleInfGraphI parent)
     Constructor.

Method Summary
public synchronized  voidadd(Triple t)
     Add one triple to the data graph, run any rules triggered by the new data item, recursively adding any generated triples.
public  voidaddSet(BFRuleContext context)
     Add a set of new triple to the data graph, run any rules triggered by the new data item, recursively adding any generated triples.
public  voidcompile(List rules, boolean ignoreBrules)
     Compile a list of rules into the internal rule store representation.
public synchronized  booleandelete(Triple t)
     Remove one triple to the data graph.
public  voidfastInit(Finder inserts)
     Process all available data.
protected  voidfindAndProcessActions()
    
protected  voidfindAndProcessAxioms()
    
public  longgetNRulesFired()
    
public  ObjectgetRuleStore()
     Access the precomputed internal rule form.
public  voidinit(boolean ignoreBrules, Finder inserts)
     Process all available data.
public static  booleanmatch(TriplePattern pattern, Triple triple, BindingStack env)
     Test if a TriplePattern matches a Triple in the given binding environment.
public static  booleanmatch(Node pattern, Node node, BindingStack env)
     Test if a pattern Node matches a Triple Node in the given binding environment.
public static  intscoreNodeBoundness(Node n, BindingEnvironment env)
     Score a Node in terms of groundedness - heuristic. Treats a variable as better than a wildcard because it constrains later clauses.
public  voidsetDerivationLogging(boolean recordDerivations)
    
public  voidsetRuleStore(Object ruleStore)
     Set the internal rule from from a precomputed state.
public  booleanshouldTrace()
     Return true if the internal engine state means that tracing is worthwhile.

Field Detail
clauseIndex
protected OneToManyMap clauseIndex(Code)
Map from predicate node to rule + clause, Node_ANY is used for wildcard predicates



infGraph
protected ForwardRuleInfGraphI infGraph(Code)
The parent InfGraph which is employing this engine instance



logger
protected static Log logger(Code)



nAxiomRulesFired
long nAxiomRulesFired(Code)
performance stats - number of rules fired during axiom initialization



nRulesFired
long nRulesFired(Code)
performance stats - number of rules fired



nRulesTriggered
int nRulesTriggered(Code)
performance stats - number of rules passing initial trigger



predicatesUsed
protected HashSet predicatesUsed(Code)
List of predicates used in rules to assist in fast data loading



processedAxioms
boolean processedAxioms(Code)
True if we have processed the axioms in the rule set



recordDerivations
protected boolean recordDerivations(Code)
Set to true to flag that derivations should be logged



rules
protected List rules(Code)
Set of rules being used



wildcardRule
protected boolean wildcardRule(Code)
Flag, if true then there is a wildcard predicate in the rule set so that selective insert is not useful




Constructor Detail
FRuleEngine
public FRuleEngine(ForwardRuleInfGraphI parent, List rules)(Code)
Constructor.
Parameters:
  parent - the F or FB infGraph that it using this engine, the parent graphholds the deductions graph and source data.
Parameters:
  rules - the rule set to be processed



FRuleEngine
public FRuleEngine(ForwardRuleInfGraphI parent)(Code)
Constructor. Build an empty engine to which rules must be added using setRuleStore().
Parameters:
  parent - the F or FB infGraph that it using this engine, the parent graphholds the deductions graph and source data.




Method Detail
add
public synchronized void add(Triple t)(Code)
Add one triple to the data graph, run any rules triggered by the new data item, recursively adding any generated triples.



addSet
public void addSet(BFRuleContext context)(Code)
Add a set of new triple to the data graph, run any rules triggered by the new data item, recursively adding any generated triples. Technically the triples having been physically added to either the base or deduction graphs and the job of this function is just to process the stack of additions firing any relevant rules.
Parameters:
  context - a context containing a set of new triples to be added



compile
public void compile(List rules, boolean ignoreBrules)(Code)
Compile a list of rules into the internal rule store representation.
Parameters:
  rules - the list of Rule objects
Parameters:
  ignoreBrules - set to true if rules written in backward notation should be ignored an object that can be installed into the engine using setRuleStore.



delete
public synchronized boolean delete(Triple t)(Code)
Remove one triple to the data graph. true if the effects could be correctly propagated orfalse if not (in which case the entire engine should be restarted).



fastInit
public void fastInit(Finder inserts)(Code)
Process all available data. This version expects that all the axioms have already be preprocessed and the clause index already exists.
Parameters:
  inserts - the set of triples to be processed, normally this is theraw data graph but may include additional deductions made by preprocessing hooks



findAndProcessActions
protected void findAndProcessActions()(Code)
Scan the rules for any actions and run those



findAndProcessAxioms
protected void findAndProcessAxioms()(Code)
Scan the rules for any axioms and insert those



getNRulesFired
public long getNRulesFired()(Code)
Return the number of rules fired since this rule engine instance was created and initialized



getRuleStore
public Object getRuleStore()(Code)
Access the precomputed internal rule form. Used when precomputing the internal axiom closures.



init
public void init(boolean ignoreBrules, Finder inserts)(Code)
Process all available data. This should be called once a deductions graph has be prepared and loaded with any precomputed deductions. It will process the rule axioms and all relevant existing exiting data entries.
Parameters:
  ignoreBrules - set to true if rules written in backward notation should be ignored
Parameters:
  inserts - the set of triples to be processed, normally this is theraw data graph but may include additional deductions made by preprocessing hooks



match
public static boolean match(TriplePattern pattern, Triple triple, BindingStack env)(Code)
Test if a TriplePattern matches a Triple in the given binding environment. If it does then the binding environment is modified the reflect any additional bindings. true if the pattern matches the triple



match
public static boolean match(Node pattern, Node node, BindingStack env)(Code)
Test if a pattern Node matches a Triple Node in the given binding environment. If it does then the binding environment is modified the reflect any additional bindings. true if the pattern matches the node



scoreNodeBoundness
public static int scoreNodeBoundness(Node n, BindingEnvironment env)(Code)
Score a Node in terms of groundedness - heuristic. Treats a variable as better than a wildcard because it constrains later clauses. Treats rdf:type as worse than any other ground node because that tends to link to lots of expensive rules.



setDerivationLogging
public void setDerivationLogging(boolean recordDerivations)(Code)
Set to true to enable derivation caching



setRuleStore
public void setRuleStore(Object ruleStore)(Code)
Set the internal rule from from a precomputed state.



shouldTrace
public boolean shouldTrace()(Code)
Return true if the internal engine state means that tracing is worthwhile. It will return false during the axiom bootstrap phase.



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

w__w___w._ja__v__a_2s__.___c___o_m___ | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.