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


java.lang.Object
   org.mandarax.kernel.LObject
      org.mandarax.kernel.LogicFactory

All known Subclasses:   org.mandarax.reference.DefaultLogicFactory,
LogicFactory
abstract public class LogicFactory extends LObject (Code)
Abstract factory object for creating logical entities such as rules, facts and terms. The implementing classes should never be instanciated directly. Instead use instances of this class to create them. Support for obtaining a reference to a default logic factory is provided - use the static method getDefaultFactory() to obtain a reference. Note that be default we try to initialize the default factory with an instance of the subclass org.mandarax.reference.DefaultLogicFactory. The respective refernce is obtained using Class.forName() so that this package does only have a weak dependency to the org.mandarax.reference package.
As from 1.9, queries are supported.
See Also:   org.mandarax.reference.DefaultLogicFactory
author:
   Jens Dietrich
version:
   3.4 <7 March 05>
since:
   1.1



Constructor Summary
public  LogicFactory()
     Constructor.

Method Summary
abstract public  ComplexTermcreateComplexTerm(Function aFunction, Term[] terms)
     Create a new complex term.
abstract public  ConstantTermcreateConstantTerm(Object obj)
     Create a new constant term.
abstract 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.
abstract public  PrerequisitecreateCut()
     Create a cut prerequisite.
abstract public  FactcreateFact(Predicate aPredicate, Term[] terms)
     Create a new fact.
abstract public  PrerequisitecreatePrerequisite(Predicate aPredicate, Term[] terms, boolean negatedAF)
     Create a new prerequisite.
abstract public  QuerycreateQuery(Fact fact, String name)
     Create a new query.
abstract public  QuerycreateQuery(Fact[] facts, String name)
     Create a new query.
abstract public  RulecreateRule(java.util.List body, Fact head)
     Create a new rule.
abstract 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.
abstract public  TestCasecreateTestCase(Query aQuery, ClauseSet[] assumptions, int policyToAddAssumptionsToKB, boolean expectedResult)
     Create a new test case.
abstract public  TestCasecreateTestCase(Query aQuery, ClauseSet[] assumptions, int policyToAddAssumptionsToKB, int expectedNumberOfResults)
     Create a new test case.
abstract public  TestCasecreateTestCase(Query aQuery, ClauseSet[] assumptions, int policyToAddAssumptionsToKB, Map[] expectedReplacements)
     Create a new test case.
abstract 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.
abstract public  VariableTermcreateVariableTerm(String aName, Class aType)
     Create a new variable term.
abstract public  ClassgetComplexTermImplementationClass()
     Return the implementation class for complex terms.
abstract public  ClassgetConstantTermImplementationClass()
     Return the implementation class for constant terms.
public static  LogicFactorygetDefaultFactory()
     Get the default factory.
abstract public  ClassgetFactImplementationClass()
     Return the implementation class for facts.
abstract public  ClassgetPrerequisiteImplementationClass()
     Return the implementation class for prerequisites.
abstract public  ClassgetQueryImplementationClass()
     Return the implementation class for queries.
abstract public  ClassgetRuleImplementationClass()
     Return the implementation class for rules.
abstract public  ClassgetVariableTermImplementationClass()
     Return the implementation class for variable terms.
public  voidinstall()
     Install the object to become the default factory.


Constructor Detail
LogicFactory
public LogicFactory()(Code)
Constructor.




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



createConstantTerm
abstract public ConstantTerm createConstantTerm(Object obj)(Code)
Create a new constant term. a new constant term
Parameters:
  obj - the wrapped object



createConstantTerm
abstract 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
abstract public Prerequisite createCut()(Code)
Create a cut prerequisite. a prerequisite



createFact
abstract public Fact createFact(Predicate aPredicate, Term[] terms)(Code)
Create a new fact. a new fact
Parameters:
  aPredicate - a predicate
Parameters:
  terms - an array of terms



createPrerequisite
abstract 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
abstract 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
abstract 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
abstract public Rule createRule(java.util.List body, Fact head)(Code)
Create a new rule. a new rule
Parameters:
  body - a list of prerequisites
Parameters:
  head - the head of the rule



createRule
abstract public Rule createRule(java.util.List body, Fact head, boolean or)(Code)
Create a new rule. a new rule
Parameters:
  body - a list of prerequisites
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. a new rule
Parameters:
  head - a fact that becomes the head of the created rule



createTestCase
abstract 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
abstract 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
abstract 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
abstract 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
abstract public VariableTerm createVariableTerm(String aName, Class aType)(Code)
Create a new variable term. a new variable term
Parameters:
  aName - the name of the term
Parameters:
  aType - the type of the term



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



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



getDefaultFactory
public static LogicFactory getDefaultFactory()(Code)
Get the default factory. the default factory object



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



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



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



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



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



install
public void install()(Code)
Install the object to become the default factory.




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.