
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@832144 13f79535-47bb-0310-9956-ffa450edef68
78 lines
3.8 KiB
HTML
78 lines
3.8 KiB
HTML
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
|
<html>
|
|
<head>
|
|
<!--
|
|
Licensed to the Apache Software Foundation (ASF) under one
|
|
or more contributor license agreements. See the NOTICE file
|
|
distributed with this work for additional information
|
|
regarding copyright ownership. The ASF licenses this file
|
|
to you under the Apache License, Version 2.0 (the
|
|
"License"); you may not use this file except in compliance
|
|
with the License. You may obtain a copy of the License at
|
|
|
|
http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
Unless required by applicable law or agreed to in writing,
|
|
software distributed under the License is distributed on an
|
|
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
KIND, either express or implied. See the License for the
|
|
specific language governing permissions and limitations
|
|
under the License.
|
|
-->
|
|
|
|
<meta content="text/html; charset=iso-8859-1" http-equiv="Content-Type">
|
|
<meta content="text/css" http-equiv="Content-Style-Type"><title>Tuscany DAS Tools</title>
|
|
|
|
<style type="text/css" media="all">
|
|
@import url("../../css/maven-base.css");
|
|
@import url("../../css/maven-theme.css");
|
|
@import url("../../css/site.css");
|
|
</style>
|
|
<link rel="stylesheet" href="./css/print.css" type="text/css" media="print"></head>
|
|
|
|
<body>
|
|
<h2>Tuscany DAS Tools</h2>
|
|
<h3>Building DAS Tools</h3>
|
|
|
|
DBToXSDGenerator provides utility methods for use when DB Schema is available and SDO Model xsds are not. This <br>
|
|
utility will help build SDO Model xsds based on DB Schema. These xsds can be supplied to Data Access Service <br>
|
|
like (RDB-DAS) to have SDO <-> DB data exchange. <br>
|
|
|
|
<br>
|
|
<ul>
|
|
<li>getModelFileFromDB(String dbInfoFile) - connect to database and convert DB Schema to XSD Model XSDs </li>
|
|
<li>getModelFileFromSchemaFile(String schemaFileName, String SDOModelFileName) - no DB Connection needed, but need Apache Torque output of DB schema file </li>
|
|
<li>getSchemaFileFromDB(String dbInfoFile) - connect to database and use Apache Torque to get DB Schema xml file </li>
|
|
<li>getModelFileFromDB(ModelXSDGenOption mo) - connect to database and convert DB Schema to XSD Model XSDs </li>
|
|
<li>getModelFileFromSchemaFile(ModelXSDGenOption mo) - no DB Connection needed, but need Apache Torque output of DB schema file </li>
|
|
<li>ModelXSDGenOption holds - schemaFile, modelFile, driverClass, databaseURL, schemaName, userName, password</li>
|
|
</ul>
|
|
|
|
To build the Tuscany DAS DBToXSDGenerator tool, perform the following steps <br>
|
|
<ul>
|
|
<li> Ensure that the environment variable JAVA_HOME is set to point to an installation of Java 1.4 JDK </li>
|
|
<li> --->To run as a maven plugin, run the command "mvn" </li>
|
|
<li> --->To run as a standalone tool, call the above listed methods from DBToXSDGenerator </li>
|
|
</ul>
|
|
|
|
<b>Assumption</b> Database exists and contains required tables, constraints. Required Driver jar is in classpath<br>
|
|
|
|
<ul style="border-right-style: solid; border-left-style: solid; border-top-style: solid; border-bottom-style: solid">
|
|
<b>Example dbInfoFile</b><br>
|
|
<Config xmlns="http:///org.apache.tuscany.das.rdb/config.xsd"> <br>
|
|
<br>
|
|
<!--Uncomment below for derby test--><br>
|
|
<ConnectionInfo><br>
|
|
<ConnectionProperties<br>
|
|
driverClass="org.apache.derby.jdbc.EmbeddedDriver"<br>
|
|
databaseURL="jdbc:derby:target/dastest"<br>
|
|
schemaName = "APP"<br>
|
|
loginTimeout="600000"/><br>
|
|
</ConnectionInfo><br><br>
|
|
<OutFiles<br>
|
|
schemaFile="target/dbSchema.txt"<br>
|
|
modelFile="target/schemaModel.xsd"<br>
|
|
/><br>
|
|
</Config>
|
|
</ul>
|
|
</body></html>
|