You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-commits@db.apache.org by rh...@apache.org on 2007/10/23 22:54:07 UTC
svn commit: r587652 [1/6] - in /db/derby/code/trunk: ./ java/demo/
java/demo/vtis/ java/demo/vtis/data/ java/demo/vtis/java/
java/demo/vtis/java/org/ java/demo/vtis/java/org/apache/
java/demo/vtis/java/org/apache/derbyDemo/ java/demo/vtis/java/org/apac...
Author: rhillegas
Date: Tue Oct 23 13:54:05 2007
New Revision: 587652
URL: http://svn.apache.org/viewvc?rev=587652&view=rev
Log:
DERBY-3129: Demo code for table functions.
Added:
db/derby/code/trunk/java/demo/vtis/
db/derby/code/trunk/java/demo/vtis/README
db/derby/code/trunk/java/demo/vtis/data/
db/derby/code/trunk/java/demo/vtis/data/ApacheServerLog.xml (with props)
db/derby/code/trunk/java/demo/vtis/data/DerbyJiraReport.xml (with props)
db/derby/code/trunk/java/demo/vtis/data/svn_log.txt (with props)
db/derby/code/trunk/java/demo/vtis/java/
db/derby/code/trunk/java/demo/vtis/java/org/
db/derby/code/trunk/java/demo/vtis/java/org/apache/
db/derby/code/trunk/java/demo/vtis/java/org/apache/derbyDemo/
db/derby/code/trunk/java/demo/vtis/java/org/apache/derbyDemo/vtis/
db/derby/code/trunk/java/demo/vtis/java/org/apache/derbyDemo/vtis/core/
db/derby/code/trunk/java/demo/vtis/java/org/apache/derbyDemo/vtis/core/FlatFileVTI.java (with props)
db/derby/code/trunk/java/demo/vtis/java/org/apache/derbyDemo/vtis/core/QueryRow.java (with props)
db/derby/code/trunk/java/demo/vtis/java/org/apache/derbyDemo/vtis/core/QueryVTIHelper.java (with props)
db/derby/code/trunk/java/demo/vtis/java/org/apache/derbyDemo/vtis/core/StringColumnVTI.java (with props)
db/derby/code/trunk/java/demo/vtis/java/org/apache/derbyDemo/vtis/core/VTIHelper.java (with props)
db/derby/code/trunk/java/demo/vtis/java/org/apache/derbyDemo/vtis/core/VTITemplate.java (with props)
db/derby/code/trunk/java/demo/vtis/java/org/apache/derbyDemo/vtis/core/XMLRow.java (with props)
db/derby/code/trunk/java/demo/vtis/java/org/apache/derbyDemo/vtis/core/XmlVTI.java (with props)
db/derby/code/trunk/java/demo/vtis/java/org/apache/derbyDemo/vtis/example/
db/derby/code/trunk/java/demo/vtis/java/org/apache/derbyDemo/vtis/example/ApacheServerLogVTI.java (with props)
db/derby/code/trunk/java/demo/vtis/java/org/apache/derbyDemo/vtis/example/DerbyJiraReportVTI.java (with props)
db/derby/code/trunk/java/demo/vtis/java/org/apache/derbyDemo/vtis/example/PropertyFileVTI.java (with props)
db/derby/code/trunk/java/demo/vtis/java/org/apache/derbyDemo/vtis/example/SubversionLogVTI.java (with props)
db/derby/code/trunk/java/demo/vtis/java/org/apache/derbyDemo/vtis/example/VTIs.java (with props)
db/derby/code/trunk/java/demo/vtis/java/org/apache/derbyDemo/vtis/example/WorldDBSnapshot.java (with props)
db/derby/code/trunk/java/demo/vtis/java/org/apache/derbyDemo/vtis/snapshot/
db/derby/code/trunk/java/demo/vtis/java/org/apache/derbyDemo/vtis/snapshot/SnapshotQuery.java (with props)
db/derby/code/trunk/java/demo/vtis/java/org/apache/derbyDemo/vtis/snapshot/Subscription.java (with props)
db/derby/code/trunk/java/demo/vtis/java/org/apache/derbyDemo/vtis/snapshot/SubscriptionSignature.java (with props)
db/derby/code/trunk/java/demo/vtis/sql/
db/derby/code/trunk/java/demo/vtis/sql/demoFileVtis.sql (with props)
db/derby/code/trunk/java/demo/vtis/sql/demoForeignDbmsVtis.sql (with props)
Modified:
db/derby/code/trunk/build.xml
db/derby/code/trunk/java/demo/build.xml
Modified: db/derby/code/trunk/build.xml
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/build.xml?rev=587652&r1=587651&r2=587652&view=diff
==============================================================================
--- db/derby/code/trunk/build.xml (original)
+++ db/derby/code/trunk/build.xml Tue Oct 23 13:54:05 2007
@@ -637,7 +637,7 @@
<property name="javadoc.tool.jdk16" value="${jdk16}/bin/javadoc"/>
<target name="javadoc"
- depends="init-javadoc-tool,init,initjars,publishedapi,derbydocs,toolsdocs,grammardocs,testingdocs"/>
+ depends="init-javadoc-tool,init,initjars,publishedapi,derbydocs,toolsdocs,grammardocs,demodocs,testingdocs"/>
<target name="init-javadoc-tool" depends="init-javadoc-not-jdk16,init-javadoc-jdk16"/>
@@ -882,6 +882,29 @@
<param name="jjtodoc" value="${derby.tools.dir}/impl/tools/ij/ij.jj"/>
<param name="jjdoctarget" value="${out.javadoc.dir}/tools/ij.html"/>
</antcall>
+
+ </target>
+
+ <target name="demodocs" depends="init-javadoc-tool,init">
+
+ <delete dir="${out.javadoc.dir}/demo"/>
+ <mkdir dir="${out.javadoc.dir}/demo"/>
+
+ <javadoc
+ executable="${javadoc.tool}"
+ additionalparam="-J-mx320M"
+ packagenames="org.apache.derbyDemo.vtis.*"
+ access="private"
+ breakiterator="yes"
+ useexternalfile="yes"
+ classpath="${out.dir}"
+ destdir="${out.javadoc.dir}/demo"
+ windowtitle="Apache Derby Demos"
+ doctitle="Apache Derby Demos"
+ >
+ <fileset dir="${derby.demo.src.dir}/vtis/java"/>
+ </javadoc>
+
</target>
Modified: db/derby/code/trunk/java/demo/build.xml
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/demo/build.xml?rev=587652&r1=587651&r2=587652&view=diff
==============================================================================
--- db/derby/code/trunk/java/demo/build.xml (original)
+++ db/derby/code/trunk/java/demo/build.xml Tue Oct 23 13:54:05 2007
@@ -110,6 +110,19 @@
<pathelement path="${java14compile.classpath};${jcc};"/>
</classpath>
</javac>
+ <javac
+ source="1.5"
+ target="1.5"
+ nowarn="on"
+ debug="${debug}"
+ depend="${depend}"
+ deprecation="${deprecation}"
+ optimize="${optimize}"
+ proceed="${proceed}"
+ verbose="${verbose}"
+ srcdir="${derby.demo.src.dir}/vtis/java"
+ destdir="${out.dir}">
+ </javac>
<ant target="compile" dir="toursdb"/>
</target>
Added: db/derby/code/trunk/java/demo/vtis/README
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/demo/vtis/README?rev=587652&view=auto
==============================================================================
--- db/derby/code/trunk/java/demo/vtis/README (added)
+++ db/derby/code/trunk/java/demo/vtis/README Tue Oct 23 13:54:05 2007
@@ -0,0 +1,50 @@
+This branch of the Demo subtree contains sample table functions. The
+code is built by the top-level Derby compile target and the javadoc is
+built by the top-level Derby javadoc target. That is, from the root
+directory of your subversion client or source distribution, invoke
+"ant all". This will build all of Derby and will also build all of the
+classes in this demo. The demo classes will be compiled into
+classes/org/apache/derbyDemo/vtis... Similarly, if you invoke
+"ant buildjavadoc" then all of the Derby javadoc will be built and,
+in addition, javadoc for this demo will be built into the demo
+subdirectory of the javadoc output.
+
+Two sql scripts are provided to test-drive these table functions.
+Use Derby's ij tool to run these scripts:
+
+1) sql/demoFileVtis.sql
+2) sql/demoForeignDbmsVtis.sql
+
+1) The first script needs to be customized as explained in the
+script's header.
+
+This first script exercises the following table functions:
+
+a) PropertyFileVTI - a table function for presenting a property file
+as a table.
+
+b) XmlVTI - a table function for presenting an arbitrary XML file as
+a table.
+
+c) ApacheServerLogVTI - an example of an XmlVTI which makes a table
+out of an Apache web server log.
+
+d) DerbyJiraReportVTI - an example of an XmlVTI which makes a table
+out of a JIRA report.
+
+e) SubversionLogVTI - a table function for making a table from the
+output of the "svn log" command.
+
+
+2) The second script runs table functions against the sample MySQL
+database called "world". To run this script, you must be running a
+MySQL server which manages the world database. You will also need
+to customize this script as its header explains. The second script
+exercises the following machinery:
+
+a) A table function which queries the CountryLanguage table in the
+MySQL database.
+
+b) A parameterized subscription from several tables in the MySQL
+database. This subscription is defined by an annotated class called
+WorldDBSnapshot.
Added: db/derby/code/trunk/java/demo/vtis/data/ApacheServerLog.xml
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/demo/vtis/data/ApacheServerLog.xml?rev=587652&view=auto
==============================================================================
--- db/derby/code/trunk/java/demo/vtis/data/ApacheServerLog.xml (added)
+++ db/derby/code/trunk/java/demo/vtis/data/ApacheServerLog.xml Tue Oct 23 13:54:05 2007
@@ -0,0 +1,11 @@
+<?xml version="1.0"?>
+<ServerLog>
+<Visitor IP="193.105.113.102" accessDate="01/Jul/2002:17:31:17 +0200" request="GET /people/Tayeb.Lemlouma/Papers/Programmation%20logique%20avec%20contraintes.pdf HTTP/1.1" statusCode="206" fileSize="1024" referrer="-" userAgent="Mozilla/4.0 (compatible; MSIE 5.01; Windows NT)" />
+<Visitor IP="193.105.113.102" accessDate="01/Jul/2002:17:31:18 +0200" request="GET /people/Tayeb.Lemlouma/Papers/Programmation%20logique%20avec%20contraintes.pdf HTTP/1.1" statusCode="206" fileSize="2395" referrer="-" userAgent="Mozilla/4.0 (compatible; MSIE 5.01; Windows NT)" />
+<Visitor IP="193.105.113.102" accessDate="01/Jul/2002:17:31:19 +0200" request="GET /people/Tayeb.Lemlouma/Papers/Programmation%20logique%20avec%20contraintes.pdf HTTP/1.1" statusCode="206" fileSize="66568" referrer="-" userAgent="Mozilla/4.0 (compatible; MSIE 5.01; Windows NT)" />
+<Visitor IP="208.13.106.20" accessDate="01/Jul/2002:17:40:56 +0200" request="GET /people/Tayeb.Lemlouma/MULTIMEDIA/CCPP/UPS-Package/UPSProfiles.html HTTP/1.0" statusCode="200" fileSize="3332" referrer="-" userAgent="Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0) Fetch API Request" />
+<Visitor IP="80.15.59.139" accessDate="01/Jul/2002:17:41:07 +0200" request="GET /people/Tayeb.Lemlouma/Papers/AdHoc_Presentation.pdf HTTP/1.1" statusCode="200" fileSize="18535" referrer="http://www.google.fr/search?q=%22applications+militaires%22+fr%C3%A9quence&hl=fr&lr=&ie=UTF-8&oe=UTF8&start=20&sa=N" userAgent="Mozilla/4.0 (compatible; MSIE 6.0; Windows 98)" />
+<Visitor IP="64.51.19.178" accessDate="01/Jul/2002:18:09:15 +0200" request="GET /people/Tayeb.Lemlouma/MULTIMEDIA/CCPP/UPS-Package/UPSProfiles.html HTTP/1.0" statusCode="200" fileSize="3332" referrer="-" userAgent="Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0) Fetch API Request" />
+<Visitor IP="64.51.19.178" accessDate="01/Jul/2002:18:19:08 +0200" request="GET /people/Tayeb.Lemlouma/NegotiationSchema/index.htm HTTP/1.0" statusCode="304" fileSize="-" referrer="-" userAgent="Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0) Fetch API Request" />
+</ServerLog>
+
Propchange: db/derby/code/trunk/java/demo/vtis/data/ApacheServerLog.xml
------------------------------------------------------------------------------
svn:eol-style = native