Java Doc for LogicFactorySupport.java in  » Rule-Engine » Mandarax » org » mandarax » util » 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 » Rule Engine » Mandarax » org.mandarax.util 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.mandarax.util.LogicFactorySupport

All known Subclasses:   org.mandarax.examples.crm.DiscountCalculator,
LogicFactorySupport
public class LogicFactorySupport (Code)
Utility class to facilitate creating rules, facts and terms.
author:
   Jens Dietrich
version:
   3.4 <7 March 05>
since:
   1.2



Constructor Summary
public  LogicFactorySupport()
     Constructor.
public  LogicFactorySupport(LogicFactory aFactory)
     Constructor.

Method Summary
public  ConstantTermcons(Object obj, Class type)
     Create a constant term.
public  ComplexTermcplx(Function function, Object[] objs)
     Create a complex term.
public  ComplexTermcplx(Function function, Object obj1)
     Create a complex term with one (sub)term.
public  ComplexTermcplx(Function function, Object obj1, Object obj2)
     Create a complex term with two (sub)terms.
public  ComplexTermcplx(Function function, Object obj1, Object obj2, Object obj3)
     Create a complex term with three (sub)terms.
public  ComplexTermcplx(Function function, Object obj1, Object obj2, Object obj3, Object obj4)
     Create a complex term with four (sub)terms.
public  Prerequisitecut()
     Create a prerequiste using the cut predicate.
public  Factfact(Predicate predicate, Object[] objs)
     Create a fact.
public  Factfact(Predicate predicate, Object obj)
     Create a fact with one term.
public  Factfact(Predicate predicate, Object obj1, Object obj2)
     Create a fact with two terms.
public  Factfact(Predicate predicate, Object obj1, Object obj2, Object obj3)
     Create a fact with three terms.
public  Factfact(Predicate predicate, Object obj1, Object obj2, Object obj3, Object obj4)
     Create a fact with four terms.
public  Prerequisitefact2prereq(Fact fact)
     Convert a fact to a prerequisite.
public  RuleorRule(Fact prerequisite1, Fact prerequisite2, Fact conclusion)
     Create a rule with two prerequisites.
public  RuleorRule(Fact prerequisite1, Fact prerequisite2, Fact prerequisite3, Fact conclusion)
     Create a rule with three prerequisites.
public  RuleorRule(Fact prerequisite1, Fact prerequisite2, Fact prerequisite3, Fact prerequisite4, Fact conclusion)
     Create a rule with four prerequisites.
public  RuleorRule(Prerequisite prerequisite1, Prerequisite prerequisite2, Fact conclusion)
     Create a rule with two prerequisites.
public  RuleorRule(Prerequisite prerequisite1, Prerequisite prerequisite2, Prerequisite prerequisite3, Fact conclusion)
     Create a rule with three prerequisites.
public  RuleorRule(Prerequisite prerequisite1, Prerequisite prerequisite2, Prerequisite prerequisite3, Prerequisite prerequisite4, Fact conclusion)
     Create a rule with four prerequisites.
public  Prerequisiteprereq(Predicate predicate, Object[] objs)
     Create a prerequisite.
public  Prerequisiteprereq(Predicate predicate, Object obj)
     Create a prerequisite with one term.
public  Prerequisiteprereq(Predicate predicate, Object obj1, Object obj2)
     Create a prerequisite with two terms.
public  Prerequisiteprereq(Predicate predicate, Object obj1, Object obj2, Object obj3)
     Create a prerequisite with three terms.
public  Prerequisiteprereq(Predicate predicate, Object obj1, Object obj2, Object obj3, Object obj4)
     Create a prerequisite with four terms.
public  Prerequisiteprereq(Predicate predicate, Object[] objs, boolean negatedAF)
     Create a prerequisite.
public  Prerequisiteprereq(Predicate predicate, Object obj, boolean negatedAF)
     Create a prerequisite with one term.
public  Prerequisiteprereq(Predicate predicate, Object obj1, Object obj2, boolean negatedAF)
     Create a prerequisite with two terms.
public  Prerequisiteprereq(Predicate predicate, Object obj1, Object obj2, Object obj3, boolean negatedAF)
     Create a prerequisite with three terms.
