|
Oracle BI Publisher Java API Reference Release 10.1.3.4 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object
oracle.apps.xdo.dataengine.DataProcessor
public class DataProcessor
The class DataProcessor is the front-end class to use XML Publisher Data Engine. To use this, users have to instanciate this class and set parameters such as template. connection and output.
After setting the parameters, you can start processing by calling processData() method.
Sample Data Template : EmpDataTemplate.xml <?xml version="1.0" encoding="WINDOWS-1252" ?> <dataTemplate name="dataTemplateName" description="Employee Details" defaultPackage="" Version="1.0"> <parameters> <parameter name="p_DeptNo" dataType="character" /> </parameters> <dataQuery> <sqlStatement name="Q1"> <![CDATA[ SELECT d.DEPTNO,d.DNAME,d.LOC, EMPNO,ENAME,JOB,MGR,HIREDATE,SAL,nvl(COMM,0) from dept d, emp e where d.deptno=e.deptno and d.deptno = nvl(:p_DeptNo,d.deptno) ]]> </sqlStatement> </dataQuery> <dataStructure> <group name="G_DEPT" source="Q1"> <element name="DEPT_NUMBER" value="DEPTNO" /> <element name="DEPT_NAME" value="DNAME" /> <element name="DEPTSAL" value="G_EMP.SALARY" function="SUM()" /> <element name="LOCATION" value="LOC" /> <group name="G_EMP" source="Q1"> <element name="EMPLOYEE_NUMBER" value="EMPNO" /> <element name="NAME" value="ENAME" /> <element name="JOB" value="JOB" /> <element name="MANAGER" value="MGR" /> <element name="HIREDATE" value="HIREDATE" /> <element name="SALARY" value="SAL" /> </group> </group> </dataStructure> </dataTemplate>
{ try { //Initilization// DataProcessor dataProcessor = new DataProcessor(); //Set Data Template dataProcessor.setDataTemplate("/home/EmpDataTemplate.xml"); //Get Parameters ArrayList parameters = dataProcessor.getParameters(); //set Parameter Values as ArrayList of oracle.apps.xdo.dataengine.Parameter Iterator it = parameters.iterator(); while (it.hasNext()) { Parameter p = (Parameter) it.next(); if (p.getName().equals("p_DeptNo")) p.setValue(new "10"); } dataProcessor.setParameters(parameters); //OR you can set Parameter Values as Hashtable. Hashtable parameters = new Hashtable(); parameters.put("p_DeptNo","10"); dataProcessor.setParameters(parameters); dataProcessor.setConnection(jdbcConnection); dataProcessor.setOutput("/home/EmpDetails.xml") dataProcessor.processData(); } catch (Exception e) { } }
Field Summary | |
---|---|
static java.lang.String |
RCS_ID |
static boolean |
RCS_ID_RECORDED |
Constructor Summary | |
---|---|
DataProcessor() Initilize the DataProcessor. |
Method Summary | |
---|---|
java.util.Vector |
getDataSourceRefs() Returns the List of DataSourceRef used in data template. |
org.w3c.dom.Document |
getDataTemplate() |
com.sun.java.util.collections.ArrayList |
getParameters() Returns the ArrayList holding oraccle.apps.xdo.dataengine.Parameter. |
org.w3c.dom.Document |
getXMLSchema() |
void |
includeParameters(boolean includeParameter) |
void |
processData() Start Processing and write XML to specified destination. |
void |
processDataStructre() |
void |
setConfig(java.util.Properties props) To specify Data Engine properties programmatically. |
void |
setConnection(java.sql.Connection connection) Set the JDBC Connection. |
void |
setDataModel(java.io.InputStream inputStream) |
void |
setDataModel(java.lang.String templateFile) |
void |
setDataTemplate(java.io.InputStream inputStream) Set Data Template as InputStream. |
void |
setDataTemplate(java.lang.String templateFile) Set Data Template from file System. |
void |
setDebugLogOn() Strat Debug Logging. |
void |
setDistributedConnections(com.sun.java.util.collections.Hashtable connections) Set the JDBC Connections as Hashtable for distributed queries. |
void |
setMaxRows(int maxRows) Set the maximum no of rows. |
void |
setOutput(java.io.OutputStream outStream) Set the output stream to write the XML output. |
void |
setOutput(java.lang.String outFile) Set the output file to write the XML output. |
void |
setParameters(com.sun.java.util.collections.ArrayList parameters) Pass the parameter as ArrayList holding oracle.apps.xdo.dataengine.Parameter Object. |
void |
setParameters(com.sun.java.util.collections.Hashtable paramters) Pass the parameter as Name:Value pair using Hashtable. |
void |
setRowsetTag(java.lang.String rowSetTag) |
void |
setRowTag(java.lang.String rowTag) |
void |
setScalableModeOn() |
void |
setSql(java.lang.String sqlQuery) |
void |
setTraceOn() Set SQL trace on. |
void |
writeDefaultLayout(java.io.OutputStream outStream) |
void |
writeDefaultLayout(java.lang.String fileName) |
void |
WriteXDOReport(java.lang.String dataSorceRef, java.lang.String layoutTemplate, java.io.OutputStream outStream, java.lang.String description, java.lang.String reportTitle) |
void |
WriteXDOReport(java.lang.String dataSorceRef, java.lang.String layoutTemplate, java.lang.String fileName, java.lang.String description, java.lang.String reportTitle) |
void |
writeXMLSchema(java.io.OutputStream outStream) |
void |
writeXMLSchema(java.lang.String fileName) |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String RCS_ID
public static final boolean RCS_ID_RECORDED
Constructor Detail |
---|
public DataProcessor()
Method Detail |
---|
public void setDataTemplate(java.io.InputStream inputStream) throws XDOException
inputStream
- InputStreamXDOException
public void setDataTemplate(java.lang.String templateFile) throws XDOException
templateFile
- [File Absolute Path] StringXDOException
public void setDataModel(java.lang.String templateFile) throws XDOException
XDOException
public void setDataModel(java.io.InputStream inputStream) throws XDOException
XDOException
public com.sun.java.util.collections.ArrayList getParameters() throws XDOException
XDOException
public void setParameters(com.sun.java.util.collections.Hashtable paramters)
paramters
- Hashtablepublic void setParameters(com.sun.java.util.collections.ArrayList parameters)
parameters
- ArrayListpublic void setConnection(java.sql.Connection connection)
connection
- Connectionpublic void setDistributedConnections(com.sun.java.util.collections.Hashtable connections)
connections
- Hashtablepublic void setOutput(java.io.OutputStream outStream)
outStream
- OutputStreampublic void setOutput(java.lang.String outFile)
outFile
- [Absolute path] Stringpublic void processData() throws XDOException, java.sql.SQLException
XDOException
java.sql.SQLException
public void processDataStructre() throws XDOException, java.sql.SQLException
XDOException
java.sql.SQLException
public void setTraceOn()
public void setDebugLogOn()
public void writeXMLSchema(java.lang.String fileName) throws java.io.IOException, XDOException, oracle.xml.parser.v2.XSLException, java.lang.Exception
java.io.IOException
XDOException
oracle.xml.parser.v2.XSLException
java.lang.Exception
public void writeXMLSchema(java.io.OutputStream outStream) throws java.io.IOException, XDOException, oracle.xml.parser.v2.XSLException, java.lang.Exception
java.io.IOException
XDOException
oracle.xml.parser.v2.XSLException
java.lang.Exception
public org.w3c.dom.Document getXMLSchema() throws XDOException, oracle.xml.parser.v2.XSLException, java.lang.Exception
XDOException
oracle.xml.parser.v2.XSLException
java.lang.Exception
public void setMaxRows(int maxRows) throws XDOException, java.sql.SQLException
maxRows
- intXDOException
java.sql.SQLException
public void writeDefaultLayout(java.io.OutputStream outStream) throws java.lang.Exception, XDOException
java.lang.Exception
XDOException
public void writeDefaultLayout(java.lang.String fileName) throws java.lang.Exception, XDOException
java.lang.Exception
XDOException
public void setScalableModeOn()
public void setSql(java.lang.String sqlQuery) throws XDOException
XDOException
public org.w3c.dom.Document getDataTemplate() throws java.lang.Exception, XDOException
java.lang.Exception
XDOException
public void WriteXDOReport(java.lang.String dataSorceRef, java.lang.String layoutTemplate, java.io.OutputStream outStream, java.lang.String description, java.lang.String reportTitle) throws java.lang.Exception, XDOException
java.lang.Exception
XDOException
public void WriteXDOReport(java.lang.String dataSorceRef, java.lang.String layoutTemplate, java.lang.String fileName, java.lang.String description, java.lang.String reportTitle) throws java.lang.Exception, XDOException
java.lang.Exception
XDOException
public void setRowTag(java.lang.String rowTag)
public void setRowsetTag(java.lang.String rowSetTag)
public void includeParameters(boolean includeParameter)
public java.util.Vector getDataSourceRefs() throws XDOException
XDOException
public void setConfig(java.util.Properties props)
props
-
|
Oracle BI Publisher Java API Reference Release 10.1.3.4 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |