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


org.mandarax.kernel.LogicFactory
   org.mandarax.reference.DefaultLogicFactory

DefaultLogicFactory
public class DefaultLogicFactory extends LogicFactory (Code)
Factory object for creating logical entities objects. The classes with the postfix Impl should never be instanciated directly. Instead use instances of this class. To use alternative implementations, subclass this class.
To install an instance of this class to be the default factory use the following code: (new DefaultLogicFactory()).install(). If this is done, a reference to the factory can be obtained using LogicFactory.getDefaultFactory().
As from 1.9, queries are supported.
author:
   Jens Dietrich
version:
   3.4 <7 March 05>
since:
   1.1



Constructor Summary
public  DefaultLogicFactory()
     Constructor.

Method Summary
public  ComplexTermcreateComplexTerm(Function anFunction, Term[] terms)
     Create a new complex term.
public  ConstantTermcreateConstantTerm(Object obj)
     Create a new constant term.
public  ConstantTermcreateConstantTerm(Object obj, Class type)
     Create a new constant term. a new constant term
Parameters:
  obj - the wrapped object
Parameters:
  type - the type of the object throws an IllegalArgumentException if object and type are inconsistent,i.e.
public  PrerequisitecreateCut()
     Create a cut prerequisite.
public  FactcreateFact(Predicate aPredicate, Term[] terms)
     Create a new fact.
public  PrerequisitecreatePrerequisite(Predicate aPredicate, Term[] terms, boolean negatedAF)
     Create a new prerequisite.
public  QuerycreateQuery(Fact fact, String name)
     Create a new query.
public  QuerycreateQuery(Fact[] facts, String name)
     Create a new query.
public  RulecreateRule(java.util.List body, Fact head)
     Create a new rule.
public  RulecreateRule(java.util.List body, Fact head, boolean or)
     Create a new rule.
public  RulecreateRule(Fact head)
     Create a new rule with an empty body.
public  TestCasecreateTestCase(Query aQuery, ClauseSet[] assumptions, int policyToAddAssumptionsToKB, boolean expectedResult)
     Create a new test case.
public  TestCasecreateTestCase(Query aQuery, ClauseSet[] assumptions, int policyToAddAssumptionsToKB, int expectedNumberOfResults)
     Create a new test case.
public  TestCasecreateTestCase(Query aQuery, ClauseSet[] assumptions, int policyToAddAssumptionsToKB, Map[] expectedReplacements)
     Create a new test case.
public  TestCasecreateTestCase(Query aQuery, ClauseSet[] assumptions, int policyToAddAssumptionsToKB, int expectedNumberOfResults, boolean expectedResult, Map[] expectedReplacements)
     Create a new test case. Note that the parameters are somehow redundant, expectedResult only makes sense if the query is ground while expectedReplacements only makes sense if the query contains variables.
public  VariableTermcreateVariableTerm(String aName, Class aType)
     Create a new variable term.
public  ClassgetComplexTermImplementationClass()
     Return the implementation class for complex terms.
public  ClassgetConstantTermImplementationClass()
     Return the implementation class for constant terms.
public  ClassgetFactImplementationClass()
     Return the implementation class for facts.
public  ClassgetPrerequisiteImplementationClass()
     Return the implementation class for prerequisites.
public  ClassgetQueryImplementationClass()
     Return the implementation class for queries.
public  ClassgetRuleImplementationClass()
     Return the implementation class for rules.
public  ClassgetVariableTermImplementationClass()
     Return the implementation class for variable terms.


Constructor Detail
DefaultLogicFactory
public DefaultLogicFactory()(Code)
Constructor.




Method Detail
createComplexTerm
public ComplexTerm createComplexTerm(Function anFunction, Term[] terms)(Code)
Create a new complex term. the created complex term
Parameters:
  anFunction - a function
Parameters:
  terms - an array of terms



createConstantTerm
public ConstantTerm createConstantTerm(Object obj)(Code)
Create a new constant term. the created constant term
Parameters:
  obj - the object that is to be wrapped by the constant term



