public abstract class AbstractDataSource.AbstractDataSourceNode extends java.lang.Object implements DataSourceNode
Constructor and Description |
---|
AbstractDataSourceNode() |
Modifier and Type | Method and Description |
---|---|
boolean |
addQuery(QueryTag tag,
DataSourceNode[] stack)
Called for a query tag.
|
void |
addSet(SetTag tag,
DataSourceNode[] stack,
java.util.Locale locale,
IMacroState macroState)
Adds the set tag value to the usermap.
|
boolean |
addSwitch(SwitchTag tag,
DataSourceNode[] stack)
Called for a switch tag.
|
void |
close()
We are done with this node.
|
void |
endSwitch(EndSwitchTag tag,
DataSourceNode[] stack)
Called when a switch ends.
|
boolean |
evaluate(java.lang.String text,
DataSourceNode[] stack,
IMacroState macroState)
Evaluate an expression for the boolean result.
|
java.io.InputStream |
getBitmap(OutTag tag,
DataSourceNode[] stack,
IMacroState state)
Called when tag is of type BITMAP.
|
java.lang.Object |
getCursor()
Returns the underlying cursor this node presently holds.
|
ChartDataSet |
getData(ChartTag tag,
DataSourceNode[] stack,
java.util.Locale locale)
Returns a set of data used to create a chart.
|
DataSourceProvider |
getDataSourceProvider()
Get the parent datasource.
|
DebugDatasourceState |
getDatasourceState(DataSourceNode[] stack)
Get the state of the datasource.
|
java.lang.Object[] |
getEquationData(java.lang.String query,
DataSourceNode[] stack,
java.util.Locale locale)
Returns an array of data from a given datasource query
|
java.lang.String |
getImport(ImportTag tag,
DataSourceNode[] stack)
Called for an import tag.
|
java.lang.String |
getImport(ImportTag tag,
DataSourceNode[] stack,
java.util.Locale locale,
IMacroState macroState)
An extended version of getImport() which supports the macro evaluation.
|
DataSourceIterator |
getIterator()
Returns the iterator presently in use for this node.
|
java.lang.String |
getLink(BaseTag tag,
DataSourceNode[] stack)
Called for a link or DrillDown tag.
|
java.lang.Object |
getOut(OutTag tag,
DataSourceNode[] stack,
java.util.Locale locale,
IMacroState state)
Called for an out tag.
|
InputDataContainer |
getOutStream(OutTag tag,
DataSourceNode[] stack,
IMacroState state)
Called for an out tag.
|
int |
getQueryMode(java.lang.String query,
BaseTag tag)
Returns the mode of a query.
|
java.lang.String |
getValue(BaseTag tag,
DataSourceNode[] stack,
IMacroState macroState,
java.util.Locale locale) |
java.lang.Object[] |
getVariableValue(java.lang.String variable,
DataSourceNode[] stack,
java.util.Locale locale)
Returns the variable value.
|
boolean |
isCase(CaseTag tag,
DataSourceNode[] stack,
IMacroState macroState)
Called for a case tag.
|
boolean |
isExistingNode(BaseTag tag,
DataSourceNode[] stack)
Return true if the passed in node exists.
|
boolean |
isIf(IfTag tag,
DataSourceNode[] stack,
IMacroState macroState)
Called for an if tag.
|
boolean |
isQuery(java.lang.String s) |
boolean |
isSelect(java.lang.String select,
boolean textIsNode)
Returns true if the passed in string is believed to be a select.
|
abstract DataSourceIterator |
iterator(ForEachTag tag,
DataSourceNode[] stack)
Called for a forEach tag.
|
public boolean isQuery(java.lang.String s)
public void addSet(SetTag tag, DataSourceNode[] stack, java.util.Locale locale, IMacroState macroState) throws DataSourceException
addSet
in interface DataSourceNode
tag
- The tag to addstack
- The stack of forEach loops in at this point. Node [0] is the root document node so this will alwaysmacroState
- the macro state of the report
have length of at least 1.DataSourceException
public boolean isSelect(java.lang.String select, boolean textIsNode)
DataSourceNode
isSelect
in interface DataSourceNode
select
- Determine if this string is a select.textIsNode
- true if plain text is a nod. false if it's a value.public int getQueryMode(java.lang.String query, BaseTag tag) throws DataSourceException
DataSourceNode
getQueryMode
in interface DataSourceNode
query
- The query.tag
- The tag this select is for. This may be null.DataSourceException
public boolean addQuery(QueryTag tag, DataSourceNode[] stack) throws DataSourceException
DataSourceNode
addQuery
in interface DataSourceNode
tag
- The values that identify the datasource node to read.stack
- The stack of forEach loops in at this point. Node [0] is the root document node so this will always
have length of at least 1.DataSourceException
- Could not retrieve the data. Generally wraps a SqlException or XpathException.public java.io.InputStream getBitmap(OutTag tag, DataSourceNode[] stack, IMacroState state) throws DataSourceException
DataSourceNode
getBitmap
in interface DataSourceNode
tag
- The values that identify the datasource node to read.stack
- The stack of forEach loops in at this point. Node [0] is the root document node so this will always
have length of at least 1.state
- macrostate of the reportDataSourceException
- Could not retrieve the data. Generally wraps a SqlException or XpathException.public java.lang.String getImport(ImportTag tag, DataSourceNode[] stack) throws DataSourceException
DataSourceNode
getImport
in interface DataSourceNode
tag
- The values that identify the datasource node to read.stack
- The stack of forEach loops in at this point. Node [0] is the root document node so this will always
have length of at least 1.DataSourceException
- Could not retrieve the data. Generally wraps a SqlException or XpathException.public java.lang.String getImport(ImportTag tag, DataSourceNode[] stack, java.util.Locale locale, IMacroState macroState) throws DataSourceException
DataSourceNode
getImport
in interface DataSourceNode
DataSourceException
public java.lang.String getLink(BaseTag tag, DataSourceNode[] stack) throws DataSourceException
DataSourceNode
getLink
in interface DataSourceNode
tag
- The values that identify the datasource node to read.stack
- The stack of forEach loops in at this point. Node [0] is the root document node so this will always
have length of at least 1.DataSourceException
- Could not retrieve the data. Generally wraps a SqlException or XpathException.public java.lang.String getValue(BaseTag tag, DataSourceNode[] stack, IMacroState macroState, java.util.Locale locale) throws DataSourceException
DataSourceException
public java.lang.Object getOut(OutTag tag, DataSourceNode[] stack, java.util.Locale locale, IMacroState state) throws DataSourceException
DataSourceNode
getOut
in interface DataSourceNode
tag
- The values that identify the datasource node to read.stack
- The stack of forEach loops in at this point. Node [0] is the root document node so this will always
have length of at least 1.locale
- The locale to produce the output in.state
- The macro state of the reportDataSourceException
- Could not retrieve the data. Generally wraps a SqlException or XpathException.public InputDataContainer getOutStream(OutTag tag, DataSourceNode[] stack, IMacroState state) throws DataSourceException
DataSourceNode
getOutStream
in interface DataSourceNode
tag
- The values that identify the datasource node to read.stack
- The stack of forEach loops in at this point. Node [0] is the root document node so this will always
have length of at least 1.state
- macrostate of the reportDataSourceException
- Could not retrieve the data. Generally wraps a SqlException or XpathException.public boolean isExistingNode(BaseTag tag, DataSourceNode[] stack) throws DataSourceException
DataSourceNode
isExistingNode
in interface DataSourceNode
tag
- The values that identify the datasource node to read.stack
- The stack of forEach loops in at this point. Node [0] is the root document node so this will always
have length of at least 1.DataSourceException
- Could not retrieve the data. Generally wraps a SqlException or XpathException.public boolean evaluate(java.lang.String text, DataSourceNode[] stack, IMacroState macroState) throws DataSourceException
DataSourceNode
evaluate
in interface DataSourceNode
text
- The expression to evaluate.stack
- The stack of forEach loops in at this point. Node [0] is the root document node so this will always
have length of at least 1.macroState
- macrostate of the reportDataSourceException
- Could not retrieve the data. Generally wraps a SqlException or XpathException.public boolean isIf(IfTag tag, DataSourceNode[] stack, IMacroState macroState) throws DataSourceException
DataSourceNode
isIf
in interface DataSourceNode
tag
- The values that identify the datasource node to read.stack
- The stack of forEach loops in at this point. Node [0] is the root document node so this will always
have length of at least 1.macroState
- macrostate of the reportDataSourceException
- Could not retrieve the data. Generally wraps a SqlException or XpathException.public boolean addSwitch(SwitchTag tag, DataSourceNode[] stack) throws DataSourceException
DataSourceNode
addSwitch
in interface DataSourceNode
tag
- The values that identify the datasource node to read.stack
- The stack of forEach loops in at this point. Node [0] is the root document node so this will always
have length of at least 1.DataSourceException
- Could not retrieve the data. Generally wraps a SqlException or XpathException.public boolean isCase(CaseTag tag, DataSourceNode[] stack, IMacroState macroState) throws DataSourceException
DataSourceNode
isCase
in interface DataSourceNode
tag
- The values that identify the datasource node to read.stack
- The stack of forEach loops in at this point. Node [0] is the root document node so this will always
have length of at least 1.macroState
- macro state of the reportDataSourceException
- Could not retrieve the data. Generally wraps a SqlException or XpathException.public void endSwitch(EndSwitchTag tag, DataSourceNode[] stack)
DataSourceNode
endSwitch
in interface DataSourceNode
tag
- The values that identify the datasource node to read.stack
- The stack of forEach loops in at this point. Node [0] is the root document node so this will always
have length of at least 1.public abstract DataSourceIterator iterator(ForEachTag tag, DataSourceNode[] stack) throws DataSourceException
DataSourceNode
iterator
in interface DataSourceNode
tag
- The values that identify the datasource node to read.stack
- The stack of forEach loops in at this point. Node [0] is the root document node so this will always
have length of at least 1.DataSourceException
- Could not retrieve the data. Generally wraps a SqlException or XpathException.public DataSourceIterator getIterator() throws DataSourceException
DataSourceNode
getIterator
in interface DataSourceNode
DataSourceException
- Could not retrieve the data. Generally wraps a SqlException or XpathException.public void close() throws DataSourceException
DataSourceNode
close
in interface DataSourceNode
DataSourceException
- Could not retrieve the data.public ChartDataSet getData(ChartTag tag, DataSourceNode[] stack, java.util.Locale locale) throws DataSourceException
DataSourceNode
getData
in interface DataSourceNode
tag
- The wr:chart tag with the select setting to use.stack
- The stack of forEach loops in at this point. Node [0] is the root document node so this will always
have length of at least 1.locale
- The locale to produce the output in.DataSourceException
- Could not retrieve the data.public java.lang.Object getCursor() throws DataSourceException
DataSourceNode
getCursor
in interface DataSourceNode
DataSourceException
- Could not retrieve the data. Generally wraps a SqlException or XpathException.public java.lang.Object[] getVariableValue(java.lang.String variable, DataSourceNode[] stack, java.util.Locale locale) throws DataSourceException
DataSourceNode
getVariableValue
in interface DataSourceNode
variable
- The string containing the variable name.stack
- The stack of forEach loops in at this point. Node [0] is the root document node so this will always
have length of at least 1.locale
- The locale to produce the output in.DataSourceException
public java.lang.Object[] getEquationData(java.lang.String query, DataSourceNode[] stack, java.util.Locale locale) throws DataSourceException
DataSourceNode
getEquationData
in interface DataSourceNode
query
- The datasource query.stack
- The stack of forEach loops in at this point. Node [0] is the root document node so this will always
have length of at least 1.locale
- The locale to produce the output in.DataSourceException
public DebugDatasourceState getDatasourceState(DataSourceNode[] stack)
DataSourceNode
getDatasourceState
in interface DataSourceNode
stack
- The stack of forEach loops in at this point. Node [0] is the root document node so this will always
have length of at least 1.public DataSourceProvider getDataSourceProvider()
DataSourceNode
getDataSourceProvider
in interface DataSourceNode
Copyright © 2017 Windward Reports - All Rights Reserved. We are java reporting software