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


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

All known Subclasses:   org.mandarax.zkb.framework.ZKBDriver_1_0,  org.mandarax.zkb.framework.ZKBDriver_2_0,  org.mandarax.zkb.framework.ZKBDriver_1_1,
GenericDriver
abstract public class GenericDriver implements ZKBDriver,TagAndAttributeNames(Code)
A generic driver that uses adapter 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:
   2.2


Field Summary
final public static  intDEFAULT_FAULT_TOLERANCE
    
final public static  intHIGH_FAULT_TOLERANCE
    
final public static  intLOW_FAULT_TOLERANCE
    
final public static  intMEDIUM_FAULT_TOLERANCE
    
protected  intfaultToleranceLevel
    
protected  PrintWriterout
    

Constructor Summary
public  GenericDriver()
     Constructor.

Method Summary
public  DocumentexportKnowledgeBase(KnowledgeBase kb, ObjectPersistencyService ops)
     Export a knowledge base, i.e., convert it into an xml document.
public  AdaptergetAdapter(String tagName)
     Get an adapter by tag name.
 ListgetAdapters()
     Get the adapters as a list.
public  StringgetDescription()
     Get a short text describing the driver.
public  intgetDtdRefPolicy()
     Get the dtd reference policy.
public  intgetFaultToleranceLevel()
     Get the fault tolerance level.
public  PrintWritergetLogWriter()
     Get the log writer.
public  StringgetName()
     Get the name of the driver.
abstract protected  StringgetRootElementType()
     Get the root element type.
public  KnowledgeBaseimportKnowledgeBase(Document doc, ObjectPersistencyService ops)
     Import a knowledge base, i.e., build it from an xml document.
public  voidinstall(Adapter adapter)
     Install an adapter.
public  voidsetDtdRefPolicy(int dtdRefPolicy)
     Sets the dtd reference policy.
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  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
DEFAULT_FAULT_TOLERANCE
final public static int DEFAULT_FAULT_TOLERANCE(Code)



HIGH_FAULT_TOLERANCE
final public static int HIGH_FAULT_TOLERANCE(Code)



LOW_FAULT_TOLERANCE
final public static int LOW_FAULT_TOLERANCE(Code)



MEDIUM_FAULT_TOLERANCE
final public static int MEDIUM_FAULT_TOLERANCE(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, ObjectPersistencyService ops) throws ZKBException(Code)
Export a knowledge base, i.e., convert it into an xml document. All encountered object references should be registered with the ops. an xml document
Parameters:
  kb - a knowledge base
Parameters:
  ops - an object persistency service
exception:
  a - ZKBException is thrown if export fails



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



getAdapters
List getAdapters()(Code)
Get the adapters as a list. a list.



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



getDtdRefPolicy
public int getDtdRefPolicy()(Code)
Get the dtd reference policy. int



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



getRootElementType
abstract protected String getRootElementType()(Code)
Get the root element type. the name of the root element



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



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



setDtdRefPolicy
public void setDtdRefPolicy(int dtdRefPolicy)(Code)
Sets the dtd reference policy.
Parameters:
  dtdRefPolicy - The dtd reference policy to set



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



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.