createConstantTerm
public ConstantTerm createConstantTerm(Object obj, Class type)(Code)
Create a new constant term. a new constant term
Parameters:
  obj - the wrapped object
Parameters:
  type - the type of the object throws an IllegalArgumentException if object and type are inconsistent,i.e. if type object is not an instance of type



createCut
public Prerequisite createCut()(Code)
Create a cut prerequisite. a prerequisite



createFact
public Fact createFact(Predicate aPredicate, Term[] terms)(Code)
Create a new fact. the created fact
Parameters:
  aPredicate - the predicate
Parameters:
  terms - the terms



createPrerequisite
public Prerequisite createPrerequisite(Predicate aPredicate, Term[] terms, boolean negatedAF)(Code)
Create a new prerequisite. a new prerequisite
Parameters:
  aPredicate - a predicate
Parameters:
  terms - an array of terms
Parameters:
  negatedAF - whether the prerequisite is negated (as failure)



createQuery
public Query createQuery(Fact fact, String name)(Code)
Create a new query. a new query
Parameters:
  fact - aFact
Parameters:
  name - the name of the query



createQuery
public Query createQuery(Fact[] facts, String name)(Code)
Create a new query. a new query
Parameters:
  facts - an array of facts
Parameters:
  name - the name of the query



createRule
public Rule createRule(java.util.List body, Fact head)(Code)
Create a new rule. the created rule
Parameters:
  body - a list of facts that will become the body of the rule
Parameters:
  head - a fact that will become the head of the rule



createRule
public Rule createRule(java.util.List body, Fact head, boolean or)(Code)
Create a new rule. a new rule
Parameters:
  body - a list facts becoming the body of the rules
Parameters:
  head - the head of the rule
Parameters:
  or - indicates whether the prerequisites are connected by OR



createRule
public Rule createRule(Fact head)(Code)
Create a new rule with an empty body. the created rule
Parameters:
  head - the fact that will become the head of the rule



createTestCase
public TestCase createTestCase(Query aQuery, ClauseSet[] assumptions, int policyToAddAssumptionsToKB, boolean expectedResult)(Code)
Create a new test case. a new test case
Parameters:
  aQuery - a ground query
Parameters:
  assumptions - some assumptions
Parameters:
  policyToAddAssumptionsToKB - one of the integers in TestCase (TestCase.ON_TOP, TestCase.AT_BOTTOM)
Parameters:
  expectedResult - true or false
See Also:   org.mandarax.kernel.validation.TestCase



createTestCase
public TestCase createTestCase(Query aQuery, ClauseSet[] assumptions, int policyToAddAssumptionsToKB, int expectedNumberOfResults)(Code)
Create a new test case. a new test case
Parameters:
  aQuery - a ground query
Parameters:
  assumptions - some assumptions
Parameters:
  policyToAddAssumptionsToKB - one of the integers in TestCase (TestCase.ON_TOP, TestCase.AT_BOTTOM)
Parameters:
  expectedNumberOfResults - the expected number of results



createTestCase
public TestCase createTestCase(Query aQuery, ClauseSet[] assumptions, int policyToAddAssumptionsToKB, Map[] expectedReplacements)(Code)
Create a new test case. a new test case
Parameters:
  aQuery - a ground query
Parameters:
  assumptions - some assumptions
Parameters:
  policyToAddAssumptionsToKB - one of the integers in TestCase (TestCase.ON_TOP, TestCase.AT_BOTTOM)
Parameters:
  expectedReplacements - an array of expected replacements, each map contains VariableTerm -> Object associations



createTestCase
public TestCase createTestCase(Query aQuery, ClauseSet[] assumptions, int policyToAddAssumptionsToKB, int expectedNumberOfResults, boolean expectedResult, Map[] expectedReplacements)(Code)
Create a new test case. Note that the parameters are somehow redundant, expectedResult only makes sense if the query is ground while expectedReplacements only makes sense if the query contains variables. This is a general purpose creator that can be used in modules such as ZKB. a new test case
Parameters:
  aQuery - a ground query
Parameters:
  assumptions - some assumptions
