Java Doc for Expression.java in  » Report » datavision-1.1.0 » jimm » datavision » 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 » Report » datavision 1.1.0 » jimm.datavision 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   java.util.Observable
      jimm.datavision.Expression

All known Subclasses:   jimm.datavision.UserColumn,  jimm.datavision.Formula,
Expression
abstract public class Expression extends Observable implements Identity,Nameable,Writeable,Draggable,Observer(Code)
The abstract superclass of objects that are evaluated, such as formulas and user columns. An expression contains text that is evaluated. The text may contain database column values, formulas, special values, or other types of objects.

Before being evaluated, the following substitutions are made withing the evaluation string:

  • {table_name.column_name} is replaced by the current value of the column table_name.column_name.
  • {@id_number} is replaced by the results of evaluating the formula whose id is id_number.
  • {%special_value_name} is replaced by a special value (report title, report run date, page number, or record number).
  • {?id_number} is replaced by a parameter value (string, number, or date).
  • {!id_number} is replaced by a user column's value (string, number, or date).


Field Summary
protected  StringexceptAfter
    
protected  Stringexpr
    
protected  Longid
    
protected  Stringname
    
protected  ArrayListobservedContents
    
protected  Reportreport
    

Constructor Summary
protected  Expression(Long id, Report report, String name, String expression, String exceptAfter)
     Constructor.

Method Summary
public  CollectioncolumnsUsed()
     Returns a collection of the columns used in the expression.
abstract public  StringdesignLabel()
    
public static  StringdisplayToExpression(Report report, String str)
     Given a string, returns a string with all instances of formula, parameter, and user column "display names" replaced by "formula strings".
abstract public  StringdragString()
    
public static  StringexpressionToDisplay(Report report, String str)
     Given a string, returns a string with all instances of formula, parameter, and user column "formula strings" replaced by "display name" strings.
protected  voidfinalize()
    
abstract public  StringformulaString()
    
public  StringgetEditableExpression()
     Returns the expression string fit for human consumption.
public  StringgetExpression()
     Returns the expression string.
public  ObjectgetId()
    
public  StringgetName()
     Returns the name for this expression.
public  booleanrefersTo(Field f)
     Returns true if this expression contains a reference to the specified field.
public  booleanrefersTo(Expression expression)
     Returns true if this expression contains a reference to the specified expression (formula or user column).
public  booleanrefersTo(Parameter p)
     Returns true if this expression contains a reference to the specified parameter.
public  voidsetEditableExpression(String newExpression)
     Sets the eval string after replacing formula, parameter, and user column names with their id numbers.
public  voidsetExpression(String newExpression)
     Sets the eval string.
public  voidsetName(String newName)
     Sets the name.
protected  voidstartObservingContents()
     Starts observing all observables referenced by this expression: formulas, parameters, and user columns.
protected  voidstopObservingContents()
     Stops observing that which we were observing.
public  voidupdate(Observable o, Object arg)
    
public  CollectionuserColumnsUsed()
     Returns a collection of the user columns used in the expression.
protected  voidwriteAdditionalAttributes(XMLWriter out)
     Writes additional attributes.
abstract public  voidwriteXML(XMLWriter out)
     Writes this expression as an XML tag.
protected  voidwriteXML(XMLWriter out, String elementName)
    

Field Detail
exceptAfter
protected String exceptAfter(Code)



expr
protected String expr(Code)



id
protected Long id(Code)



name
protected String name(Code)



observedContents
protected ArrayList observedContents(Code)



report
protected Report report(Code)




Constructor Detail
Expression
protected Expression(Long id, Report report, String name, String expression, String exceptAfter)(Code)
Constructor. If id is null, throws an IllegalArgumentException. This is because subclasses are responsible for generating their id number. For example, formulas call Report.generateNewFormulaId.
Parameters:
  id - the unique identifier for the new expression; may not benull
Parameters:
  report - the report containing this expression
Parameters:
  name - the expression name
Parameters:
  expression - the string to evaulate at runtime; may benull
Parameters:
  exceptAfter - when looking for things inside "{}" braces, ignorebraces immediately after this string




