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


java.lang.Object
   org.mandarax.kernel.AbstractPropertiesSupport
      org.mandarax.kernel.meta.AbstractClauseSet

All known Subclasses:   org.mandarax.kernel.meta.JClauseSet,  org.mandarax.kernel.meta.JSymmetricClauseSet,
AbstractClauseSet
abstract class AbstractClauseSet extends AbstractPropertiesSupport implements CachedClauseSet(Code)
Abstract clause set based on the reflect mechanism. The idea is to consider java methods with a boolean return type as predicates and to analyse objects in order to build facts for tupels of objects where the invokation of the method with these obects as parameter yields true. Note that there is a boolean property to enable a cache mechanism. If the cache is switched off (the default), any call to clauses() builds a new clause iterator and therefore may perform a new fetch operation. Otherwise the result is stored and the clause set will not note further changes in the object model. There is also a flag to negate the clause set. If this flag is false (the default), a fact is built from the objects where invokation of the method (the JPredicate) returns true. If the set is negated, then a fact is built from objects where the invokation returns false;
author:
   Jens Dietrich
version:
   3.4 <7 March 05>
since:
   1.0
version:
   3.4 <7 March 05>


Field Summary
protected  Collectioncache
    
protected  booleancacheEnabled
    
protected transient  VectorclauseSetChangeListener
    
protected  Methodmethod
    
protected  booleannegated
    
protected  JPredicatepredicate
    

Constructor Summary
protected  AbstractClauseSet()
     Constructor.
protected  AbstractClauseSet(boolean isNegated)
     Constructor.

Method Summary
public  voidaddClauseSetChangeListener(ClauseSetChangeListener l)
     Add a clause set listener.
protected  ClausebuildFact(Object target, Object[] parameters)
     Build a fact.
abstract protected  CollectionbuildFacts()
     Build the collection of facts.
protected  voidcheckMethod(Method aMethod)
     Check the method.
public  org.mandarax.util.ClauseIteratorclauses()
     Get an iterator for clauses.
public  org.mandarax.util.ClauseIteratorclauses(Clause query, Object additionalParameter)
     Get an iterator for clauses.
protected  voidfireClauseSetChangeEvent(ClauseSetChangeEvent e)
    
public  ObjectgetKey()
     Get a key for indexing.
protected  voidinitialize(Method aMethod)
     Validate the parameters provided to set up the set.
protected  voidinitialize(JPredicate aPredicate)
     Validate the parameters provided to set up the set.
public  booleanisCacheEnabled()
     Indicates whether the cache is enabled.
public  Iteratorpredicates()
     Get an iterator iterating over the predicates contained in this clause set.
public  voidremoveClauseSetChangeListener(ClauseSetChangeListener l)
     Remove a clause set listener.
public  voidreset()
     Reset the set.
public  voidsetCacheEnabled(boolean flag)
     Enable / disable the cache property.
public  StringtoString()
     Convert the object to a string.

Field Detail
cache
protected Collection cache(Code)



cacheEnabled
protected boolean cacheEnabled(Code)



clauseSetChangeListener
protected transient Vector clauseSetChangeListener(Code)



method
protected Method method(Code)



negated
protected boolean negated(Code)



predicate
protected JPredicate predicate(Code)




Constructor Detail
AbstractClauseSet
protected AbstractClauseSet()(Code)
Constructor.



AbstractClauseSet
protected AbstractClauseSet(boolean isNegated)(Code)
Constructor.
Parameters:
  isNegated - true if the set should be negated, false otherwise




Method Detail
addClauseSetChangeListener
public void addClauseSetChangeListener(ClauseSetChangeListener l)(Code)
Add a clause set listener.
Parameters:
  l - a listener



buildFact
protected Clause buildFact(Object target, Object[] parameters)(Code)
Build a fact. a fact
Parameters:
  target - the object receiving the metod call
Parameters:
  parameters - the parameters of the method call



buildFacts
abstract protected Collection buildFacts()(Code)
Build the collection of facts. a collection of facts



checkMethod
protected void checkMethod(Method aMethod) throws NullPointerException, IllegalAccessException, IllegalArgumentException(Code)
Check the method.
Parameters:
  aMethod - a method
throws:
  java.lang.IllegalAccessException - Thrown if the return type of the method is not boolean or if the number of parameters does not equal 1.
throws:
  java.lang.IllegalArgumentException - Thrown if the method is not public.



clauses
public org.mandarax.util.ClauseIterator clauses()(Code)
Get an iterator for clauses. a clause iterator



clauses
public org.mandarax.util.ClauseIterator clauses(Clause query, Object additionalParameter)(Code)
Get an iterator for clauses. The parameters are ignored and clauses() is called! a clause iterator
Parameters:
  query - the query clause
Parameters:
  additionalParameter - an additional parameter



fireClauseSetChangeEvent
protected void fireClauseSetChangeEvent(ClauseSetChangeEvent e)(Code)
Fire a clause set change event
Parameters:
  e - an event



getKey
public Object getKey()(Code)
Get a key for indexing. Here this is the predicate shared by all clauses in the set. the key object



initialize
protected void initialize(Method aMethod) throws NullPointerException, IllegalAccessException, IllegalArgumentException(Code)
Validate the parameters provided to set up the set.
Parameters:
  aMethod - the method to be evaluated
throws:
  java.lang.IllegalAccessException - Thrown if the method is not public.
throws:
  java.lang.IllegalArgumentException - Thrown if the return type of the method is not boolean or if the number of argument sets does not match.
throws:
  java.lang.NullPointerException - Thrown if one of the arguments is null.



initialize
protected void initialize(JPredicate aPredicate) throws NullPointerException, IllegalAccessException, IllegalArgumentException(Code)
Validate the parameters provided to set up the set.
Parameters:
  aPredicate - the JPredicate
throws:
  java.lang.IllegalAccessException - Thrown if the underlying method is not public.
throws:
  java.lang.IllegalArgumentException - Thrown if the return type of the underlying method is not boolean or if the number of argument sets does not match.
throws:
  java.lang.NullPointerException - Thrown if one of the arguments is null.



isCacheEnabled
public boolean isCacheEnabled()(Code)
Indicates whether the cache is enabled. true if the cache is enabled, false otherwise



predicates
public Iterator predicates()(Code)
Get an iterator iterating over the predicates contained in this clause set. an iterator



removeClauseSetChangeListener
public void removeClauseSetChangeListener(ClauseSetChangeListener l)(Code)
Remove a clause set listener.
Parameters:
  l - a listener



reset
public void reset()(Code)
Reset the set. In particular, this includes cleaning the cache.



setCacheEnabled
public void setCacheEnabled(boolean flag)(Code)
Enable / disable the cache property.
Parameters:
  flag - true if the cache should be enabled and false if the cache should be disabled



toString
public String toString()(Code)
Convert the object to a string. the string representation of this object



Methods inherited from org.mandarax.kernel.AbstractPropertiesSupport
public Properties getProperties()(Code)(Java Doc)
public String getProperty(String key)(Code)(Java Doc)
public Enumeration propertyNames()(Code)(Java Doc)
public Object removeProperty(String key)(Code)(Java Doc)
public void setProperties(Properties properties)(Code)(Java Doc)
public Object setProperty(String key, String value)(Code)(Java Doc)

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.