Java Doc for AbstractAdapter.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.AbstractAdapter

All known Subclasses:   org.mandarax.zkb.framework.Adapter4CustomClauseSets,  org.mandarax.zkb.framework.Adapter4Rules,  org.mandarax.zkb.framework.Adapter4Prerequisites,  org.mandarax.zkb.framework.Adapter4Facts,  org.mandarax.zkb.framework.Adapter4VariableTerms,  org.mandarax.zkb.framework.Adapter4SQLClauseSets,  org.mandarax.zkb.framework.Adapter4DerivationEventListeners,  org.mandarax.zkb.framework.Adapter4TestCases_2_0,  org.mandarax.zkb.framework.Adapter4KnowledgeBases,  org.mandarax.zkb.framework.Adapter4Queries_1_1,  org.mandarax.zkb.framework.Adapter4ConstantTerms,  org.mandarax.zkb.framework.Adapter4Queries,  org.mandarax.zkb.framework.Adapter4Rules_1_1,  org.mandarax.zkb.framework.Adapter4Predicates,  org.mandarax.zkb.framework.Adapter4Prerequisites_1_1,  org.mandarax.zkb.framework.Adapter4Functions,  org.mandarax.zkb.framework.Adapter4ComplexTerms,  org.mandarax.zkb.framework.Adapter4KnowledgeBases_2_0,  org.mandarax.zkb.framework.Adapter4Comparators,  org.mandarax.zkb.framework.Adapter4KnowledgeBases_1_1,  org.mandarax.zkb.framework.Adapter4Facts_1_1,
AbstractAdapter
abstract public class AbstractAdapter implements Adapter,LogCategories,TagAndAttributeNames(Code)
An abstract class implementing XMLAdapter. Some utility methods are implemented here.
author:
   Jens Dietrich
version:
   3.4 <7 March 05>
since:
   2.2


Field Summary
final public static  StringONE_OR_MANY
    
final public static  StringZERO_OR_MANY
    
final public static  StringZERO_OR_ONE
    
final public static  StringZONE
    
protected  LogicFactorylfactory
    


Method Summary
protected  voidassignURI(Element e, ObjectPersistencyService ops, Object obj)
     Assign an object id to an object and add the respective attribute to the element. Use an existing id if possible.
protected  voidcheck(Object obj, Class clazz)
     Utility method that checks the type of an object and throws an exception if the object is not an instance of the respective class.
protected  Classclass4Name(String name)
     Get the class for a name, throw an ZKB exception if class cannot be loaded.
protected  voidexportChildren(Object[] objs, Element parent, String kindOfObject, GenericDriver driver, ObjectPersistencyService ops)
     Utility method to export an array of objects and add the elements to the parent.
protected  voidexportChildren(Collection objs, Element parent, String kindOfObject, GenericDriver driver, ObjectPersistencyService ops)
     Utility method to export a collection of objects and add the elements to the parent.
protected  ElementexportObject(Object obj, String kindOfObject, GenericDriver driver, ObjectPersistencyService ops)
     Utility method that locates the appropriate driver and exports an object using this driver.
protected  voidexportProperties(Element parent, PropertiesSupport ps)
     Export the properties of an object implementing PropertiesSupport.
protected  StringgetClauseSetType(ClauseSet cs)
     Get the type of clause set, e.g.
protected  ObjectgetObjectByURI(Element e, ObjectPersistencyService ops)
     Get the object with the uri found in the tag.
protected  ObjectimportChild(Element parent, String name, GenericDriver driver, ObjectPersistencyService ops, LogicFactory lfactory)
     Utility method to import a child (the first child) with a certain name (not the tag name but the symbolic name as defined in GenericDriver) of the given parent element.
protected  ObjectimportChildren(Element parent, String name, GenericDriver driver, ObjectPersistencyService ops, LogicFactory lfactory, Class targetType)
     Utility method to import the children with a certain name (not the tag name but the symbolic name as defined in GenericDriver) of the given parent element.
protected  voidimportProperties(Element parent, PropertiesSupport ps)
     Import the properties of an object implementing PropertiesSupport.
abstract public  voidprintDTD(StringBuffer out)
     Print the DTD associated with this adapter on a string buffer.
Parameters:
  out - the buffer to print on.
protected  voidsetTypeAttribute(Element e, Term t)
     Set the type attribute.

Field Detail
ONE_OR_MANY
final public static String ONE_OR_MANY(Code)



ZERO_OR_MANY
final public static String ZERO_OR_MANY(Code)



ZERO_OR_ONE
final public static String ZERO_OR_ONE(Code)



ZONE
final public static String ZONE(Code)



lfactory
protected LogicFactory lfactory(Code)





Method Detail
assignURI
protected void assignURI(Element e, ObjectPersistencyService ops, Object obj)(Code)
Assign an object id to an object and add the respective attribute to the element. Use an existing id if possible.
Parameters:
  e - an element