public  Prerequisiteprereq(Predicate predicate, Object obj1, Object obj2, Object obj3, Object obj4, boolean negatedAF)
     Create a prerequisite with four terms.
public  Queryquery(Fact fact, String name)
     Create a query with one fact.
public  Queryquery(Fact fact1, Fact fact2, String name)
     Create a query with two facts.
public  Queryquery(Fact fact1, Fact fact2, Fact fact3, String name)
     Create a query with three facts.
public  Queryquery(Fact[] facts, String name)
     Create a query with N facts.
public  Rulerule(List body, Fact conclusion)
     Create a rule.
public  Rulerule(Fact conclusion)
     Create a rule with no prerequisites.
public  Rulerule(Fact prerequisite, Fact conclusion)
     Create a rule with one prerequisite.
public  Rulerule(Fact prerequisite1, Fact prerequisite2, Fact conclusion)
     Create a rule with two prerequisites.
public  Rulerule(Fact prerequisite1, Fact prerequisite2, Fact prerequisite3, Fact conclusion)
     Create a rule with three prerequisites.
public  Rulerule(Fact prerequisite1, Fact prerequisite2, Fact prerequisite3, Fact prerequisite4, Fact conclusion)
     Create a rule with four prerequisites.
public  Rulerule(Prerequisite prerequisite, Fact conclusion)
     Create a rule with one prerequisite.
public  Rulerule(Prerequisite prerequisite1, Prerequisite prerequisite2, Fact conclusion)
     Create a rule with two prerequisites.
public  Rulerule(Prerequisite prerequisite1, Prerequisite prerequisite2, Prerequisite prerequisite3, Fact conclusion)
     Create a rule with three prerequisites.
public  Rulerule(Prerequisite prerequisite1, Prerequisite prerequisite2, Prerequisite prerequisite3, Prerequisite prerequisite4, Fact conclusion)
     Create a rule with four prerequisites.
public  Termvariable(String name, Class clazz)
     Convenient method to create a variable.
public  Termvariable(String name)
     Convenient method to create a string type variable.


Constructor Detail
LogicFactorySupport
public LogicFactorySupport()(Code)
Constructor.



LogicFactorySupport
public LogicFactorySupport(LogicFactory aFactory)(Code)
Constructor.
Parameters:
  aFactory - the logic factory to be used




Method Detail
cons
public ConstantTerm cons(Object obj, Class type)(Code)
Create a constant term. the constant term created
Parameters:
  obj - the object
Parameters:
  type - the type



cplx
public ComplexTerm cplx(Function function, Object[] objs)(Code)
Create a complex term. See toTerm how the object is converted to a term. the complex term created
Parameters:
  function - the function
Parameters:
  objs - objects (will be interpreted as terms)



cplx
public ComplexTerm cplx(Function function, Object obj1)(Code)
Create a complex term with one (sub)term. See toTerm how the object is converted to a term. the complex term created
Parameters:
  function - the function
Parameters:
  obj - an object



cplx
public ComplexTerm cplx(Function function, Object obj1, Object obj2)(Code)
Create a complex term with two (sub)terms. See toTerm how the object is converted to a term. the complex term created
Parameters:
  function - the function
Parameters:
  obj1 - an object
Parameters:
  obj2 - an object



cplx
public ComplexTerm cplx(Function function, Object obj1, Object obj2, Object obj3)(Code)
Create a complex term with three (sub)terms. See toTerm how the object is converted to a term. the complex term created
Parameters:
  function - the function
Parameters:
  obj1 - an object
Parameters:
  obj2 - an object
Parameters:
  obj3 - an object



cplx
public ComplexTerm cplx(Function function, Object obj1, Object obj2, Object obj3, Object obj4)(Code)
Create a complex term with four (sub)terms. See toTerm how the object is converted to a term. the complex term created
Parameters:
  function - the function
Parameters:
  obj1 - an object
Parameters:
  obj2 - an object
Parameters:
  obj3 - an object
Parameters:
  obj4 - an object



cut
public Prerequisite cut()(Code)
Create a prerequiste using the cut predicate. a prerequisite



