public class Dom4jDataSource extends DataSourceBase implements DataSourceProvider
Modifier and Type | Class and Description |
---|---|
class |
Dom4jDataSource.VarResults
Deprecated.
|
NAME_DATASET, NAME_JSON, NAME_LITERAL, NAME_ODATA, NAME_SFDC, NAME_SQL, NAME_XML, NAME_XML_1_0
Constructor and Description |
---|
Dom4jDataSource(org.w3c.dom.Document document)
Deprecated.
Create a DataSourceProvider that uses dom4j to traverse an xml stream.
|
Dom4jDataSource(org.dom4j.Document document,
boolean extractNamespaces)
Deprecated.
Create a DataSourceProvider that uses dom4j to traverse an xml stream.
|
Dom4jDataSource(org.dom4j.Element node)
Deprecated.
Create a DataSourceProvider that uses dom4j to traverse an xml stream.
|
Dom4jDataSource(java.io.InputStream xmlData)
Deprecated.
Create a DataSourceProvider that uses an xml stream as the data and dom4j to traverse it.
|
Dom4jDataSource(java.io.InputStream xmlData,
java.io.InputStream schemaFile)
Deprecated.
Create a DataSourceProvider that uses an xml stream as the data and dom4j to traverse it.
|
Dom4jDataSource(java.lang.String xmlData)
Deprecated.
Create a DataSourceProvider that uses an xml string as the data and dom4j to traverse it.
|
Dom4jDataSource(java.lang.String xmlConnectionString,
java.lang.String schemaConnectionString)
Deprecated.
Create a DataSourceProvider using the passed in connection strings.
|
Modifier and Type | Method and Description |
---|---|
void |
approveDenyModifySelect(BaseTag xmlTag)
Deprecated.
Verifys that a tag select is approved by a user defined callback
Or denies by throwing a DatasourceException or modifies the select
|
void |
close()
Deprecated.
Called when processing is complete.
|
static org.dom4j.io.SAXReader |
createSAXReader()
Deprecated.
Create a SAXReader set to disallow XXE aattacks.
|
java.lang.String |
getDatasourceName()
Deprecated.
returns the name of this type in the form "sql", "xml", etc.
|
java.lang.String |
getDefaultNamespacePrefix()
Deprecated.
The prefixes for namespaces are pulled from the XML datasource.
|
java.util.Map<java.lang.String,java.lang.Object> |
getParameters()
Deprecated.
This call is for internal engine use only.
|
int |
getParamMode()
Deprecated.
Use ReportProperties.getString(SQL_PARAMETERS)
|
int |
getQueryMode(java.lang.String query,
BaseTag tag)
Deprecated.
Returns the query mode for this select.
|
DataSourceNode |
getRootNode()
Deprecated.
Returns the root node for this data set.
|
TagAttributes[] |
getTagAttributes()
Deprecated.
Returns the allowed attributes for all tags.
|
java.util.Date |
parseAsDate(java.lang.String str)
Deprecated.
|
void |
populateDatasourceException(DataSourceException exception,
BaseTag tag,
DataSourceNode[] stack)
Deprecated.
Populates that properties in a DataSourceException via DataSourceException.setProperties().
|
void |
setDefaultNamespacePrefix(java.lang.String prefix)
Deprecated.
The prefixes for namespaces are pulled from the XML datasource.
|
void |
SetNamespaces(XPathNamespace[] namespaces)
Deprecated.
|
void |
setParameters(java.util.Map<java.lang.String,java.lang.Object> parameters)
Deprecated.
This call is for internal engine use only.
|
void |
setParamMode(int paramMode)
Deprecated.
Use ReportProperties.setString(SQL_PARAMETERS)
|
boolean |
supportsDataSets()
Deprecated.
Does this datasource support data sets?
|
void |
validateTag(BaseTag xmlTag)
Deprecated.
Verifys that a tag has all required attributes and no unknown attributes.
|
convertToInputStream, forTesting, getProperties, lookupVariable, setProperties
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getProperties, setProperties
public Dom4jDataSource(java.lang.String xmlConnectionString, java.lang.String schemaConnectionString) throws DataConnectionException
xmlConnectionString
- Connection string to read the XML file.schemaConnectionString
- Connection string to read the schema. null if no schema.DataConnectionException
public Dom4jDataSource(java.io.InputStream xmlData, java.io.InputStream schemaFile) throws DataConnectionException
xmlData
- A well formed xml data file.schemaFile
- the schema file.DataConnectionException
- thrown if anything goes wrong.public Dom4jDataSource(java.io.InputStream xmlData) throws DataConnectionException
xmlData
- A well formed xml data file.DataConnectionException
- thrown if anything goes wrong.public Dom4jDataSource(java.lang.String xmlData) throws DataConnectionException
xmlData
- Well formed xml (not a filename to an XML file - this is XML in a string).DataConnectionException
- thrown if anything goes wrong.public Dom4jDataSource(org.dom4j.Element node) throws DataConnectionException
node
- a Node created in dom4j pointing to all or part of a xml tree.DataConnectionException
public Dom4jDataSource(org.dom4j.Document document, boolean extractNamespaces) throws DataConnectionException
document
- a dom4j document.extractNamespaces
- true if namespaces need to be read from the document and set as namespaces. Set to
false if this has already been done. You must do this yourself if the document has a schema.DataConnectionException
public Dom4jDataSource(org.w3c.dom.Document document) throws DataConnectionException
document
- a w3c Document.DataConnectionException
public java.lang.String getDatasourceName()
getDatasourceName
in interface DataSourceProvider
public TagAttributes[] getTagAttributes()
getTagAttributes
in interface DataSourceProvider
public void validateTag(BaseTag xmlTag) throws TagException
validateTag
in interface DataSourceProvider
xmlTag
- The tag to checkTagException
- thrown if illegal parameters passed in.public void approveDenyModifySelect(BaseTag xmlTag) throws DataSourceException
approveDenyModifySelect
in interface DataSourceProvider
xmlTag
- The tag to checkDataSourceException
- thrown if illegal parameters passed in.public void populateDatasourceException(DataSourceException exception, BaseTag tag, DataSourceNode[] stack) throws DataSourceException
populateDatasourceException
in interface DataSourceProvider
exception
- The exception to populate.tag
- The tag we're processing. null if no tag.stack
- The node stack at the time of the exception. null if not relevant.DataSourceException
public void SetNamespaces(XPathNamespace[] namespaces)
public int getParamMode()
getParamMode
in interface DataSourceProvider
public void setParamMode(int paramMode)
setParamMode
in interface DataSourceProvider
paramMode
- the parameter substitution mode.public void setParameters(java.util.Map<java.lang.String,java.lang.Object> parameters)
setParameters
in interface DataSourceProvider
parameters
- This object is directly assigned for use as it is shared. Therefore any changes to it after
this call effect the datasource.public java.util.Map<java.lang.String,java.lang.Object> getParameters()
getParameters
in interface DataSourceProvider
public void setDefaultNamespacePrefix(java.lang.String prefix)
prefix
- The prefix used for the default namespace in xpath selects.public java.lang.String getDefaultNamespacePrefix()
public DataSourceNode getRootNode()
getRootNode
in interface DataSourceProvider
public void close()
close
in interface DataSourceProvider
public java.util.Date parseAsDate(java.lang.String str)
public int getQueryMode(java.lang.String query, BaseTag tag)
getQueryMode
in interface DataSourceProvider
query
- The select to evaluate.tag
- The tag this select is for. This may be null.public boolean supportsDataSets()
supportsDataSets
in class DataSourceBase
public static org.dom4j.io.SAXReader createSAXReader() throws org.xml.sax.SAXException
org.xml.sax.SAXException
Copyright © 2002-2021 Windward Studios, LLC. - All Rights Reserved. We are Java document generation software