Style Intelligence v12.0

inetsoft.uql.xml
Class XMLDataSource

java.lang.Object
  extended by inetsoft.uql.XDataSource
      extended by inetsoft.uql.util.HierDataSource
          extended by inetsoft.uql.xml.XMLDataSource
All Implemented Interfaces:
inetsoft.util.XMLSerializable, Serializable, Cloneable
Direct Known Subclasses:
TextDataSource

public class XMLDataSource
extends HierDataSource

XML data source.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class inetsoft.uql.util.HierDataSource
GET, POST
 
Fields inherited from class inetsoft.uql.XDataSource
CORBA, DOMAIN_DB2, DOMAIN_NONE, DOMAIN_ORACLE, DOMAIN_SQL, DOMAIN_SQLSERVER, EJB, JDBC, OBJECT, SAP, SOAP, TEXT, XML, XMLA
 
Constructor Summary
  XMLDataSource()
          Create a XML data source.
protected XMLDataSource(String type)
          Create a XML data source.
 
Method Summary
 void addRequest(String item)
          Add a request to the data source.
 Object clone()
          Create a clone of this object.
 String getCurrentRequestName()
          Get the current selected request name.
 String getDTD()
          Get the DTD of this data source.
 String getDTD(boolean runtime)
          Get the DTD of this data source.
 String getMethod()
          Get the HTTP method for this query.
 UserVariable[] getParameters()
          Get the data source connection parameters.
 String getRequest(int idx)
          Get the data source item name.
 int getRequestCount()
          Get the number of requests.
 String getRequestEncode(String qname)
          Get the encode of the specified request.
 XTypeNode getRequestInputType(String item)
          Get the input type of the specified request.
 XTypeNode getRequestOutputType(String qname)
          Get the output type of the specified request.
 XNode getRequestParameters(String qname)
          Get the parameters of the specified request.
 String getURL()
          Get the URL of this data source.
 String getURL(boolean runtime)
          Get the URL of this data source.
 boolean isTypesFixed()
          Get whether the user can modify the output types.
protected  XTypeNode parseOutput(Element requestNode)
          Parse the output tag.
 void parseXML(Element root)
          Parse the XML element that contains information on this data source.
 void removeRequest(int idx)
          Remove a request from the data source definition.
 void setCurrentRequestName(String name)
          Set the current selected request name.
 void setDTD(String dtd)
          Set the DTD of the data source.
 void setMethod(String method)
          Set the HTTP method for this query.
 boolean setRequest(String name, String encode)
          Set(including "add" and "replace") a request to the data source.
 void setRequestEncode(String qname, String code)
          Set the encode of the specified request.
 void setRequestOutputType(String qname, XTypeNode param)
          Set the request output type.
 void setRequestParameters(String qname, XNode param)
          Set the parameters of the specified request.
 void setTypesFixed(boolean fixed)
          Specify whether the user can modify the output types.
 void setURL(String url)
          Set the URL of the data source.
protected  void writeOutput(XTypeNode type, PrintWriter writer)
          Write output tag to xml.
 void writeXML(PrintWriter writer)
          Generate the XML segment to represent this data source.
 
Methods inherited from class inetsoft.uql.util.HierDataSource
getTypeResolver, setTypeResolver
 
Methods inherited from class inetsoft.uql.XDataSource
addFolder, equals, getDescription, getDomainType, getFolders, getFullName, getName, getRuntimeValue, getType, hashCode, isMVEnabled, removeFolder, removeFolders, setDescription, setName, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

XMLDataSource

protected XMLDataSource(String type)
Create a XML data source.


XMLDataSource

public XMLDataSource()
Create a XML data source.

Method Detail

getRequest

public String getRequest(int idx)
Get the data source item name.

Specified by:
getRequest in class HierDataSource

getRequestCount

public int getRequestCount()
Get the number of requests.

Specified by:
getRequestCount in class HierDataSource

removeRequest

public void removeRequest(int idx)
Remove a request from the data source definition.


addRequest

public void addRequest(String item)
Add a request to the data source.


setURL

public void setURL(String url)
Set the URL of the data source. The URL can be either HTTP server, FTP, local file.


getURL

public String getURL()
Get the URL of this data source.


getURL

public String getURL(boolean runtime)
Get the URL of this data source.


setDTD

public void setDTD(String dtd)
Set the DTD of the data source. The DTD can be either a URL or a file path.


getDTD

public String getDTD()
Get the DTD of this data source.


getDTD

public String getDTD(boolean runtime)
Get the DTD of this data source.


setMethod

public void setMethod(String method)
Set the HTTP method for this query.


getMethod

public String getMethod()
Get the HTTP method for this query.


setTypesFixed

public void setTypesFixed(boolean fixed)
Specify whether the user can modify the output types.


isTypesFixed

public boolean isTypesFixed()
Get whether the user can modify the output types.


getRequestEncode

public String getRequestEncode(String qname)
Get the encode of the specified request.

Parameters:
qname - request name.

setRequestEncode

public void setRequestEncode(String qname,
                             String code)
Set the encode of the specified request.

Parameters:
qname - request name.
code - xml encode.

getRequestParameters

public XNode getRequestParameters(String qname)
Get the parameters of the specified request.

Specified by:
getRequestParameters in class HierDataSource
Parameters:
qname - request name.

setRequestParameters

public void setRequestParameters(String qname,
                                 XNode param)
Set the parameters of the specified request.

Specified by:
setRequestParameters in class HierDataSource
Parameters:
qname - request name.
param - parameters represented as a tree. It is converted to a query string or POST input.

getRequestOutputType

public XTypeNode getRequestOutputType(String qname)
Get the output type of the specified request.

Specified by:
getRequestOutputType in class HierDataSource
Parameters:
qname - request name.
Returns:
request output type.

setRequestOutputType

public void setRequestOutputType(String qname,
                                 XTypeNode param)
Set the request output type.


getRequestInputType

public XTypeNode getRequestInputType(String item)
Get the input type of the specified request.

Specified by:
getRequestInputType in class HierDataSource
Parameters:
item - request name.
Returns:
request input type.

getParameters

public UserVariable[] getParameters()
Get the data source connection parameters.

Overrides:
getParameters in class HierDataSource

parseXML

public void parseXML(Element root)
              throws Exception
Parse the XML element that contains information on this data source.

Specified by:
parseXML in interface inetsoft.util.XMLSerializable
Overrides:
parseXML in class XDataSource
Throws:
Exception

parseOutput

protected XTypeNode parseOutput(Element requestNode)
                         throws Exception
Parse the output tag.

Parameters:
requestNode - request node.
Returns:
output object. (XTypeNode)
Throws:
Exception

writeXML

public void writeXML(PrintWriter writer)
Generate the XML segment to represent this data source.

Specified by:
writeXML in interface inetsoft.util.XMLSerializable
Overrides:
writeXML in class XDataSource

writeOutput

protected void writeOutput(XTypeNode type,
                           PrintWriter writer)
Write output tag to xml.

Parameters:
type -

clone

public Object clone()
Create a clone of this object.

Overrides:
clone in class XDataSource

setRequest

public boolean setRequest(String name,
                          String encode)
Set(including "add" and "replace") a request to the data source.


setCurrentRequestName

public void setCurrentRequestName(String name)
Set the current selected request name.


getCurrentRequestName

public String getCurrentRequestName()
Get the current selected request name.


Copyright © 1996-2014 InetSoft Technology Corp. All Rights Reserved.