by.belsoft.report.tools.reportdb
Class QueryMethods

java.lang.Object
  |
  +--by.belsoft.report.tools.reportdb.CommonMethods
        |
        +--by.belsoft.report.tools.reportdb.QueryMethods

public class QueryMethods
extends CommonMethods

The class to work with query xml

Author:
Ilya Kirillov

Constructor Summary
QueryMethods()
           
 
Method Summary
 void addDataSource(org.w3c.dom.Document doc, DataSource ds)
          addDataSource adds datasource
 void addDriver(org.w3c.dom.Document doc, java.lang.String name)
          addDriver adds driver
 org.w3c.dom.Element addQuery(org.w3c.dom.Document doc, Query query)
          addQuery adds query
 org.w3c.dom.Document addView(org.w3c.dom.Document doc, BaseTakenUp table)
          addView adda view to report
 BaseTakenUp convertQueryToTable(Query query, BaseTakenUp tabl)
          convertQueryToTable converts query to table
 DataSource getDataSource(org.w3c.dom.Document doc, java.lang.String id)
          getDataSource gets datasource
 java.util.ArrayList getDataSourceObjects(org.w3c.dom.Document doc)
          getDataSourceObjects gets datasource objects
 java.util.ArrayList getDataSources(org.w3c.dom.Document doc)
          getDataSources get datasources
 java.util.ArrayList getDrivers(org.w3c.dom.Document doc)
          getDrivers gets drivers
 java.util.ArrayList getParentFields(org.w3c.dom.Document doc, java.lang.String projname, java.lang.String name)
          getParentFields gets parent fields
 java.util.ArrayList getQueries(org.w3c.dom.Document doc)
          getQueries gets queries
 Query getQuery(org.w3c.dom.Document doc, java.lang.String name)
          getQuery gets query
 org.w3c.dom.Element getQueryNode(org.w3c.dom.Document doc, Query query)
          getQueryNode gets node from query
 Query getQueryObject(java.lang.String id, org.w3c.dom.Node element)
          getQueryObject gets query object
 org.w3c.dom.Node getXMLSource(org.w3c.dom.Document doc, Query query)
          getXMLSource gets xml source from objects
 Query isSaved(org.w3c.dom.Document doc, Query query)
          isSaved checks if the query is saved
 org.w3c.dom.Element makeDataSourceElement(org.w3c.dom.Document doc, DataSource ds)
          makeDataSourceElement makes datasource element
 DataSource makeDataSourceFromNode(org.w3c.dom.Element from)
          makeDataSourceFromNode makes datasource from node
 Field makeFieldFromNode(org.w3c.dom.Document doc, java.lang.String fieldid)
          makeFieldFromNode makes field from node
 Query makeObjectTreeFromNode(Query to, org.w3c.dom.Node what)
          makeObjectTreeFromNode makes object tree from node
 org.w3c.dom.Element makeXMLTreeFromObject(org.w3c.dom.Document doc, org.w3c.dom.Element to, java.util.ArrayList what)
          makeXMLTreeFromObject makes xml tree from object
 void removeDataSource(org.w3c.dom.Document doc, java.lang.String id)
          removeDataSource removes datasource
 void removeDataSources(org.w3c.dom.Document doc, java.lang.String[] ids)
          removeDataSources removes datasources
 void removeDriver(org.w3c.dom.Document doc, java.lang.String name)
          removeDriver removes driver
 org.w3c.dom.Document removeQuery(org.w3c.dom.Document doc, java.lang.String id)
          removeQuery removes query
 org.w3c.dom.Document removeTable(org.w3c.dom.Document doc, java.lang.String id)
          removeTable removes selected table
 java.util.ArrayList reverseList(java.util.ArrayList toReverse)
          reverseList makes reverse list
 void updateDataSource(org.w3c.dom.Document doc, DataSource ds)
          updateDataSource updates datasource
 org.w3c.dom.Document updateQuery(org.w3c.dom.Document doc, Query query)
          updateQuery updates query
 
Methods inherited from class by.belsoft.report.tools.reportdb.CommonMethods
getStaticElement, getStaticElements, getTables, makeBaseTakenUpObject, makeBaseTakenUpObjects, makeBaseTakenUpXML, updateTable
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

QueryMethods

public QueryMethods()
Method Detail

addView

public org.w3c.dom.Document addView(org.w3c.dom.Document doc,
                                    BaseTakenUp table)
addView adda view to report

Parameters:
doc - Document the document element
table - BaseTakenUp the container with data
Returns:
Document the updated document

removeQuery

public org.w3c.dom.Document removeQuery(org.w3c.dom.Document doc,
                                        java.lang.String id)
removeQuery removes query

Parameters:
doc - Document the document element
id - String the element id
Returns:
Document the updated document

removeTable

public org.w3c.dom.Document removeTable(org.w3c.dom.Document doc,
                                        java.lang.String id)
removeTable removes selected table

Parameters:
doc - Document the document element
id - String the element id
Returns:
Document the updated document

isSaved

public Query isSaved(org.w3c.dom.Document doc,
                     Query query)
isSaved checks if the query is saved

Parameters:
doc - Document the document element
query - Query the query to check
Returns:
Query the query checked

updateQuery

public org.w3c.dom.Document updateQuery(org.w3c.dom.Document doc,
                                        Query query)
updateQuery updates query

Parameters:
doc - Document the document element
query - Query the query to be updated
Returns:
Document the updated document

addQuery

public org.w3c.dom.Element addQuery(org.w3c.dom.Document doc,
                                    Query query)
addQuery adds query

Parameters:
doc - Document the document element
query - Query the query to add
Returns:
Element generated from query

getXMLSource

public org.w3c.dom.Node getXMLSource(org.w3c.dom.Document doc,
                                     Query query)
getXMLSource gets xml source from objects

Parameters:
doc - Document the document element
query - Query the query to view source
Returns:
Node the node made from source

makeXMLTreeFromObject

public org.w3c.dom.Element makeXMLTreeFromObject(org.w3c.dom.Document doc,
                                                 org.w3c.dom.Element to,
                                                 java.util.ArrayList what)
makeXMLTreeFromObject makes xml tree from object

Parameters:
doc - Document the document element
to - Element the element to be formed
what - ArrayList the list of data
Returns:
Element the result element

getQueryNode

public org.w3c.dom.Element getQueryNode(org.w3c.dom.Document doc,
                                        Query query)
getQueryNode gets node from query

Parameters:
doc - Document the document element
query - Query the query to parse
Returns:
Element the result element

getQueryObject

public Query getQueryObject(java.lang.String id,
                            org.w3c.dom.Node element)
getQueryObject gets query object

Parameters:
id - String the element id
element - Node the element node
Returns:
Query the result query

makeObjectTreeFromNode

public Query makeObjectTreeFromNode(Query to,
                                    org.w3c.dom.Node what)
makeObjectTreeFromNode makes object tree from node

Parameters:
to - Query the query where to put data
what - Node the node to parse
Returns:
Query the result query

getQueries

public java.util.ArrayList getQueries(org.w3c.dom.Document doc)
getQueries gets queries

Parameters:
doc - Document the document element
Returns:
ArrayList the result list with queries

getQuery

public Query getQuery(org.w3c.dom.Document doc,
                      java.lang.String name)
getQuery gets query

Parameters:
doc - Document the document element
name - String the query name
Returns:
Query the result query

getParentFields

public java.util.ArrayList getParentFields(org.w3c.dom.Document doc,
                                           java.lang.String projname,
                                           java.lang.String name)
getParentFields gets parent fields

Parameters:
doc - Document the document element
projname - String the report name
name - String the query name
Returns:
ArrayList the list with fields

reverseList

public java.util.ArrayList reverseList(java.util.ArrayList toReverse)
reverseList makes reverse list

Parameters:
toReverse - ArrayList the list to be reversed
Returns:
ArrayList the result list

makeFieldFromNode

public Field makeFieldFromNode(org.w3c.dom.Document doc,
                               java.lang.String fieldid)
makeFieldFromNode makes field from node

Parameters:
doc - Document the document element
fieldid - String the field id
Returns:
Field the result field

convertQueryToTable

public BaseTakenUp convertQueryToTable(Query query,
                                       BaseTakenUp tabl)
convertQueryToTable converts query to table

Parameters:
query - Query the query to convert
tabl - BaseTakenUp the table of converting
Returns:
BaseTakenUp the result table

makeDataSourceFromNode

public DataSource makeDataSourceFromNode(org.w3c.dom.Element from)
makeDataSourceFromNode makes datasource from node

Parameters:
from - Element element to parse
Returns:
DataSource the result datasource

makeDataSourceElement

public org.w3c.dom.Element makeDataSourceElement(org.w3c.dom.Document doc,
                                                 DataSource ds)
makeDataSourceElement makes datasource element

Parameters:
doc - Document the document element
ds - DataSource the datasource with data
Returns:
Element the result element

getDataSources

public java.util.ArrayList getDataSources(org.w3c.dom.Document doc)
getDataSources get datasources

Parameters:
doc - Document the document element
Returns:
ArrayList the result list

getDataSourceObjects

public java.util.ArrayList getDataSourceObjects(org.w3c.dom.Document doc)
getDataSourceObjects gets datasource objects

Parameters:
doc - Document the document element
Returns:
ArrayList the result list

getDataSource

public DataSource getDataSource(org.w3c.dom.Document doc,
                                java.lang.String id)
getDataSource gets datasource

Parameters:
doc - Document the document element
id - String the id
Returns:
DataSource the result datasource

addDataSource

public void addDataSource(org.w3c.dom.Document doc,
                          DataSource ds)
addDataSource adds datasource

Parameters:
doc - Document the document element
ds - DataSource the datasource to add

removeDataSource

public void removeDataSource(org.w3c.dom.Document doc,
                             java.lang.String id)
removeDataSource removes datasource

Parameters:
doc - Document the document element
id - String the datasources id

removeDataSources

public void removeDataSources(org.w3c.dom.Document doc,
                              java.lang.String[] ids)
removeDataSources removes datasources

Parameters:
doc - Document the document element
ids - String[] the datasources ids

updateDataSource

public void updateDataSource(org.w3c.dom.Document doc,
                             DataSource ds)
updateDataSource updates datasource

Parameters:
doc - Document the document element
ds - DataSource the datasource to be updated

getDrivers

public java.util.ArrayList getDrivers(org.w3c.dom.Document doc)
getDrivers gets drivers

Parameters:
doc - Document the document element
Returns:
ArrayList the result list

addDriver

public void addDriver(org.w3c.dom.Document doc,
                      java.lang.String name)
addDriver adds driver

Parameters:
doc - Document the document element
name - String the drivers name

removeDriver

public void removeDriver(org.w3c.dom.Document doc,
                         java.lang.String name)
removeDriver removes driver

Parameters:
doc - Document the document element
name - String the drivers name


Copyright © 2005 BelSoft Inc. All Rights Reserved.