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


java.lang.Object
   org.mandarax.xkb.framework.GenericDriver

All known Subclasses:   org.mandarax.xkb.framework.XKBDriver_2_0,  org.mandarax.xkb.framework.XKBDriver_1_1,  org.mandarax.xkb.framework.XKBDriver_1_0,  org.mandarax.xkb.framework.XKBDriver_2_1,
GenericDriver
abstract public class GenericDriver implements XKBDriver(Code)
A generic driver that uses XMLAdapter to map objects to XML.
The driver can be more or less fault tolerant. The level of fault tolerance can be set using the respective constants. Furthermore, we can set a print writer that the adapter can use to report events or problems that do not lead to exceptions. The fault tolerance concepts applies in particular on the level of knowledge bases. Here the following guidelines should be used:
  • If the fault tolerance level is medium, each problem should interrupt the export or import and the error should be "bubbled up"
  • If the level is medium, the export or import can continue even id it fails for some clauses. But the log writer should be used to post a descriptive message, and (for export) a comment should be inserted into the document where the clause set is supposed to be.
  • If the level is high, problems with export or import of single clauses are just ignored.
The default fault tolerance level is medium.
author:
   Jens Dietrich
version:
   3.4 <7 March 05>
since:
   1.6


Field Summary
final public static  StringCOMPARATOR
    
final public static  StringCOMPLEX_TERM
    
final public static  StringCONSTANT_TERM
    
final public static  StringDATA_SOURCE
    
final public static  intDEFAULT_FAULT_TOLERANCE
    
final public static  StringDYNA_BEAN_FUNCTION
    
final public static  StringFACT
    
final public static  intHIGH_FAULT_TOLERANCE
    
final public static  StringJFUNCTION
    
final public static  StringJPREDICATE
    
final public static  StringKNOWLEDGE_BASE
    
final public static  intLOW_FAULT_TOLERANCE
    
final public static  StringMANDARAX_LIB_FUNCTION
    
final public static  StringMANDARAX_LIB_PREDICATE
    
final public static  intMEDIUM_FAULT_TOLERANCE
    
final public static  StringMETHOD
    
final public static  StringOBJECT
    
final public static  StringPREREQUISITE
    
final public static  StringPROPERTIES
    
final public static  StringPROPERTY
    
final public static  StringPROPERTY_NAME
    
final public static  StringPROPERTY_VALUE
    
final public static  StringQUERY
    
final public static  StringRULE
    
final public static  StringSIMPLE_PREDICATE
    
final public static  StringSQL_CLAUSE_SET
    
final public static  StringSQL_FUNCTION
    
final public static  StringSQL_PREDICATE
    
final public static  StringTYPE
    
final public static  StringVARIABLE_TERM
    
protected  intfaultToleranceLevel
    
protected  PrintWriterout
    

Constructor Summary
public  GenericDriver()
     Constructor.

Method Summary
public  DocumentexportKnowledgeBase(KnowledgeBase kb)
     Export a knowledge base, i.e., convert it into an xml document.
public  XMLAdaptergetAdapterByKindOfObject(String typeName)
     Get an adapter by type, the type is a name as defined in static variables here.
public  XMLAdaptergetAdapterByTagName(String tagName)
     Get an adapter by tag name.
public  StringgetDTD()
     Get the location (URL) of the associated DTD.
public  StringgetDescription()
     Get a short text describing the driver.
public  intgetFaultToleranceLevel()
     Get the fault tolerance level.
public  PrintWritergetLogWriter()
     Get the log writer.
public  StringgetName()
     Get the name of the driver.
public  KnowledgeBaseimportKnowledgeBase(Document doc)
     Import a knowledge base, i.e., build it from an xml document.
public  KnowledgeBaseimportKnowledgeBase(Element e)
     Import a knowledge base.
public  voidinstall(XMLAdapter adapter)
     Install an adapter.