fact
public Fact fact(Predicate predicate, Object[] objs)(Code)
Create a fact. See toTerm how the object is converted to a term. the fact created
Parameters:
  predicate - the predicate
Parameters:
  objs - objects (will be interpreted as terms)



fact
public Fact fact(Predicate predicate, Object obj)(Code)
Create a fact with one term. See toTerm how the object is converted to a term. the fact created
Parameters:
  predicate - the predicate
Parameters:
  obj - an object



fact
public Fact fact(Predicate predicate, Object obj1, Object obj2)(Code)
Create a fact with two terms. See toTerm how the object is converted to a term. the fact created
Parameters:
  predicate - the predicate
Parameters:
  obj1 - an object
Parameters:
  obj2 - an object



fact
public Fact fact(Predicate predicate, Object obj1, Object obj2, Object obj3)(Code)
Create a fact with three terms. See toTerm how the object is converted to a term. the fact created
Parameters:
  predicate - the predicate
Parameters:
  obj1 - an object
Parameters:
  obj2 - an object
Parameters:
  obj3 - an object



fact
public Fact fact(Predicate predicate, Object obj1, Object obj2, Object obj3, Object obj4)(Code)
Create a fact with four terms. See toTerm how the object is converted to a term. the fact created
Parameters:
  predicate - the predicate
Parameters:
  obj1 - an object
Parameters:
  obj2 - an object
Parameters:
  obj3 - an object
Parameters:
  obj4 - an object



fact2prereq
public Prerequisite fact2prereq(Fact fact)(Code)
Convert a fact to a prerequisite.
Parameters:
  fact - a fact a prerequisite



orRule
public Rule orRule(Fact prerequisite1, Fact prerequisite2, Fact conclusion)(Code)
Create a rule with two prerequisites. The prerequisites are connected by OR. the rule created
Parameters:
  prerequisite1 - a prerequisite
Parameters:
  prerequisite2 - a prerequisite
Parameters:
  conclusion - the concusion of the rule



orRule
public Rule orRule(Fact prerequisite1, Fact prerequisite2, Fact prerequisite3, Fact conclusion)(Code)
Create a rule with three prerequisites. The prerequisites are connected by OR. the rule created
Parameters:
  prerequisite1 - a prerequisite
Parameters:
  prerequisite2 - a prerequisite
Parameters:
  prerequisite3 - a prerequisite
Parameters:
  conclusion - the concusion of the rule



orRule
public Rule orRule(Fact prerequisite1, Fact prerequisite2, Fact prerequisite3, Fact prerequisite4, Fact conclusion)(Code)
Create a rule with four prerequisites. The prerequisites are connected by OR. the rule created
Parameters:
  prerequisite1 - a prerequisite
Parameters:
  prerequisite2 - a prerequisite
Parameters:
  prerequisite3 - a prerequisite
Parameters:
  prerequisite4 - a prerequisite
Parameters:
  conclusion - the concusion of the rule



orRule
public Rule orRule(Prerequisite prerequisite1, Prerequisite prerequisite2, Fact conclusion)(Code)
Create a rule with two prerequisites. The prerequisites are connected by OR. the rule created
Parameters:
  prerequisite1 - a prerequisite
Parameters:
  prerequisite2 - a prerequisite
Parameters:
  conclusion - the concusion of the rule



orRule
public Rule orRule(Prerequisite prerequisite1, Prerequisite prerequisite2, Prerequisite prerequisite3, Fact conclusion)(Code)
Create a rule with three prerequisites. The prerequisites are connected by OR. the rule created
Parameters:
  prerequisite1 - a prerequisite
Parameters:
  prerequisite2 - a prerequisite
Parameters:
  prerequisite3 - a prerequisite
Parameters:
  conclusion - the concusion of the rule



orRule
public Rule orRule(Prerequisite prerequisite1, Prerequisite prerequisite2, Prerequisite prerequisite3, Prerequisite prerequisite4, Fact conclusion)(Code)
Create a rule with four prerequisites. The prerequisites are connected by OR. the rule created
Parameters:
  prerequisite1 - a prerequisite
Parameters:
  prerequisite2 - a prerequisite