Parameters:
  policyToAddAssumptionsToKB - one of the integers in TestCase (TestCase.ON_TOP, TestCase.AT_BOTTOM)
Parameters:
  expectedNumberOfResults - the expected number of results
Parameters:
  expectedResult - true or false
Parameters:
  expectedReplacements - an array of expected replacements, each map contains VariableTerm -> Object associations



createVariableTerm
public VariableTerm createVariableTerm(String aName, Class aType)(Code)
Create a new variable term. the created variable term
Parameters:
  aName - the name of the variable
Parameters:
  aType - the type of the variable



getComplexTermImplementationClass
public Class getComplexTermImplementationClass()(Code)
Return the implementation class for complex terms. a class



getConstantTermImplementationClass
public Class getConstantTermImplementationClass()(Code)
Return the implementation class for constant terms. a class



getFactImplementationClass
public Class getFactImplementationClass()(Code)
Return the implementation class for facts. a class



getPrerequisiteImplementationClass
public Class getPrerequisiteImplementationClass()(Code)
Return the implementation class for prerequisites. a class



getQueryImplementationClass
public Class getQueryImplementationClass()(Code)
Return the implementation class for queries. a class



getRuleImplementationClass
public Class getRuleImplementationClass()(Code)
Return the implementation class for rules. a class



getVariableTermImplementationClass
public Class getVariableTermImplementationClass()(Code)
Return the implementation class for variable terms. a class



Methods inherited from org.mandarax.kernel.LogicFactory
abstract public ComplexTerm createComplexTerm(Function aFunction, Term[] terms)(Code)(Java Doc)
abstract public ConstantTerm createConstantTerm(Object obj)(Code)(Java Doc)
abstract public ConstantTerm createConstantTerm(Object obj, Class type)(Code)(Java Doc)
abstract public Prerequisite createCut()(Code)(Java Doc)
abstract public Fact createFact(Predicate aPredicate, Term[] terms)(Code)(Java Doc)
abstract public Prerequisite createPrerequisite(Predicate aPredicate, Term[] terms, boolean negatedAF)(Code)(Java Doc)
abstract public Query createQuery(Fact fact, String name)(Code)(Java Doc)
abstract public Query createQuery(Fact[] facts, String name)(Code)(Java Doc)
abstract public Rule createRule(java.util.List body, Fact head)(Code)(Java Doc)
abstract public Rule createRule(java.util.List body, Fact head, boolean or)(Code)(Java Doc)
public Rule createRule(Fact head)(Code)(Java Doc)
abstract public TestCase createTestCase(Query aQuery, ClauseSet[] assumptions, int policyToAddAssumptionsToKB, boolean expectedResult)(Code)(Java Doc)
abstract public TestCase createTestCase(Query aQuery, ClauseSet[] assumptions, int policyToAddAssumptionsToKB, int expectedNumberOfResults)(Code)(Java Doc)
abstract public TestCase createTestCase(Query aQuery, ClauseSet[] assumptions, int policyToAddAssumptionsToKB, Map[] expectedReplacements)(Code)(Java Doc)
abstract public TestCase createTestCase(Query aQuery, ClauseSet[] assumptions, int policyToAddAssumptionsToKB, int expectedNumberOfResults, boolean expectedResult, Map[] expectedReplacements)(Code)(Java Doc)
abstract public VariableTerm createVariableTerm(String aName, Class aType)(Code)(Java Doc)
abstract public Class getComplexTermImplementationClass()(Code)(Java Doc)
abstract public Class getConstantTermImplementationClass()(Code)(Java Doc)
public static LogicFactory getDefaultFactory()(Code)(Java Doc)
abstract public Class getFactImplementationClass()(Code)(Java Doc)
abstract public Class getPrerequisiteImplementationClass()(Code)(Java Doc)
abstract public Class getQueryImplementationClass()(Code)(Java Doc)
abstract public Class getRuleImplementationClass()(Code)(Java Doc)
abstract public Class getVariableTermImplementationClass()(Code)(Java Doc)
public void install()(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.