Method Detail
columnsUsed
public Collection columnsUsed()(Code)
Returns a collection of the columns used in the expression. This is used by the report's query when it is figuring out what columns and tables are used by the report. a possibly empty collection of database columns
See Also:   jimm.datavision.source.Query.findSelectablesUsed



designLabel
abstract public String designLabel()(Code)



displayToExpression
public static String displayToExpression(Report report, String str)(Code)
Given a string, returns a string with all instances of formula, parameter, and user column "display names" replaced by "formula strings". If there are no such strings, the original string is returned.
Parameters:
  report - a report
Parameters:
  str - a string with display names a string with all display names replaced by formula strings



dragString
abstract public String dragString()(Code)



expressionToDisplay
public static String expressionToDisplay(Report report, String str)(Code)
Given a string, returns a string with all instances of formula, parameter, and user column "formula strings" replaced by "display name" strings. If there are no such strings, the original string is returned. a string with all formula strings replaced by display namestrings



finalize
protected void finalize() throws Throwable(Code)



formulaString
abstract public String formulaString()(Code)



getEditableExpression
public String getEditableExpression()(Code)
Returns the expression string fit for human consumption. This mainly means that we substitute formula, parameter, and user column numbers with names. Called from any expression editor. This code assumes that curly braces are never nested. the eval string with formula, parameter, and user column id numbersreplaced with names



getExpression
public String getExpression()(Code)
Returns the expression string. the eval string



getId
public Object getId()(Code)



getName
public String getName()(Code)
Returns the name for this expression. the name



refersTo
public boolean refersTo(Field f)(Code)
Returns true if this expression contains a reference to the specified field.
Parameters:
  f - a field true if this field contains a reference to thespecified field



refersTo
public boolean refersTo(Expression expression)(Code)
Returns true if this expression contains a reference to the specified expression (formula or user column).
Parameters:
  expression - an expression true if this field is the same as or contains areference to the specified expression



refersTo
public boolean refersTo(Parameter p)(Code)
Returns true if this expression contains a reference to the specified parameter.
Parameters:
  p - a parameter true if this field contains a reference to thespecified parameter



setEditableExpression
public void setEditableExpression(String newExpression)(Code)
Sets the eval string after replacing formula, parameter, and user column names with their id numbers. Called from a editor.

This method will throw an IllegalArgumentException if any formula, parameter, or user column name is not the name of some existing object.
Parameters:
  newExpression - the new eval string
throws:
  IllegalArgumentException -




setExpression
public void setExpression(String newExpression)(Code)
Sets the eval string.
Parameters:
  newExpression - the new eval string



setName
public void setName(String newName)(Code)
Sets the name.
Parameters:
  newName - the new name



startObservingContents
protected void startObservingContents()(Code)
Starts observing all observables referenced by this expression: formulas, parameters, and user columns.



stopObservingContents
protected void stopObservingContents()(Code)
Stops observing that which we were observing.



update
public void update(Observable o, Object arg)(Code)



userColumnsUsed
public Collection userColumnsUsed()(Code)
Returns a collection of the user columns used in the expression. This is used by the report's query when it is figuring out what columns, tables, and user columns are used by the report. a possibly empty collection of user columns
See Also:   jimm.datavision.source.Query.findSelectablesUsed



writeAdditionalAttributes
protected void writeAdditionalAttributes(XMLWriter out)(Code)
Writes additional attributes. Default behavior is to do nothing.
Parameters:
  out - a writer that knows how to write XML



writeXML
abstract public void writeXML(XMLWriter out)(Code)
Writes this expression as an XML tag.
Parameters:
  out - a writer that knows how to write XML



writeXML
protected void writeXML(XMLWriter out, String elementName)(Code)



Methods inherited from java.util.Observable
public synchronized void addObserver(Observer o)(Code)(Java Doc)
protected synchronized void clearChanged()(Code)(Java Doc)
public synchronized int countObservers()(Code)(Java Doc)
public synchronized void deleteObserver(Observer o)(Code)(Java Doc)
public synchronized void deleteObservers()(Code)(Java Doc)
public synchronized boolean hasChanged()(Code)(Java Doc)
public void notifyObservers()(Code)(Java Doc)
public void notifyObservers(Object arg)(Code)(Java Doc)
protected synchronized void setChanged()(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.