public  voidsetFaultToleranceLevel(int level)
     Set the fault tolerance level.
public  voidsetLogWriter(PrintWriter pw)
     Set the log writer.
public  booleansupportsAutoFacts()
     Indicates whether the driver (and the underlying xml format (=dtd)) supports auto facts.
public  booleansupportsClauseSets()
     Indicates whether the driver (and the underlying xml format (=dtd)) supports clause sets.
public  booleansupportsFacts()
     Indicates whether the driver (and the underlying xml format (=dtd)) supports facts.
public  booleansupportsFunctions()
     Indicates whether the driver (and the underlying xml format (=dtd)) supports functions.
public  booleansupportsJavaSemantics()
     Indicates whether the driver (and the underlying xml format (=dtd)) supports the java semantics (e.g.
public  booleansupportsMultiplePremises()
     Indicates whether the driver (and the underlying xml format (=dtd)) supports multiple premises.
public  booleansupportsNegationAsFailure()
     Indicates whether the driver (and the underlying xml format (=dtd)) supports negation as failure.
public  booleansupportsOrPremises()
     Indicates whether the driver (and the underlying xml format (=dtd)) supports multiple premises connected by OR.
public  booleansupportsQueries()
     Indicates whether the driver (and the underlying xml format (=dtd)) supports queries.
public  booleansupportsTypes()
     Indicates whether the driver (and the underlying xml format (=dtd)) supports types.

Field Detail
COMPARATOR
final public static String COMPARATOR(Code)



COMPLEX_TERM
final public static String COMPLEX_TERM(Code)



CONSTANT_TERM
final public static String CONSTANT_TERM(Code)



DATA_SOURCE
final public static String DATA_SOURCE(Code)



DEFAULT_FAULT_TOLERANCE
final public static int DEFAULT_FAULT_TOLERANCE(Code)



DYNA_BEAN_FUNCTION
final public static String DYNA_BEAN_FUNCTION(Code)



FACT
final public static String FACT(Code)



HIGH_FAULT_TOLERANCE
final public static int HIGH_FAULT_TOLERANCE(Code)



JFUNCTION
final public static String JFUNCTION(Code)



JPREDICATE
final public static String JPREDICATE(Code)



KNOWLEDGE_BASE
final public static String KNOWLEDGE_BASE(Code)



LOW_FAULT_TOLERANCE
final public static int LOW_FAULT_TOLERANCE(Code)



MANDARAX_LIB_FUNCTION
final public static String MANDARAX_LIB_FUNCTION(Code)



MANDARAX_LIB_PREDICATE
final public static String MANDARAX_LIB_PREDICATE(Code)



MEDIUM_FAULT_TOLERANCE
final public static int MEDIUM_FAULT_TOLERANCE(Code)



METHOD
final public static String METHOD(Code)



OBJECT
final public static String OBJECT(Code)



PREREQUISITE
final public static String PREREQUISITE(Code)



PROPERTIES
final public static String PROPERTIES(Code)



PROPERTY
final public static String PROPERTY(Code)



PROPERTY_NAME
final public static String PROPERTY_NAME(Code)



PROPERTY_VALUE
final public static String PROPERTY_VALUE(Code)



QUERY
final public static String QUERY(Code)



RULE
final public static String RULE(Code)



SIMPLE_PREDICATE
final public static String SIMPLE_PREDICATE(Code)



SQL_CLAUSE_SET
final public static String SQL_CLAUSE_SET(Code)



SQL_FUNCTION
final public static String SQL_FUNCTION(Code)



SQL_PREDICATE
final public static String SQL_PREDICATE(Code)



TYPE
final public static String TYPE(Code)



VARIABLE_TERM
final public static String VARIABLE_TERM(Code)



faultToleranceLevel
protected int faultToleranceLevel(Code)



out
protected PrintWriter out(Code)




Constructor Detail
GenericDriver
public GenericDriver()(Code)
Constructor.




Method Detail
exportKnowledgeBase
public Document exportKnowledgeBase(KnowledgeBase kb) throws XKBException(Code)
Export a knowledge base, i.e., convert it into an xml document. an xml document
Parameters:
  kb - a knowledge base
exception:
  an - XKBException is thrown if export fails



getAdapterByKindOfObject
public XMLAdapter getAdapterByKindOfObject(String typeName) throws XKBException(Code)
Get an adapter by type, the type is a name as defined in static variables here.
Parameters:
  typeName - a text indicating the kind of object the adapter can export/import



getAdapterByTagName
public XMLAdapter getAdapterByTagName(String tagName) throws XKBException(Code)
Get an adapter by tag name.
Parameters:
  tagName - a text indicating the name of an xml element



getDTD
public String getDTD()(Code)
Get the location (URL) of the associated DTD. a text



getDescription
public String getDescription()(Code)
Get a short text describing the driver. a text



getFaultToleranceLevel
public int getFaultToleranceLevel()(Code)
Get the fault tolerance level. a number (see the constants defined in GenericDriver)



getLogWriter
public PrintWriter getLogWriter()(Code)
Get the log writer. a print writer



getName
public String getName()(Code)
Get the name of the driver. a text



importKnowledgeBase
public KnowledgeBase importKnowledgeBase(Document doc) throws XKBException(Code)
Import a knowledge base, i.e., build it from an xml document. a knowledge base
Parameters:
  doc - an xml document
exception:
  an - XKBException is thrown if import fails



importKnowledgeBase
public KnowledgeBase importKnowledgeBase(Element e) throws XKBException(Code)
Import a knowledge base. a knowledge base
Parameters:
  e - an xml element
exception:
  an - XKBException is thrown if import fails



install
public void install(XMLAdapter adapter)(Code)
Install an adapter.
Parameters:
  adapter - an adapter



setFaultToleranceLevel
public void setFaultToleranceLevel(int level)(Code)
Set the fault tolerance level.
Parameters:
  level - a number (see the constants defined in GenericDriver)



setLogWriter
public void setLogWriter(PrintWriter pw)(Code)
Set the log writer.
Parameters:
  pw - a print writer



supportsAutoFacts
public boolean supportsAutoFacts()(Code)
Indicates whether the driver (and the underlying xml format (=dtd)) supports auto facts. a boolean



supportsClauseSets
public boolean supportsClauseSets()(Code)
Indicates whether the driver (and the underlying xml format (=dtd)) supports clause sets. a boolean



supportsFacts
public boolean supportsFacts()(Code)
Indicates whether the driver (and the underlying xml format (=dtd)) supports facts. (some formats might see facts as rules without body) a boolean



supportsFunctions
public boolean supportsFunctions()(Code)
Indicates whether the driver (and the underlying xml format (=dtd)) supports functions. a boolean



supportsJavaSemantics
public boolean supportsJavaSemantics()(Code)
Indicates whether the driver (and the underlying xml format (=dtd)) supports the java semantics (e.g. JFunctions, JPredicate). a boolean



supportsMultiplePremises
public boolean supportsMultiplePremises()(Code)
Indicates whether the driver (and the underlying xml format (=dtd)) supports multiple premises. a boolean



supportsNegationAsFailure
public boolean supportsNegationAsFailure()(Code)
Indicates whether the driver (and the underlying xml format (=dtd)) supports negation as failure. a boolean



supportsOrPremises
public boolean supportsOrPremises()(Code)
Indicates whether the driver (and the underlying xml format (=dtd)) supports multiple premises connected by OR. a boolean



supportsQueries
public boolean supportsQueries()(Code)
Indicates whether the driver (and the underlying xml format (=dtd)) supports queries. a boolean



supportsTypes
public boolean supportsTypes()(Code)
Indicates whether the driver (and the underlying xml format (=dtd)) supports types. a boolean



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.