<?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.0"?>
<plugin>
     <extension-point id="driverinfo" name="JDBC Driver Information Extension" 
   			schema="schema/driverinfo.exsd"/>
   			
   <extension
         point="org.eclipse.datatools.connectivity.oda.dataSource">
      <dataSource
            odaVersion="3.1"
            driverClass="org.eclipse.birt.report.data.oda.jdbc.OdaJdbcDriver"
            defaultDisplayName="%datasource.name"
            setThreadContextClassLoader="false"
            id="%oda.data.source.id">
         <properties>
            <propertyGroup
                  defaultDisplayName="Connection Properties"
                  name="connectionProperties">
               <property
                  type="string"
                  defaultDisplayName="%datasource.property.odaDriverClass"
                  canInherit="true"
                  name="odaDriverClass"/>
               <property
                  type="string"
                  defaultDisplayName="%datasource.property.odaURL"
                  canInherit="true"
                  name="odaURL"/>
               <property
                  type="string"
                  defaultDisplayName="%datasource.property.odaDataSource"
                  canInherit="true"
                  name="odaDataSource"/>
               <property
                  type="string"
                  defaultDisplayName="%datasource.property.odaUser"
                  canInherit="true"
                  name="odaUser"/>
               <property
                  type="choice"
                  defaultDisplayName="%datasource.property.autocommit"
                  canInherit="true"
                  name="odaAutoCommit">
         			<choice name="false" value="false" defaultDisplayName="%dataset.connection.autocommit.false"/>
               		<choice name="true" value="true" defaultDisplayName="%dataset.connection.autocommit.true"/>
               	</property>
               <property
                  type="choice"
                  defaultDisplayName="%datasource.property.isolationmode"
                  canInherit="true"
                  name="odaIsolationMode">
					<choice name="read-uncommitted" value="1" defaultDisplayName="%dataset.connection.isolationmode.read-uncommitted"/>
               		<choice name="read-committed" value="2" defaultDisplayName="%dataset.connection.isolationmode.read-committed"/>
               		<choice name="repeatable-read" value="4" defaultDisplayName="%dataset.connection.isolationmode.repeatable-read"/>
               		<choice name="serializable" value="8" defaultDisplayName="%dataset.connection.isolationmode.serializable"/>
                 </property>
               <property
                     isEncryptable="true"
                     type="string"
                     canInherit="true"
                     defaultDisplayName="%datasource.property.odaPassword"
                     name="odaPassword"/>
               <property
                     canInherit="true"
                     defaultDisplayName="%datasource.property.odaJndiURL"
                     name="odaJndiName"
                     type="string"/>
               <property
                     isEncryptable="true"
                     type="string"
                     canInherit="true"
                     defaultDisplayName="%datasource.property.ssl.trustStorePassword"
                     name="TrustStorePassword"/>
                <property
                     isEncryptable="true"
                     type="string"
                     canInherit="true"
                     defaultDisplayName="%datasource.property.ssl.keyStorePassword"
                     name="KeyStorePassword"/>
            </propertyGroup>
            <propertyVisibility name="odaDataSource" visibility="hide"/>
            <propertyVisibility name="TrustStorePassword" visibility="hide"/>
            <propertyVisibility name="KeyStorePassword" visibility="hide"/>
         </properties>
      </dataSource>
      <dataSet
            defaultDisplayName="%dataset.query.sqltype"
            id="org.eclipse.birt.report.data.oda.jdbc.JdbcSelectDataSet">
         <dataTypeMapping
               nativeDataType="BIT"
               nativeDataTypeCode="-7"
               odaScalarDataType="Integer"/>
         <dataTypeMapping
               nativeDataType="TINYINT"
               nativeDataTypeCode="-6"
               odaScalarDataType="Integer"/>
         <dataTypeMapping
               nativeDataType="SMALLINT"
               nativeDataTypeCode="5"
               odaScalarDataType="Integer"/>
         <dataTypeMapping
               nativeDataType="INTEGER"
               nativeDataTypeCode="4"
               odaScalarDataType="Integer"/>
         <dataTypeMapping
               nativeDataType="BIGINT"
               nativeDataTypeCode="-5"
               odaScalarDataType="Decimal"/>
         <dataTypeMapping
               nativeDataType="FLOAT"
               nativeDataTypeCode="6"
               odaScalarDataType="Double"/>
         <dataTypeMapping
               nativeDataType="REAL"
               nativeDataTypeCode="7"
               odaScalarDataType="Double"/>
         <dataTypeMapping
               nativeDataType="DOUBLE"
               nativeDataTypeCode="8"
               odaScalarDataType="Double"/>
         <dataTypeMapping
               nativeDataType="NUMERIC"
               nativeDataTypeCode="2"
               odaScalarDataType="Decimal"/>
         <dataTypeMapping
               nativeDataType="DECIMAL"
               nativeDataTypeCode="3"
               odaScalarDataType="Decimal"/>
         <dataTypeMapping
               nativeDataType="CHAR"
               nativeDataTypeCode="1"
               odaScalarDataType="String"/>
         <dataTypeMapping
               nativeDataType="VARCHAR"
               nativeDataTypeCode="12"
               odaScalarDataType="String"/>
         <dataTypeMapping
               nativeDataType="LONGVARCHAR"
               nativeDataTypeCode="-1"
               odaScalarDataType="String"/>
         <dataTypeMapping
               nativeDataType="DATE"
               nativeDataTypeCode="91"
               odaScalarDataType="Date"/>
         <dataTypeMapping
               nativeDataType="TIME"
               nativeDataTypeCode="92"
               odaScalarDataType="Time"/>
         <dataTypeMapping
               nativeDataType="TIMESTAMP"
               nativeDataTypeCode="93"
               odaScalarDataType="Timestamp"/>
               
         <!--For Oracle TIMESTAMPTZ type -->
         <dataTypeMapping
               nativeDataType="TIMESTAMPTZ"
               nativeDataTypeCode="-101"
               odaScalarDataType="Timestamp"/>
         <!--For Oracle TIMESTAMPLTZ type -->
         <dataTypeMapping
               nativeDataType="TIMESTAMPLTZ"
               nativeDataTypeCode="-102"
               odaScalarDataType="Timestamp"/>
         <dataTypeMapping
               nativeDataType="BOOLEAN"
               nativeDataTypeCode="16"
               odaScalarDataType="Boolean"/>
         <dataTypeMapping
               nativeDataType="BINARY"
               nativeDataTypeCode="-2"
               odaScalarDataType="Blob"/>
         <dataTypeMapping
               nativeDataType="VARBINARY"
               nativeDataTypeCode="-3"
               odaScalarDataType="Blob"/>
         <dataTypeMapping
               nativeDataType="LONGVARBINARY"
               nativeDataTypeCode="-4"
               odaScalarDataType="Blob"/>
         <dataTypeMapping
               nativeDataType="BLOB"
               nativeDataTypeCode="2004"
               odaScalarDataType="Blob"/>
         <dataTypeMapping
               nativeDataType="CLOB"
               nativeDataTypeCode="2005"
               odaScalarDataType="Clob"/>
         <properties>
            <propertyGroup
                  defaultDisplayName="Query Properties"
                  name="queryProperties">
               <property
                     type="string"
                     defaultDisplayName="%dataset.property.queryTimeOut"
                     canInherit="true"
                     name="queryTimeOut"/>
               <property
                     type="string"
                     defaultDisplayName="%dataset.property.rowFetchSize"
                     canInherit="false"
                     name="rowFetchSize"/>
            </propertyGroup>
         </properties>
      </dataSet>
      <dataSet
            defaultDisplayName="%dataset.query.sptype"
            id="org.eclipse.birt.report.data.oda.jdbc.SPSelectDataSet">
         <dataTypeMapping
               nativeDataType="BIT"
               nativeDataTypeCode="-7"
               odaScalarDataType="Integer"/>
         <dataTypeMapping
               nativeDataType="TINYINT"
               nativeDataTypeCode="-6"
               odaScalarDataType="Integer"/>
         <dataTypeMapping
               nativeDataType="SMALLINT"
               nativeDataTypeCode="5"
               odaScalarDataType="Integer"/>
         <dataTypeMapping
               nativeDataType="INTEGER"
               nativeDataTypeCode="4"
               odaScalarDataType="Integer"/>
         <dataTypeMapping
               nativeDataType="BIGINT"
               nativeDataTypeCode="-5"
               odaScalarDataType="Decimal"/>
         <dataTypeMapping
               nativeDataType="FLOAT"
               nativeDataTypeCode="6"
               odaScalarDataType="Double"/>
         <dataTypeMapping
               nativeDataType="REAL"
               nativeDataTypeCode="7"
               odaScalarDataType="Double"/>
         <dataTypeMapping
               nativeDataType="DOUBLE"
               nativeDataTypeCode="8"
               odaScalarDataType="Double"/>
         <dataTypeMapping
               nativeDataType="NUMERIC"
               nativeDataTypeCode="2"
               odaScalarDataType="Decimal"/>
         <dataTypeMapping
               nativeDataType="DECIMAL"
               nativeDataTypeCode="3"
               odaScalarDataType="Decimal"/>
         <dataTypeMapping
               nativeDataType="CHAR"
               nativeDataTypeCode="1"
               odaScalarDataType="String"/>
         <dataTypeMapping
               nativeDataType="VARCHAR"
               nativeDataTypeCode="12"
               odaScalarDataType="String"/>
         <dataTypeMapping
               nativeDataType="LONGVARCHAR"
               nativeDataTypeCode="-1"
               odaScalarDataType="String"/>
         <dataTypeMapping
               nativeDataType="DATE"
               nativeDataTypeCode="91"
               odaScalarDataType="Date"/>
         <dataTypeMapping
               nativeDataType="TIME"
               nativeDataTypeCode="92"
               odaScalarDataType="Time"/>
         <dataTypeMapping
               nativeDataType="TIMESTAMP"
               nativeDataTypeCode="93"
               odaScalarDataType="Timestamp"/>
         <!--For Oracle TIMESTAMPTZ type -->
         <dataTypeMapping
               nativeDataType="TIMESTAMPTZ"
               nativeDataTypeCode="-101"
               odaScalarDataType="Timestamp"/>
         <dataTypeMapping
               nativeDataType="BOOLEAN"
               nativeDataTypeCode="16"
               odaScalarDataType="Boolean"/>
         <dataTypeMapping
               nativeDataType="BINARY"
               nativeDataTypeCode="-2"
               odaScalarDataType="Blob"/>
         <dataTypeMapping
               nativeDataType="VARBINARY"
               nativeDataTypeCode="-3"
               odaScalarDataType="Blob"/>
         <dataTypeMapping
               nativeDataType="LONGVARBINARY"
               nativeDataTypeCode="-4"
               odaScalarDataType="Blob"/>
         <dataTypeMapping
               nativeDataType="BLOB"
               nativeDataTypeCode="2004"
               odaScalarDataType="Blob"/>
         <dataTypeMapping
               nativeDataType="CLOB"
               nativeDataTypeCode="2005"
               odaScalarDataType="Clob"/>
         <dataTypeMapping
               nativeDataType="REF CURSOR"
               nativeDataTypeCode="-10"
               odaScalarDataType="String"/>
         <properties>
            <propertyGroup
                  defaultDisplayName="Query Properties"
                  name="queryProperties">
               <property
                     type="string"
                     defaultDisplayName="%dataset.property.queryTimeOut"
                     canInherit="true"
                     name="queryTimeOut"/>
                <property
                     type="string"
                     defaultDisplayName="%dataset.property.rowFetchSize"
                     canInherit="true"
                     name="rowFetchSize"/>
            </propertyGroup>
         </properties>
      </dataSet>

   </extension>
        <extension
         point="org.eclipse.datatools.connectivity.connectionProfile">
      <category
            id="%oda.data.source.id"
            name="%oda.data.source.name"
            parentCategory="%oda.parent.category.id"/>
      <connectionProfile
            category="%oda.data.source.id"
            id="%oda.data.source.id"
            name="%connection.profile.name"
            pingFactory="org.eclipse.datatools.connectivity.oda.profile.OdaConnectionFactory"/>
      <connectionFactory
            id="org.eclipse.datatools.connectivity.oda.IConnection"
            name="%oda.connection.factory.name"
            class="org.eclipse.datatools.connectivity.oda.profile.OdaConnectionFactory"
            profile="%oda.data.source.id"/>
   </extension>
   
   <extension
         point="org.eclipse.birt.report.data.oda.jdbc.driverinfo">
      <jdbcDriver
            driverClass="org.apache.derby.jdbc.EmbeddedDriver"
            urlTemplate="jdbc:derby:[subsubprotocol:]DATABASE[;ATTRIBUTE=VALUE]*"
            name="Apache Derby Embedded Driver"/>
   </extension>
</plugin>