Parameters:
  prerequisite3 - a prerequisite
Parameters:
  prerequisite4 - a prerequisite
Parameters:
  conclusion - the concusion of the rule



prereq
public Prerequisite prereq(Predicate predicate, Object[] objs)(Code)
Create a prerequisite. See toTerm how the object is converted to a term. the prerequisite created
Parameters:
  predicate - the predicate
Parameters:
  objs - objects (will be interpreted as terms)



prereq
public Prerequisite prereq(Predicate predicate, Object obj)(Code)
Create a prerequisite with one term. See toTerm how the object is converted to a term. the prerequisite created
Parameters:
  predicate - the predicate
Parameters:
  obj - an object



prereq
public Prerequisite prereq(Predicate predicate, Object obj1, Object obj2)(Code)
Create a prerequisite with two terms. See toTerm how the object is converted to a term. the prerequisite created
Parameters:
  predicate - the predicate
Parameters:
  obj1 - an object
Parameters:
  obj2 - an object



prereq
public Prerequisite prereq(Predicate predicate, Object obj1, Object obj2, Object obj3)(Code)
Create a prerequisite with three terms. See toTerm how the object is converted to a term. the prerequisite created
Parameters:
  predicate - the predicate
Parameters:
  obj1 - an object
Parameters:
  obj2 - an object
Parameters:
  obj3 - an object



prereq
public Prerequisite prereq(Predicate predicate, Object obj1, Object obj2, Object obj3, Object obj4)(Code)
Create a prerequisite with four terms. See toTerm how the object is converted to a term. the prerequisite created
Parameters:
  predicate - the predicate
Parameters:
  obj1 - an object
Parameters:
  obj2 - an object
Parameters:
  obj3 - an object
Parameters:
  obj4 - an object



prereq
public Prerequisite prereq(Predicate predicate, Object[] objs, boolean negatedAF)(Code)
Create a prerequisite. See toTerm how the object is converted to a term. the prerequisite created
Parameters:
  predicate - the predicate
Parameters:
  objs - objects (will be interpreted as terms)
Parameters:
  negatedAF - whether the prerequisite is negated (using negation as failure)



prereq
public Prerequisite prereq(Predicate predicate, Object obj, boolean negatedAF)(Code)
Create a prerequisite with one term. See toTerm how the object is converted to a term. the prerequisite created
Parameters:
  predicate - the predicate
Parameters:
  obj - an object
Parameters:
  negatedAF - whether the prerequisite is negated (using negation as failure)



prereq
public Prerequisite prereq(Predicate predicate, Object obj1, Object obj2, boolean negatedAF)(Code)
Create a prerequisite with two terms. See toTerm how the object is converted to a term. the prerequisite created
Parameters:
  predicate - the predicate
Parameters:
  obj1 - an object
Parameters:
  obj2 - an object
Parameters:
  negatedAF - whether the prerequisite is negated (using negation as failure)



prereq
public Prerequisite prereq(Predicate predicate, Object obj1, Object obj2, Object obj3, boolean negatedAF)(Code)
Create a prerequisite with three terms. See toTerm how the object is converted to a term. the prerequisite created
Parameters:
  predicate - the predicate
Parameters:
  obj1 - an object
Parameters:
  obj2 - an object
Parameters:
  obj3 - an object
Parameters:
  negatedAF - whether the prerequisite is negated (using negation as failure)



prereq
public Prerequisite prereq(Predicate predicate, Object obj1, Object obj2, Object obj3, Object obj4, boolean negatedAF)(Code)
Create a prerequisite with four terms. See toTerm how the object is converted to a term. the prerequisite created
Parameters:
  predicate - the predicate
Parameters:
  obj1 - an object
Parameters:
  obj2 - an object
Parameters:
  obj3 - an object
Parameters:
  obj4 - an object
Parameters:
  negatedAF - whether the prerequisite is negated (using negation as failure)



query
public Query query(Fact fact, String name)(Code)
Create a query with one fact. the query created
Parameters:
  fact - a fact
Parameters:
  name - the name of the query



query
public Query query(Fact fact1, Fact fact2, String name)(Code)
Create a query with two facts. the query created
Parameters:
  fact1 - a fact
