| com.uwyn.rife.xml.Xml2Data com.uwyn.rife.database.Xml2Datasources
Xml2Datasources | public class Xml2Datasources extends Xml2Data (Code) | | This class parses an XML file to create a set of
Datasource objects.
An example of the parsable datasource file:
<datasources>
<datasource name="postgres">
<driver>org.postgresql.Driver</driver>
<url>jdbc:postgres://localhost/database</url>
<user>username</user>
<password>password</user>
<poolsize>5</poolsize>
</datasource>
</datasources>
An explaination of terms:
- datasource name: used to uniquely identify the datasource
- driver: the classname of the driver to use to connect
- url: the connection url used to connect
- user: the username needed for authentication
- password: the password needed for authentication
- poolsize: the number of connections to always keep connected
Multiple datasource definitions are supported and can be used at anytime.
author: JR Boyens (jboyens[remove] at uwyn dot com) author: Geert Bevin (gbevin[remove] at uwyn dot com) version: $Revision: 3634 $ since: 1.0 |
characters | public void characters(char[] ch, int start, int length)(Code) | | Called when text data is encountered, usually between tags.
Parameters: ch - a character array of the encountered text content Parameters: start - the index in the array at which the content starts Parameters: length - the length of the data stored in the character array since: 1.0 |
clear | protected void clear()(Code) | | Clears the information in this datasource.
since: 1.0 |
endElement | public void endElement(String namespaceURI, String localName, String qName)(Code) | | Called when the end tag of an XML element is encountered
Parameters: namespaceURI - the URI of the namespace of the ending element Parameters: localName - the local name of the ending element Parameters: qName - the qualified name of the ending element since: 1.0 |
getDatasources | public HashMap<String, Datasource> getDatasources()(Code) | | Return the created datasources.
the datasources created after parsing since: 1.0 |
startDocument | public void startDocument()(Code) | | Called when the beginng of the document to be parsed is found
since: 1.0 |
startElement | public void startElement(String namespaceURI, String localName, String qName, Attributes atts)(Code) | | Called when the start tag of an XML element is encountered
Parameters: namespaceURI - the URI of the namespace of the start tag Parameters: localName - the local name of the starting element Parameters: qName - the qualified name of the starting element Parameters: atts - the attributes of the starting element since: 1.0 |
|
|