Parameters:
  ops - an object persistency service
Parameters:
  obj - the object



check
protected void check(Object obj, Class clazz) throws ZKBException(Code)
Utility method that checks the type of an object and throws an exception if the object is not an instance of the respective class.
Parameters:
  obj - an object
Parameters:
  clazz - a class



class4Name
protected Class class4Name(String name) throws ZKBException(Code)
Get the class for a name, throw an ZKB exception if class cannot be loaded.
Parameters:
  name - the name of the class a class



exportChildren
protected void exportChildren(Object[] objs, Element parent, String kindOfObject, GenericDriver driver, ObjectPersistencyService ops) throws ZKBException(Code)
Utility method to export an array of objects and add the elements to the parent.
Parameters:
  objs - the objects
Parameters:
  parent - the parent element
Parameters:
  kindOfObject - the kind of object, usually a constant defined in GenericDriver
Parameters:
  driver - the generic driver
Parameters:
  ops - the object persistency service
exception:
  a - ZKBException is thrown if export fails



exportChildren
protected void exportChildren(Collection objs, Element parent, String kindOfObject, GenericDriver driver, ObjectPersistencyService ops) throws ZKBException(Code)
Utility method to export a collection of objects and add the elements to the parent.
Parameters:
  objs - the objects
Parameters:
  parent - the parent element
Parameters:
  kindOfObject - the kind of object, usually a constant defined in GenericDriver
Parameters:
  driver - the generic driver
Parameters:
  ops - the object persistency service
exception:
  an - ZKBException is thrown if export fails



exportObject
protected Element exportObject(Object obj, String kindOfObject, GenericDriver driver, ObjectPersistencyService ops) throws ZKBException(Code)
Utility method that locates the appropriate driver and exports an object using this driver.
Parameters:
  obj - an object
Parameters:
  kindOfObject - the kind of object, usually a constant defined in GenericDriver
Parameters:
  driver - the generic driver
Parameters:
  ops - the object persistency service an element
exception:
  a - ZKBException is thrown if export fails



exportProperties
protected void exportProperties(Element parent, PropertiesSupport ps)(Code)
Export the properties of an object implementing PropertiesSupport.
Parameters:
  parent - the parent element
Parameters:
  ps - the object implementing PropertiesSupport



getClauseSetType
protected String getClauseSetType(ClauseSet cs)(Code)
Get the type of clause set, e.g. GenericDriver.FACT or GenericDriver.RULE.
Parameters:
  cs - a clause set a string



getObjectByURI
protected Object getObjectByURI(Element e, ObjectPersistencyService ops)(Code)
Get the object with the uri found in the tag.
Parameters:
  e - an element
Parameters:
  ops - the object persistency service an object



importChild
protected Object importChild(Element parent, String name, GenericDriver driver, ObjectPersistencyService ops, LogicFactory lfactory) throws ZKBException(Code)
Utility method to import a child (the first child) with a certain name (not the tag name but the symbolic name as defined in GenericDriver) of the given parent element.
Parameters:
  e - the parent element
Parameters:
  name - the name of the child tag
Parameters:
  driver - the generic driver
Parameters:
  ops - the object persistency service
Parameters:
  lfactory - the logic factory used to create objects an object
exception:
  an - ZKBException is thrown if import fails



importChildren
protected Object importChildren(Element parent, String name, GenericDriver driver, ObjectPersistencyService ops, LogicFactory lfactory, Class targetType) throws ZKBException(Code)
Utility method to import the children with a certain name (not the tag name but the symbolic name as defined in GenericDriver) of the given parent element. The name can be null, in this case all child elements will be imported. The target type argument specifies the type of the objects in the array. Note that we return an object , not an array. But this object can be casted to an array of the target type, e.g. like in
Term[] terms = importChildren(e,null,driver,cache,lfactory,Term.class)
Parameters:
  e - the parent element
Parameters:
  name - the name of the child tag
Parameters:
  driver - the generic driver
Parameters:
  ops - the object persistency service
Parameters:
  lfactory - the logic factory used to create objects
Parameters:
  targetType - the expected type of elements in the array an object that can be casted to an array of elements of the target type
exception:
  an - ZKBException is thrown if import fails



importProperties
protected void importProperties(Element parent, PropertiesSupport ps)(Code)
Import the properties of an object implementing PropertiesSupport.
Parameters:
  parent - the parent element
Parameters:
  ps - the object implementing PropertiesSupport



printDTD
abstract public void printDTD(StringBuffer out)(Code)
Print the DTD associated with this adapter on a string buffer.
Parameters:
  out - the buffer to print on.



setTypeAttribute
protected void setTypeAttribute(Element e, Term t)(Code)
Set the type attribute.
Parameters:
  e - an element
Parameters:
  term - a term



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.