Parameters:
  fact2 - a fact
Parameters:
  name - the name of the query



query
public Query query(Fact fact1, Fact fact2, Fact fact3, String name)(Code)
Create a query with three facts. the query created
Parameters:
  fact1 - a fact
Parameters:
  fact2 - a fact
Parameters:
  fact3 - a fact
Parameters:
  name - the name of the query



query
public Query query(Fact[] facts, String name)(Code)
Create a query with N facts. the query created
Parameters:
  fact1 - a fact
Parameters:
  fact2 - a fact
Parameters:
  name - the name of the query



rule
public Rule rule(List body, Fact conclusion)(Code)
Create a rule. the rule created
Parameters:
  body - the prerequisites of the rule
Parameters:
  conclusion - the concusion of the rule



rule
public Rule rule(Fact conclusion)(Code)
Create a rule with no prerequisites. the rule created
Parameters:
  conclusion - the concusion of the rule



rule
public Rule rule(Fact prerequisite, Fact conclusion)(Code)
Create a rule with one prerequisite. the rule created
Parameters:
  prerequisite - a prerequisite
Parameters:
  conclusion - the concusion of the rule



rule
public Rule rule(Fact prerequisite1, Fact prerequisite2, Fact conclusion)(Code)
Create a rule with two prerequisites. the rule created
Parameters:
  prerequisite1 - a prerequisite
Parameters:
  prerequisite2 - a prerequisite
Parameters:
  conclusion - the concusion of the rule



rule
public Rule rule(Fact prerequisite1, Fact prerequisite2, Fact prerequisite3, Fact conclusion)(Code)
Create a rule with three prerequisites. the rule created
Parameters:
  prerequisite1 - a prerequisite
Parameters:
  prerequisite2 - a prerequisite
Parameters:
  prerequisite3 - a prerequisite
Parameters:
  conclusion - the concusion of the rule



rule
public Rule rule(Fact prerequisite1, Fact prerequisite2, Fact prerequisite3, Fact prerequisite4, Fact conclusion)(Code)
Create a rule with four prerequisites. the rule created
Parameters:
  prerequisite1 - a prerequisite
Parameters:
  prerequisite2 - a prerequisite
Parameters:
  prerequisite3 - a prerequisite
Parameters:
  prerequisite4 - a prerequisite
Parameters:
  conclusion - the concusion of the rule



rule
public Rule rule(Prerequisite prerequisite, Fact conclusion)(Code)
Create a rule with one prerequisite. the rule created
Parameters:
  prerequisite - a prerequisite
Parameters:
  conclusion - the concusion of the rule



rule
public Rule rule(Prerequisite prerequisite1, Prerequisite prerequisite2, Fact conclusion)(Code)
Create a rule with two prerequisites. the rule created
Parameters:
  prerequisite1 - a prerequisite
Parameters:
  prerequisite2 - a prerequisite
Parameters:
  conclusion - the concusion of the rule



rule
public Rule rule(Prerequisite prerequisite1, Prerequisite prerequisite2, Prerequisite prerequisite3, Fact conclusion)(Code)
Create a rule with three prerequisites. the rule created
Parameters:
  prerequisite1 - a prerequisite
Parameters:
  prerequisite2 - a prerequisite
Parameters:
  prerequisite3 - a prerequisite
Parameters:
  conclusion - the concusion of the rule



rule
public Rule rule(Prerequisite prerequisite1, Prerequisite prerequisite2, Prerequisite prerequisite3, Prerequisite prerequisite4, Fact conclusion)(Code)
Create a rule with four prerequisites. the rule created
Parameters:
  prerequisite1 - a prerequisite
Parameters:
  prerequisite2 - a prerequisite
Parameters:
  prerequisite3 - a prerequisite
Parameters:
  prerequisite4 - a prerequisite
Parameters:
  conclusion - the concusion of the rule



variable
public Term variable(String name, Class clazz)(Code)
Convenient method to create a variable. a term
Parameters:
  name - a var name
Parameters:
  clazz - a type



variable
public Term variable(String name)(Code)
Convenient method to create a string type variable. a term
Parameters:
  name - a var name



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)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.