diff options
author | CVS to git conversion script <webmaster@postgresql.org> | 2002-11-04 17:14:30 +0000 |
---|---|---|
committer | CVS to git conversion script <webmaster@postgresql.org> | 2002-11-04 17:14:30 +0000 |
commit | 503b41f6e5db97b79911c140310d9d2abbac0232 (patch) | |
tree | 1a26ca24ac4cf57d0fd3b7cf4c4dd482defdcaeb | |
parent | 3f435f9e9950c35fbc5f774d2505951855b30263 (diff) | |
download | postgresql-503b41f6e5db97b79911c140310d9d2abbac0232.tar.gz postgresql-503b41f6e5db97b79911c140310d9d2abbac0232.zip |
This commit was manufactured by cvs2git to create branch 'REL7_3_STABLE'.
Sprout from master 2002-11-04 17:14:29 UTC Tom Lane <tgl@sss.pgh.pa.us> 'Remove extraneous semicolons after routine bodies. These don't bother'
Cherrypick from master 2002-09-04 07:23:04 UTC Bruce Momjian <bruce@momjian.us> 'Brand 7.3. Ready for beta!':
contrib/xml/README
contrib/retep/CHANGELOG
contrib/retep/Implementation
contrib/retep/Makefile
contrib/retep/README
contrib/retep/build.xml
contrib/retep/data/cds.dtd
contrib/retep/data/cds.xml
contrib/retep/uk/org/retep/tools.properties
contrib/retep/uk/org/retep/dtu/DCollection.java
contrib/retep/uk/org/retep/dtu/DConstants.java
contrib/xml/pgxml_dom.source
contrib/retep/uk/org/retep/dtu/DElement.java
contrib/retep/uk/org/retep/dtu/DEnvironment.java
contrib/retep/uk/org/retep/dtu/DModule.java
contrib/retep/uk/org/retep/dtu/DModuleXML.java
contrib/retep/uk/org/retep/dtu/DNode.java
contrib/retep/uk/org/retep/dtu/DProcessor.java
contrib/retep/uk/org/retep/dtu/DTransform.java
contrib/retep/uk/org/retep/tools/Tool.java
contrib/retep/uk/org/retep/util/ExceptionDialog.java
contrib/retep/uk/org/retep/util/Globals.java
contrib/retep/uk/org/retep/util/Logger.java
contrib/retep/uk/org/retep/util/Main.java
contrib/retep/uk/org/retep/util/StandaloneApp.java
contrib/retep/uk/org/retep/util/hba/Editor.java
contrib/retep/uk/org/retep/util/misc/IPAddress.java
contrib/retep/uk/org/retep/util/misc/PropertiesIO.java
contrib/retep/uk/org/retep/util/misc/WStringTokenizer.java
contrib/retep/uk/org/retep/util/models/HBATableModel.java
contrib/retep/uk/org/retep/util/models/PropertiesTableModel.java
contrib/retep/uk/org/retep/util/proped/PropertyEditor.java
contrib/retep/uk/org/retep/xml/core/XMLFactory.java
contrib/retep/uk/org/retep/xml/core/XMLFactoryException.java
contrib/retep/uk/org/retep/xml/jdbc/XMLDatabase.java
contrib/retep/uk/org/retep/xml/jdbc/XMLResultSet.java
contrib/retep/uk/org/retep/xml/parser/TagListener.java
contrib/retep/uk/org/retep/xml/test/XMLExport.java
doc/src/sgml/libpgeasy.sgml
doc/src/sgml/odbc.sgml
contrib/xml/pgxml.source
doc/src/sgml/recovery.sgml
src/test/regress/expected/geometry-bsdi-precision.out
contrib/retep/uk/org/retep/xml/parser/TagHandler.java
doc/src/sgml/version.sgml
doc/src/sgml/y2k.sgml
contrib/retep/retep.jpx
src/interfaces/jdbc/utils/CheckVersion.java
src/interfaces/jdbc/utils/changelog.pl
contrib/retep/uk/org/retep/util/hba/Main.java
contrib/retep/uk/org/retep/util/hba/Record.java
contrib/retep/uk/org/retep/util/proped/Main.java
src/interfaces/jdbc/CHANGELOG
src/interfaces/jdbc/Implementation
src/interfaces/jdbc/utils/buildDriver
src/interfaces/jdbc/jdbc.jpx
56 files changed, 10592 insertions, 0 deletions
diff --git a/contrib/retep/CHANGELOG b/contrib/retep/CHANGELOG new file mode 100644 index 00000000000..188c40129e2 --- /dev/null +++ b/contrib/retep/CHANGELOG @@ -0,0 +1,7 @@ +Fri Mar 02 16:08:00 GMT 2001 peter@retep.org.uk + - Started importing in the rest of the retep tools. + +Tue Jan 23 10:19:00 GMT 2001 peter@retep.org.uk + - Finished the XML Export classes + - First of the test data suite now in CVS. + diff --git a/contrib/retep/Implementation b/contrib/retep/Implementation new file mode 100644 index 00000000000..b3125acf0ed --- /dev/null +++ b/contrib/retep/Implementation @@ -0,0 +1,116 @@ +Retep Tools Implementation +-------------------------- + + +The tools are designed to be put into a single jar file, but each one is +executable either individually or part of one single application. + +To run the big application, you can either: + + java -jar retepTools.jar + +or with the retepTools.jar in the classpath run: + + java uk.org.retep.tools.Main + +Windows users: For you you can also double click the retepTools.jar as windows +will automatically run javac for you. + +To run the individual tools, you must have the .jar file in your classpath and +then run the relevant Main class. + +Tool Type Class +------------------------------------------------------------------------------ +pg_hba.conf Editor/repairer Editor uk.org.retep.util.hba.Main +Properties Editor Editor uk.org.retep.util.proped.Main + + +Layout of the classes +--------------------- + +Simply, tools that work on property files (Java properties, resource files, +configuration settings - pg_hba.conf for example) go under uk.org.retep.util in +their own package. Other utility classes (like PropertyIO) go in to the +uk.org.retep.util.misc package except for certain ones where they are related. + +ie: TableModels. In swing you have JTable which uses a TableModel to display +(and possibly update) some data. These go under uk.org.retep.util.models where +you will find PropertiesTableModel for example. This one allows a Properties +object to be displayed & updated. + +Come core classes like Logger, ExceptionDialog etc go into the main +uk.org.retep.util package. + +Directory/Package Contents +------------------------------------------------------------------------------ +uk.org.retep Home of the tools.properties file +uk.org.retep.tools The main all-in-one application +uk.org.retep.dtu The Data Transform Unit +uk.org.retep.util Core utility classes +uk.org.retep.util.hba pg_hba.conf editor/repairer +uk.org.retep.util.misc Misc utility classes +uk.org.retep.util.models Swing table models +uk.org.retep.util.proped Property Editor +uk.org.retep.util.xml.core Basic XML Factory +uk.org.retep.util.xml.jdbc JDBC/XML interface +uk.org.retep.util.xml.parser Simple SAX parser + +Structure of a tool +------------------- + +Each tool has at least 2 base classes, and an entry in the tools.properties +file. For this example, I'll show you the Properties Editor: + +Base package uk.org.retep.util.proped +Main tool class uk.org.retep.util.proped.PropertyEditor +Standalone class uk.org.retep.util.proped.Main + +The main tool class is the entry point used by the main application. Because +they are used in a GUI, this class must extend javax.swing.JComponent and +implement the uk.org.retep.tools.Tool interface. (NB: You will find I always +use JPanel, but JComponent is used here so that any swing class can be used +you are not limited to JPanel.) + +The standalone class is a basic static class that implements the main method. +It should extend the uk.org.retep.misc.StandaloneApp class and be written along +the lines of the following example: + + import uk.org.retep.util.StandaloneApp; + import javax.swing.JComponent; + + public class Main extends StandaloneApp + { + public Main(String[] args) + throws Exception + { + super(args); + } + + public JComponent init() + throws Exception + { + // Your initialisation here. In this case the PropertyEditor + PropertyEditor panel = new PropertyEditor(); + + // do stuff here, ie load a file if supplied + + // return the tool + return panel; + } + + public static void main(String[] args) + throws Exception + { + Main main = new Main(args); + main.pack(); + main.setVisible(true); + } + } + +you will find a template in the uk.org.retep.util.Main class. Simply copy this +classes source, as it gives you the basic stub. Just add your own implementation +if init() like the one above. Look at the full Main class for the +PropertiesEditor to see how to get at the command line args. + +By convention, the standalone class is named Main. + diff --git a/contrib/retep/Makefile b/contrib/retep/Makefile new file mode 100644 index 00000000000..e5de9c7ac80 --- /dev/null +++ b/contrib/retep/Makefile @@ -0,0 +1,30 @@ +#------------------------------------------------------------------------- +# +# Makefile for contributed retep tools +# +# Copyright (c) 2001, PostgreSQL Global Development Group +# +# $Header: /cvsroot/pgsql/contrib/retep/Attic/Makefile,v 1.1 2001/07/06 23:07:20 petere Exp $ +# +#------------------------------------------------------------------------- + +subdir = contrib/retep +top_builddir = ../.. +include $(top_builddir)/src/Makefile.global + +all: + $(ANT) -buildfile $(srcdir)/build.xml all + +install: installdirs + $(ANT) -buildfile $(srcdir)/build.xml install \ + -Dinstall.directory=$(javadir) + +installdirs: + $(mkinstalldirs) $(javadir) + +uninstall: + $(ANT) -buildfile $(srcdir)/build.xml uninstall \ + -Dinstall.directory=$(javadir) + +clean distclean maintainer-clean: + $(ANT) -buildfile $(srcdir)/build.xml clean diff --git a/contrib/retep/README b/contrib/retep/README new file mode 100644 index 00000000000..5355c9d99f3 --- /dev/null +++ b/contrib/retep/README @@ -0,0 +1,35 @@ +Before you ask what retepTools are, they are my personal suite of utilities. +About 90% of them are JDBC related (either they use JDBC, or I use them in +developing the JDBC driver). + +Now, because of various reasons I won't go into now, in January 2001 I decided +to release the entire lot to the public. I could have used something like +SourceForge, but as they are mainly JDBC related I thought here is the best +place. + +Now all (bar retepPDF, see end-note) will over the next few months be going +into the /contrib/retep directory. They range from simple XML Inport/Export +classes to entire sub-systems that can be plugged into applications. + +All this lot were never released, so I'm placing them under PostgreSQL's +licence. + +Please refer to Implementation for details of what package does what. + +It all requires Java2SE (JDK1.2) as a minimum. I do have some plans for some +EJB tools later, so those will need Java2EE, but not yet ;-) + +Peter Mount +peter@retep.org.uk +March 2 2001 + +retepPDF: This is not included for two reasons: + +1: It's big and not really related in any way to PostgreSQL +2: More importantly, I (may be foolishly) released it some 3 years ago under + the LGPL. As a few people have added to it, it's not really possible to + change the licence, and I don't want to polute PostgreSQL's source tree ;-) + +retepGraph: This was an old graphics library. It's been obsolete for 3 years +now, so it's not going in. + diff --git a/contrib/retep/build.xml b/contrib/retep/build.xml new file mode 100644 index 00000000000..04a8db5c2f0 --- /dev/null +++ b/contrib/retep/build.xml @@ -0,0 +1,98 @@ +<?xml version="1.0"?> +<!-- + + build file to build the donated retep tools packages + + $Header: /cvsroot/pgsql/contrib/retep/Attic/build.xml,v 1.8 2001/07/06 23:07:20 petere Exp $ + +--> + +<!DOCTYPE project [ + <!ENTITY jarname "retepTools.jar"> +]> + +<project name="retep" default="all" basedir="."> + + <!-- set global properties for this build --> + <property name="srcdir" value="." /> + <property name="builddir" value="build" /> + <property name="package" value="uk/org/retep" /> + <property name="jardir" value="jars" /> + + <!-- Some checks used to build dependent on the environment --> + <target name="checks"> + <available property="jdk1.2+" classname="java.lang.ThreadLocal" /> + <available property="jdk1.3+" classname="java.lang.StrictMath" /> + <available property="jdk1.2e+" classname="javax.sql.DataSource" /> + <available property="xml" classname="org.xml.sax.Parser" /> + </target> + + <target name="warning" depends="checks" unless="jdk1.2+"> + <echo> +*** WARNING: Contributed retep tools need jdk1.2 or later. +*** Compilation NOT done + </echo> + </target> + + + <!-- default target --> + <target name="all"> + <antcall target="jar" /> + </target> + + + <!-- Builds the various jar files --> + <target name="jar" depends="compile"> + <jar jarfile="${jardir}/&jarname;" whenempty="fail"> + <fileset dir="${builddir}"> + <include name="**/*.class" /> + </fileset> + + <fileset dir="${srcdir}"> + <include name="**/*.properties" /> + </fileset> + </jar> + </target> + + + <!-- Builds the XML Tools --> + <target name="compile" depends="checks,prepare,warning" if="jdk1.2+"> + <javac srcdir="${srcdir}" destdir="${builddir}"> + <include name="${package}/**" /> + <exclude name="${package}/**" unless="jdk1.2+" /> + </javac> + </target> + + + <!-- Prepares the build by creating a directory to place the class files --> + <target name="prepare"> + <mkdir dir="${builddir}" /> + <mkdir dir="${jardir}" /> + </target> + + + <target name="install" depends="all" if="install.directory"> + <copy todir="${install.directory}" overwrite="true" filtering="off"> + <fileset dir="${jardir}"> + <include name="&jarname;" /> + </fileset> + </copy> + </target> + + + <target name="uninstall" if="install.directory"> + <delete> + <fileset dir="${install.directory}"> + <include name="&jarname;" /> + </fileset> + </delete> + </target> + + + <!-- This target removes any class files from the build directory --> + <target name="clean"> + <delete quiet="true" dir="${builddir}" /> + <delete quiet="true" dir="${jardir}" /> + </target> + +</project> diff --git a/contrib/retep/data/cds.dtd b/contrib/retep/data/cds.dtd new file mode 100644 index 00000000000..df542c34768 --- /dev/null +++ b/contrib/retep/data/cds.dtd @@ -0,0 +1,16 @@ +<!ELEMENT album (track*)+> +<!ATTLIST album +title CDATA #IMPLIED + aid CDATA #IMPLIED +> +<!ELEMENT catalogue (group)> +<!ELEMENT group (album*)> +<!ATTLIST group + name CDATA #IMPLIED +> +<!ELEMENT track (#PCDATA)> +<!ATTLIST track + tid CDATA #IMPLIED + id CDATA #IMPLIED +> +
diff --git a/contrib/retep/data/cds.xml b/contrib/retep/data/cds.xml new file mode 100644 index 00000000000..fb0203bda90 --- /dev/null +++ b/contrib/retep/data/cds.xml @@ -0,0 +1,2691 @@ +<catalogue> + <group name="(hed) Planet Earth"> + <album aid="1" title="Broke"> + <track id="1" tid="1">01 - Kiling Time</track> + <track id="2" tid="2">02 - Waiting To Die</track> + <track id="3" tid="3">03 - Feel Good</track> + <track id="4" tid="4">04 - Bartender</track> + <track id="5" tid="5">05 - Crazy Legs</track> + <track id="6" tid="6">06 - Pac Bell</track> + <track id="7" tid="7">07 - I Got You</track> + <track id="8" tid="8">08 - Boom (How You Like That)</track> + <track id="9" tid="9">09 - Swan Dive</track> + <track id="10" tid="10">10 - Stevie</track> + <track id="11" tid="11">11 - Jesus (Of Nazareth)</track> + <track id="12" tid="12">12 - The Meadow</track> + </group> + <group name="2 Unlimited"> + </album> + <album aid="2" title="2 Unlimited"> + <track id="13" tid="1">jump for joy</track> + </album> + <album aid="3" title="NO Limits!"> + <track id="14" tid="1">01 - No Limit</track> + <track id="15" tid="2">02 - Tribal Dance</track> + <track id="16" tid="3">03 - Mysterious</track> + <track id="17" tid="4">04 - Faces</track> + <track id="18" tid="5">05 - Maximum Overdrive</track> + <track id="19" tid="6">06 - The Power Age</track> + <track id="20" tid="7">07 - Break The Chain</track> + <track id="21" tid="8">08 - Kiss Me Bliss Me</track> + <track id="22" tid="9">09 - Thow The Groove Down</track> + <track id="23" tid="10">10 - R.U.O.K</track> + <track id="24" tid="11">11 - Let The Beat Control Your Body</track> + <track id="25" tid="12">12 - Invinite Me To Trance</track> + <track id="26" tid="13">13 - Where Are You Now</track> + <track id="27" tid="14">14 - Shelter For A Rainy Day</track> + <track id="28" tid="15">15 - Get Ready For This (WILDE MIX)</track> + <track id="29" tid="16">16 - No Limit - (AUTOMATIC BREAKBEAT REMIX)</track> + </group> + <group name="2-Raum Wohnung"> + </album> + <album aid="4" title="Wir trafen uns in einem Garten"> + <track id="30" tid="1">01 - 2-Raum Wohnung - Wir trafen uns in einem Garten</track> + <track id="31" tid="2">02 - 2-Raum Wohnung - Wir trafen uns in einem Garten (Inga Humpes Version)</track> + <track id="32" tid="3">03 - 2-Raum Wohnung - Wir trafen uns in einem Garten mit Max</track> + <track id="33" tid="4">04 - 2-Raum Wohnung - Wir trafen uns in einem Garten (i-oI - Remix)</track> + </group> + <group name="2000 Black"> + </album> + <album aid="5" title="The GooDgOOd"> + <track id="34" tid="1">01 - Track 1</track> + <track id="35" tid="2">02 - Track 2</track> + <track id="36" tid="3">03 - Track 3</track> + <track id="37" tid="4">04 - Track 4</track> + <track id="38" tid="5">05 - Track 5</track> + <track id="39" tid="6">06 - Track 6</track> + <track id="40" tid="7">07 - Track 7</track> + <track id="41" tid="8">08 - Track 8</track> + <track id="42" tid="9">09 - Track 9</track> + <track id="43" tid="10">10 - Track 10</track> + <track id="44" tid="11">11 - Track 11</track> + <track id="45" tid="12">12 - Track 12</track> + <track id="46" tid="13">13 - Track 13</track> + </group> + <group name="23rd spirit"> + </album> + <album aid="6" title="the homegrown edition"> + <track id="47" tid="1">01 - Show me something good</track> + <track id="48" tid="2">02 - Feel 'ya</track> + <track id="49" tid="3">03 - Find Your Own Peace</track> + <track id="50" tid="4">04 - Nourishing The Ocean</track> + <track id="51" tid="5">05 - Walking</track> + <track id="52" tid="6">06 - Bring Out Your Love</track> + <track id="53" tid="7">07 - Primetime</track> + <track id="54" tid="8">08 - Stormy</track> + <track id="55" tid="9">09 - Philosophie</track> + <track id="56" tid="10">10 - No</track> + <track id="57" tid="11">11 - Dharma</track> + <track id="58" tid="12">12 - Shine On</track> + </group> + <group name="2Pac"> + </album> + <album aid="7" title="All Eyes On Me"> + <track id="59" tid="1">01 - Ambitionz As A Ridah</track> + <track id="60" tid="2">02 - All bout u</track> + <track id="61" tid="3">03 - Skandalouz</track> + <track id="62" tid="4">04 - Got My Mind Made Up</track> + <track id="63" tid="5">05 - How Do You Want It</track> + <track id="64" tid="6">06 - 2 Of Amerikaz Most Wanted</track> + <track id="65" tid="7">07 - No More Pain</track> + <track id="66" tid="8">08 - Heartz of Men</track> + <track id="67" tid="9">09 - Life Goes On</track> + <track id="68" tid="10">10 - Only God can judge me</track> + <track id="69" tid="11">11 - Tradin War Stories</track> + <track id="70" tid="12">12 - California Love(RMX)</track> + <track id="71" tid="13">13 - I Ain't Mad At Cha</track> + <track id="72" tid="14">14 - What'z Ya Phone Number</track> + </album> + <album aid="8" title="Changes (Maxi)"> + <track id="73" tid="1">01 - Radio Mix</track> + <track id="74" tid="2">02 - Instrumental</track> + <track id="75" tid="3">03 - Album Mix</track> + </album> + <album aid="9" title="R U Still Down [Remember Me]|CD1"> + <track id="76" tid="1">01 - Redemption</track> + <track id="77" tid="2">02 - Open Fire</track> + <track id="78" tid="3">03 - R U Still Down_ (Remeber Me)</track> + <track id="79" tid="4">04 - Hellrazor</track> + <track id="80" tid="5">05 - Thug Style</track> + <track id="81" tid="6">06 - Where Do We Go From Here</track> + <track id="82" tid="7">07 - I Wonder If Heaven Got A Ghetto</track> + <track id="83" tid="8">08 - Nothing To Lose</track> + <track id="84" tid="9">09 - I'm Gettin Money</track> + <track id="85" tid="10">10 - Lie To Kick It</track> + <track id="86" tid="11">11 - Fuck All Y'all</track> + <track id="87" tid="12">12 - Let Them Thangs Go</track> + <track id="88" tid="13">13 - Definition Of A Thug Nigga</track> + </album> + <album aid="10" title="R U Still Down [Remember Me]|CD2"> + <track id="89" tid="1">01 - Ready 4 Whatever</track> + <track id="90" tid="2">02 - When I Get Free</track> + <track id="91" tid="3">03 - Hold On Be Strong</track> + <track id="92" tid="4">04 - I'm Losin It</track> + <track id="93" tid="5">05 - Fake Ass Bitches</track> + <track id="94" tid="6">06 - Do For Love</track> + <track id="95" tid="7">07 - Enemies With Me</track> + <track id="96" tid="8">08 - Nothin But Love</track> + <track id="97" tid="9">09 - 16 On Death Row</track> + <track id="98" tid="10">10 - I Wonder If Heaven Got A Ghetto (Hip-hop Version)</track> + <track id="99" tid="11">11 - When I Get Free</track> + <track id="100" tid="12">12 - Black Starry Night (Interlude)</track> + <track id="101" tid="13">13 - Only Fear Of Death</track> + </group> + <group name="3p"> + </album> + <album aid="11" title="3p (License to kill) (Maxi)"> + <track id="102" tid="1">01 - Original Version</track> + <track id="103" tid="2">02 - SNA Club Mix</track> + <track id="104" tid="3">03 - Jack Danielīs</track> + </group> + <group name="4 hero"> + </album> + <album aid="12" title="Two Pages - Page 1"> + <track id="105" tid="1">01-Loveless</track> + <track id="106" tid="2">02-Golden Age of Life</track> + <track id="107" tid="3">03-Planeteria</track> + <track id="108" tid="4">04-Third Stream</track> + <track id="109" tid="5">05-Escape That</track> + <track id="110" tid="6">06-Cosmic Tree</track> + <track id="111" tid="7">07-Spirits in Transit</track> + <track id="112" tid="8">08-The Action</track> + <track id="113" tid="9">09-Star Chasers</track> + <track id="114" tid="10">10-Wishful Thinking</track> + <track id="115" tid="11">11-Universal Reprise</track> + </album> + <album aid="13" title="Two Pages - Page 2"> + <track id="116" tid="1">01-We who are not as others</track> + <track id="117" tid="2">02-Humans</track> + <track id="118" tid="3">03-In the shadows</track> + <track id="119" tid="4">04-Mathmatical Probability</track> + <track id="120" tid="5">05-Greys</track> + <track id="121" tid="6">06-Pegasus 51</track> + <track id="122" tid="7">07-!$^^$%</track> + <track id="123" tid="8">08-Wormholes</track> + <track id="124" tid="9">09-Dauntless</track> + </album> + <album aid="14" title="Two Pages Reinterpretations"> + <track id="125" tid="1">01-Planetaria (Hefner Remix)</track> + <track id="126" tid="2">02-We Who Are Not As Others (Jazzaova Version)</track> + <track id="127" tid="3">03-Mathematical Probability (Mustang Remix)</track> + <track id="128" tid="4">04-Escape That (New Sector Movements Selekshan 2 Sector Rub Remix)</track> + <track id="129" tid="5">05-Escape That (Off-World Remix)</track> + <track id="130" tid="6">06-Dauntless (Restless Soul South Pacific Remix)</track> + <track id="131" tid="7">07-Star Chasers (Masters at Work Main Mix)</track> + <track id="132" tid="8">08-Star Chasers (Azymuth Remix)</track> + <track id="133" tid="9">09-The Action (Shawn J Period Remix)</track> + <track id="134" tid="10">10-We Who Are Not As Others (Alpha Omega Remix)</track> + <track id="135" tid="11">11-We Who Are Not As Others (Sonar Circle Remix)</track> + </group> + <group name="4 Non Blondes"> + </album> + <album aid="15" title="4 Non Blondes"> + <track id="136" tid="1">01 - Train</track> + <track id="137" tid="2">02 - Superfly</track> + <track id="138" tid="3">03 - What's Up</track> + <track id="139" tid="4">04 - Pleasantly Blue</track> + <track id="140" tid="5">05 - Morphin & Chocolate</track> + <track id="141" tid="6">06 - Spaceman</track> + <track id="142" tid="7">07 - Old Mr. Heffer</track> + <track id="143" tid="8">08 - Calling All The People</track> + <track id="144" tid="9">09 - Dear Mr. President</track> + <track id="145" tid="10">10 - Drifting</track> + <track id="146" tid="11">11 - No Place Like Home</track> + </group> + <group name="90125"> + </album> + <album aid="16" title="90125"> + <track id="147" tid="1">01 - Owner Of A Lonely Heart</track> + <track id="148" tid="2">02 - Hold On</track> + <track id="149" tid="3">03 - It Can Happen</track> + <track id="150" tid="4">04 - Changes</track> + <track id="151" tid="5">05 - Cinema</track> + <track id="152" tid="6">06 - Leave It</track> + <track id="153" tid="7">07 - Our Song</track> + <track id="154" tid="8">08 - City Of Love</track> + <track id="155" tid="9">09 - Hearts</track> + </group> + <group name="A"> + </album> + <album aid="17" title="A vs Monkey Kong"> + <track id="156" tid="1">01 - For Starters</track> + <track id="157" tid="2">02 - Monkey Kong</track> + <track id="158" tid="3">03 - A</track> + <track id="159" tid="4">04 - Old Folks</track> + <track id="160" tid="5">05 - Hopper Jonnus Fang</track> + <track id="161" tid="6">06 - Summer On The Underground</track> + <track id="162" tid="7">07 - Warning</track> + <track id="163" tid="8">08 - If It Ain't Broke Fix It Anyway</track> + <track id="164" tid="9">09 - I Love Lake Tahoe</track> + <track id="165" tid="10">10 - Don't Be Punks</track> + <track id="166" tid="11">11 - Down On The Floor</track> + <track id="167" tid="12">12 - Jason's Addiction</track> + <track id="168" tid="13">13 - Miles Away</track> + <track id="169" tid="14">14 - Getting Around</track> + </group> + <group name="A Guy Called Gerald"> + </album> + <album aid="18" title="Essence"> + <track id="170" tid="1">01-The Universe-A Guy Called Gerald</track> + <track id="171" tid="2">02-The First Breath-A Guy Called Gerald</track> + <track id="172" tid="3">03-Humanity-A Guy Called Gerald</track> + <track id="173" tid="4">04-Multiplies-A Guy Called Gerald</track> + <track id="174" tid="5">05-Fever (Or a Flame)-A Guy Called Gerald</track> + <track id="175" tid="6">06-Could you Understand-A Guy Called Gerald</track> + <track id="176" tid="7">07-Alien Report-A Guy Called Gerald</track> + <track id="177" tid="8">08-Glow-A Guy Called Gerald</track> + <track id="178" tid="9">09-Beaches & Deserts-A Guy Called Gerald</track> + <track id="179" tid="10">10-Final Call-A Guy Called Gerald</track> + <track id="180" tid="11">11-I Make It-A Guy Called Gerald</track> + <track id="181" tid="12">12-Universal Spirit-A Guy Called Gerald</track> + <track id="182" tid="13">13-Hurry To Go Easy-A Guy Called Gerald</track> + <track id="183" tid="14">14-Scale Circle-A Guy Called Gerald</track> + <track id="184" tid="15">15-Landed-A Guy Called Gerald</track> + </group> + <group name="A Teens"> + </album> + <album aid="19" title="The ABBA Generation"> + <track id="185" tid="1">01 A Teens - Mamma Mia</track> + <track id="186" tid="2">03 A Teens - Super Trouper</track> + <track id="187" tid="3">02 A Teens - gimme gimme gimme (a man after midnight)</track> + <track id="188" tid="4">04 A Teens - One of us</track> + <track id="189" tid="5">05 A Teens - Voulez vous</track> + <track id="190" tid="6">06 A Teens - SOS</track> + <track id="191" tid="7">07 A Teens - Dancing Queen</track> + <track id="192" tid="8">08 A Teens - Take a chance on me</track> + <track id="193" tid="9">09 A Teens - Lay all your love on me</track> + <track id="194" tid="10">10 A Teens - The name of the game</track> + <track id="195" tid="11">11 ATeens - Our last summer</track> + </group> + <group name="a-ha"> + </album> + <album aid="20" title="Headlines and Deadlines"> + <track id="196" tid="1">01 - Take On Me</track> + <track id="197" tid="2">02 - Cry Wolf</track> + <track id="198" tid="3">03 - Touchy</track> + <track id="199" tid="4">04 - You Are The One</track> + <track id="200" tid="5">05 - Manhattan Skyline</track> + <track id="201" tid="6">06 - The Blood That Moves The Body</track> + <track id="202" tid="7">07 - Early Morning</track> + <track id="203" tid="8">08 - Hunting High And Low</track> + <track id="204" tid="9">09 - Move To Memphis</track> + <track id="205" tid="10">10 - I've Been Losing You</track> + <track id="206" tid="11">11 - The Living Daylights</track> + <track id="207" tid="12">12 - Crying In The Rain</track> + <track id="208" tid="13">13 - I Call Your Name</track> + <track id="209" tid="14">14 - Stay On These Roads</track> + <track id="210" tid="15">15 - Train Of Thought</track> + <track id="211" tid="16">16 - The Sun Always Shines On TV</track> + </album> + <album aid="21" title="hunting high and low"> + <track id="212" tid="1">01 - Take on me</track> + <track id="213" tid="2">02 - Train of Thought</track> + <track id="214" tid="3">03 - Hunting High and Low</track> + <track id="215" tid="4">04 - The Blue Sky</track> + <track id="216" tid="5">05 - Living a Boy's Adventure Tale </track> + <track id="217" tid="6">06 - The Sun Always Shines On TV</track> + <track id="218" tid="7">07 - And You Tell Me</track> + <track id="219" tid="8">08 - Love Is Reason</track> + <track id="220" tid="9">09 - I Dream Myself Alive</track> + <track id="221" tid="10">10 - Here I Stand and Face the Rain</track> + </album> + <album aid="22" title="Minor Earth Major Sky"> + <track id="222" tid="1">01 - minor earth major sky</track> + <track id="223" tid="2">02 - little black heart</track> + <track id="224" tid="3">03 - velvet</track> + <track id="225" tid="4">04 - summer moved on</track> + <track id="226" tid="5">05 - the sun never shone that day</track> + <track id="227" tid="6">06 - to let you win</track> + <track id="228" tid="7">07 - the company man</track> + <track id="229" tid="8">08 - thought that it was you</track> + <track id="230" tid="9">09 - i wish i cared</track> + <track id="231" tid="10">10 - barely hanging on</track> + <track id="232" tid="11">11 - you will never get over me</track> + <track id="233" tid="12">12 - i wont forget here</track> + <track id="234" tid="13">13 - mary ellen makes the moment count</track> + </group> + <group name="ABBA"> + </album> + <album aid="23" title="Gold"> + <track id="235" tid="1">01 - Dancing Queen</track> + <track id="236" tid="2">02 - Knowing Me, Knowing You</track> + <track id="237" tid="3">03 - Take A Chance On Me</track> + <track id="238" tid="4">04 - Mamma Mia</track> + <track id="239" tid="5">05 - Lay All Your Love On Me</track> + <track id="240" tid="6">06 - Super Trouper</track> + <track id="241" tid="7">07 - I Have A Dream</track> + <track id="242" tid="8">08 - The Winner Takes It All</track> + <track id="243" tid="9">09 - Money, Money, Money</track> + <track id="244" tid="10">10 - S.O.S</track> + <track id="245" tid="11">11 - Chiquitita</track> + <track id="246" tid="12">12 - Fernando</track> + <track id="247" tid="13">13 - Voulez Vous</track> + <track id="248" tid="14">14 - Gimme! Gimme! Gimme!</track> + <track id="249" tid="15">15 - Does Your Mother Know</track> + <track id="250" tid="16">16 - One Of Us</track> + <track id="251" tid="17">17 - The Name Of The Game</track> + <track id="252" tid="18">18 - Thank You For The Musik</track> + <track id="253" tid="19">19 - Waterloo</track> + </album> + <album aid="24" title="Golden Stars"> + <track id="254" tid="1">01 - Waterloo</track> + <track id="255" tid="2">02 - Honey, Honey</track> + <track id="256" tid="3">03 - So long</track> + <track id="257" tid="4">04 - I do</track> + <track id="258" tid="5">05 - SOS</track> + <track id="259" tid="6">06 - Mamma mia</track> + <track id="260" tid="7">07 - Fernando</track> + <track id="261" tid="8">09 - Money, Money, Money</track> + <track id="262" tid="9">10 - The name of the game</track> + <track id="263" tid="10">11 - Take a chance on me</track> + <track id="264" tid="11">12 - Chiquitita</track> + <track id="265" tid="12">13 - I have a dream</track> + <track id="266" tid="13">14 - The winner takes it all</track> + <track id="267" tid="14">15 - Super trouper</track> + <track id="268" tid="15">16 - Thank you for the music</track> + </album> + <album aid="25" title="More Gold"> + <track id="269" tid="1">01 - Summer Night City</track> + <track id="270" tid="2">02 - Angeleyes</track> + <track id="271" tid="3">03 - The Day Before You Came</track> + <track id="272" tid="4">04 - Eagle</track> + <track id="273" tid="5">05 - I Do, I Do, I Do, I Do, I Do</track> + <track id="274" tid="6">06 - So Long</track> + <track id="275" tid="7">07 - Honey Honey</track> + <track id="276" tid="8">08 - The Visitors</track> + <track id="277" tid="9">09 - Our Last Summer</track> + <track id="278" tid="10">10 - On & On</track> + <track id="279" tid="11">11 - Ring Ring</track> + <track id="280" tid="12">12 - I Wonder</track> + <track id="281" tid="13">13 - Lovelight</track> + <track id="282" tid="14">14 - Head Over Heels</track> + <track id="283" tid="15">15 - When I Kissed The Teacher</track> + <track id="284" tid="16">16 - I Am The City</track> + <track id="285" tid="17">17 - Cassandra</track> + <track id="286" tid="18">18 - Under Attack</track> + <track id="287" tid="19">19 - When All Is Said And Done</track> + <track id="288" tid="20">20 - The Way Old Friends Do</track> + </album> + <album aid="26" title="The Complete Single Collection|CD1"> + <track id="289" tid="1">01 - People Need Love</track> + <track id="290" tid="2">02 - Ring Ring</track> + <track id="291" tid="3">03 - Waterloo</track> + <track id="292" tid="4">04 - Waterloo (German Version) </track> + <track id="293" tid="5">05 - Honey Honey</track> + <track id="294" tid="6">06 - So Long</track> + <track id="295" tid="7">07 - I Do, I Do, I Do, I Do, I Do</track> + <track id="296" tid="8">08 - S.O.S</track> + <track id="297" tid="9">09 - Mamma Mia</track> + <track id="298" tid="10">10 - Fernando</track> + <track id="299" tid="11">11 - Dancing Queen</track> + <track id="300" tid="12">12 - Money, Money, Money</track> + <track id="301" tid="13">13 - Knowing Me, Knowing You</track> + <track id="302" tid="14">14 - The Name Of The Game</track> + <track id="303" tid="15">15 - Take A Chance On Me</track> + <track id="304" tid="16">16 - Eagle</track> + <track id="305" tid="17">17 - Thank You For The Music</track> + <track id="306" tid="18">18 - Summer Night City</track> + </album> + <album aid="27" title="The Complete Single Collection|CD2"> + <track id="307" tid="1">01 - Chiquitita</track> + <track id="308" tid="2">02 - Does Your Mother Know</track> + <track id="309" tid="3">03 - Voulez-Vous</track> + <track id="310" tid="4">04 - Gimme! Gimme! Gimme! (A Man After Midnight)</track> + <track id="311" tid="5">05 - I Have A Dream</track> + <track id="312" tid="6">06 - The Winner Takes It All</track> + <track id="313" tid="7">07 - Super Trouper</track> + <track id="314" tid="8">08 - Lay All Your Love On Me</track> + <track id="315" tid="9">09 - One Of Us</track> + <track id="316" tid="10">10 - Head Over Heels</track> + <track id="317" tid="11">11 - The Day Before You Came</track> + <track id="318" tid="12">12 - Under Attack</track> + <track id="319" tid="13">13 - Ring Ring (German Version)</track> + <track id="320" tid="14">14 - Happy New Year</track> + <track id="321" tid="15">15 - Wer Im Wartesaal Der Liebe Steht</track> + </group> + <group name="Absolute Beginner"> + </album> + <album aid="28" title="Bamboole"> + <track id="322" tid="1">01. Absolute Beginner - Das Boot</track> + <track id="323" tid="2">02. Absolute Beginner - Hammerhart</track> + <track id="324" tid="3">03. Absolute Beginner - Rock On</track> + <track id="325" tid="4">04. Absolute Beginner - Liebeslied</track> + <track id="326" tid="5">05. Absolute Beginner - Füchse</track> + <track id="327" tid="6">06. Absolute Beginner - Fahr'n</track> + <track id="328" tid="7">07. Absolute Beginner - Showmaster</track> + <track id="329" tid="8">08. Absolute Beginner - Geht Was</track> + <track id="330" tid="9">09. Absolute Beginner - Geh bitte</track> + <track id="331" tid="10">10. Absolute Beginner - Nie Nett</track> + <track id="332" tid="11">11. Absolute Beginner - Mikro in der Hand</track> + <track id="333" tid="12">12. Absolute Beginner - Nicht Allein</track> + <track id="334" tid="13">5Sterne Delux - Dein Herz schlägt schneller</track> + </group> + <group name="Abwaerts"> + </album> + <album aid="29" title="Hurra"> + <track id="335" tid="1">01-Zonenzombie</track> + <track id="336" tid="2">02-Papier</track> + <track id="337" tid="3">03-Friss den Stahl</track> + <track id="338" tid="4">04-Charly</track> + <track id="339" tid="5">05-Die Ballade von Karl Arsch</track> + <track id="340" tid="6">06-Europa</track> + <track id="341" tid="7">07-Terror und Schrott</track> + <track id="342" tid="8">08-Küss mich</track> + <track id="343" tid="9">09-Weit daneben gepisst</track> + <track id="344" tid="10">10-Welt voll Harmonie</track> + <track id="345" tid="11">11-Die Zeit</track> + <track id="346" tid="12">12-Unfall</track> + <track id="347" tid="13">13-Ich und die Wirklichkeit</track> + <track id="348" tid="14">14Die Reise</track> + </group> + <group name="AC-DC"> + </album> + <album aid="30" title="The Best"> + <track id="349" tid="1">01 AC-DC - Riff Raff</track> + <track id="350" tid="2">02 AC-DC - Let There Be Rock</track> + <track id="351" tid="3">03 AC-DC - Whole Lotta Rosie</track> + <track id="352" tid="4">04 AC-DC - Sin City</track> + <track id="353" tid="5">05 AC-DC - Dirty Deeds Done Dirt Cheap</track> + <track id="354" tid="6">06 AC-DC - Baby Please Don't Go</track> + <track id="355" tid="7">07 AC-DC - Big Balls</track> + <track id="356" tid="8">08 AC-DC - Walk All Over You</track> + <track id="357" tid="9">09 AC-DC - Hard As Rock</track> + <track id="358" tid="10">10 AC-DC - Hells Bells</track> + <track id="359" tid="11">11 AC-DC - What Next To The Moon</track> + <track id="360" tid="12">12 AC-DC - Shake Your Foundations</track> + <track id="361" tid="13">13 AC-DC - Gone Shooting</track> + <track id="362" tid="14">14 AC-DC - Thunderstuck</track> + </group> + <group name="Ace of Base"> + </album> + <album aid="31" title="Flowers"> + <track id="363" tid="1">01 - Life Is A Flower</track> + <track id="364" tid="2">02 - Always Have, Always Will</track> + <track id="365" tid="3">03 - Cruel Summer</track> + <track id="366" tid="4">04 - Travel To Romantis</track> + <track id="367" tid="5">05 - Adventures In Paradise</track> + <track id="368" tid="6">06 - Dr. Sun</track> + <track id="369" tid="7">07 - Cecilia</track> + <track id="370" tid="8">08 - He Decides</track> + <track id="371" tid="9">09 - I Pray</track> + <track id="372" tid="10">10 - Tokyo Girl</track> + <track id="373" tid="11">11 - Don't Go Away</track> + <track id="374" tid="12">12 - Captain Nemo</track> + <track id="375" tid="13">13 - Donnie</track> + <track id="376" tid="14">14 - Cruel Summer (Big Bonus Mix)</track> + </album> + <album aid="32" title="Happy Nation"> + <track id="377" tid="1">01 - Voules-Vous Dancer</track> + <track id="378" tid="2">02 - All That She Wants</track> + <track id="379" tid="3">03 - Münchhausen (Just Chaos)</track> + <track id="380" tid="4">04 - Happy Nation</track> + <track id="381" tid="5">05 - Waiting For Magic</track> + <track id="382" tid="6">06 - Fashion Party</track> + <track id="383" tid="7">07 - Wheel Of Fortune</track> + <track id="384" tid="8">08 - Dancer In A Daydream</track> + <track id="385" tid="9">09 - My Mind -Mindles Mix-</track> + <track id="386" tid="10">10 - W.O.F. -Original Club Mix-</track> + <track id="387" tid="11">11 - Dimension Of Depth</track> + <track id="388" tid="12">12 - Young And Proud</track> + <track id="389" tid="13">13 - A.T.S.W. -Banghra Version-</track> + </album> + <album aid="33" title="The Sign (Maxi-CD)"> + <track id="390" tid="1">01 - The sign (radio edit)</track> + <track id="391" tid="2">02 - The sign (long version)</track> + </group> + <group name="Achim Reichel"> + </album> + <album aid="34" title="Melancholie und Sturmflut"> + <track id="392" tid="1">01 - Made in Paradise</track> + <track id="393" tid="2">02 - Auf der Rolltreppe</track> + <track id="394" tid="3">03 - Kuddel Daddel Du</track> + <track id="395" tid="4">04 - Die Zauberin</track> + <track id="396" tid="5">06 - Sturmflut</track> + <track id="397" tid="6">07 - Robert der Roboter</track> + <track id="398" tid="7">08 - Melancholie</track> + <track id="399" tid="8">09 - Karawane ins Glück</track> + <track id="400" tid="9">10 - Das Lied von Susi und Johnny</track> + <track id="401" tid="10">11 - Mein Herz ist ein Ufo</track> + </group> + <group name="Acid Scout"> + </album> + <album aid="35" title="Safari"> + <track id="402" tid="1">01 - acid marathon 1</track> + <track id="403" tid="2">02 - acid marathon 2</track> + <track id="404" tid="3">03 - acid marathon 3</track> + <track id="405" tid="4">04 - washaa</track> + <track id="406" tid="5">05 - acid marathon 4</track> + <track id="407" tid="6">06 - jing jang</track> + <track id="408" tid="7">07 - in front of da outland</track> + <track id="409" tid="8">08 - mondonon</track> + <track id="410" tid="9">09 - clock seven</track> + <track id="411" tid="10">10 - 4 degrees</track> + <track id="412" tid="11">11 - balance</track> + <track id="413" tid="12">12 - + + + acid</track> + </group> + <group name="Adam F"> + </album> + <album aid="36" title="Colours"> + <track id="414" tid="1">01 - Intro</track> + <track id="415" tid="2">02 - 73</track> + <track id="416" tid="3">03 - Metropolis</track> + <track id="417" tid="4">04 - Music in my Mind</track> + <track id="418" tid="5">05 - Jaxx</track> + <track id="419" tid="6">06 - Mother Death</track> + <track id="420" tid="7">07 - The Tree Knows Everything</track> + <track id="421" tid="8">08 - Circles</track> + <track id="422" tid="9">09 - Dirty Happy</track> + <track id="423" tid="10">10 - F-Jam</track> + <track id="424" tid="11">11 - Colours</track> + <track id="425" tid="12">12 - Aromatherapy</track> + </group> + <group name="Adoniran Barbosa"> + </album> + <album aid="37" title="Meus Momentos"> + <track id="426" tid="1">01 - Tiro Ao lvaro</track> + <track id="427" tid="2">02 - Iracema</track> + <track id="428" tid="3">03 - Trem Das Onze</track> + <track id="429" tid="4">04 - Saudosa Maloca</track> + <track id="430" tid="5">05 - O Samba Do Arnesto</track> + <track id="431" tid="6">06 - Torresmo Milanesa</track> + <track id="432" tid="7">07 - Viaduto Santa Efig nia</track> + <track id="433" tid="8">08 - Bom Dia Tristeza</track> + <track id="434" tid="9">09 - As Mariposas</track> + <track id="435" tid="10">10 - Despejo Na Favela</track> + <track id="436" tid="11">11 - Ag enta a M o, Jo o</track> + <track id="437" tid="12">12 - Vide Verso Meu Endere o</track> + <track id="438" tid="13">13 - Acende O Candieiro</track> + <track id="439" tid="14">14 - No Morro Da Casa Verde</track> + <track id="440" tid="15">15 - Vila Esperan a</track> + <track id="441" tid="16">16 - Fica Mais Um Pouco Amor</track> + <track id="442" tid="17">17 - Apaga O Fogo Man </track> + </group> + <group name="Adriana Calcanhoto"> + </album> + <album aid="38" title="A F brica Do Poema"> + <track id="443" tid="1">01 - Por que voc faz cinema-</track> + <track id="444" tid="2">02 - A f brica do Poema</track> + <track id="445" tid="3">03 - Bagatelas</track> + <track id="446" tid="4">04 - Metade</track> + <track id="447" tid="5">05 - Sudoeste</track> + <track id="448" tid="6">06 - O verme e a estrela</track> + <track id="449" tid="7">07 - Estrelas</track> + <track id="450" tid="8">08 - Aconteceu</track> + <track id="451" tid="9">09 - Cariocas</track> + <track id="452" tid="10">10 - Morro dois irm os</track> + <track id="453" tid="11">11 - Inverno</track> + <track id="454" tid="12">12 - Roleta russa</track> + <track id="455" tid="13">13 - Tema de Alice</track> + <track id="456" tid="14">14 - Portrait of Gertrude</track> + <track id="457" tid="15">15 - Minha m sica</track> + </group> + <group name="Aerosmith"> + </album> + <album aid="39" title="Get a Grip"> + <track id="458" tid="1">Amazing</track> + <track id="459" tid="2">Boogie Man</track> + <track id="460" tid="3">Can't Stop Messin'</track> + <track id="461" tid="4">Crazy</track> + <track id="462" tid="5">Cryin'</track> + <track id="463" tid="6">Eat the Rich</track> + <track id="464" tid="7">Fever</track> + <track id="465" tid="8">Flesh</track> + <track id="466" tid="9">Get a Grip</track> + <track id="467" tid="10">Gotta Love It</track> + <track id="468" tid="11">Intro</track> + <track id="469" tid="12">Line Up</track> + <track id="470" tid="13">Livin' on the Edge</track> + <track id="471" tid="14">Shut Up And Dance</track> + <track id="472" tid="15">Walk On Down</track> + </album> + <album aid="40" title="Nine Lives"> + <track id="473" tid="1">01 - Nine Lives</track> + <track id="474" tid="2">02 - Falling In Love</track> + <track id="475" tid="3">03 - Hole In My Soul</track> + <track id="476" tid="4">04 - Taste Of India</track> + <track id="477" tid="5">05 - Full Circle</track> + <track id="478" tid="6">06 - Something's Gotta Give</track> + <track id="479" tid="7">07 - Ain't That A Bitch</track> + <track id="480" tid="8">08 - Take Me To The Farm</track> + <track id="481" tid="9">09 - Crash</track> + <track id="482" tid="10">10 - Kiss Your Past Good-bye</track> + <track id="483" tid="11">11 - Pink</track> + <track id="484" tid="12">12 - Falling Off</track> + <track id="485" tid="13">13 - Attitude Adjustment</track> + </group> + <group name="Afro Cuban All Stars"> + </album> + <album aid="41" title="A Toda Cuba le Gusta"> + <track id="486" tid="1">01 - Amor Verdadero</track> + <track id="487" tid="2">02 - Alto Songo</track> + <track id="488" tid="3">03 - Habana Del Este</track> + <track id="489" tid="4">04 - A Toda Cuba Le Gusta</track> + <track id="490" tid="5">05 - Fiesta de la Rumba</track> + <track id="491" tid="6">06 - Los Sitio' Asere</track> + <track id="492" tid="7">07 - Pio Mentiroso</track> + <track id="493" tid="8">08 - Maria Caracoles</track> + <track id="494" tid="9">09 - Clasiqueando con Ruben</track> + <track id="495" tid="10">10 - Elube Chango</track> + </group> + <group name="AG Geige"> + </album> + <album aid="42" title="Trickbeat"> + <track id="496" tid="1">01 - Das Möbiusband - Zeychen und Wunder</track> + <track id="497" tid="2">02 - Triebwerk</track> + <track id="498" tid="3">03 - Felix</track> + <track id="499" tid="4">04 - Kosmonauten</track> + <track id="500" tid="5">05 - Fingerwalze</track> + <track id="501" tid="6">06 - So sollte es nicht sein!</track> + <track id="502" tid="7">07 - Küchenlied</track> + <track id="503" tid="8">08 - Das Scheusal</track> + <track id="504" tid="9">09 - Déjā vu (Snap Mix #2)</track> + <track id="505" tid="10">10 - Hasensong</track> + <track id="506" tid="11">11 - Schöner leben</track> + <track id="507" tid="12">12 - Rohleder's</track> + <track id="508" tid="13">13 - Maximale Gier</track> + <track id="509" tid="14">14 - Nach Hause (instr.)</track> + <track id="510" tid="15">15 - Gesichter</track> + <track id="511" tid="16">16 - Stadt-Fisch</track> + </group> + <group name="aim"> + </album> + <album aid="43" title="Cold Water Music"> + <track id="512" tid="1">01-Intro</track> + <track id="513" tid="2">02-Cold Water Music</track> + <track id="514" tid="3">03-The Force</track> + <track id="515" tid="4">04-Sail</track> + <track id="516" tid="5">05-Downstate</track> + <track id="517" tid="6">06-Ain't Got Time To Waste</track> + <track id="518" tid="7">07-Fat City (Interlude)</track> + <track id="519" tid="8">08-True To Hip Hop</track> + <track id="520" tid="9">09-Demonique</track> + <track id="521" tid="10">10-A Tree, A Rock And A Cloud</track> + <track id="522" tid="11">11-Journey To The End Of The Night</track> + <track id="523" tid="12">12-From Here To Fame</track> + </group> + <group name="Air"> + </album> + <album aid="44" title="Kelly watch the stars (Maxi)"> + <track id="524" tid="1">01 - Original mix</track> + <track id="525" tid="2">02 - Sexy boy</track> + <track id="526" tid="3">03 - Album version</track> + <track id="527" tid="4">04 - Remember</track> + </album> + <album aid="45" title="Moon Safari"> + <track id="528" tid="1">01 - La Femme D'Argent</track> + <track id="529" tid="2">02 - Sexy Boy</track> + <track id="530" tid="3">03 - All I Need</track> + <track id="531" tid="4">04 - Kelly Watch The Stars</track> + <track id="532" tid="5">05 - Talisman</track> + <track id="533" tid="6">06 - Remember</track> + <track id="534" tid="7">07 - You Make It Easy</track> + <track id="535" tid="8">08 - Ce Matin La</track> + <track id="536" tid="9">09 - New Star In The Sky</track> + <track id="537" tid="10">10 - Le Voyage De Pénélope</track> + </album> + <album aid="46" title="Premiers Symptomes"> + <track id="538" tid="1">01 - Modular Mix</track> + <track id="539" tid="2">02 - Casanova 70</track> + <track id="540" tid="3">03 - Les Professionnels</track> + <track id="541" tid="4">04 - J'ai dormi sous l'Eau</track> + <track id="542" tid="5">05 - Le Soleil est pres de Moi</track> + <track id="543" tid="6">06 - Californie</track> + <track id="544" tid="7">07 - Brakes On</track> + </album> + <album aid="47" title="The Virgin Suicides"> + <track id="545" tid="1">01 - playground love</track> + <track id="546" tid="2">02 - clouds up</track> + <track id="547" tid="3">03 - bathroom girl</track> + <track id="548" tid="4">04 - cemetary party</track> + <track id="549" tid="5">05 - dark messages</track> + <track id="550" tid="6">06 - the word 'hurricane'</track> + <track id="551" tid="7">07 - dirty trip</track> + <track id="552" tid="8">08 - highschool lover</track> + <track id="553" tid="9">09 - afternoon sister</track> + <track id="554" tid="10">10 - ghost song</track> + <track id="555" tid="11">11 - empty house</track> + <track id="556" tid="12">12 - dead bodies</track> + <track id="557" tid="13">13 - suicide underground</track> + </group> + <group name="Aktuell"> + </album> + <album aid="48" title="2000_03"> + <track id="558" tid="1">A Teens - Super Trouper</track> + <track id="559" tid="2">Aqua - Cartoon Heroes</track> + <track id="560" tid="3">Backstreet Boys - Show Me The Meaning Of Being Lonely</track> + <track id="561" tid="4">Bloodhound Gang - The Bad Touch</track> + <track id="562" tid="5">Die Toten Hosen - Unsterblich</track> + <track id="563" tid="6">Enrique Iglesias - Rhythm Divine</track> + <track id="564" tid="7">Highland - Bella Stella</track> + <track id="565" tid="8">HIM - Join me</track> + <track id="566" tid="9">Lene Marlin - Sitting Down Here</track> + <track id="567" tid="10">Madonna - American Pie</track> + <track id="568" tid="11">Marc Anthony - I Need To Know</track> + <track id="569" tid="12">Melanie C - Northern Star</track> + <track id="570" tid="13">Metallica - Nothing Else Matters</track> + <track id="571" tid="14">Modern Talking - China In Your Eyes (Ext.Version)</track> + <track id="572" tid="15">N'Sync - Bye Bye Bye</track> + <track id="573" tid="16">Natural Born Hippies - Am I Not Sweet</track> + <track id="574" tid="17">Oli.P - Niemals Mehr</track> + <track id="575" tid="18">Prezioso feat. Marvin- Tell Me Why</track> + <track id="576" tid="19">Santana - Maria Maria</track> + <track id="577" tid="20">Sash! - Adelante [Original Mix]</track> + <track id="578" tid="21">Stefan Raab - Wadde Hadde Dudde Da</track> + <track id="579" tid="22">Sting - Desert Rose</track> + <track id="580" tid="23">Thomas D. - Liebesbrief</track> + <track id="581" tid="24">Vengaboys - Shalala Lala</track> + <track id="582" tid="25">Yamboo - Come With Me</track> + </album> + <album aid="49" title="2000_06"> + <track id="583" tid="1">01_Blank & Jones - The Nightfly</track> + <track id="584" tid="2">02_Passion Fruit - Wonderland</track> + <track id="585" tid="3">03_GIGI D'AGOSTINO - The Riddle</track> + <track id="586" tid="4">04_Echt - Junimond</track> + <track id="587" tid="5">05_Bon Jovi - Itīs My Life</track> + <track id="588" tid="6">06_Backstreet Boys - The One</track> + <track id="589" tid="7">07_Venga Boys - Uncle John From Jamaica</track> + <track id="590" tid="8">08_GIGI D'AGOSTINO - Another Way</track> + <track id="591" tid="9">09_Ace Of Base - Hallo Hallo</track> + <track id="592" tid="10">10_Melanie C - Never Be The Same Again</track> + <track id="593" tid="11">11_Anton Aus Tirol Feat DJ Ötzi - Gemma Bier Trinken</track> + <track id="594" tid="12">12_Britney Spears - Oops I Did It Again</track> + <track id="595" tid="13">13_GIGI D'AGOSTINO - La Passion</track> + <track id="596" tid="14">14_Reamonn - Supergirl</track> + <track id="597" tid="15">15_John Davies - I Promised Myself</track> + <track id="598" tid="16">16_Fools Garden - Suzy</track> + <track id="599" tid="17">17_Bomfunk MC's - Freestyler</track> + <track id="600" tid="18">18_Die Toten Hosen - Bayern</track> + <track id="601" tid="19">19_Die Band Ohne Namen - Take My Heart</track> + </album> + <album aid="50" title="2000_08"> + <track id="602" tid="1">Anastacia - I'm Outta Love </track> + <track id="603" tid="2">Andreas Stenschke - Just When I Needed You Most</track> + <track id="604" tid="3">Antonia Feat. Sandra - ...Ich Bin Viel Schöner</track> + <track id="605" tid="4">Azuca - Este Chico (I Fall In Love With You) (Radio Mix)</track> + <track id="606" tid="5">Bastian Raagas - You Complete Me (Radio Dance Version)</track> + <track id="607" tid="6">Captain Jack - Only You</track> + <track id="608" tid="7">Celine Dion - I Want You To Need Me (Radio Edit)</track> + <track id="609" tid="8">Celine Dion - I Want You To Need Me (Thunderpuss Radio Mix)</track> + <track id="610" tid="9">Chayanne - Boom Boom (Spanglish Version)</track> + <track id="611" tid="10">Eskobar - Good Day For Dying (Radio Edit)</track> + <track id="612" tid="11">Hooverphonic - Mad About You (Radio Edit)</track> + <track id="613" tid="12">Madonna - Music (CD Version)</track> + <track id="614" tid="13">Monaco - Iīve Got A Feeling (Radio Edit)</track> + <track id="615" tid="14">Red Sector - Invasion Over Berlin (Short Energy Mix)</track> + <track id="616" tid="15">Senait - Aura (Radio Edit)</track> + <track id="617" tid="16">Sharon Williams - Life Is So Strong (Single Edit)</track> + <track id="618" tid="17">Sladdgo - Was Du Woll</track> + <track id="619" tid="18">Sonique - It Feels So Good</track> + <track id="620" tid="19">Sound Convoy - Hey Baby ( Radio Edit )</track> + <track id="621" tid="20">Verena - Ist das alles</track> + </album> + <album aid="51" title="2000_11"> + <track id="622" tid="1">Berger - Zeig mir Dein Gesicht</track> + <track id="623" tid="2">Britney Spears - Lucky</track> + <track id="624" tid="3">Darude - Sandstorm</track> + <track id="625" tid="4">Marque - Electronic Lady</track> + <track id="626" tid="5">Mel C - I Turn To You</track> + <track id="627" tid="6">Mr President - Upīn Away 2k</track> + <track id="628" tid="7">N Sync 02 - It's Gonna Be Me</track> + <track id="629" tid="8">Orange Blue - She's Got That Light</track> + <track id="630" tid="9">Rednex - Hold Me (For A While)</track> + <track id="631" tid="10">Rednex - The Spirit Of The Hawk</track> + <track id="632" tid="11">Ronan Keating - Life is a Rollercoaster</track> + <track id="633" tid="12">Sasha - Owner Of My Heart</track> + <track id="634" tid="13">Tic Tac Toe - Ich liebe Disch</track> + <track id="635" tid="14">Toploader - Dancing in the Moonlight</track> + <track id="636" tid="15">Vanessa Amorosi - Absolutely Everybody</track> + <track id="637" tid="16">Whitney Houston & Enrique Iglesias - Could I Have This Kiss Forever</track> + </group> + <group name="Al Bano & Romina Power"> + </album> + <album aid="52" title="Ihre großen Erfolge"> + <track id="638" tid="1">01 - Che Angelo Sei (Amore Mio)</track> + <track id="639" tid="2">02 - Tu Soltanto Tu (Mi Hai Fatto Innamorare)</track> + <track id="640" tid="3">03 - Ci Sara</track> + <track id="641" tid="4">04 - Imagini 77</track> + <track id="642" tid="5">05 - Canto Di Libertá</track> + <track id="643" tid="6">06 - Abbandonati</track> + <track id="644" tid="7">07 - Prima Notte Dīamore</track> + <track id="645" tid="8">08 - Sharazan</track> + <track id="646" tid="9">09 - Felicitá</track> + <track id="647" tid="10">10 - Meditando</track> + <track id="648" tid="11">11 - Caro Gesú</track> + <track id="649" tid="12">12 - E Fu Subito Amore</track> + <track id="650" tid="13">13 - Angeli</track> + <track id="651" tid="14">14 - Aria Pura</track> + <track id="652" tid="15">15 - Lo Ti Cerco</track> + <track id="653" tid="16">16 - Canzone Blu</track> + </group> + <group name="Alanis Morissette"> + </album> + <album aid="53" title="Jagged Little Pill"> + <track id="654" tid="1">01 - All I Really Want</track> + <track id="655" tid="2">02 - You Oughta Know</track> + <track id="656" tid="3">03 - Perfect</track> + <track id="657" tid="4">04 - Hand In My Pocket</track> + <track id="658" tid="5">05 - Right Through You</track> + <track id="659" tid="6">06 - Forgiven</track> + <track id="660" tid="7">07 - You Learn</track> + <track id="661" tid="8">08 - Head Over Feet</track> + <track id="662" tid="9">09 - Mary Jane</track> + <track id="663" tid="10">10 - Ironic</track> + <track id="664" tid="11">11 - Not the Doctor</track> + <track id="665" tid="12">12 - Wake Up</track> + <track id="666" tid="13">13 - You Oughta Know (remix)</track> + </album> + <album aid="54" title="MTV Unplugged"> + <track id="667" tid="1">01 - You Learn-1</track> + <track id="668" tid="2">01 - You Learn</track> + <track id="669" tid="3">02 - Joining You</track> + <track id="670" tid="4">03 - No Pressure Over Cappuccino</track> + <track id="671" tid="5">04 - That I Would Be Good</track> + <track id="672" tid="6">05 - Head Over Feet</track> + <track id="673" tid="7">06 - Princes Familiar</track> + <track id="674" tid="8">07 - I Was Hoping</track> + <track id="675" tid="9">08 - Ironic</track> + <track id="676" tid="10">09 - These R The Thoughts</track> + <track id="677" tid="11">10 - King Of Pain</track> + <track id="678" tid="12">11 - You Oughta Know</track> + <track id="679" tid="13">12 - Uninvited</track> + </album> + <album aid="55" title="Supposed Former Infatuation Junkie"> + <track id="680" tid="1">Alanis Morisette - 01 Front Row</track> + <track id="681" tid="2">Alanis Morisette - 02 Baba</track> + <track id="682" tid="3">Alanis Morisette - 03 Thank U</track> + <track id="683" tid="4">Alanis Morisette - 04 Are You Still Mad</track> + <track id="684" tid="5">Alanis Morisette - 05 Sympathetic Character</track> + <track id="685" tid="6">Alanis Morisette - 06 That I Would be Good</track> + <track id="686" tid="7">Alanis Morisette - 07 The Couch</track> + <track id="687" tid="8">Alanis Morisette - 08 Can't Not</track> + </group> + <group name="Alex Gopher"> + </album> + <album aid="56" title="You my Baby & I"> + <track id="688" tid="1">01 - Time</track> + <track id="689" tid="2">02 - Tryin'</track> + <track id="690" tid="3">03 - The Child</track> + <track id="691" tid="4">04 - Ralph & Kathy</track> + <track id="692" tid="5">05 - With U</track> + <track id="693" tid="6">06 - You, my Baby & I</track> + <track id="694" tid="7">07 - 06 10 98</track> + <track id="695" tid="8">08 - Party People</track> + <track id="696" tid="9">09 - Consolidated</track> + <track id="697" tid="10">10 - Quiet Storm</track> + </group> + <group name="Alex Reece"> + </album> + <album aid="57" title="So Far"> + <track id="698" tid="1">01 - Feel the Sunshine</track> + <track id="699" tid="2">02 - Jazz Master</track> + <track id="700" tid="3">03 - Intro 1</track> + <track id="701" tid="4">04 - Acid Lab</track> + <track id="702" tid="5">05 - Pulp Friction</track> + <track id="703" tid="6">06 - Candles</track> + <track id="704" tid="7">07 - Ibiza</track> + <track id="705" tid="8">08 - Intro 2</track> + <track id="706" tid="9">09 - Out of Time</track> + <track id="707" tid="10">10 - U R</track> + </group> + <group name="Alphaville"> + </album> + <album aid="58" title="First Harvest 1984-92"> + <track id="708" tid="1">01 - Big In Japan</track> + <track id="709" tid="2">02 - Sounds Like A Melody</track> + <track id="710" tid="3">03 - Sensations</track> + <track id="711" tid="4">04 - The Mysteries Of Love</track> + <track id="712" tid="5">05 - Lassie Come Home</track> + <track id="713" tid="6">06 - Jerusalem</track> + <track id="714" tid="7">07 - Dance With Me</track> + <track id="715" tid="8">08 - For A Million</track> + <track id="716" tid="9">09 - A Victory Of Love</track> + <track id="717" tid="10">10 - The Jet Set</track> + <track id="718" tid="11">11 - Red Rose</track> + <track id="719" tid="12">12 - Romeos</track> + <track id="720" tid="13">13 - Summer Rain</track> + <track id="721" tid="14">14 - Forever Young</track> + <track id="722" tid="15">15 - Big In Japan [Culture Mix]</track> + </album> + <album aid="59" title="Forever young"> + <track id="723" tid="1">A Victory Of Love</track> + <track id="724" tid="2">Big In Japan</track> + <track id="725" tid="3">Fallen Angel</track> + <track id="726" tid="4">Forever Young</track> + <track id="727" tid="5">In The Mood</track> + <track id="728" tid="6">Lies</track> + <track id="729" tid="7">Sounds Like A Melody</track> + <track id="730" tid="8">Summer In Berlin</track> + <track id="731" tid="9">The Jet Set</track> + <track id="732" tid="10">To Germany With Love</track> + </group> + <group name="Amanda Lear"> + </album> + <album aid="60" title="Super 20"> + <track id="733" tid="1">01 - Follow Me</track> + <track id="734" tid="2">02 - Gold</track> + <track id="735" tid="3">03 - Mother Look What They've Done To Me</track> + <track id="736" tid="4">04 - Run Baby Run</track> + <track id="737" tid="5">05 - Queen Of China Town</track> + <track id="738" tid="6">06 - The Sphinx</track> + <track id="739" tid="7">07 - Blood And Honey</track> + <track id="740" tid="8">08 - Fashion Pack</track> + <track id="741" tid="9">09 - Fabulous Lover Love Me</track> + <track id="742" tid="10">10 - Diamonds</track> + <track id="743" tid="11">11 - Egal</track> + <track id="744" tid="12">12 - Fever</track> + <track id="745" tid="13">13 - Never Trus A Pretty Face</track> + <track id="746" tid="14">14 - Alphabet</track> + <track id="747" tid="15">15 - Im A Photograph</track> + <track id="748" tid="16">16 - Blue Tango</track> + <track id="749" tid="17">17 - Tomorrow</track> + <track id="750" tid="18">18 - The Lady In Black</track> + <track id="751" tid="19">19 - I Need A Man</track> + <track id="752" tid="20">20 - Nymphomania</track> + </group> + <group name="Amanda Marshall"> + </album> + <album aid="61" title="Amanda Marshall"> + <track id="753" tid="1">01 - Let it rain</track> + <track id="754" tid="2">02 - Birmingham</track> + <track id="755" tid="3">03 - Fall from grace</track> + <track id="756" tid="4">04 - Dark Horse</track> + <track id="757" tid="5">05 - Beautiful goodbye</track> + <track id="758" tid="6">06 - Sitting on the top of the world</track> + <track id="759" tid="7">07 - Last exit to eden</track> + <track id="760" tid="8">08 - Trust me (This is love)</track> + <track id="761" tid="9">09 - Let's got lost</track> + <track id="762" tid="10">10 - Promises</track> + </album> + <album aid="62" title="Dark Horse (Maxi-CD)"> + <track id="763" tid="1">01 - Dark Horse</track> + <track id="764" tid="2">02 - Let It Rain</track> + <track id="765" tid="3">03 - Birmingham</track> + </album> + <album aid="63" title="Tuesday's child"> + <track id="766" tid="1">01 - Believe in you</track> + <track id="767" tid="2">02 - Love lift me</track> + <track id="768" tid="3">03 - Why don't you love me-</track> + <track id="769" tid="4">04 - Too little, too late</track> + <track id="770" tid="5">05 - If I didn't have you</track> + <track id="771" tid="6">06 - Ride</track> + <track id="772" tid="7">07 - Right here all along</track> + <track id="773" tid="8">08 - Wishful thinking</track> + <track id="774" tid="9">09 - Shades of grey</track> + <track id="775" tid="10">10 - Give up giving in</track> + <track id="776" tid="11">11 - Best of me</track> + <track id="777" tid="12">12 - Never said goodbye</track> + <track id="778" tid="13">13 - Out of bounds</track> + </group> + <group name="Amon Tobin"> + </album> + <album aid="64" title="Bricolage"> + <track id="779" tid="1">01 - Stoney Street</track> + <track id="780" tid="2">02 - Easy Muffin</track> + <track id="781" tid="3">03 - Yasawas</track> + <track id="782" tid="4">04 - Creatures</track> + <track id="783" tid="5">05 - Chomp Samba</track> + <track id="784" tid="6">06 - The New York Editor</track> + <track id="785" tid="7">07 - Defocus</track> + <track id="786" tid="8">08 - The Nasty</track> + <track id="787" tid="9">09 - Bitter & Twisted</track> + <track id="788" tid="10">10 - Wires & Snakes</track> + <track id="789" tid="11">11 - One Day In My Garden</track> + <track id="790" tid="12">12 - Dream Sequence</track> + <track id="791" tid="13">13 - One Small Step</track> + <track id="792" tid="14">14 - Mission</track> + </album> + <album aid="65" title="Supermodified"> + <track id="793" tid="1">01 - Get Your Snack On</track> + <track id="794" tid="2">02 - Four Ton Mantis</track> + <track id="795" tid="3">03 - Slowly</track> + <track id="796" tid="4">04 - Marine Machines</track> + <track id="797" tid="5">05 - Golfer vrs Boxer</track> + <track id="798" tid="6">06 - Deo</track> + <track id="799" tid="7">07 - Precursor (feat. Quadraceptor)</track> + <track id="800" tid="8">08 - Saboteur</track> + <track id="801" tid="9">09 - Chocolate Lovely</track> + <track id="802" tid="10">10 - Rhino Jockey</track> + <track id="803" tid="11">11 - Keepin' It Steel (The Anvil Track)</track> + <track id="804" tid="12">12 - Natureland</track> + </group> + <group name="Anastacia"> + </album> + <album aid="66" title="Not That Kind"> + <track id="805" tid="1">01 - Not That Kind</track> + <track id="806" tid="2">02 - I'm Outta Love</track> + <track id="807" tid="3">03 - Cowboys & Kisses</track> + <track id="808" tid="4">04 - Who's Gonna Stop The Rain</track> + <track id="809" tid="5">05 - Love Is Alive</track> + <track id="810" tid="6">06 - I Ask Of You</track> + <track id="811" tid="7">07 - Wishing Well</track> + <track id="812" tid="8">08 - Made For Lovin' You</track> + <track id="813" tid="9">09 - Black Roses</track> + <track id="814" tid="10">10 - Yo Trippin'</track> + <track id="815" tid="11">11 - One More Chance</track> + <track id="816" tid="12">12 - Some Old Story</track> + </group> + <group name="And One"> + </album> + <album aid="67" title="9.9.99"> + <track id="817" tid="1">01 - Get you closer</track> + <track id="818" tid="2">02 - Michael caine</track> + <track id="819" tid="3">03 - Evil boys</track> + <track id="820" tid="4">04 - Pimmelmann</track> + <track id="821" tid="5">05 - Und wieder</track> + <track id="822" tid="6">06 - Love & fingers</track> + <track id="823" tid="7">07 - Pray</track> + <track id="824" tid="8">08 - Men in uniform</track> + <track id="825" tid="9">09 - Hypnotize</track> + <track id="826" tid="10">10 - Der erste Schritt</track> + </album> + <album aid="68" title="Anguish"> + <track id="827" tid="1">01 - Devil airlines</track> + <track id="828" tid="2">02 - Second front</track> + <track id="829" tid="3">03 - Metalhammer</track> + <track id="830" tid="4">04 - Menschen</track> + <track id="831" tid="5">05 - And one</track> + <track id="832" tid="6">06 - Only one</track> + <track id="833" tid="7">07 - Crimetime</track> + <track id="834" tid="8">08 - Synthetik</track> + <track id="835" tid="9">09 - Geld</track> + <track id="836" tid="10">10 - Second voice</track> + <track id="837" tid="11">11 - Exit</track> + <track id="838" tid="12">12 - Anguish</track> + <track id="839" tid="13">13 - Deliverance</track> + <track id="840" tid="14">14 - Metalhammer (Heavy mix)</track> + </album> + <album aid="69" title="Get you closer (Maxi)"> + <track id="841" tid="1">01 - Get You Closer (Radio Mix)</track> + <track id="842" tid="2">02 - Get You Closer (Club Mix)</track> + <track id="843" tid="3">03 - Pimmelmann (Nixmix)</track> + </album> + <album aid="70" title="Ist"> + <track id="844" tid="1">01 - Ego</track> + <track id="845" tid="2">02 - Murder murder</track> + <track id="846" tid="3">03 - Driving with my darling</track> + <track id="847" tid="4">04 - The only guest</track> + <track id="848" tid="5">05 - Dein Duft</track> + <track id="849" tid="6">06 - It happend last night</track> + <track id="850" tid="7">07 - When the feet hurt</track> + <track id="851" tid="8">08 - The secret</track> + <track id="852" tid="9">09 - Fuer</track> + <track id="853" tid="10">10 - Second day</track> + <track id="854" tid="11">11 - Body nerv</track> + <track id="855" tid="12">12 - Take some more</track> + <track id="856" tid="13">13 - Deutschmaschine</track> + <track id="857" tid="14">14 - Heart of stone</track> + <track id="858" tid="15">15 - Ghama voodoo</track> + <track id="859" tid="16">16 - Bonus</track> + </album> + <album aid="71" title="Maschinenstuermer"> + <track id="860" tid="1">01 - Nachtschicht in der hassfabrik</track> + <track id="861" tid="2">02 - Teufel oder engel</track> + <track id="862" tid="3">03 - Klon mich lieber nicht!</track> + <track id="863" tid="4">04 - Maschinenstuermer</track> + <track id="864" tid="5">05 - Bedienungsanleitungen</track> + </album> + <album aid="72" title="Nordhausen"> + <track id="865" tid="1">01 - Und dafuer</track> + <track id="866" tid="2">02 - Sometimes</track> + <track id="867" tid="3">03 - Movie star</track> + <track id="868" tid="4">04 - Uns geht's gut</track> + <track id="869" tid="5">05 - My warrior</track> + <track id="870" tid="6">06 - Creatures</track> + <track id="871" tid="7">07 - Sweety sweety</track> + <track id="872" tid="8">08 - Schluss mit lustig</track> + <track id="873" tid="9">09 - Sitata tirulala</track> + <track id="874" tid="10">10 - Friends in heaven</track> + <track id="875" tid="11">11 - Mirror in your heart</track> + <track id="876" tid="12">12 - Nordhausen</track> + </album> + <album aid="73" title="Sometimes"> + <track id="877" tid="1">01 - Sometimes (Radio Edit)</track> + <track id="878" tid="2">02 - High (Bonus)</track> + <track id="879" tid="3">03 - White Doves (Bonus)</track> + <track id="880" tid="4">04 - Technoman (Live !)</track> + <track id="881" tid="5">05 - Sometimes (Instr.)</track> + <track id="882" tid="6">06 - Nordhausen (Album Mix)</track> + </album> + <album aid="74" title="Spot"> + <track id="883" tid="1">01 - Wild pain</track> + <track id="884" tid="2">02 - Life isnt easy in germany</track> + <track id="885" tid="3">03 - Consequence of time</track> + <track id="886" tid="4">04 - Spontanverkehr</track> + <track id="887" tid="5">05 - Friend of stars</track> + <track id="888" tid="6">06 - Hall of souls</track> + <track id="889" tid="7">07 - Recover you</track> + <track id="890" tid="8">08 - Der erste Stein</track> + <track id="891" tid="9">09 - Tanz der Arroganz</track> + <track id="892" tid="10">10 - The and</track> + <track id="893" tid="11">11 - Spot</track> + <track id="894" tid="12">41 - Wild pain (maxi)</track> + </album> + <album aid="75" title="Virgin Superstar"> + <track id="895" tid="1">01 - Virgin superstar</track> + <track id="896" tid="2">02 - Wasted</track> + <track id="897" tid="3">03 - You don't love me anymore</track> + <track id="898" tid="4">04 - Goodbye Germany</track> + <track id="899" tid="5">05 - Wet spot</track> + <track id="900" tid="6">06 - Panzer Mensch</track> + <track id="901" tid="7">07 - My story</track> + <track id="902" tid="8">08 - Life to lose</track> + <track id="903" tid="9">09 - Not the only one</track> + <track id="904" tid="10">10 - Don't need the drugs</track> + <track id="905" tid="11">11 - Mr Jenka</track> + </album> + <album aid="76" title="Wasted (Maxi)"> + <track id="906" tid="1">01 - Wasted (Radio Edit)</track> + <track id="907" tid="2">02 - Forever J (Bonus)</track> + <track id="908" tid="3">03 - Wasted (Naghavi Mix)</track> + <track id="909" tid="4">04 - Maschinenhimmel (Bonus)</track> + <track id="910" tid="5">05 - Lawrence Of Arabia (Bonus)</track> + </group> + <group name="Andrea Parker"> + </album> + <album aid="77" title="Andrea Parker"> + <track id="911" tid="1">01-Track 1</track> + <track id="912" tid="2">02-Track 2</track> + <track id="913" tid="3">03-Track 3</track> + <track id="914" tid="4">04-Track 4</track> + <track id="915" tid="5">05-Track 5</track> + <track id="916" tid="6">06-Track 6</track> + <track id="917" tid="7">07-Track 7</track> + <track id="918" tid="8">08-Track 8</track> + <track id="919" tid="9">09-Track 9</track> + <track id="920" tid="10">10-Track 10</track> + <track id="921" tid="11">11-Track 11</track> + <track id="922" tid="12">12-Track 12</track> + <track id="923" tid="13">13-Track 13</track> + <track id="924" tid="14">14-Track 14</track> + <track id="925" tid="15">15-Track 15</track> + <track id="926" tid="16">16-Track 16</track> + <track id="927" tid="17">17-Track 17</track> + <track id="928" tid="18">18-Track 18</track> + </group> + <group name="Andreas Dorau"> + </album> + <album aid="78" title="70 minuten musik ungeklaerter herkunft"> + <track id="929" tid="1">01 - lass uns brennen</track> + <track id="930" tid="2">02 - girls in love</track> + <track id="931" tid="3">03 - so ist das nun mal</track> + <track id="932" tid="4">04 - ab</track> + <track id="933" tid="5">05 - allein im park</track> + <track id="934" tid="6">06 - das weisst nur du</track> + <track id="935" tid="7">07 - du bist da</track> + <track id="936" tid="8">08 - blaumeise yvonne</track> + <track id="937" tid="9">09 - es ist nur der rauch</track> + <track id="938" tid="10">10 - in mich selbst verliebt</track> + <track id="939" tid="11">11 - wenn du menschen triffst</track> + <track id="940" tid="12">12 - das maedchen auf dem foto</track> + <track id="941" tid="13">13 - scheinzahm</track> + </album> + <album aid="79" title="girls in love (maxi)"> + <track id="942" tid="1">01 - girls in love (original version)</track> + <track id="943" tid="2">02 - girls in love (grungerman remix)</track> + <track id="944" tid="3">03 - girls in love (forever sweet remix)</track> + <track id="945" tid="4">04 - singen hoeren</track> + </album> + <album aid="80" title="girls in love - ich weiss es nicht"> + <track id="946" tid="1">01 - girls in love</track> + <track id="947" tid="2">02 - ich weiss es nicht (tegel a23)</track> + <track id="948" tid="3">03 - es ist nur der rauch</track> + <track id="949" tid="4">04 - ich weiss es nicht</track> + </album> + <album aid="81" title="so ist das nun mal (maxi)"> + <track id="950" tid="1">01 - so ist das nun mal</track> + <track id="951" tid="2">02 - linda</track> + <track id="952" tid="3">03 - so ist das nun mal (mike ink mix)</track> + <track id="953" tid="4">04 - so ist das nun mal (reinhard & tobias happy sundays mix)</track> + </group> + <group name="Angelo Branduardi"> + </album> + <album aid="82" title="Il dito e la luna"> + <track id="954" tid="1">01 - Il giocatore di biliardo</track> + <track id="955" tid="2">02 - La comica finale</track> + <track id="956" tid="3">03 - Il dito e la luna</track> + <track id="957" tid="4">04 - L'ultimo giorno del circo</track> + <track id="958" tid="5">05 - Per ogni matematico</track> + <track id="959" tid="6">06 - La parola ai mimi</track> + <track id="960" tid="7">07 - L'uso dell'amore</track> + <track id="961" tid="8">08 - Lamento di un uomo di neve</track> + <track id="962" tid="9">09 - La regola del filo a piombo</track> + <track id="963" tid="10">10 - Vita quotidana di uno spettro</track> + <track id="964" tid="11">11 - La leggenda del collezionista</track> + <track id="965" tid="12">12 - Confesso che ho vissuto</track> + </album> + <album aid="83" title="il ladro"> + <track id="966" tid="1">01 - il ladro</track> + <track id="967" tid="2">02 - Madame</track> + <track id="968" tid="3">03 - bella faccia</track> + <track id="969" tid="4">04 - uomini di passaggio</track> + <track id="970" tid="5">05 - Ballerina</track> + <track id="971" tid="6">06 - Amazzonia</track> + <track id="972" tid="7">07 - il bambino dei topi</track> + <track id="973" tid="8">08 - il tempo di partire</track> + <track id="974" tid="9">09 - il grido</track> + <track id="975" tid="10">10 - ai confini dell'asia</track> + <track id="976" tid="11">11 - Festa</track> + </album> + <album aid="84" title="L'infinitamente Piccolo"> + <track id="977" tid="1">01 - Il Cantico Delle Creature</track> + <track id="978" tid="2">02 - Il Sultano Di Babilonia E La Prostituta</track> + <track id="979" tid="3">03 - Il Lupo Di Gubbio</track> + <track id="980" tid="4">04 - Audite Poverelle</track> + <track id="981" tid="5">05 - Divina Commedia - Paradiso, Canto XI</track> + <track id="982" tid="6">06 - Il Trattato Dei Miracoli</track> + <track id="983" tid="7">07 - Nelle Paludi Di Venezia Francesco Si Fermō Per Pregare E Tutto Tacue</track> + <track id="984" tid="8">08 - La Regola</track> + <track id="985" tid="9">09 - La Predica Della Perfetta Letizia</track> + <track id="986" tid="10">10 - La Morte Di Francesco</track> + <track id="987" tid="11">11 - Salmo</track> + </group> + <group name="Anne Clark"> + </album> + <album aid="85" title="Joined up writting and The sitting room"> + <track id="988" tid="1">01 - Nothing at all</track> + <track id="989" tid="2">02 - Weltschmerz</track> + <track id="990" tid="3">03 - Killing time</track> + <track id="991" tid="4">04 - True love tales</track> + <track id="992" tid="5">05 - Self destruct</track> + <track id="993" tid="6">06 - Out darkness</track> + <track id="994" tid="7">07 - The sitting room</track> + <track id="995" tid="8">08 - Swimming</track> + <track id="996" tid="9">09 - An ordinary life</track> + <track id="997" tid="10">10 - Shades</track> + <track id="998" tid="11">11 - Short story</track> + <track id="999" tid="12">12 - The power game</track> + <track id="1000" tid="13">13 - All we have to be thankful for</track> + </album> + <album aid="86" title="Letter Of Thanks To A Friend"> + <track id="1001" tid="1">Letter Of Thanks To A Friend (club edit)</track> + <track id="1002" tid="2">Letter Of Thanks To A Friend (instrumental edit)</track> + <track id="1003" tid="3">Letter Of Thanks To A Friend (radio edit)</track> + </album> + <album aid="87" title="Our darkness (Remix '97)"> + <track id="1004" tid="1">01 - Hardfloor 97 Radio edit</track> + <track id="1005" tid="2">02 - Hardfloor 97 version</track> + <track id="1006" tid="3">03 - Total eclipse remix</track> + </album> + <album aid="88" title="Pressure Points"> + <track id="1007" tid="1">01 - Heaven</track> + <track id="1008" tid="2">02 - Red Sands</track> + <track id="1009" tid="3">03 - Alarm Call</track> + <track id="1010" tid="4">04 - Tide</track> + <track id="1011" tid="5">05 - The Interruption</track> + <track id="1012" tid="6">06 - The Power Game</track> + <track id="1013" tid="7">07 - World Without Warning</track> + <track id="1014" tid="8">08 - Bursting</track> + <track id="1015" tid="9">09 - Lovers Retreat</track> + </album> + <album aid="89" title="Promotion Copy"> + <track id="1016" tid="1">If I could</track> + <track id="1017" tid="2">Our Darkness-2</track> + <track id="1018" tid="3">Our Darkness</track> + </album> + <album aid="90" title="Psychometry"> + <track id="1019" tid="1">At Midnight</track> + <track id="1020" tid="2">Closed Circuit</track> + <track id="1021" tid="3">Come In</track> + <track id="1022" tid="4">Dedication</track> + <track id="1023" tid="5">Echoes Remain Forever</track> + <track id="1024" tid="6">Fragility</track> + <track id="1025" tid="7">Improvisation</track> + <track id="1026" tid="8">Interlude</track> + <track id="1027" tid="9">Journey By Night</track> + <track id="1028" tid="10">Killing Time</track> + <track id="1029" tid="11">So Quiet Here</track> + <track id="1030" tid="12">Swallow Song</track> + <track id="1031" tid="13">That We Have Been Here</track> + <track id="1032" tid="14">The Sitting Room</track> + <track id="1033" tid="15">The Spinning Turning Of The Summer Earth</track> + <track id="1034" tid="16">This Be The Verse</track> + <track id="1035" tid="17">Unstill Life</track> + <track id="1036" tid="18">Windmills Of Your Mind</track> + <track id="1037" tid="19">World Without Warning</track> + </album> + <album aid="91" title="RSVP (Live)"> + <track id="1038" tid="1">01 - Up</track> + <track id="1039" tid="2">02 - Homecoming</track> + <track id="1040" tid="3">03 - Red sands</track> + <track id="1041" tid="4">04 - The power game</track> + <track id="1042" tid="5">05 - Cane hill</track> + <track id="1043" tid="6">06 - Leaving</track> + <track id="1044" tid="7">07 - Heaven</track> + <track id="1045" tid="8">08 - The last emotion</track> + <track id="1046" tid="9">09 - Killing time</track> + <track id="1047" tid="10">10 - Wallies</track> + <track id="1048" tid="11">11 - Out darkness</track> + <track id="1049" tid="12">12 - Now</track> + <track id="1050" tid="13">13 - This be the verse</track> + <track id="1051" tid="14">14 - Sleeper in metropolis</track> + </album> + <album aid="92" title="the best of Anne Clark"> + <track id="1052" tid="1">01 - the sitting room</track> + <track id="1053" tid="2">02 - swimming</track> + <track id="1054" tid="3">03 - an ordinary live</track> + <track id="1055" tid="4">04 - shades</track> + <track id="1056" tid="5">06 - the power game</track> + <track id="1057" tid="6">07 - all we have to be thankful</track> + <track id="1058" tid="7">08 - contact</track> + <track id="1059" tid="8">09 - sleeper in metropolis</track> + <track id="1060" tid="9">10 - poem for a nuclear romance</track> + <track id="1061" tid="10">11 - wallies</track> + <track id="1062" tid="11">12 - the lovers audition</track> + <track id="1063" tid="12">13 - poets turmoil no 364</track> + <track id="1064" tid="13">14 - echoes remain forever</track> + <track id="1065" tid="14">15 - all night party</track> + <track id="1066" tid="15">16 - pandoras box</track> + <track id="1067" tid="16">17 - feel</track> + <track id="1068" tid="17">18 - the last emotion</track> + <track id="1069" tid="18">19 - nothing at all</track> + <track id="1070" tid="19">20 - true love tales</track> + <track id="1071" tid="20">21 - self destruct</track> + <track id="1072" tid="21">23 - weltschmerz</track> + <track id="1073" tid="22">24 - our darkness remix 12</track> + <track id="1074" tid="23">x0 - killing time</track> + <track id="1075" tid="24">y0 - for</track> + </album> + <album aid="93" title="To Love And Be Loved"> + <track id="1076" tid="1">Acropolis</track> + <track id="1077" tid="2">Athens</track> + <track id="1078" tid="3">Dream Made Real</track> + <track id="1079" tid="4">Elegy For A Lost Summer</track> + <track id="1080" tid="5">Letter Of Thanks To A Friend</track> + <track id="1081" tid="6">Mundesley Beach</track> + <track id="1082" tid="7">Painting</track> + <track id="1083" tid="8">The Healing</track> + <track id="1084" tid="9">The Key</track> + <track id="1085" tid="10">Virtuality</track> + </album> + <album aid="94" title="Wordprocessing"> + <track id="1086" tid="1">01 Anne Clark - Virtuality ( Global Youth Remix )</track> + <track id="1087" tid="2">02 Anne Clark - The Healing ( Aural Float Treatment )</track> + <track id="1088" tid="3">03 Anne Clark - Sleeper In Metropolis ( Hardfloor 97 Version )</track> + <track id="1089" tid="4">04 Anne Clark - Letter Of Thanks To A Friend ( Radi Mate Mix By Mouse On Mars )</track> + <track id="1090" tid="5">05 Anne Clark - Nida ( Saafi Bros. Remix )</track> + <track id="1091" tid="6">06 Anne Clark - Our Darkness ( Hardfloor 97 Version )</track> + <track id="1092" tid="7">07 Anne Clark - Homecoming ( Pascal F.E.O.S. Remix )</track> + <track id="1093" tid="8">08 Anne Clark - Sleeper In Metropolis ( Sleepers Revenge Mix by Sven Väth & Ralf Hildenbeutel )</track> + <track id="1094" tid="9">09 Anne Clark - Contact ( Contact 2017 Mix by the Mover )</track> + <track id="1095" tid="10">10 Anne Clark - Wallies ( Night Of The Hunter Remix By Juno Reactor )</track> + <track id="1096" tid="11">11 Anne Clark - Our Darkness ( Total Eclipse Remix )</track> + </group> + <group name="Anouk"> + </album> + <album aid="95" title="Nobodys wife (Maxi)"> + <track id="1097" tid="1">01 - Radio edit</track> + <track id="1098" tid="2">02 - Album version</track> + <track id="1099" tid="3">03 - Instrumental</track> + <track id="1100" tid="4">04 - It is a shame</track> + </group> + <group name="Anrufbeantworter"> + </album> + <album aid="96" title="comic"> + <track id="1101" tid="1">abe</track> + <track id="1102" tid="2">barney2</track> + <track id="1103" tid="3">barney3</track> + <track id="1104" tid="4">bart</track> + <track id="1105" tid="5">bfpvny</track> + <track id="1106" tid="6">bush</track> + <track id="1107" tid="7">cfuture</track> + <track id="1108" tid="8">duffy</track> + <track id="1109" tid="9">eckat</track> + <track id="1110" tid="10">fett</track> + <track id="1111" tid="11">feuerste</track> + <track id="1112" tid="12">homer</track> + <track id="1113" tid="13">homer2</track> + <track id="1114" tid="14">homer3</track> + <track id="1115" tid="15">homer4</track> + <track id="1116" tid="16">homer5</track> + <track id="1117" tid="17">krusty</track> + <track id="1118" tid="18">moe</track> + <track id="1119" tid="19">moe2</track> + <track id="1120" tid="20">nafzu</track> + <track id="1121" tid="21">ned</track> + <track id="1122" tid="22">nick</track> + <track id="1123" tid="23">prfsimon</track> + <track id="1124" tid="24">roehrich</track> + <track id="1125" tid="25">sexchat</track> + <track id="1126" tid="26">simpson</track> + <track id="1127" tid="27">spd</track> + <track id="1128" tid="28">spd2</track> + <track id="1129" tid="29">troymc</track> + </album> + <album aid="97" title="erotic"> + <track id="1130" tid="1">0190maen</track> + <track id="1131" tid="2">0190weib</track> + <track id="1132" tid="3">anonym</track> + <track id="1133" tid="4">bettdecke</track> + <track id="1134" tid="5">domina</track> + <track id="1135" tid="6">hotline</track> + <track id="1136" tid="7">otto</track> + <track id="1137" tid="8">peppig</track> + <track id="1138" tid="9">sexchat</track> + <track id="1139" tid="10">sexshop</track> + <track id="1140" tid="11">sigilive</track> + <track id="1141" tid="12">susi3</track> + <track id="1142" tid="13">telsex</track> + </album> + <album aid="98" title="misc"> + <track id="1143" tid="1">3_schritte</track> + <track id="1144" tid="2">abends</track> + <track id="1145" tid="3">ali</track> + <track id="1146" tid="4">anwalt</track> + <track id="1147" tid="5">baby</track> + <track id="1148" tid="6">bananen</track> + <track id="1149" tid="7">beichte</track> + <track id="1150" tid="8">bleib_ma_dran</track> + <track id="1151" tid="9">boehme</track> + <track id="1152" tid="10">butler</track> + <track id="1153" tid="11">f-prinzp</track> + <track id="1154" tid="12">franzoesisch</track> + <track id="1155" tid="13">friedhof</track> + <track id="1156" tid="14">geld</track> + <track id="1157" tid="15">genervt</track> + <track id="1158" tid="16">heller</track> + <track id="1159" tid="17">hengst</track> + <track id="1160" tid="18">horoskop</track> + <track id="1161" tid="19">hypnose</track> + <track id="1162" tid="20">indianer</track> + <track id="1163" tid="21">inkasso</track> + <track id="1164" tid="22">kind</track> + <track id="1165" tid="23">klh-ende</track> + <track id="1166" tid="24">klhradio</track> + <track id="1167" tid="25">kontonr</track> + <track id="1168" tid="26">lauter</track> + <track id="1169" tid="27">mallorca</track> + <track id="1170" tid="28">mamifix</track> + <track id="1171" tid="29">maschine</track> + <track id="1172" tid="30">maxmanu</track> + <track id="1173" tid="31">mensch</track> + <track id="1174" tid="32">mir</track> + <track id="1175" tid="33">mkp</track> + <track id="1176" tid="34">morgens</track> + <track id="1177" tid="35">nervoes</track> + <track id="1178" tid="36">omm</track> + <track id="1179" tid="37">polizei</track> + <track id="1180" tid="38">privater_anschiss</track> + <track id="1181" tid="39">rezept4</track> + <track id="1182" tid="40">talent</track> + <track id="1183" tid="41">toupet</track> + <track id="1184" tid="42">versteigerung</track> + <track id="1185" tid="43">werbung</track> + <track id="1186" tid="44">y2kfrau</track> + <track id="1187" tid="45">y2kmann</track> + </album> + <album aid="99" title="music"> + <track id="1188" tid="1">bayer</track> + <track id="1189" tid="2">beatles</track> + <track id="1190" tid="3">chanchan</track> + <track id="1191" tid="4">delasoul</track> + <track id="1192" tid="5">dtkuhn</track> + <track id="1193" tid="6">feschajaga</track> + <track id="1194" tid="7">george</track> + <track id="1195" tid="8">helge2</track> + <track id="1196" tid="9">howard</track> + <track id="1197" tid="10">kaktus</track> + <track id="1198" tid="11">mouskour</track> + <track id="1199" tid="12">python</track> + <track id="1200" tid="13">python2</track> + <track id="1201" tid="14">raab</track> + <track id="1202" tid="15">ringdong</track> + <track id="1203" tid="16">ruehmann</track> + <track id="1204" tid="17">schwein</track> + <track id="1205" tid="18">spice</track> + <track id="1206" tid="19">tmwywfm</track> + </album> + <album aid="100" title="office"> + <track id="1207" tid="1">12oder3</track> + <track id="1208" tid="2">24uhr</track> + <track id="1209" tid="3">anschlu2</track> + <track id="1210" tid="4">arabia</track> + <track id="1211" tid="5">assigned</track> + <track id="1212" tid="6">cutoff</track> + <track id="1213" tid="7">d1_1</track> + <track id="1214" tid="8">d2_3</track> + <track id="1215" tid="9">d2_4</track> + <track id="1216" tid="10">ende</track> + <track id="1217" tid="11">erreicht</track> + <track id="1218" tid="12">gehalten</track> + <track id="1219" tid="13">geschaltet</track> + <track id="1220" tid="14">importan</track> + <track id="1221" tid="15">interoute</track> + <track id="1222" tid="16">japan</track> + <track id="1223" tid="17">kingcall1</track> + <track id="1224" tid="18">kingcall2</track> + <track id="1225" tid="19">maschendrahtzaun</track> + <track id="1226" tid="20">mittagspause</track> + <track id="1227" tid="21">nachrich</track> + <track id="1228" tid="22">nica</track> + <track id="1229" tid="23">talkline</track> + <track id="1230" tid="24">tmobil</track> + <track id="1231" tid="25">urlaub</track> + <track id="1232" tid="26">vorwahl</track> + </album> + <album aid="101" title="promis"> + <track id="1233" tid="1">bbecker</track> + <track id="1234" tid="2">bbecker2</track> + <track id="1235" tid="3">brandt</track> + <track id="1236" tid="4">bushkohl</track> + <track id="1237" tid="5">cdu</track> + <track id="1238" tid="6">coolman</track> + <track id="1239" tid="7">faust</track> + <track id="1240" tid="8">gerdschroeder</track> + <track id="1241" tid="9">gerdschroeder2</track> + <track id="1242" tid="10">gerdschroeder3</track> + <track id="1243" tid="11">gerdschroeder4</track> + <track id="1244" tid="12">gott</track> + <track id="1245" tid="13">grizmek3</track> + <track id="1246" tid="14">halrvord</track> + <track id="1247" tid="15">helge4</track> + <track id="1248" tid="16">honikohl</track> + <track id="1249" tid="17">kohl</track> + <track id="1250" tid="18">kohl2</track> + <track id="1251" tid="19">kohl3</track> + <track id="1252" tid="20">kohl4</track> + <track id="1253" tid="21">kohlsingt</track> + <track id="1254" tid="22">kork</track> + <track id="1255" tid="23">lndnberg</track> + <track id="1256" tid="24">loddar</track> + <track id="1257" tid="25">loriot</track> + <track id="1258" tid="26">michael</track> + <track id="1259" tid="27">mission</track> + <track id="1260" tid="28">moser</track> + <track id="1261" tid="29">papst2</track> + <track id="1262" tid="30">ranicki</track> + <track id="1263" tid="31">ranicki2</track> + <track id="1264" tid="32">scherz</track> + <track id="1265" tid="33">supereh</track> + <track id="1266" tid="34">susi3</track> + <track id="1267" tid="35">weihnachtsmann</track> + <track id="1268" tid="36">wiebitte</track> + <track id="1269" tid="37">wummwend</track> + </album> + <album aid="102" title="sfstars"> + <track id="1270" tid="1">3947</track> + <track id="1271" tid="2">borg</track> + <track id="1272" tid="3">c3po</track> + <track id="1273" tid="4">cluster</track> + <track id="1274" tid="5">dsn</track> + <track id="1275" tid="6">dukat</track> + <track id="1276" tid="7">dukat2</track> + <track id="1277" tid="8">hansolo</track> + <track id="1278" tid="9">holodoc</track> + <track id="1279" tid="10">janeway</track> + <track id="1280" tid="11">kim2</track> + <track id="1281" tid="12">kira</track> + <track id="1282" tid="13">kirk</track> + <track id="1283" tid="14">mib</track> + <track id="1284" tid="15">nog</track> + <track id="1285" tid="16">obrien</track> + <track id="1286" tid="17">obrien2</track> + <track id="1287" tid="18">odo</track> + <track id="1288" tid="19">picard</track> + <track id="1289" tid="20">r2d2</track> + <track id="1290" tid="21">riker</track> + <track id="1291" tid="22">schatten</track> + <track id="1292" tid="23">sisko</track> + <track id="1293" tid="24">sisko2</track> + <track id="1294" tid="25">spock</track> + <track id="1295" tid="26">spock2</track> + <track id="1296" tid="27">tng</track> + <track id="1297" tid="28">tos</track> + <track id="1298" tid="29">uhura</track> + <track id="1299" tid="30">voyager</track> + <track id="1300" tid="31">worfdax</track> + <track id="1301" tid="32">zimmerm</track> + </album> + <album aid="103" title="tvstars"> + <track id="1302" tid="1">ab_lilo_5</track> + <track id="1303" tid="2">airforc2</track> + <track id="1304" tid="3">airforce</track> + <track id="1305" tid="4">albundy</track> + <track id="1306" tid="5">alf</track> + <track id="1307" tid="6">alf2</track> + <track id="1308" tid="7">berti</track> + <track id="1309" tid="8">bestofrichie</track> + <track id="1310" tid="9">bond</track> + <track id="1311" tid="10">bond2</track> + <track id="1312" tid="11">boning</track> + <track id="1313" tid="12">bully</track> + <track id="1314" tid="13">bvogts</track> + <track id="1315" tid="14">clousea2</track> + <track id="1316" tid="15">clouseau</track> + <track id="1317" tid="16">conan</track> + <track id="1318" tid="17">ddf</track> + <track id="1319" tid="18">delasoul</track> + <track id="1320" tid="19">drebin</track> + <track id="1321" tid="20">drebins</track> + <track id="1322" tid="21">dtkuhn</track> + <track id="1323" tid="22">duke</track> + <track id="1324" tid="23">elaine</track> + <track id="1325" tid="24">emil</track> + <track id="1326" tid="25">erhardt</track> + <track id="1327" tid="26">george</track> + <track id="1328" tid="27">georgebush</track> + <track id="1329" tid="28">ghostbusters</track> + <track id="1330" tid="29">hartman</track> + <track id="1331" tid="30">helge</track> + <track id="1332" tid="31">helge2</track> + <track id="1333" tid="32">helge3</track> + <track id="1334" tid="33">krause</track> + <track id="1335" tid="34">lector</track> + <track id="1336" tid="35">lose</track> + <track id="1337" tid="36">mulder</track> + <track id="1338" tid="37">mulder2</track> + <track id="1339" tid="38">nypd</track> + <track id="1340" tid="39">ohotte</track> + <track id="1341" tid="40">osterwelle</track> + <track id="1342" tid="41">python3</track> + <track id="1343" tid="42">python4</track> + <track id="1344" tid="43">python5</track> + <track id="1345" tid="44">raab</track> + <track id="1346" tid="45">renegade</track> + <track id="1347" tid="46">richie</track> + <track id="1348" tid="47">richie2</track> + <track id="1349" tid="48">richie3</track> + <track id="1350" tid="49">richie4</track> + <track id="1351" tid="50">richie5</track> + <track id="1352" tid="51">rockfor2</track> + <track id="1353" tid="52">rockford</track> + <track id="1354" tid="53">scully</track> + <track id="1355" tid="54">scully2</track> + <track id="1356" tid="55">scully3</track> + <track id="1357" tid="56">seinfeld</track> + <track id="1358" tid="57">seth</track> + <track id="1359" tid="58">sigi</track> + <track id="1360" tid="59">smeister</track> + <track id="1361" tid="60">thejade</track> + <track id="1362" tid="61">tnet-box</track> + <track id="1363" tid="62">tooltime</track> + <track id="1364" tid="63">twachter</track> + <track id="1365" tid="64">venkman</track> + <track id="1366" tid="65">ventura</track> + <track id="1367" tid="66">ventura2</track> + <track id="1368" tid="67">verona</track> + <track id="1369" tid="68">wallace</track> + <track id="1370" tid="69">xfiles</track> + </group> + <group name="Aphex Twin"> + </album> + <album aid="104" title="''Girl-Boy'' E.P"> + <track id="1371" tid="1">01 - Girl Boy (nls mix)</track> + <track id="1372" tid="2">02 - Milk Man</track> + <track id="1373" tid="3">03 - Inkey$</track> + <track id="1374" tid="4">04 - Girl Boy [Ģ18 snarerush mix]</track> + <track id="1375" tid="5">05 - Beetles</track> + <track id="1376" tid="6">06 - Girl Boy [redruth mix]</track> + </album> + <album aid="105" title="...I care because you do"> + <track id="1377" tid="1">01 - Acrid Avid Jamshred</track> + <track id="1378" tid="2">02 - The Waxen Pith</track> + <track id="1379" tid="3">03 - Wax the Nip</track> + <track id="1380" tid="4">04 - Icct Hedral (Edit)</track> + <track id="1381" tid="5">05 - Ventolin (Video Version)</track> + <track id="1382" tid="6">06 - Come On You Slags</track> + <track id="1383" tid="7">07 - Start As You Mean To Go On</track> + <track id="1384" tid="8">08 - Wet Tip Hen Ax</track> + <track id="1385" tid="9">09 - Mookid</track> + <track id="1386" tid="10">10 - Alberto Balsam</track> + <track id="1387" tid="11">11 - Cow Cud Is A Twin</track> + <track id="1388" tid="12">12 - Next Heap With</track> + </album> + <album aid="106" title="Anologue Bubblebath 3"> + <track id="1389" tid="1">01 - .215061</track> + <track id="1390" tid="2">02 - .1993841</track> + <track id="1391" tid="3">03 - .0180871R</track> + <track id="1392" tid="4">04 - .942937</track> + <track id="1393" tid="5">05 - .0180871L</track> + <track id="1394" tid="6">06 - .000890569</track> + <track id="1395" tid="7">07 - .55278037732581</track> + <track id="1396" tid="8">08 - (CAT 00897-AA1)</track> + <track id="1397" tid="9">09 - (CAT 00897-A1)</track> + <track id="1398" tid="10">10 - AFX 6-B</track> + <track id="1399" tid="11">11 - (CD Only Track #1)</track> + <track id="1400" tid="12">12 - (CD Only Track #2)</track> + <track id="1401" tid="13">13 - (CAT 00897-A2)</track> + </album> + <album aid="107" title="Classics"> + <track id="1402" tid="1">01 - Digeridoo</track> + <track id="1403" tid="2">02 - Flaphead</track> + <track id="1404" tid="3">03 - Phloam</track> + <track id="1405" tid="4">04 - Isopropanol</track> + <track id="1406" tid="5">05 - Polynomial-C</track> + <track id="1407" tid="6">06 - Tamphex (Hedphuq Mix)</track> + <track id="1408" tid="7">07 - Phlange Phace</track> + <track id="1409" tid="8">08 - Dodeccaheedron</track> + <track id="1410" tid="9">09 - Analogue Bubblebath 1</track> + <track id="1411" tid="10">10 - Metapharstic</track> + <track id="1412" tid="11">11 - We have arrived (Aphex Twin QQT Mix)</track> + <track id="1413" tid="12">12 - We have arrived (Aphex Twin TTQ Mix)</track> + <track id="1414" tid="13">13 - Digeridoo (Live in Cornwall, 1990)</track> + </album> + <album aid="108" title="Come To Daddy"> + <track id="1415" tid="1">01 - Come To Daddy, Pappy Mix</track> + <track id="1416" tid="2">02 - Flim</track> + <track id="1417" tid="3">03 - Come To Daddy, Little Lord Faulteroy Mix</track> + <track id="1418" tid="4">04 - Bucephalus Bouncing Ball</track> + <track id="1419" tid="5">05 - To Cure A Weakling Child, Contour Regard</track> + <track id="1420" tid="6">06 - Funny Little Man</track> + <track id="1421" tid="7">07 - Come To Daddy, Mummy Mix</track> + <track id="1422" tid="8">08 - IZ-US</track> + </album> + <album aid="109" title="Donkey Rhubarb"> + <track id="1423" tid="1">01 - Donkey Rhubarb</track> + <track id="1424" tid="2">02 - Vaz Deferenz</track> + <track id="1425" tid="3">03 - Icct Hedral (Philip Glass Orchestration)</track> + <track id="1426" tid="4">04 - Pancake Lizard</track> + </album> + <album aid="110" title="Expert Knob Twiddlers (with Mike Paradinas)"> + <track id="1427" tid="1">01 - Mr. Frosty</track> + <track id="1428" tid="2">02 - Jelly Fish</track> + <track id="1429" tid="3">03 - Eggy Toast</track> + <track id="1430" tid="4">04 - Reg</track> + <track id="1431" tid="5">05 - Vodka</track> + <track id="1432" tid="6">06 - Winner Takes All</track> + <track id="1433" tid="7">07 - Giant Deflating Football</track> + <track id="1434" tid="8">08 - Upright Kangaroo</track> + <track id="1435" tid="9">09 - The Sound of Beady Eyes</track> + <track id="1436" tid="10">10 - Bu Bu Bu Ba</track> + </album> + <album aid="111" title="on"> + <track id="1437" tid="1">01 - on</track> + <track id="1438" tid="2">02 - 73-yips</track> + <track id="1439" tid="3">03 - d-scape</track> + <track id="1440" tid="4">04 - xepha</track> + </album> + <album aid="112" title="on remixes"> + <track id="1441" tid="1">01 - d-scape mix</track> + <track id="1442" tid="2">02 - reload mix</track> + <track id="1443" tid="3">03 - mu-ziq mix</track> + <track id="1444" tid="4">04 - 28 mix</track> + </album> + <album aid="113" title="Polygon Window - Quoth"> + <track id="1445" tid="1">01 - Quoth (Original)</track> + <track id="1446" tid="2">02 - Iketa</track> + <track id="1447" tid="3">03 - Quoth (Wooden Thump Mix)</track> + <track id="1448" tid="4">04 - Bike Pump Meets Bucket</track> + <track id="1449" tid="5">05 - (Unlisted)</track> + </album> + <album aid="114" title="Polygon Window - Surfing On Sine Waves"> + <track id="1450" tid="1">01 - Polygon Window</track> + <track id="1451" tid="2">02 - Audax Powder</track> + <track id="1452" tid="3">03 - Quoth</track> + <track id="1453" tid="4">04 - If It Really Is Me</track> + <track id="1454" tid="5">05 - Supremacy II</track> + <track id="1455" tid="6">06 - UT1 - dot</track> + <track id="1456" tid="7">07 - -no title-</track> + <track id="1457" tid="8">08 - Quixote</track> + <track id="1458" tid="9">09 - Quino-phec</track> + </album> + <album aid="115" title="Richard D. James Album"> + <track id="1459" tid="1">01 - 4</track> + <track id="1460" tid="2">02 - Cornish Acid</track> + <track id="1461" tid="3">03 - Peek 824545201</track> + <track id="1462" tid="4">04 - Fingerbib</track> + <track id="1463" tid="5">05 - Corn Mouth</track> + <track id="1464" tid="6">06 - To Cure A Weakling Child</track> + <track id="1465" tid="7">07 - Goon Gumpas</track> + <track id="1466" tid="8">08 - Yellow Calx</track> + <track id="1467" tid="9">09 - Girl-Boy Song</track> + <track id="1468" tid="10">10 - Logon Rock Witch</track> + </album> + <album aid="116" title="Selected Ambient Works 85-92 (Volume I)"> + <track id="1469" tid="1">01 - Xtal</track> + <track id="1470" tid="2">02 - Tha</track> + <track id="1471" tid="3">03 - Pulsewidth</track> + <track id="1472" tid="4">04 - Ageispolis</track> + <track id="1473" tid="5">05 - i</track> + <track id="1474" tid="6">06 - Green Calx</track> + <track id="1475" tid="7">07 - Heliosphan</track> + <track id="1476" tid="8">08 - We are the Music Makers</track> + <track id="1477" tid="9">09 - Schottkey 7th Path</track> + <track id="1478" tid="10">10 - Ptolemy</track> + <track id="1479" tid="11">11 - Hedphelym</track> + <track id="1480" tid="12">12 - Delphium</track> + <track id="1481" tid="13">13 - Actium</track> + </album> + <album aid="117" title="Selected Ambient Works II|CD1"> + <track id="1482" tid="1">01 - Cliffs</track> + <track id="1483" tid="2">02 - Radiator</track> + <track id="1484" tid="3">03 - Rhubarb</track> + <track id="1485" tid="4">04 - Hankie</track> + <track id="1486" tid="5">05 - Grass</track> + <track id="1487" tid="6">06 - Mold</track> + <track id="1488" tid="7">07 - Curtains</track> + <track id="1489" tid="8">08 - Blur</track> + <track id="1490" tid="9">09 - Weathered stone</track> + <track id="1491" tid="10">10 - Tree</track> + <track id="1492" tid="11">11 - Domino</track> + <track id="1493" tid="12">12 - White blur 1</track> + </album> + <album aid="118" title="Ventolin E.P"> + <track id="1494" tid="1">01 - Ventolin (Salbutamol Mix)</track> + <track id="1495" tid="2">02 - Ventolin (Praze-An-Beeble Mix)</track> + <track id="1496" tid="3">03 - Ventolin (Marazanvose Mix)</track> + <track id="1497" tid="4">04 - Ventolin (Plain-An-Gwarry Mix)</track> + <track id="1498" tid="5">05 - Ventolin (The Coppice Mix)</track> + <track id="1499" tid="6">06 - Ventolin (Crowsmengegus Mix)</track> + </album> + <album aid="119" title="Ventolin EP (The Remixes)"> + <track id="1500" tid="1">01 - Ventolin (wheeze mix)</track> + <track id="1501" tid="2">02 - Ventolin CARHARRACK mix</track> + <track id="1502" tid="3">03 - Ventolin PROBUS mix</track> + <track id="1503" tid="4">04 - Ventolin (cylob mix)</track> + <track id="1504" tid="5">05 - Ventolin (deep gong mix)</track> + <track id="1505" tid="6">06 - Ventolin (asthma beats mix)</track> + </group> + <group name="Aphrodite Recordings"> + </album> + <album aid="120" title="Aphrodite Recordings"> + <track id="1506" tid="1">01 (Aphrodite) - Aphromoods</track> + <track id="1507" tid="2">02 (Amazon II) - King Of The Beats</track> + <track id="1508" tid="3">03 (Aladdin) - Woman That Rolls!</track> + <track id="1509" tid="4">04 (Aphrodite) - Spice (Of The Gods Remix)</track> + <track id="1510" tid="5">05 (Aladdin) - Summer Breeze</track> + <track id="1511" tid="6">06 (Amazon II) - Music's Hypnotising</track> + <track id="1512" tid="7">07 (Aphrodite (Vortex Mix)) - Listen To The Rythm</track> + <track id="1513" tid="8">08 (Aphrodite) - Dub Moods (The Greatest Trick)</track> + <track id="1514" tid="9">09 (Aphrodite) - Style From The Dark Side</track> + <track id="1515" tid="10">10 (Aphrodite) - Tower Bass!</track> + <track id="1516" tid="11">11 (Aphrodite feat. Gail Mclean) - I Wanted It More And</track> + <track id="1517" tid="12">12 (Aphrodite) - Sweet Mind</track> + </group> + <group name="Apollo 440"> + </album> + <album aid="121" title="Electro Glide In Blue"> + <track id="1518" tid="1">01 - Sealth Overture</track> + <track id="1519" tid="2">02 - Ain't Talkin' 'Bout Dub</track> + <track id="1520" tid="3">03 - Altamont Super-Highway Revisted</track> + <track id="1521" tid="4">04 - Electro Glide In Blue</track> + <track id="1522" tid="5">05 - Vanishing Point</track> + <track id="1523" tid="6">06 - Tears Of The Gods</track> + <track id="1524" tid="7">07 - Carrera Rapida</track> + <track id="1525" tid="8">08 - Krupa</track> + <track id="1526" tid="9">09 - White Man's Throat!s</track> + <track id="1527" tid="10">10 - Pain In Any Language</track> + <track id="1528" tid="11">11 - Stealth Mass In F#m!s</track> + </album> + <album aid="122" title="Gettin' High On Your Own Supply"> + <track id="1529" tid="1">01 - Are we a rock band or what</track> + <track id="1530" tid="2">02 - Stop the rock</track> + <track id="1531" tid="3">03 - Crazee Horse</track> + <track id="1532" tid="4">04 - Cold Rock the Mic</track> + <track id="1533" tid="5">05 - Lost in Space (Theme)</track> + <track id="1534" tid="6">06 - For forty days</track> + <track id="1535" tid="7">07 - Heart Go Boom</track> + <track id="1536" tid="8">08 - The Machine in the ghost</track> + <track id="1537" tid="9">09 - Blackbeat</track> + <track id="1538" tid="10">10 - Stadium parking lot</track> + <track id="1539" tid="11">11 - YO, Future</track> + <track id="1540" tid="12">12 - High on your own supply</track> + <track id="1541" tid="13">13 - The Perfect crime</track> + </album> + <album aid="123" title="Millennium Fever"> + <track id="1542" tid="1">02 - Liquid Cool</track> + <track id="1543" tid="2">03 - Film Me And Finish Me Off</track> + <track id="1544" tid="3">04 - I Need Something Stronger</track> + <track id="1545" tid="4">05 - Pain Is A Close Up</track> + <track id="1546" tid="5">06 - Omega Point</track> + <track id="1547" tid="6">07 - Don't Fear The Reaper</track> + <track id="1548" tid="7">08 - Astral Amerika</track> + <track id="1549" tid="8">09 - Millennium Fever</track> + <track id="1550" tid="9">10 - Stealth Requiem</track> + </group> + <group name="Apoptygma Berzerk"> + </album> + <album aid="124" title="7"> + <track id="1551" tid="1">01 - Love Never Dies, Part I</track> + <track id="1552" tid="2">02 - Mourn</track> + <track id="1553" tid="3">03 - Non-Stop Violence</track> + <track id="1554" tid="4">04 - 25 Cromwell St.</track> + <track id="1555" tid="5">05 - Rebel</track> + <track id="1556" tid="6">06 - Deep Red</track> + <track id="1557" tid="7">07 - Nearer</track> + <track id="1558" tid="8">08 - Half Asleep</track> + <track id="1559" tid="9">09 - Love Never Dies, Part II</track> + </album> + <album aid="125" title="Kathy's_Song"> + <track id="1560" tid="1">01_-_Kathy's_Song_(Ferry_Corsten_RMX)</track> + <track id="1561" tid="2">02_-_Kathy's_Song_(Single_version)</track> + <track id="1562" tid="3">03_-_Kathy's_Song_(Victoria_mix_by_VNV_Nation)</track> + <track id="1563" tid="4">04_-_Kathy's_Song_(Beborn_Beton_RMX)</track> + <track id="1564" tid="5">05_-_Kathy's_Song_(Ferry_Corsten_RMX)(12-_version)</track> + <track id="1565" tid="6">06_-_Kathy's_Song_(C-64_version)</track> + </album> + <album aid="126" title="Mourn EP"> + <track id="1566" tid="1">01 - Mourn (APB Remix)</track> + <track id="1567" tid="2">02 - Mourn (Ihrmx)</track> + <track id="1568" tid="3">03 - Mourn (Original Version)</track> + <track id="1569" tid="4">04 - Untitled Too (Sweep remix)</track> + <track id="1570" tid="5">05 - Ohm Sweet Ohm</track> + <track id="1571" tid="6">06 - Electricity</track> + <track id="1572" tid="7">07 - Snutt 7</track> + </album> + <album aid="127" title="Non-Stop Violence"> + <track id="1573" tid="1">01 - Non-Stop Violence [CNN version]</track> + <track id="1574" tid="2">02 - Near [Banilla Dream version]</track> + <track id="1575" tid="3">03 - Burnin' Heretic [Live]</track> + </album> + <album aid="128" title="Soli Deo Gloria"> + <track id="1576" tid="1">01 - Like Blood From The Beloved (part 1)</track> + <track id="1577" tid="2">02 - Bitch</track> + <track id="1578" tid="3">03 - Burnin Heretic (album version)</track> + <track id="1579" tid="4">04 - Stich</track> + <track id="1580" tid="5">05 - Walk With Me</track> + <track id="1581" tid="6">06 - Backdraft</track> + <track id="1582" tid="7">07 - Arp (808 edit)</track> + <track id="1583" tid="8">08 - Spiritual Reality</track> + <track id="1584" tid="9">09 - Skyscraping (schizophreniac)</track> + <track id="1585" tid="10">10 - All Tomorrows Parties</track> + <track id="1586" tid="11">11 - The Sentinel</track> + <track id="1587" tid="12">12 - Ashes To Ashes `93</track> + <track id="1588" tid="13">13 - Like Blood From The Beloved (part 2)</track> + </album> + <album aid="129" title="The Apopcalyptic Manifesto"> + <track id="1589" tid="1">01 - Apb goes C-64</track> + <track id="1590" tid="2">02 - Deep Red</track> + <track id="1591" tid="3">03 - Bitch</track> + <track id="1592" tid="4">04 - Stitch</track> + <track id="1593" tid="5">05 - Spiritual Reality</track> + <track id="1594" tid="6">06 - Electronic Warfare</track> + <track id="1595" tid="7">07 - All Tomorrows Parties</track> + <track id="1596" tid="8">08 - Arp</track> + <track id="1597" tid="9">09 - Burninī Heretic (Album version)</track> + <track id="1598" tid="10">10 - Ledelsens Mening</track> + <track id="1599" tid="11">11 - Backdraft</track> + <track id="1600" tid="12">12 - Ashes to Ashes (German Slam version)</track> + <track id="1601" tid="13">13 - The Approach of Death</track> + <track id="1602" tid="14">14 - Ashes to Ashes (Original 12- version)</track> + <track id="1603" tid="15">15 - Wrackīem to Pieces</track> + <track id="1604" tid="16">16 - Burning Heretics (Crisp version)</track> + </album> + <album aid="130" title="Welcome To Earth"> + <track id="1605" tid="1">01 - Everything We Know Is Wrong</track> + <track id="1606" tid="2">02 - Starsign</track> + <track id="1607" tid="3">03 - Eclipse</track> + <track id="1608" tid="4">04 - Help Me</track> + <track id="1609" tid="5">05 - Kathy's Song (Come Lie Next To Me)</track> + <track id="1610" tid="6">06 - Untiled 3</track> + <track id="1611" tid="7">07 - Moment Of Tranquililty</track> + <track id="1612" tid="8">08 - Fade To Black</track> + <track id="1613" tid="9">09 - 64K</track> + <track id="1614" tid="10">10 - Paranoia</track> + <track id="1615" tid="11">11 - Soultaker</track> + <track id="1616" tid="12">12 - LNDP 3</track> + <track id="1617" tid="13">13 - Time To Move On + Bonus (ABP Goes C-64 Again)</track> + </group> + <group name="Aretha Franklin"> + </album> + <album aid="131" title="Greatest Hits"> + <track id="1618" tid="1">01 Aretha Franklin - Freeway Of Love</track> + <track id="1619" tid="2">02 Aretha Franklin - I Knew You Were Waiting</track> + <track id="1620" tid="3">03 Aretha Franklin - Jump To It</track> + <track id="1621" tid="4">04 Aretha Franklin - Willing To Forgive</track> + <track id="1622" tid="5">05 Aretha Franklin - Doctor's Orders</track> + <track id="1623" tid="6">06 Aretha Franklin - United Together</track> + <track id="1624" tid="7">07 Aretha Franklin - Who's Zoomin' Who</track> + <track id="1625" tid="8">08 Aretha Franklin - A Deeper Love</track> + <track id="1626" tid="9">09 Aretha Franklin - Honey</track> + <track id="1627" tid="10">10 Aretha Franklin - Get It Right</track> + <track id="1628" tid="11">11 Aretha Franklin - Another Night</track> + <track id="1629" tid="12">12 Aretha Franklin - Ever Changing Times</track> + <track id="1630" tid="13">13 Aretha Franklin - Jimmy Lee</track> + <track id="1631" tid="14">14 Aretha Franklin - You Make Me Feel</track> + <track id="1632" tid="15">15 Aretha Franklin - I Dreamed A Dream</track> + <track id="1633" tid="16">16 Aretha Franklin - Jumpin' Jack Flash</track> + </group> + <group name="Armando"> + </album> + <album aid="132" title="One World One Future"> + <track id="1634" tid="1">SN1B6208B_Trk01A</track> + <track id="1635" tid="2">SN1B6208B_Trk02A</track> + <track id="1636" tid="3">SN1B6208B_Trk03A</track> + <track id="1637" tid="4">SN1B6208B_Trk04A</track> + <track id="1638" tid="5">SN1B6208B_Trk05A</track> + <track id="1639" tid="6">SN1B6208B_Trk06A</track> + <track id="1640" tid="7">SN1B6208B_Trk07A</track> + <track id="1641" tid="8">SN1B6208B_Trk08A</track> + <track id="1642" tid="9">SN1B6208B_Trk09A</track> + <track id="1643" tid="10">SN1B6208B_Trk10A</track> + <track id="1644" tid="11">SN1B6208B_Trk11A</track> + <track id="1645" tid="12">SN1B6208B_Trk12A</track> + <track id="1646" tid="13">SN1B6208B_Trk13A</track> + <track id="1647" tid="14">SN1B6208B_Trk14A</track> + </group> + <group name="Armando Manzanero"> + </album> + <album aid="133" title="Lo mejor de"> + <track id="1648" tid="1">01 - Adoro</track> + <track id="1649" tid="2">02 - Somos novios</track> + <track id="1650" tid="3">03 - Cuando estoy contigo</track> + <track id="1651" tid="4">04 - Pensando en ti</track> + <track id="1652" tid="5">05- Contigo amor</track> + <track id="1653" tid="6">06 - Cariņo mio</track> + <track id="1654" tid="7">07 - Yo te quiero</track> + <track id="1655" tid="8">08 - Esta tarde vi llover</track> + <track id="1656" tid="9">09 - Voy a apagar la luz</track> + <track id="1657" tid="10">10 - Contigo aprendi</track> + <track id="1658" tid="11">11 - No</track> + <track id="1659" tid="12">12 - Esperare</track> + <track id="1660" tid="13">13 - Pero te extraņo</track> + <track id="1661" tid="14">14 - Me vas a recordar</track> + <track id="1662" tid="15">15 - Mia</track> + </group> + <group name="Arschgefickte Gummivotzen"> + </album> + <album aid="134" title="Arschgefickte Gummivotzen"> + <track id="1663" tid="1">(01).im.wagen.vor.mir</track> + <track id="1664" tid="2">(02).ferien.auf.dem.bauernhof</track> + <track id="1665" tid="3">(03).das.frivole.wiedersehen</track> + <track id="1666" tid="4">(04).spermadin</track> + </album> + <album aid="135" title="Covenant|united states of mind"> + <track id="1667" tid="1">02 - No Man's Land</track> + </group> + <group name="Arschkrampen"> + </album> + <album aid="136" title="Zicken & Würmer II"> + <track id="1668" tid="1">16 - Poppen muss Spass machen</track> + <track id="1669" tid="2">19 - Der Ausdenker</track> + <track id="1670" tid="3">17 - Heiligabend</track> + <track id="1671" tid="4">15 - Drei Eier</track> + <track id="1672" tid="5">18 - Gertrud ist abgerissen</track> + <track id="1673" tid="6">12 - Einbruch bei Gertrud - In der Haseluenner Lubjanka</track> + <track id="1674" tid="7">13 - Einbruch bei Gertrud - Die Verhandlung</track> + <track id="1675" tid="8">14 - Oeffentlicher Nahverkehr</track> + <track id="1676" tid="9">10 - Ruesselwaesche</track> + <track id="1677" tid="10">11 - Einbruch bei Gertrud - Gertrud hat noch zu</track> + <track id="1678" tid="11">09 - Schneeraeumen am Arsch</track> + <track id="1679" tid="12">08 - Oedipus Kurt</track> + <track id="1680" tid="13">01 - Ferkel nervt</track> + <track id="1681" tid="14">02 - Arschkrampen im Krieg - Der Kessel von Goebelgrad</track> + <track id="1682" tid="15">03 - Arschkrampen im Krieg - Der 7 Mai 1945</track> + <track id="1683" tid="16">04 - Arschkrampen im Krieg - Nacht ueber Gotenhafen</track> + <track id="1684" tid="17">05 - Es plaestert</track> + <track id="1685" tid="18">06 - Pflaumen pfluecken</track> + <track id="1686" tid="19">07 - Weitstrullen</track> + </album> + <album aid="137" title="Aggi Aggi"> + <track id="1687" tid="1">19 - Kampfruf des Negers</track> + <track id="1688" tid="2">02 - Die alte Kultur</track> + <track id="1689" tid="3">08 - Schwanzmessen</track> + <track id="1690" tid="4">20 - Die Leguane greifen an</track> + <track id="1691" tid="5">01 - Was hier denn los</track> + <track id="1692" tid="6">18 - Schluepfer rasseln in Fickstadt</track> + <track id="1693" tid="7">05 - Am Tag als der Leguan</track> + <track id="1694" tid="8">03 - Entfuehrer und Enthueller</track> + <track id="1695" tid="9">04 - Wie gehts eigentlich Praenki</track> + <track id="1696" tid="10">21 - Erste Kritik</track> + <track id="1697" tid="11">07 - Excusez-moi</track> + <track id="1698" tid="12">06 - Zu den Quellen des Amazonas</track> + <track id="1699" tid="13">09 - Gelegenheit zum Gespraech</track> + <track id="1700" tid="14">13 - Gehts Praenki besser</track> + <track id="1701" tid="15">16 - Praenki is kaputt</track> + <track id="1702" tid="16">14 - An den Ufern des Urinoko</track> + <track id="1703" tid="17">15 - Zicken her</track> + <track id="1704" tid="18">12 - Eckis Plattentip</track> + <track id="1705" tid="19">11 - Brettermeier duebelt</track> + <track id="1706" tid="20">10 - Goebelblanca</track> + <track id="1707" tid="21">17 - Feuchte BIRAFO</track> + </album> + <album aid="138" title="Arschkrampen Tekkno (Maxi)"> + <track id="1708" tid="1">04 - Brettermeier (Karaoke Version)</track> + <track id="1709" tid="2">03 - Brettermeier (Radio Version)</track> + <track id="1710" tid="3">02 - 18 Bier mit Tsatsiki</track> + <track id="1711" tid="4">01 - Brettermeier die Pottsau</track> + </album> + <album aid="139" title="Ekeleregend"> + <track id="1712" tid="1">02 - Der kleine Pisser</track> + <track id="1713" tid="2">03 - Die Alpen</track> + <track id="1714" tid="3">01 - Damals in der Bretterpenne</track> + <track id="1715" tid="4">04 - Gedichte</track> + <track id="1716" tid="5">10 - Telephonsex</track> + <track id="1717" tid="6">09 - Bluemel und Laesch</track> + <track id="1718" tid="7">12 - Gurkenrost</track> + <track id="1719" tid="8">11 - Groehlen un Suppe</track> + <track id="1720" tid="9">16 - Jingle - Arschkrampenzeit</track> + <track id="1721" tid="10">15 - Arschregen</track> + <track id="1722" tid="11">14 - Kurtin</track> + <track id="1723" tid="12">13 - Cassette im Arsch</track> + </album> + <album aid="140" title="Sooo Siehddas Aus"> + <track id="1724" tid="1">01 - Ich bin ein Ferkelwaemser</track> + <track id="1725" tid="2">05 - Der Iwan is nich ohne</track> + <track id="1726" tid="3">03 - Allegorie ueber Stalingrad</track> + <track id="1727" tid="4">02 - Frauen stehen auf Macht</track> + <track id="1728" tid="5">04 - Der Negerueberfall</track> + <track id="1729" tid="6">06 - Hier Bretter-Control</track> + <track id="1730" tid="7">07 - Goebel-Solo</track> + <track id="1731" tid="8">08 - Kurt is in Kur</track> + <track id="1732" tid="9">20 - Absage</track> + <track id="1733" tid="10">17 - Kurt im Schrank</track> + <track id="1734" tid="11">19 - Gertrud hat zu</track> + <track id="1735" tid="12">09 - Guergen erinnert sich</track> + <track id="1736" tid="13">10 - Der Tomatenkopp</track> + <track id="1737" tid="14">16 - Ab inne Truhe</track> + <track id="1738" tid="15">12 - Der Gammel</track> + <track id="1739" tid="16">15 - Gesucht wird Albert Brettermeier</track> + <track id="1740" tid="17">11 - Kurt Kong</track> + <track id="1741" tid="18">13 - Bei Gertrud</track> + <track id="1742" tid="19">18 - Kurt hat Geburtstag</track> + <track id="1743" tid="20">14 - Wir fahn nach Wakaluba</track> + </album> + <album aid="141" title="Zicken & Würmer I"> + <track id="1744" tid="1">01 - Stracciatella</track> + <track id="1745" tid="2">22 - Die letzte Folge</track> + <track id="1746" tid="3">21 - Ferkels Schwester</track> + <track id="1747" tid="4">20 - Hier spricht Ramke</track> + <track id="1748" tid="5">16 - Wuggi baut um</track> + <track id="1749" tid="6">14 - Zasta Krockett der verwarzte Rochen</track> + <track id="1750" tid="7">15 - Die Ex-Verlobte</track> + <track id="1751" tid="8">17 - Robinson Kurt</track> + <track id="1752" tid="9">11 - dammte Pekinesenkotze - Telephon</track> + <track id="1753" tid="10">13 - Wischmeyer ruft an</track> + <track id="1754" tid="11">19 - Reingeroemert</track> + <track id="1755" tid="12">18 - Der grosse Hatti Mueller</track> + <track id="1756" tid="13">02 - The Making of Arschkrampen</track> + <track id="1757" tid="14">03 - Der Vollidiot</track> + <track id="1758" tid="15">04 - Geheimagent Ferkel</track> + <track id="1759" tid="16">05 - Die Hackfresse</track> + <track id="1760" tid="17">06 - Die Kimmen der Adler</track> + <track id="1761" tid="18">07 - Schrappige Zicken</track> + <track id="1762" tid="19">08 - Wie gehzn Wuggi</track> + <track id="1763" tid="20">09 - Kurt will heiraten 1 - Krissa die Hundekopffegerin</track> + <track id="1764" tid="21">10 - Kurt will heiraten 2 - Der Hochzeitstag</track> + <track id="1765" tid="22">12 - Kurt will heiraten 3 - Die Vermaehlung</track> + </group> + <group name="Art of Trance"> + </album> + <album aid="142" title="Madagasca (Maxi)"> + <track id="1766" tid="1">01 - Madagasca</track> + <track id="1767" tid="2">02 - Madagasca Cygnus X Remix</track> + </album> + <album aid="143" title="Voice Of Earth"> + <track id="1768" tid="1">01 - Breathe</track> + <track id="1769" tid="2">02 - Monsoon</track> + <track id="1770" tid="3">03 - The Hummer</track> + <track id="1771" tid="4">04 - Madagascar</track> + <track id="1772" tid="5">05 - Requiem</track> + <track id="1773" tid="6">06 - Dud UK</track> + <track id="1774" tid="7">07 - Easter Island</track> + <track id="1775" tid="8">08 - Stealth</track> + <track id="1776" tid="9">09 - Panorama</track> + <track id="1777" tid="10">10 - Voice Of Earth</track> + </group> + <group name="Artful Dodger"> + </album> + <album aid="144" title="Movin Too Fast"> + <track id="1778" tid="1">01 - Movin Too Fast - Radio Mix</track> + <track id="1779" tid="2">02 - Movin Too Fast - Bump & Flex Vocal</track> + <track id="1780" tid="3">03 - Movin Too Fast - Pussy 2000 Vocal</track> + </album> + <album aid="145" title="Artful Dodger"> + <track id="1781" tid="1">Re-Rewind - The artful dodger</track> + </album> + <album aid="146" title="woman trouble"> + <track id="1782" tid="1">01 - woman trouble (radio edit)</track> + <track id="1783" tid="2">02 - woman trouble (original version radio edit)</track> + <track id="1784" tid="3">03 - woman trouble (sunkids future discotech edit)</track> + <track id="1785" tid="4">04 - woman trouble (wideboy's pickapocket or two radio edit)</track> + </group> + <group name="Artificial Intelligence"> + </album> + <album aid="147" title="Vol. 1"> + <track id="1786" tid="1">01 - The Dice Man - Polygon Window</track> + <track id="1787" tid="2">02 - Musicology - Telefone 529</track> + <track id="1788" tid="3">03 - Autechre - Crystel</track> + <track id="1789" tid="4">04 - I.A.O - The Clan</track> + <track id="1790" tid="5">05 - Speedy J - De-Orbit</track> + <track id="1791" tid="6">06 - Musicology - Preminition</track> + <track id="1792" tid="7">07 - UP! - Spiritual High</track> + <track id="1793" tid="8">08 - Autechre - The Egg</track> + <track id="1794" tid="9">09 - Speedy J - Fill 3</track> + <track id="1795" tid="10">10 - Dr Alex Paterson - Loving You Live</track> + </album> + <album aid="148" title="Vol. 2"> + <track id="1796" tid="1">01 - Mark Franklin - Release to the System</track> + <track id="1797" tid="2">02 - The Higher Intelligence Agency - Selinite</track> + <track id="1798" tid="3">03 - Link - Arcadian</track> + <track id="1799" tid="4">04 - B12 - Scriptures</track> + <track id="1800" tid="5">05 - Autechre - Chatter</track> + <track id="1801" tid="6">06 - Speedy J - Symmetry</track> + <track id="1802" tid="7">07 - Beaumont Hannant - Utuba</track> + <track id="1803" tid="8">08 - Richard H. Kirk - Reality Net</track> + <track id="1804" tid="9">09 - Balil - Parasight</track> + <track id="1805" tid="10">10 - Seefeel - Spangle</track> + </group> + <group name="Artificial Joy Club"> + </album> + <album aid="149" title="Sick And Beautiful"> + <track id="1806" tid="1">01 - Sick And Beautiful Radio Edit</track> + <track id="1807" tid="2">02 - Sick And Beautiful Quick Fix Mix</track> + <track id="1808" tid="3">03 - My Heaven</track> + </group> + <group name="Arturo Benedetti"> + </album> + <album aid="150" title="CD2 Great Pianists of the 20th Century"> + <track id="1809" tid="1">01 - Track 1</track> + <track id="1810" tid="2">02 - Track 2</track> + <track id="1811" tid="3">03 - Track 3</track> + <track id="1812" tid="4">04 - Track 4</track> + <track id="1813" tid="5">05 - Track 5</track> + <track id="1814" tid="6">06 - Track 6</track> + <track id="1815" tid="7">07 - Track 7</track> + <track id="1816" tid="8">08 - Track 8</track> + <track id="1817" tid="9">09 - Track 9</track> + <track id="1818" tid="10">10 - Track 10</track> + <track id="1819" tid="11">11 - Track 11</track> + <track id="1820" tid="12">12 - Track 12</track> + </album> + <album aid="151" title="Great Pianists of the 20th Century"> + <track id="1821" tid="1">01 - Track 1</track> + <track id="1822" tid="2">02 - Track 2</track> + <track id="1823" tid="3">03 - Track 3</track> + <track id="1824" tid="4">04 - Track 4</track> + <track id="1825" tid="5">05 - Track 5</track> + <track id="1826" tid="6">06 - Track 6</track> + <track id="1827" tid="7">07 - Track 7</track> + <track id="1828" tid="8">08 - Track 8</track> + <track id="1829" tid="9">09 - Track 9</track> + <track id="1830" tid="10">10 - Track 10</track> + <track id="1831" tid="11">11 - Track 11</track> + <track id="1832" tid="12">12 - Track 12</track> + <track id="1833" tid="13">13 - Track 13</track> + <track id="1834" tid="14">14 - Track 14</track> + <track id="1835" tid="15">15 - Track 15</track> + <track id="1836" tid="16">16 - Track 16</track> + <track id="1837" tid="17">17 - Track 17</track> + <track id="1838" tid="18">18 - Track 18</track> + </group> + <group name="Asion Dub Foundation"> + </album> + <album aid="152" title="Rafi's Revenge"> + <track id="1839" tid="1">01 - naxalite</track> + <track id="1840" tid="2">02 - buzzin'</track> + <track id="1841" tid="3">03 - black white</track> + <track id="1842" tid="4">04 - assassin</track> + <track id="1843" tid="5">05 - hypocrite</track> + <track id="1844" tid="6">06 - charge</track> + <track id="1845" tid="7">07 - free satpal ram</track> + <track id="1846" tid="8">08 - dub mentality</track> + <track id="1847" tid="9">09 - culture move</track> + <track id="1848" tid="10">10 - operation eagle lie</track> + <track id="1849" tid="11">11 - change</track> + <track id="1850" tid="12">12 - tribute to john stevens</track> + </group> + <group name="ATB"> + </album> + <album aid="153" title="The Fields Of Love (Maxi; feat York)"> + <track id="1851" tid="1">01 - The Fields Of Love Airplay Mix</track> + <track id="1852" tid="2">02 - The Fields Of Love Original Club Mix</track> + <track id="1853" tid="3">03 - The Fields Of Love York Remix</track> + <track id="1854" tid="4">04 - The Fields Of Love Instrumental</track> + </album> + <album aid="154" title="The summer (Maxi)"> + <track id="1855" tid="1">01 - Aiplay mix</track> + <track id="1856" tid="2">02 - Clubb mix</track> + <track id="1857" tid="3">03 - Instrumental clubb mix</track> + <track id="1858" tid="4">04 - Ibiza influence mix</track> + </group> + <group name="Auktyon"> + </album> + <album aid="155" title="Auktyon & Hvost_Chainik vina"> + <track id="1859" tid="1">AudioTrack 01</track> + <track id="1860" tid="2">AudioTrack 02</track> + <track id="1861" tid="3">AudioTrack 03</track> + <track id="1862" tid="4">AudioTrack 04</track> + <track id="1863" tid="5">AudioTrack 05</track> + <track id="1864" tid="6">AudioTrack 06</track> + <track id="1865" tid="7">AudioTrack 07</track> + <track id="1866" tid="8">AudioTrack 08</track> + <track id="1867" tid="9">AudioTrack 09</track> + <track id="1868" tid="10">AudioTrack 10</track> + <track id="1869" tid="11">AudioTrack 11</track> + <track id="1870" tid="12">AudioTrack 12</track> + </album> + <album aid="156" title="Auktyon & Hvost_Jiletz versin"> + <track id="1871" tid="1">AudioTrack 01</track> + <track id="1872" tid="2">AudioTrack 02</track> + <track id="1873" tid="3">AudioTrack 03</track> + <track id="1874" tid="4">AudioTrack 04</track> + <track id="1875" tid="5">AudioTrack 05</track> + <track id="1876" tid="6">AudioTrack 06</track> + <track id="1877" tid="7">AudioTrack 07</track> + <track id="1878" tid="8">AudioTrack 08</track> + <track id="1879" tid="9">AudioTrack 09</track> + <track id="1880" tid="10">AudioTrack 10</track> + <track id="1881" tid="11">AudioTrack 11</track> + <track id="1882" tid="12">AudioTrack 12</track> + <track id="1883" tid="13">AudioTrack 13</track> + <track id="1884" tid="14">AudioTrack 14</track> + <track id="1885" tid="15">AudioTrack 15</track> + </album> + <album aid="157" title="Auktyon & Leonid Fedorov_Chetirispolovinojtonni"> + <track id="1886" tid="1">AudioTrack 01</track> + <track id="1887" tid="2">AudioTrack 02</track> + <track id="1888" tid="3">AudioTrack 03</track> + <track id="1889" tid="4">AudioTrack 04</track> + <track id="1890" tid="5">AudioTrack 05</track> + <track id="1891" tid="6">AudioTrack 06</track> + <track id="1892" tid="7">AudioTrack 07</track> + <track id="1893" tid="8">AudioTrack 08</track> + <track id="1894" tid="9">AudioTrack 09</track> + <track id="1895" tid="10">AudioTrack 10</track> + <track id="1896" tid="11">AudioTrack 11</track> + <track id="1897" tid="12">AudioTrack 12</track> + <track id="1898" tid="13">AudioTrack 13</track> + <track id="1899" tid="14">AudioTrack 14</track> + <track id="1900" tid="15">AudioTrack 15</track> + <track id="1901" tid="16">AudioTrack 16</track> + <track id="1902" tid="17">AudioTrack 17</track> + <track id="1903" tid="18">AudioTrack 18</track> + </album> + <album aid="158" title="Auktyon_Bodun"> + <track id="1904" tid="1">AudioTrack 01</track> + <track id="1905" tid="2">AudioTrack 02</track> + <track id="1906" tid="3">AudioTrack 03</track> + <track id="1907" tid="4">AudioTrack 04</track> + <track id="1908" tid="5">AudioTrack 05</track> + <track id="1909" tid="6">AudioTrack 06</track> + <track id="1910" tid="7">AudioTrack 07</track> + <track id="1911" tid="8">AudioTrack 08</track> + <track id="1912" tid="9">AudioTrack 09</track> + <track id="1913" tid="10">AudioTrack 10</track> + <track id="1914" tid="11">AudioTrack 11</track> + </album> + <album aid="159" title="Auktyon_Dobserver"> + <track id="1915" tid="1">AudioTrack 01</track> + <track id="1916" tid="2">AudioTrack 02</track> + <track id="1917" tid="3">AudioTrack 03</track> + <track id="1918" tid="4">AudioTrack 04</track> + <track id="1919" tid="5">AudioTrack 05</track> + <track id="1920" tid="6">AudioTrack 06</track> + <track id="1921" tid="7">AudioTrack 07</track> + <track id="1922" tid="8">AudioTrack 08</track> + <track id="1923" tid="9">AudioTrack 09</track> + <track id="1924" tid="10">AudioTrack 10</track> + <track id="1925" tid="11">AudioTrack 11</track> + <track id="1926" tid="12">AudioTrack 12</track> + <track id="1927" tid="13">AudioTrack 13</track> + <track id="1928" tid="14">AudioTrack 14</track> + <track id="1929" tid="15">AudioTrack 15</track> + <track id="1930" tid="16">AudioTrack 16</track> + <track id="1931" tid="17">AudioTrack 17</track> + <track id="1932" tid="18">AudioTrack 18</track> + </album> + <album aid="160" title="Auktyon_Jopa"> + <track id="1933" tid="1">AudioTrack 01</track> + <track id="1934" tid="2">AudioTrack 02</track> + <track id="1935" tid="3">AudioTrack 03</track> + <track id="1936" tid="4">AudioTrack 04</track> + <track id="1937" tid="5">AudioTrack 05</track> + <track id="1938" tid="6">AudioTrack 06</track> + <track id="1939" tid="7">AudioTrack 07</track> + <track id="1940" tid="8">AudioTrack 08</track> + <track id="1941" tid="9">AudioTrack 09</track> + <track id="1942" tid="10">AudioTrack 10</track> + </album> + <album aid="161" title="Auktyon_Kak ja stal predatelem"> + <track id="1943" tid="1">AudioTrack 01</track> + <track id="1944" tid="2">AudioTrack 02</track> + <track id="1945" tid="3">AudioTrack 03</track> + <track id="1946" tid="4">AudioTrack 04</track> + <track id="1947" tid="5">AudioTrack 05</track> + <track id="1948" tid="6">AudioTrack 06</track> + <track id="1949" tid="7">AudioTrack 07</track> + <track id="1950" tid="8">AudioTrack 08</track> + <track id="1951" tid="9">AudioTrack 09</track> + <track id="1952" tid="10">AudioTrack 10</track> + </album> + <album aid="162" title="Auktyon_Ptiza"> + <track id="1953" tid="1">AudioTrack 01</track> + <track id="1954" tid="2">AudioTrack 02</track> + <track id="1955" tid="3">AudioTrack 03</track> + <track id="1956" tid="4">AudioTrack 04</track> + <track id="1957" tid="5">AudioTrack 05</track> + <track id="1958" tid="6">AudioTrack 06</track> + <track id="1959" tid="7">AudioTrack 07</track> + <track id="1960" tid="8">AudioTrack 08</track> + <track id="1961" tid="9">AudioTrack 09</track> + <track id="1962" tid="10">AudioTrack 10</track> + <track id="1963" tid="11">AudioTrack 11</track> + </album> + <album aid="163" title="Auktyon_V Bagdade vse spokojno"> + <track id="1964" tid="1">AudioTrack 01</track> + <track id="1965" tid="2">AudioTrack 02</track> + <track id="1966" tid="3">AudioTrack 03</track> + <track id="1967" tid="4">AudioTrack 04</track> + <track id="1968" tid="5">AudioTrack 05</track> + <track id="1969" tid="6">AudioTrack 06</track> + <track id="1970" tid="7">AudioTrack 07</track> + <track id="1971" tid="8">AudioTrack 08</track> + </group> + <group name="Autechre"> + </album> + <album aid="164" title="Peel Session"> + <track id="1972" tid="1">01 - Peel Session</track> + <track id="1973" tid="2">02 - Peel Sesion</track> + <track id="1974" tid="3">03 - Peel Sesion</track> + </group> + <group name="Ayla"> + </album> + <album aid="165" title="Ayla part 2 (Maxi)"> + <track id="1975" tid="1">01 - Radio mix</track> + <track id="1976" tid="2">02 - Extended mix</track> + <track id="1977" tid="3">03 - Club mix</track> + <track id="1978" tid="4">04 - Atmosphere mix</track> + </group> + <group name="B Real, Busta Rhymes, Coolio, LL Cool J & Method Man"> + </album> + <album aid="166" title="Hit 'em High (The Monstars' Anthem)"> + <track id="1979" tid="1">(01) Radio Version</track> + <track id="1980" tid="2">(02) Extended Mix</track> + <track id="1981" tid="3">(03) Extended Track Masters Remix</track> + <track id="1982" tid="4">(04) Original Instrumental</track> + </group> + <group name="B.B. King & Eric Clapton"> + </album> + <album aid="167" title="Riding With The King"> + <track id="1983" tid="1">01 - Riding With The King</track> + <track id="1984" tid="2">02 - Ten Long Years</track> + <track id="1985" tid="3">03 - Key To The Highway</track> + <track id="1986" tid="4">04 - Marry You</track> + <track id="1987" tid="5">05 - Three O'Clock Blues</track> + <track id="1988" tid="6">06 - Help The Poor</track> + <track id="1989" tid="7">07 - I Wanna Be</track> + <track id="1990" tid="8">08 - Worried Life Blues</track> + <track id="1991" tid="9">09 - Days Of Old</track> + <track id="1992" tid="10">10 - When My Heart Beats Like A Hammer</track> + <track id="1993" tid="11">11 - Hold On I'm Coming</track> + <track id="1994" tid="12">12 - Come Rain Or Come Shine</track> + </group> + <group name="Babylon Zoo"> + </album> + <album aid="168" title="The Boy With The X-Ray Eyes"> + <track id="1995" tid="1">01 - Animal Army</track> + <track id="1996" tid="2">02 - Spaceman</track> + <track id="1997" tid="3">03 - Zodiac Sign</track> + <track id="1998" tid="4">04 - Paris Green</track> + <track id="1999" tid="5">05 - Confused Art</track> + <track id="2000" tid="6">06 - Caffeine</track> + <track id="2001" tid="7">07 - The Boy With The X-Ray Eyes</track> + <track id="2002" tid="8">08 - Don't Feed The Animals</track> + <track id="2003" tid="9">09 - Fire Guided Light</track> + <track id="2004" tid="10">10 - Is Your Soul For Sale</track> + <track id="2005" tid="11">11 - I'm Cracking Up I Need A Pill</track> + </group> + <group name="Bacharach & David They Write The Songs"> + </album> + <album aid="169" title="Bacharach & David They Write The Songs"> + <track id="2006" tid="1">(There's) Always Something There To Remind Me - Sandie Shaw</track> + <track id="2007" tid="2">(They Long To Be) Close To You - Isaac Hayes </track> + <track id="2008" tid="3">A House Is Not A Home - Luther Vandross</track> + <track id="2009" tid="4">Anyone Who Had A Heart - Luther Vandross</track> + <track id="2010" tid="5">Arthur's Theme (Best That You Can Do) - Christopher Cross</track> + <track id="2011" tid="6">I Just Don't Know What To Do With Myself - Dusty Springfield</track> + <track id="2012" tid="7">I Say A Little Prayer - Aretha Franklin</track> + <track id="2013" tid="8">I'll Never Fall In Love Again - Bobby Gentry</track> + <track id="2014" tid="9">Make It Easy On Yourself - The Walker Brothers</track> + <track id="2015" tid="10">Reach Out For Me - Dionne Warwick</track> + <track id="2016" tid="11">The Look Of Love - Dusty Springfield</track> + <track id="2017" tid="12">This Guy's In Love With You - Burt Bacharach</track> + <track id="2018" tid="13">Trains And Boats And Planes - Billy J Kramer & The Dakotas</track> + <track id="2019" tid="14">Walk On By - Dionne Warwick</track> + <track id="2020" tid="15">What The World Needs Now Is Love - Jackie De Shannon</track> + <track id="2021" tid="16">Windows Of The World - The Pretenders</track> + <track id="2022" tid="17">You'll Never Get To Heaven (If You Break My Heart) - The Stylistics</track> + </group> + <group name="Bad Boys Blue"> + </album> + <album aid="170" title="Super 20"> + <track id="2023" tid="1">01 - Lady In Black (Radio Edit)</track> + <track id="2024" tid="2">02 - Come Back And Stay</track> + <track id="2025" tid="3">03 - Gimme, Gimme Your Lovin' (Little Lady)</track> + <track id="2026" tid="4">04 - Hungry For Love (Radio Edit)</track> + <track id="2027" tid="5">05 - Don't Walk Away, Suzanne</track> + <track id="2028" tid="6">06 - L.O.V.E. In My Car</track> + <track id="2029" tid="7">07 - You're A Woman</track> + <track id="2030" tid="8">08 - A World Without You (Michelle) - Radio Edit</track> + <track id="2031" tid="9">09 - I Wanna Hear Your Heartbeat (Sunday Girl)</track> + <track id="2032" tid="10">10 - Pretty Young Girl</track> + <track id="2033" tid="11">11 - Kisses And Tears (My One And Only)</track> + <track id="2034" tid="12">12 - Love Really Hurts Without You</track> + <track id="2035" tid="13">13 - Lovers In The Sand</track> + <track id="2036" tid="14">14 - Kiss You All Over, Baby (New Version)</track> + <track id="2037" tid="15">15 - Hot Girls - Bad Boys</track> + <track id="2038" tid="16">16 - One Night In Heaven</track> + <track id="2039" tid="17">17 - Baby I Love You</track> + <track id="2040" tid="18">18 - Love Is No Crime</track> + <track id="2041" tid="19">19 - Inside Of Me</track> + </group> + <group name="Bad Religion"> + </album> + <album aid="171" title="The Gray Race"> + <track id="2042" tid="1">01 - The Gray Race</track> + <track id="2043" tid="2">02 - Them And Us</track> + <track id="2044" tid="3">03 - A Walk</track> + <track id="2045" tid="4">04 - Parallel</track> + <track id="2046" tid="5">05 - Punk Rock Song</track> + <track id="2047" tid="6">06 - Empty Causes</track> + <track id="2048" tid="7">07 - Nobody Listens</track> + <track id="2049" tid="8">08 - Pitty The Dead</track> + <track id="2050" tid="9">09 - Spirit Shine</track> + <track id="2051" tid="10">10 - The Streets Of America</track> + <track id="2052" tid="11">11 - Ten In 2010</track> + <track id="2053" tid="12">12 - Victory</track> + <track id="2054" tid="13">13 - Drunk Sincerity</track> + <track id="2055" tid="14">14 - Come Join Us</track> + <track id="2056" tid="15">15 - Cease</track> + <track id="2057" tid="16">16 - Punk Rock Song (In German)</track> + </group> + <group name="Badesalz"> + </album> + <album aid="172" title="Die wo da so"> + <track id="2058" tid="1">01 - Weckruf</track> + <track id="2059" tid="2">02 - I want your Sex</track> + <track id="2060" tid="3">03 - Papa</track> + <track id="2061" tid="4">04 - Bako</track> + <track id="2062" tid="5">05 - Hassi Janes</track> + <track id="2063" tid="6">06 - Operation</track> + <track id="2064" tid="7">07 - In der Waschanlach</track> + <track id="2065" tid="8">08 - Sound</track> + <track id="2066" tid="9">09 - Was glaubst du</track> + <track id="2067" tid="10">10 - German Music</track> + <track id="2068" tid="11">11 - Papa</track> + <track id="2069" tid="12">12 - Immer schlimmer</track> + <track id="2070" tid="13">13 - Lichterkette</track> + <track id="2071" tid="14">14 - Thomas und Heidi</track> + <track id="2072" tid="15">15 - Dixi-Band</track> + <track id="2073" tid="16">16 - Bubblegum-Time</track> + <track id="2074" tid="17">17 - Richie und Headbanger</track> + <track id="2075" tid="18">18 - Schwarz und Weiß</track> + <track id="2076" tid="19">19 - 6,50 Sicherheitsgebühr</track> + <track id="2077" tid="20">20 - Gesang</track> + <track id="2078" tid="21">21 - Wahltag</track> + <track id="2079" tid="22">22 - Mabadaja Mabadaga ja</track> + <track id="2080" tid="23">23 - Megabreit Computerdeppen</track> + <track id="2081" tid="24">24 - Papa</track> + <track id="2082" tid="25">25 - Neschperblues</track> + <track id="2083" tid="26">26 - Revolte in der Schule</track> + <track id="2084" tid="27">27 - Bongo Karl</track> + <track id="2085" tid="28">28 - Babu</track> + <track id="2086" tid="29">29 - Gereizt</track> + <track id="2087" tid="30">30 - Parfüm</track> + <track id="2088" tid="31">31 - Halleluja</track> + <track id="2089" tid="32">32 - Papa</track> + <track id="2090" tid="33">33 - Superdepp</track> + <track id="2091" tid="34">34 - Dialog</track> + <track id="2092" tid="35">35 - Belgische Äpfel</track> + <track id="2093" tid="36">36 - Dressur</track> + </album> + <album aid="173" title="Wie Mutter und Tochter"> + <track id="2094" tid="1">01 - viel zu harmlos</track> + <track id="2095" tid="2">02 - handy song</track> + <track id="2096" tid="3">04 - tamagotchi</track> + <track id="2097" tid="4">05 - wetzlar</track> + <track id="2098" tid="5">06 - der erste kontakt</track> + <track id="2099" tid="6">07 - versprochen</track> + <track id="2100" tid="7">08 - gianni</track> + <track id="2101" tid="8">09 - pappa vol.17</track> + <track id="2102" tid="9">10 - ying und yang</track> + <track id="2103" tid="10">11 - styling</track> + <track id="2104" tid="11">12 - kasperle gegen drogen</track> + <track id="2105" tid="12">13 - der spanische apotheker</track> + <track id="2106" tid="13">14 - gute argumente</track> + <track id="2107" tid="14">15 - session</track> + <track id="2108" tid="15">16 - nachdenklichkeit</track> + <track id="2109" tid="16">17 - naturschauspiel</track> + <track id="2110" tid="17">18 - schmusebär</track> + <track id="2111" tid="18">19 - hobbies</track> + <track id="2112" tid="19">20 - bali mach uff!</track> + <track id="2113" tid="20">21 - was war das... </track> + <track id="2114" tid="21">22 - der kunde ist könig</track> + <track id="2115" tid="22">23 - jazz</track> + <track id="2116" tid="23">24 - pappa vol.18</track> + <track id="2117" tid="24">25 - die hochzeit</track> + <track id="2118" tid="25">26 - der neue star</track> + <track id="2119" tid="26">27 - route 66</track> + <track id="2120" tid="27">28 - ziegenkäsegeschäft</track> + <track id="2121" tid="28">29 - mutter und tochter</track> + <track id="2122" tid="29">30 - alle jahre wieder</track> + <track id="2123" tid="30">31 - besorgt</track> + <track id="2124" tid="31">32 - kreuzworträtsel</track> + <track id="2125" tid="32">33 - sensibilität</track> + <track id="2126" tid="33">34 - die wahrscheinlichkeit</track> + <track id="2127" tid="34">35 - f.e.v.a</track> + <track id="2128" tid="35">36 - private geheimnisse</track> + <track id="2129" tid="36">37 - back for good (leider live)</track> + </album> + <album aid="174" title="Zarte Metzger"> + <track id="2130" tid="1">01 - Zarte Metzger</track> + <track id="2131" tid="2">02 - Jesu S.</track> + <track id="2132" tid="3">03 - Seelachs</track> + <track id="2133" tid="4">04 - Aufgespürt</track> + <track id="2134" tid="5">05 - Fitneß-Tom</track> + <track id="2135" tid="6">06 - Der Brautstrauß</track> + <track id="2136" tid="7">07 - Der Rollo</track> + <track id="2137" tid="8">08 - Pappa Vol. 15</track> + <track id="2138" tid="9">09 - Zivilcourage</track> + <track id="2139" tid="10">10 - Kamm tugesser</track> + <track id="2140" tid="11">11 - Tobias</track> + <track id="2141" tid="12">12 - Radlacka</track> + <track id="2142" tid="13">13 - Kevin Costner</track> + <track id="2143" tid="14">14 - Moderne Väter</track> + <track id="2144" tid="15">15 - 0190634 . . .</track> + <track id="2145" tid="16">16 - Dabrauchemergarnetdrübberredde</track> + <track id="2146" tid="17">17 - Stones-Revival-Revival</track> + <track id="2147" tid="18">18 - Weichei - Das Musical 1. Akt</track> + <track id="2148" tid="19">19 - Themenabend</track> + <track id="2149" tid="20">20 - Song für Witta Pohl</track> + <track id="2150" tid="21">21 - Herr Seiler</track> + <track id="2151" tid="22">22 - Duell bei Hanau 1420 (Orginal-Aufnahme)</track> + <track id="2152" tid="23">23 - Pappa Vol. 16</track> + <track id="2153" tid="24">24 - Kippen holen</track> + <track id="2154" tid="25">25 - Wie bei Axel</track> + <track id="2155" tid="26">26 - Die Demo</track> + <track id="2156" tid="27">27 - Sin kaa breetsche da</track> + <track id="2157" tid="28">28 - Natur</track> + <track id="2158" tid="29">29 - Die Gaby und Ich</track> + <track id="2159" tid="30">30 - Glück gehabt</track> + <track id="2160" tid="31">31 - Weichei - Das Musical 3. Akt</track> + <track id="2161" tid="32">32 - Der Wettkönig</track> + <track id="2162" tid="33">33 - Waldfest</track> + <track id="2163" tid="34">34 - Tierfreunde</track> + <track id="2164" tid="35">35 - Der australische Freund</track> + <track id="2165" tid="36">36 - Du</track> + </group> + <group name="Bahamadia"> + </album> + <album aid="175" title="Kollage"> + <track id="2166" tid="1">01-Intro</track> + <track id="2167" tid="2">02-Word Play</track> + <track id="2168" tid="3">03-Spontaneity</track> + <track id="2169" tid="4">04-Rugged ruff</track> + <track id="2170" tid="5">05-Interlude</track> + <track id="2171" tid="6">06-I confess</track> + <track id="2172" tid="7">07-UKNOWHOWWEDU</track> + <track id="2173" tid="8">08-Interlude</track> + <track id="2174" tid="9">09-Total wreck</track> + <track id="2175" tid="10">10-Innovation</track> + <track id="2176" tid="11">11-Da jawn</track> + <track id="2177" tid="12">12-Interlude</track> + <track id="2178" tid="13">13-True honey buns (dat freak sht)</track> + <track id="2179" tid="14">14-3 tha hard way</track> + <track id="2180" tid="15">15-Biggest part of me</track> + <track id="2181" tid="16">16-Path to rhythm</track> + </group> + <group name="Baka Beyond"> + </album> + <album aid="176" title="Spirit of the forest"> + <track id="2182" tid="1">1 - Spirit of the forest</track> + <track id="2183" tid="2">2 - The man who danced too slowly</track> + <track id="2184" tid="3">3 - Ngombi</track> + <track id="2185" tid="4">4 - Baka play baka</track> + <track id="2186" tid="5">5 - Nahwia</track> + <track id="2187" tid="6">6 - Eeya be</track> + <track id="2188" tid="7">7 - Canya Jam</track> + <track id="2189" tid="8">8 - Bounaka</track> + </album> +</group> +</catalogue> diff --git a/contrib/retep/retep.jpx b/contrib/retep/retep.jpx new file mode 100644 index 00000000000..dcf68ac8ceb --- /dev/null +++ b/contrib/retep/retep.jpx @@ -0,0 +1,55 @@ +<?xml version="1.0" encoding="UTF-8"?>
+
+<!--JBuilder XML Project-->
+<project>
+ <property category="idl" name="ProcessIDL" value="false" />
+ <property category="runtime.0" name="RunnableType" value="com.borland.jbuilder.runtime.ApplicationRunner" />
+ <property category="runtime.0" name="application.class" value="uk.org.retep.util.hba.Main" />
+ <property category="runtime.0" name="application.parameters" value="-d2 pg_hba.conf" />
+ <property category="runtime.0" name="appserver.ejbJarsSaved" value="1" />
+ <property category="runtime.0" name="appserver.parameters" value="-jts -jns -jss -jdb" />
+ <property category="runtime.0" name="appserver.servername" value="ejbcontainer" />
+ <property category="runtime.0" name="appserver.vmparameters" value="" />
+ <property category="runtime.0" name="jsprunner.docbase" value="." />
+ <property category="runtime.0" name="jsprunner.jspfile" value="E%|/docs/java/xml/example6" />
+ <property category="sys" name="AuthorLabel" value="@author" />
+ <property category="sys" name="BackupPath" value="bak" />
+ <property category="sys" name="BeansInstantiate" value="false" />
+ <property category="sys" name="BraceStyle" value="1" />
+ <property category="sys" name="CheckStable" value="1" />
+ <property category="sys" name="Company" value="" />
+ <property category="sys" name="CompanyLabel" value="Company:" />
+ <property category="sys" name="Copyright" value="Copyright (c) 2001" />
+ <property category="sys" name="CopyrightLabel" value="Copyright:" />
+ <property category="sys" name="DefaultPackage" value="uk.org.retep.util.misc" />
+ <property category="sys" name="Description" value="" />
+ <property category="sys" name="DescriptionLabel" value="Description:" />
+ <property category="sys" name="DocPath" value="doc" />
+ <property category="sys" name="EventMatch" value="false" />
+ <property category="sys" name="EventStyle" value="1" />
+ <property category="sys" name="ExcludeClassEnabled" value="0" />
+ <property category="sys" name="InstanceVisibility" value="0" />
+ <property category="sys" name="JDK" value="java 1.3.0-C" />
+ <property category="sys" name="LastTag" value="0" />
+ <property category="sys" name="Libraries" value="JAXP;Oracle JDBC;JDK1.3 JRE" />
+ <property category="sys" name="MakeStable" value="0" />
+ <property category="sys" name="OutPath" value="build" />
+ <property category="sys" name="SourcePath" value="." />
+ <property category="sys" name="Title" value="" />
+ <property category="sys" name="TitleLabel" value="Title:" />
+ <property category="sys" name="Version" value="1.0" />
+ <property category="sys" name="VersionLabel" value="@version" />
+ <property category="sys" name="WorkingDirectory" value="." />
+ <node type="Package" name="uk.org.retep.dtu" />
+ <node type="Package" name="uk.org.retep.tools" />
+ <node type="Package" name="uk.org.retep.util" />
+ <node type="Package" name="uk.org.retep.xml.core" />
+ <node type="Package" name="uk.org.retep.xml.jdbc" />
+ <node type="Package" name="uk.org.retep.xml.parser" />
+ <file path="build.xml" />
+ <file path="CHANGELOG" />
+ <file path="Implementation" />
+ <file path="uk/org/retep/util/models/PropertiesTableModel.java" />
+ <file path="README" />
+</project>
+
diff --git a/contrib/retep/uk/org/retep/dtu/DCollection.java b/contrib/retep/uk/org/retep/dtu/DCollection.java new file mode 100644 index 00000000000..e97fc067c43 --- /dev/null +++ b/contrib/retep/uk/org/retep/dtu/DCollection.java @@ -0,0 +1,228 @@ +package uk.org.retep.dtu; + +import uk.org.retep.xml.core.XMLFactory; +import uk.org.retep.xml.core.XMLFactoryException; + +import java.io.IOException; +import java.util.Collection; +import java.util.Iterator; + +public class DCollection implements Collection +{ + protected int num,max,inc; + + protected DElement elements[]; + + public DCollection() + { + this(10); + } + + public DCollection(int aIncrement) + { + num=0; + max=0; + inc=aIncrement; + elements=null; + } + + protected void resize() + { + if(num>=max) { + max+=inc; + DElement n[] = new DElement[max]; + if(elements!=null) { + System.arraycopy(elements,0,n,0,elements.length); + } + elements=n; + } + } + + public int size() + { + return num; + } + + public boolean isEmpty() + { + return (num==0); + } + + /** + * Checks the list using it's XML id. + */ + public synchronized boolean contains(Object parm1) + { + if(parm1 instanceof DElement) { + DElement e = (DElement) parm1; + int ei = e.getID(); + + // out of range? + if(ei<0 || ei>=num) + return false; + + return elements[ei].equals(e); + } + + return false; + } + + public Iterator iterator() + { + return new iterator(this); + } + + /** + * Inner class to implement an Iterator + */ + protected class iterator implements Iterator + { + protected DCollection c; + protected int i; + + public iterator(DCollection aCollection) + { + c=aCollection; + i=0; + } + + public boolean hasNext() + { + return i<c.size(); + } + + public Object next() { + return c.getElement(i++); + } + + public void remove() { + } + } + + public synchronized Object[] toArray() + { + Object o[] = new Object[num]; + System.arraycopy(elements,0,o,0,num); + return o; + } + + public Object[] toArray(Object[] parm1) + { + /**@todo: Implement this java.util.Collection method*/ + throw new java.lang.UnsupportedOperationException("Method toArray() not yet implemented."); + } + + /** + * Adds a node to the Collection, and sets it's ID to its position in the Collection + */ + public synchronized boolean add(Object parm1) + { + if(parm1 instanceof DElement) { + DElement e = (DElement) parm1; + + // Do nothing if it's already in a Collection + if(e.getID()>-1) { + return false; + } + + // Add to the Collection + resize(); + e.setID(num); + elements[num++] = e; + return true; + } + return false; + } + + public synchronized boolean remove(Object parm1) + { + if(parm1 instanceof DElement) { + DElement e = (DElement) parm1; + int ei = e.getID(); + if(ei<0 || ei>=num) + return false; + + // Mark the node as parentless + e.setID(-1); + + // Now remove from the array by moving latter nodes, fixing their ids + // in the process + for(int j=ei,k=ei+1;k<num;j++,k++) { + elements[j]=elements[k]; + elements[j].setID(j); + } + num--; + return true; + } + + return false; + } + + public boolean containsAll(Collection parm1) + { + /**@todo: Implement this java.util.Collection method*/ + throw new java.lang.UnsupportedOperationException("Method containsAll() not yet implemented."); + } + + public boolean addAll(Collection parm1) + { + /**@todo: Implement this java.util.Collection method*/ + throw new java.lang.UnsupportedOperationException("Method addAll() not yet implemented."); + } + + public boolean removeAll(Collection parm1) + { + /**@todo: Implement this java.util.Collection method*/ + throw new java.lang.UnsupportedOperationException("Method removeAll() not yet implemented."); + } + + public boolean retainAll(Collection parm1) + { + /**@todo: Implement this java.util.Collection method*/ + throw new java.lang.UnsupportedOperationException("Method retainAll() not yet implemented."); + } + + public synchronized void clear() + { + // Mark each node as parentless + for(int i=0;i<num;i++) { + elements[i].setID(-1); + } + + // dispose the array + num=0; + max=0; + elements=null; + } + + /** + * Returns the element with supplied id. + * @return element or null + */ + public synchronized DElement getElement(int id) + { + if(id<0 || id>=num) + return null; + + return elements[id]; + } + + /** + * Repairs the collection, ensuring all id's are correct + */ + public synchronized void repair() + { + for(int i=0;i<num;i++) { + elements[i].setID(i); + } + } + + public synchronized void saveXML(XMLFactory aFactory) + throws IOException, XMLFactoryException + { + for(int i=0;i<num;i++) { + elements[i].saveXML(aFactory); + } + } + +}
\ No newline at end of file diff --git a/contrib/retep/uk/org/retep/dtu/DConstants.java b/contrib/retep/uk/org/retep/dtu/DConstants.java new file mode 100644 index 00000000000..fb825d735bf --- /dev/null +++ b/contrib/retep/uk/org/retep/dtu/DConstants.java @@ -0,0 +1,43 @@ +package uk.org.retep.dtu; + +public class DConstants +{ + /** + * A global version number + */ + public static final String XML_VERSION_ID = "V7.1-2001-02-26"; + + /** + * XML Tag names + */ + public static final String XML_DISPLAYNAME= "DISPLAYNAME"; + public static final String XML_FROM = "FROM"; + public static final String XML_ID = "ID"; + public static final String XML_MODULE = "MODULE"; + public static final String XML_NODE = "NODE"; + public static final String XML_TO = "TO"; + public static final String XML_TRANSFORM = "TRANSFORM"; + public static final String XML_TYPE = "TYPE"; + public static final String XML_VERSION = "VERSION"; + public static final String XML_X = "X"; + public static final String XML_Y = "Y"; + + public static final int NOP = 0; // No operation or always run transform + public static final int SUCCESS = 1; // Run transform only if DNode.OK + public static final int ERROR = 2; // Run transform only if DNode.ERROR + + /** + * Node types 20-39 reserved for Transformation types + */ + public static final int TRANSFORMBASE = 20; + + /** + * Node types 20-99 reserved for Internal Node implementations + */ + public static final int INTERNALBASE = 50; + + /** + * Node types 100+ are for user extensions + */ + public static final int USERBASE = 100; +}
\ No newline at end of file diff --git a/contrib/retep/uk/org/retep/dtu/DElement.java b/contrib/retep/uk/org/retep/dtu/DElement.java new file mode 100644 index 00000000000..73fa7e87e83 --- /dev/null +++ b/contrib/retep/uk/org/retep/dtu/DElement.java @@ -0,0 +1,31 @@ +package uk.org.retep.dtu; + +import uk.org.retep.xml.core.XMLFactory; +import uk.org.retep.xml.core.XMLFactoryException; + +import java.io.IOException; + +public interface DElement +{ + /** + * Fetch the unique ID of this Element + */ + public int getID(); + + /** + * Sets the unique id - normally set by DCollection + */ + public void setID(int id); + + /** + * @return the type of the Element + */ + public int getType(); + + /** + * Set's the element type + */ + public void setType(int aType); + + public void saveXML(XMLFactory aFactory) throws IOException, XMLFactoryException; +}
\ No newline at end of file diff --git a/contrib/retep/uk/org/retep/dtu/DEnvironment.java b/contrib/retep/uk/org/retep/dtu/DEnvironment.java new file mode 100644 index 00000000000..2efcfe81a1e --- /dev/null +++ b/contrib/retep/uk/org/retep/dtu/DEnvironment.java @@ -0,0 +1,30 @@ +package uk.org.retep.dtu; + +import java.util.Collection; +import java.util.HashMap; +import java.util.Iterator; + +public class DEnvironment +{ + protected HashMap dsrc; + + public DEnvironment() + { + dsrc=new HashMap(); + } + + public void addDataSource(String aKey,Object aObject) + { + dsrc.put(aKey,aObject); + } + + public Object getDataSource(String aKey) + { + return dsrc.get(aKey); + } + + public Iterator getDataSources() + { + return dsrc.values().iterator(); + } +}
\ No newline at end of file diff --git a/contrib/retep/uk/org/retep/dtu/DModule.java b/contrib/retep/uk/org/retep/dtu/DModule.java new file mode 100644 index 00000000000..21d037f2678 --- /dev/null +++ b/contrib/retep/uk/org/retep/dtu/DModule.java @@ -0,0 +1,97 @@ +package uk.org.retep.dtu; + +import uk.org.retep.xml.core.XMLFactory; +import uk.org.retep.xml.core.XMLFactoryException; +import uk.org.retep.xml.parser.TagListener; +import uk.org.retep.util.Logger; + +import java.io.IOException; +import java.io.Serializable; +import java.util.HashMap; +import java.util.Iterator; + +/** + * DModule represents a programatic module of steps used within the DTU + */ +public class DModule implements Serializable +{ + // The nodes and transitions between them + protected DCollection nodes; + + protected String displayName; + + public static final String DEFAULT_DISPLAYNAME = "unnamed module"; + + public DModule() + { + nodes=new DCollection(); + displayName=DEFAULT_DISPLAYNAME; + Logger.log(Logger.DEBUG,"new DModule",this); + } + + // Expensive! + public DNode getNode(int id) + { + return (DNode) nodes.getElement(id); + } + + public DNode addNode(DNode aNode) + { + Logger.log(Logger.DEBUG,"DModule.addNode",aNode); + nodes.add(aNode); + return aNode; + } + + public void removeNode(DNode aNode) + { + Logger.log(Logger.DEBUG,"DModule.removeNode",aNode); + nodes.remove(aNode); + } + + public void clear() + { + Logger.log(Logger.DEBUG,"DModule.clear",this); + nodes.clear(); + } + + public void setDisplayName(String aName) + { + Logger.log(Logger.DEBUG,"DModule.setDisplayName",aName); + displayName = aName; + } + + public String getDisplayName() + { + return displayName; + } + + public Iterator iterator() + { + return nodes.iterator(); + } + + /** + * Writes an XML representation of this module to an XMLFactory. The caller + * must close the factory after use! + */ + public synchronized void saveXML(XMLFactory aFactory) + throws IOException, XMLFactoryException + { + Logger.log(Logger.DEBUG,"DModule.saveXML start",this); + Iterator it; + + aFactory.startTag(DConstants.XML_MODULE); + aFactory.addAttribute(DConstants.XML_DISPLAYNAME,displayName); + aFactory.addAttribute(DConstants.XML_VERSION,DConstants.XML_VERSION_ID); + + // The nodes + nodes.saveXML(aFactory); + + // The transforms + //trans.saveXML(aFactory); + + aFactory.endTag(); // MODULE + Logger.log(Logger.DEBUG,"DModule.saveXML end",this); + } + +}
\ No newline at end of file diff --git a/contrib/retep/uk/org/retep/dtu/DModuleXML.java b/contrib/retep/uk/org/retep/dtu/DModuleXML.java new file mode 100644 index 00000000000..31552cd8d72 --- /dev/null +++ b/contrib/retep/uk/org/retep/dtu/DModuleXML.java @@ -0,0 +1,233 @@ +package uk.org.retep.dtu; + +import uk.org.retep.xml.core.XMLFactory; +import uk.org.retep.xml.core.XMLFactoryException; +import uk.org.retep.xml.parser.TagHandler; +import uk.org.retep.xml.parser.TagListener; +import uk.org.retep.util.Logger; + +import java.io.CharArrayWriter; +import java.io.FileInputStream; +import java.io.FileWriter; +import java.io.IOException; +import java.util.HashMap; +import java.util.Iterator; +import java.util.ArrayList; + +import org.xml.sax.InputSource; +import org.xml.sax.Parser; +import org.xml.sax.SAXException; +import javax.xml.parsers.ParserConfigurationException; + +public class DModuleXML implements TagListener +{ + protected TagHandler handler; + + protected DModule module = null; + protected DNode node = null; + protected DTransform trans = null; + + protected ArrayList txmap; + + public DModuleXML() + { + handler = new TagHandler(); + handler.addTagListener(this); + + txmap = new ArrayList(); + + Logger.log(Logger.DEBUG,"DModuleXML initialised"); + } + + public TagHandler getTagHandler() + { + return handler; + } + + /** + * Used to optimise the switch handling in tagStart. + * + * The values of each T_* constant must match the corresponding element no + * in the tags static array. + */ + private static final int T_DEFAULT=-1; + private static final int T_MODULE =0; + private static final int T_NODE =1; + private static final int T_TRANS =2; + private static final String tags[] = { + DConstants.XML_MODULE, + DConstants.XML_NODE, + DConstants.XML_TRANSFORM + }; + + /** + * This is called when a tag has just been started. + * <p><b>NB:</b> args is volatile, so if you use it beyond the lifetime of + * this call, then you must make a copy of the HashMap (and not use simply + * store this HashMap). + * @param level The number of tags above this + * @param tag The tag name + * @param args A HashMap of any arguments + */ + public void tagStart(int level,String tag,HashMap args) + { + Logger.log(Logger.DEBUG,"DModuleXML.tagStart",tag); + + // Prefetch some common attributes + String sType = (String) args.get(DConstants.XML_TYPE); + String sX = (String) args.get(DConstants.XML_X); + String sY = (String) args.get(DConstants.XML_Y); + + int type=-1,x=-1,y=-1; + + if(sType!=null) { + type = Integer.parseInt(sType); + } + + if(sX!=null) { + y = Integer.parseInt(sX); + } + + if(sY!=null) { + x = Integer.parseInt(sY); + } + + // Match the tag against the tags array (used for switch() ) + int tagID=T_DEFAULT; + for(int i=0;i<tags.length;i++) { + if(tag.equals(tags[i])) { + tagID=i; + } + } + + switch(tagID) + { + // The main module tag + case T_MODULE: + module = new DModule(); + + String sDisplayName = (String) args.get(DConstants.XML_DISPLAYNAME); + if(sDisplayName!=null) { + module.setDisplayName(sDisplayName); + } + break; + + // Basic nodes + case T_NODE: + node = new DNode(); + node.setType(type); + module.addNode(node); + break; + + // Basic transforms + case T_TRANS: + trans = new DTransform(); + trans.setType(type); + + // When finished we fix the transforms + int to = Integer.parseInt((String) args.get(DConstants.XML_TO)); + txmap.add(new tx(node,trans,to)); + + break; + + default: + // ignore unknown tags for now + break; + } + } + + protected class tx + { + public DNode node; + public DTransform transform; + public int toID; + + public tx(DNode aNode,DTransform aTransform,int aID) + { + node=aNode; + transform=aTransform; + toID=aID; + } + } + + /** + * This method is called by ContHandler to process a tag once it has been + * fully processed. + * <p><b>NB:</b> content is volatile, so you must copy its contents if you use + * it beyond the lifetime of this call. + * @param content CharArrayWriter containing the content of the tag. + */ + public void tagContent(CharArrayWriter content) + { + // Ignore + } + + public void fixTransforms() + { + DNode to; + Iterator it = txmap.iterator(); + + while(it.hasNext()) { + tx x = (tx) it.next(); + + //Logger.log(Logger.DEBUG,"Fixing transform "+x.toID,x.transform,Integer.toString(x.node.getID()),Integer.toString(module.getNode(x.toID).getID())); + to = module.getNode(x.toID); + + x.transform.setFrom(x.node); + x.transform.setTo(to); + //to.setFrom(x.transform); + } + + } + + /** + * Parse an InputSource and return the contained module. + * @return DModule loaded, null if the xml file does not contain a module. + */ + public DModule parse(InputSource is) + throws IOException,SAXException + { + getTagHandler().parse(is); + fixTransforms(); + return module; + } + + /** + * Parse an uri and return the contained module. + * @return DModule loaded, null if the xml file does not contain a module. + */ + public DModule parse(String uri) + throws IOException,SAXException + { + getTagHandler().parse(uri); + fixTransforms(); + return module; + } + + /** + * Debug test - read xml from one file and save to another. + */ + public static void main(String args[]) throws Exception + { + if(args.length!=2) { + System.err.println("Syntax: java DModuleXML in-file out-file"); + System.exit(1); + } + + Logger.setLevel(Logger.DEBUG); + + Logger.log(Logger.INFO,"DModuleXML Read test1.xml"); + DModuleXML dm = new DModuleXML(); + DModule module = dm.parse(new InputSource(new FileInputStream(args[0]))); + + Logger.log(Logger.INFO,"Parse complete"); + + Logger.log(Logger.INFO,"DModuleXML Write XML"); + FileWriter fw = new FileWriter(args[1]); + module.saveXML(new XMLFactory(fw)); + fw.close(); + Logger.log(Logger.INFO,"Write complete"); + + DProcessor.run(module); + } +}
\ No newline at end of file diff --git a/contrib/retep/uk/org/retep/dtu/DNode.java b/contrib/retep/uk/org/retep/dtu/DNode.java new file mode 100644 index 00000000000..7a8321741cd --- /dev/null +++ b/contrib/retep/uk/org/retep/dtu/DNode.java @@ -0,0 +1,233 @@ +package uk.org.retep.dtu; + +import uk.org.retep.util.Logger; +import uk.org.retep.xml.core.XMLFactory; +import uk.org.retep.xml.core.XMLFactoryException; + +import java.io.IOException; +import java.io.Serializable; +import java.util.Iterator; + +/** + * This is the base class for all nodes. + */ +public class DNode implements DElement, Serializable +{ + // The id of this node + protected int id; + + // The type of this node + protected int type; + + protected int x,y; + + public static final int OK = 0; // Node last ran fine + public static final int ERROR = 1; // Node failed on last run + + /** + * This type of node does nothing + */ + public static int NOP = 0; // No action + + public DNode() + { + this(NOP); + } + + public DNode(int aType) + { + id=-1; + type=aType; + + // Init the transform linkage + mf=mt=5; + nf=nt=0; + fn = new DTransform[mf]; + tn = new DTransform[mt]; + + Logger.log(Logger.DEBUG,"new DNode"); + } + + public int getID() + { + return id; + } + + public void setID(int aID) + { + id=aID; + Logger.log(Logger.DEBUG,"DNode.setID",aID); + } + + public int getType() + { + return type; + } + + public void setType(int aType) + { + type=aType; + Logger.log(Logger.DEBUG,"DNode.setType",aType); + } + + /** + */ + public void saveXML(XMLFactory aFactory) + throws IOException, XMLFactoryException + { + Logger.log(Logger.DEBUG,"DNode.saveXML start",this); + Iterator it; + + aFactory.startTag(DConstants.XML_NODE); + aFactory.addAttribute(DConstants.XML_ID,new Integer(getID())); + aFactory.addAttribute(DConstants.XML_TYPE,new Integer(getType())); + + // used for display only + aFactory.addAttribute(DConstants.XML_X,new Integer(getX())); + aFactory.addAttribute(DConstants.XML_Y,new Integer(getY())); + + // Save the transforms here (only the from list required) + for(int i=0;i<nf;i++) { + fn[i].saveXML(aFactory); + } + + aFactory.endTag(); // NODE + Logger.log(Logger.DEBUG,"DNode.saveXML finish",this); + } + + public void setPosition(int aX,int aY) + { + x=aX; + y=aY; + } + + public int getX() + { + return x; + } + + public int getY() + { + return y; + } + + public void setX(int aX) + { + x=aX; + } + + public void setY(int aY) + { + y=aY; + } + + /** + * This must be overidden to do something + * @return Return status + */ + public int run(DEnvironment env) + { + return OK; + } + + /** + * Node Transforms... + */ + protected int nf,mf,nt,mt; + protected DTransform fn[],tn[]; + + /** + * Executes the transform + */ + public DTransform getTransform(int aID) + { + return tn[aID]; + } + + /** + * @return number of transforms + */ + public int getFromTransforms() + { + return nf; + } + + /** + * @return number of transforms + */ + public int getToTransforms() + { + return nt; + } + + /** + * Adds a transform to this node (called by DTransform) + */ + protected synchronized void setFrom(DTransform aTransform) + { + for(int i=0;i<nf;i++) { + if(fn[i].equals(aTransform)) { + return; + } + } + if(nf>=mf) { + mf+=5; + DTransform nn[] = new DTransform[mf]; + System.arraycopy(fn,0,nn,0,nf); + fn=nn; + } + fn[nf++]=aTransform; + } + + /** + * Adds a transform to this node (called by DTransform) + */ + protected synchronized void setTo(DTransform aTransform) + { + for(int i=0;i<nt;i++) { + if(tn[i].equals(aTransform)) { + return; + } + } + if(nt>=mt) { + mt+=5; + DTransform nn[] = new DTransform[mt]; + System.arraycopy(tn,0,nn,0,nt); + tn=nn; + } + tn[nt++]=aTransform; + } + + /** + * Removes a transform (called by DTransform) + */ + protected synchronized void removeFrom(DTransform aTransform) + { + for(int i=0;i<nf;i++) { + if(tn[i].equals(aTransform)) { + for(int j=i+1;j<nf;j++,i++) { + fn[i]=fn[j]; + } + nf--; + return; + } + } + } + + /** + * Removes a transform (called by DTransform) + */ + protected synchronized void removeTo(DTransform aTransform) + { + for(int i=0;i<nt;i++) { + if(tn[i].equals(aTransform)) { + for(int j=i+1;j<nt;j++,i++) { + tn[i]=tn[j]; + } + nt--; + return; + } + } + } + +} diff --git a/contrib/retep/uk/org/retep/dtu/DProcessor.java b/contrib/retep/uk/org/retep/dtu/DProcessor.java new file mode 100644 index 00000000000..7745a184840 --- /dev/null +++ b/contrib/retep/uk/org/retep/dtu/DProcessor.java @@ -0,0 +1,191 @@ +package uk.org.retep.dtu; + +import uk.org.retep.util.Logger; + +import java.util.Iterator; + +/** + * This class processes a Module. It's implemented as a Thread and there can + * be many threads running on a single module + */ +public class DProcessor +{ + /** + * This starts a module + */ + public static DProcessor run(DModule aModule) { + // 3600000 is 1 hour in milliseconds + return run(aModule,3600000); + } + + /** + * This starts a module + */ + public static DProcessor run(DModule aModule,long timeout) { + return new DProcessor(aModule,timeout); + } + + protected DProcessor(DModule aModule,long timeout) { + ThreadGroup group = new ThreadGroup(aModule.getDisplayName()+" DProcessor"); + + // Setup the environment + DEnvironment env = new DEnvironment(); + + // loop for any nodes without a transform pointing _to_ it. + Iterator it = aModule.iterator(); + while(it.hasNext()) { + DNode node = (DNode) it.next(); + + // Only start if we have no predecessor + if(node.getFromTransforms()==0) { + proc proc = new proc(group,aModule,node,env); + proc.start(); + } + } + + // Now wait until all the threads have finished + boolean running=true; + try { + int cnt=1; // must loop at least once! + + while(cnt>0) { + int numThreads = group.activeCount(); + Thread threads[] = new Thread[numThreads]; + cnt = group.enumerate(threads,false); + + //Logger.log(Logger.DEBUG,"Waiting on threads",cnt); + while(cnt>0) { + //Logger.log(Logger.DEBUG,"Waiting on thread",cnt); + threads[--cnt].join(timeout); + } + + Logger.log(Logger.DEBUG,"All threads appear to have died, retesting"); + } + } catch(InterruptedException ie) { + Logger.log(Logger.ERROR,"DProcessor, exception caught while waiting for threads to die",ie); + } + + // finally close any open datasources + Logger.log(Logger.DEBUG,"DProcessor cleanup"); + + Logger.log(Logger.DEBUG,"DProcessor finished"); + } + + class proc implements Runnable + { + protected DModule module; // The module being run + protected DNode pc; // current Program Counter + + protected DEnvironment env; // Shared environment + + // Used when launching new threads only + protected DTransform trans; // If not null, a transform to run first + protected int status; + + protected Thread thread; + + /** + * Start processing from DNode aNode. This is called by DProcessor at + * initialisation only. + */ + protected proc(ThreadGroup aGroup,DModule aModule,DNode aNode,DEnvironment aEnv) + { + // aGroup will be null when forking... + if(aGroup==null) { + thread = new Thread(this); + } else { + thread = new Thread(aGroup,this); + } + + module = aModule; + pc = aNode; + env = aEnv; + } + + /** + * Start processing the DTransform aTransform from aNode (does not execute + * the node). This is called by this inner class itself when forking new + * threads. + */ + protected proc(DModule aModule,DNode aNode,DEnvironment aEnv,DTransform aTransform,int aStatus) + { + this(null,aModule,aNode,aEnv); + trans = aTransform; + status = aStatus; + } + + /** + * Start this thread + */ + public void start() + { + thread.start(); + } + + public void run() + { + // Handle an initial transform first. It's used when a new Thread was created. + if(trans!=null) { + transform(trans,false,status); + trans=null; + } + + while(pc!=null) { + //Logger.log(Logger.DEBUG,"running node ",pc.getID()); + + // Process the node + int status = pc.run(env); + //Logger.log(Logger.DEBUG," status ",status); + + // Now the transforms. This thread continues with the first one that runs, + // but any others that will also run will do so in their own thread. + // If no transform runs (or there are none), then the thread will die. + int numTrans = pc.getToTransforms(); + boolean fork=false; + for(int i=0;i<numTrans;i++) { + fork = transform(pc.getTransform(i),fork,status); + //Logger.log(Logger.DEBUG,"fork",fork?"true":"false"); + } + //Logger.log(Logger.DEBUG,"fork",fork?"true":"false"); + if(!fork) { + // No transforms ran, so we quit this thread + pc=null; + } + + // This lets the other threads a chance to run + Thread.yield(); + } + } + + /** + * This executes a transform + * @param aTransform DTransform to execute + * @param fork true then a new process is triggered + * @param status The return status of the previous node + * @return true if the transform ran or a fork occured. + */ + public boolean transform(DTransform aTransform,boolean fork,int status) + { + // Check to see if the transform will run (based on the calling nodes return + // status + if(!aTransform.willRun(status,env)) { + return false; + } + + if(fork) { + // Create the new processor but this time we want a transform to run + proc proc = new proc(module,pc,env,aTransform,status); + return true; + } + + if(aTransform.run(env)) { + pc=aTransform.getTo(); + return true; + } + + return false; + } + + } // class proc + +}
\ No newline at end of file diff --git a/contrib/retep/uk/org/retep/dtu/DTransform.java b/contrib/retep/uk/org/retep/dtu/DTransform.java new file mode 100644 index 00000000000..88aac19768a --- /dev/null +++ b/contrib/retep/uk/org/retep/dtu/DTransform.java @@ -0,0 +1,133 @@ +package uk.org.retep.dtu; + +import uk.org.retep.xml.core.XMLFactory; +import uk.org.retep.xml.core.XMLFactoryException; + +import java.io.IOException; + +/** + * This manages the links between two nodes. + */ +public class DTransform +{ + protected DNode from,to; + protected int type; + + public DTransform() + { + this(null,null); + } + + public DTransform(DNode aFrom,DNode aTo) + { + from=aFrom; + to=aTo; + } + + public int getType() + { + return type; + } + + public void setType(int aType) + { + type=aType; + } + + public void setFrom(DNode aNode) + { + if(from!=null) { + from.removeTo(this); + } + + from=aNode; + from.setTo(this); + } + + public DNode getFrom() + { + return from; + } + + public void setTo(DNode aNode) + { + if(to!=null) { + to.removeFrom(this); + } + + to=aNode; + aNode.setFrom(this); + } + + public DNode getTo() + { + return to; + } + + /** + * This ensures the minimum tag/attributes are generated. + * To extend, extend saveCustomXML() which is called by this method + * appropriately. + */ + public final void saveXML(XMLFactory aFactory) + throws IOException, XMLFactoryException + { + // Bare minimum is the tag type, and the destination node's id + aFactory.startTag(DConstants.XML_TRANSFORM); + aFactory.addAttribute(DConstants.XML_TYPE,Integer.toString(getType())); + aFactory.addAttribute(DConstants.XML_TO,Integer.toString(to.getID())); + saveCustomXML(aFactory); + aFactory.endTag(); + } + + /** + * Custom transformations must overide this method and write direct to the + * supplied XMLFactory. A tag is currently open when the method is called, but + * is closed immediately this method exits. + */ + public void saveCustomXML(XMLFactory aFactory) + throws IOException, XMLFactoryException + { + // Default method does nothing... + } + + /** + * Checks to see if we should run based on the calling nodes status. Overide + * this to add this sort of checking. + * + * @param status The return status of the calling node + * @param env DEnvironment we are using + * @return true if we will run. + */ + public boolean willRun(int status,DEnvironment env) + { + switch(getType()) + { + // NOP is the generic link - always run + case DConstants.NOP: + return true; + + // SUCCESS only runs if the previous node was OK + case DConstants.SUCCESS: + return status==DNode.OK; + + case DConstants.ERROR: + return status==DNode.ERROR; + + // Default - always run. Overide the method if you need to change this + default: + return true; + } + } + + /** + * Overide this for a transform to do something. + * @param env DEnvironment we are using + * @return true if we actually ran. DProcessor will jump to the getTo() node if so. + */ + public boolean run(DEnvironment env) + { + return true; + } + +}
\ No newline at end of file diff --git a/contrib/retep/uk/org/retep/tools.properties b/contrib/retep/uk/org/retep/tools.properties new file mode 100644 index 00000000000..38dc668aea1 --- /dev/null +++ b/contrib/retep/uk/org/retep/tools.properties @@ -0,0 +1,8 @@ +#Written by Retep PropertyEditor
+#Sat Mar 03 16:29:44 GMT+00:00 2001
+tool.hba=pg_hba.conf editor
+tool.hba.class=uk.org.retep.util.hba.Editor
+tool.proped.class=uk.org.retep.util.proped.PropertyEditor
+tool.hba.type=Misc
+tool.proped.type=Misc
+tool.proped=Properties Editor
diff --git a/contrib/retep/uk/org/retep/tools/Tool.java b/contrib/retep/uk/org/retep/tools/Tool.java new file mode 100644 index 00000000000..ffd19ae90c0 --- /dev/null +++ b/contrib/retep/uk/org/retep/tools/Tool.java @@ -0,0 +1,33 @@ +package uk.org.retep.tools; + +import javax.swing.JMenuBar; + +/** + * Tools can implement this interface to provide the parent manager (the big + * application or the StandaloneApp class) enough details to display them. + * + * If a tool does not implement this class, it gets basic treatment. + * + * @author + * @version 1.0 + */ + +public interface Tool +{ + /** + * @return the JMenuBar for this tool, null if none. + */ + public JMenuBar getMenuBar(); + + /** + * @return the title string to go into the JFrame/JInternalFrame's title bar. + */ + public String getTitle(); + + /** + * Called by StandaloneApp to indicate this is within a StandaloneApp. + * You should assume you are not in standalone mode until this is called. + */ + public void setStandaloneMode(boolean aMode); + +}
\ No newline at end of file diff --git a/contrib/retep/uk/org/retep/util/ExceptionDialog.java b/contrib/retep/uk/org/retep/util/ExceptionDialog.java new file mode 100644 index 00000000000..ea3d5c43c98 --- /dev/null +++ b/contrib/retep/uk/org/retep/util/ExceptionDialog.java @@ -0,0 +1,141 @@ +package uk.org.retep.util; + +import java.awt.*; +import javax.swing.*; +import java.awt.event.*; + +/** + * Display an Exception to the user + * @author + * @version 1.0 + */ + +public class ExceptionDialog extends JDialog +{ + // This is used to store the parent frame. + // Classes like StandaloneApp set's this so that the + // displayException() method can work without knowing/finding out + // the parent Frame/JFrame. + private static Frame globalFrame; + + private static ExceptionDialog globalDialog; + + JPanel panel1 = new JPanel(); + BorderLayout borderLayout1 = new BorderLayout(); + JTextArea message = new JTextArea(); + JPanel jPanel1 = new JPanel(); + JButton jButton1 = new JButton(); + GridLayout gridLayout1 = new GridLayout(); + JButton jButton2 = new JButton(); + JLabel jLabel1 = new JLabel(); + + public ExceptionDialog(Frame frame, String title, boolean modal) + { + super(frame, title, modal); + try + { + jbInit(); + pack(); + } + catch(Exception ex) + { + ex.printStackTrace(); + } + } + + public ExceptionDialog() + { + this(null, "", false); + } + void jbInit() throws Exception + { + panel1.setLayout(borderLayout1); + message.setBorder(BorderFactory.createLoweredBevelBorder()); + message.setText("jTextArea1"); + message.setBackground(Color.lightGray); + message.setEditable(false); + jButton1.setText("Close"); + jButton1.addActionListener(new java.awt.event.ActionListener() + { + public void actionPerformed(ActionEvent e) + { + jButton1_actionPerformed(e); + } + }); + jPanel1.setLayout(gridLayout1); + jButton2.setEnabled(false); + jButton2.setText("Stack Trace"); + jLabel1.setEnabled(false); + getContentPane().add(panel1); + panel1.add(message, BorderLayout.CENTER); + this.getContentPane().add(jPanel1, BorderLayout.SOUTH); + jPanel1.add(jButton2, null); + jPanel1.add(jLabel1, null); + jPanel1.add(jButton1, null); + } + + /** + * Sets the Frame used to display all dialog boxes. + */ + public static void setFrame(Frame aFrame) + { + globalFrame = aFrame; + } + + /** + * Displays a dialog based on the exception + * @param ex Exception that was thrown + */ + public static void displayException(Exception ex) + { + displayException(ex,null); + } + + /** + * Displays a dialog based on the exception + * @param ex Exception that was thrown + */ + public static void displayException(Exception ex,String msg) + { + String cname = ex.getClass().getName(); + int i=cname.lastIndexOf("."); + displayException(cname.substring(i+1),ex,msg); + } + + public static void displayException(String title,Exception ex) + { + displayException(title,ex,null); + } + + public static void displayException(String title,Exception ex,String msg) + { + Logger.log(Logger.ERROR,title,ex.getMessage()); + + // Default to a stack trace if no frame set + if(globalFrame==null) { + ex.printStackTrace(); + return; + } + + if(globalDialog==null) { + globalDialog=new ExceptionDialog(globalFrame,title,true); + globalDialog.pack(); + } + + globalDialog.setTitle(title); + + if(msg!=null) { + globalDialog.message.setText(msg); + globalDialog.message.append(":\n"); + } + globalDialog.message.append(ex.getMessage()); + + globalDialog.pack(); + globalDialog.setVisible(true); + } + + void jButton1_actionPerformed(ActionEvent e) + { + setVisible(false); + } +}
\ No newline at end of file diff --git a/contrib/retep/uk/org/retep/util/Globals.java b/contrib/retep/uk/org/retep/util/Globals.java new file mode 100644 index 00000000000..c0e3548a321 --- /dev/null +++ b/contrib/retep/uk/org/retep/util/Globals.java @@ -0,0 +1,170 @@ +package uk.org.retep.util; + +import uk.org.retep.util.Logger; + +import java.util.ArrayList; +import java.util.Hashtable; +import java.util.Iterator; +import java.util.Properties; + +/** + * This is a Singleton that stores global properties, command line arguments + * etc. + * + * All tools are guranteed that this will exist. + * + * @author + * @version 1.0 + */ + +public class Globals +{ + private static final Globals SINGLETON = new Globals(); + + private Hashtable global= new Hashtable(); + private Properties props = new Properties(); + private ArrayList args = new ArrayList(); + + private Globals() + { + } + + public static Globals getInstance() + { + return SINGLETON; + } + + /** + * Retrieves an object from the global pool + * @param aKey key of the object + * @return The object, null if not found + */ + public Object get(Object aKey) + { + return global.get(aKey); + } + + /** + * Stores an object into the global pool + * @param aKey key of the object + * @param aObj the object to store + * @return aObj + */ + public Object put(Object aKey,Object aObj) + { + return global.put(aKey,aObj); + } + + /** + * Returns a Properties object of all properties + */ + /* + public Properties getProperties() + { + return props; + } + */ + + /** + * @param aProp a property supplied to the command line + * @return property or NULL if not present + */ + public String getProperty(String aProp) + { + return props.getProperty(aProp); + } + + /** + * @param aProp a property supplied to the command line + * @param aDefault default to return if property was not supplied + * @return property value + */ + public String getProperty(String aProp,String aDefault) + { + return props.getProperty(aProp,aDefault); + } + + /** + * @param aID ID of the argument, 0 ... getArgumentCount()-1 + * @return argument + */ + public String getArgument(int aID) + { + return (String) args.get(aID); + } + + /** + * Returns an array of String objects representing the arguments + */ + public String[] getArguments() + { + return (String[]) args.toArray(); + } + + /** + * Returns an Iterator of the arguments + */ + public Iterator getArgumentIterator() + { + return args.iterator(); + } + + /** + * @return number of arguments + */ + public int getArgumentCount() + { + return args.size(); + } + + /** + * Parses the command line arguments + */ + public void parseArguments(String[] aArgs) + throws Exception + { + for(int i=0;i<aArgs.length;i++) { + String arg = aArgs[i]; + if(arg.startsWith("--") || arg.startsWith("-")) { + if(arg.length()>1) { + // Split the option at the first '=' char if any + int s = arg.startsWith("--") ? 2 : 1 ; // -- or - + int e = arg.indexOf("="); + String key,val; + if(e>s) { + // Format: -key=value + key=arg.substring(s,e-1); + val=arg.substring(e+1); + } else if(e>-1 && e<=s) { + // Can't have a property without a key! + throw new Exception("Invalid option -="); + } else { + key=arg.substring(s); + val=""; // can't be null + } + + if(key.equals("d")) { + // -d | --d is reserved to set the Logger level + int level=0; + if(!val.equals("")) { + level=Integer.parseInt(val); + } + Logger.setLevel(level); + } else { + // Add all other properties into the Properties object + props.put(key,val); + Logger.log(Logger.INFO,"Argument",key,val); + } + + } else { + // Just a - on its own? + System.out.println("Unknown option: -"); + } + } else { + // Add the argument to the array + args.add(arg); + } + } + } + +}
\ No newline at end of file diff --git a/contrib/retep/uk/org/retep/util/Logger.java b/contrib/retep/uk/org/retep/util/Logger.java new file mode 100644 index 00000000000..c272f1d005a --- /dev/null +++ b/contrib/retep/uk/org/retep/util/Logger.java @@ -0,0 +1,150 @@ +package uk.org.retep.util; + +import java.io.CharArrayWriter; +import java.io.PrintWriter; + +public class Logger +{ + protected static int level; + protected static PrintWriter logger; + + public static final int NONE = -1; + public static final int INFO = 0; + public static final int ERROR = 1; + public static final int DEBUG = 2; + public static final int ALL = 3; + + static { + level = NONE; + logger = null; + }; + + private static final String levels[] = { + "INFO :", + "ERROR:", + "DEBUG:", + "ALL :" + }; + + public static void setLevel(int aLevel) + { + // Incase we have not yet set a logger + if(logger==null) { + logger = new PrintWriter(System.out); + } + + if(aLevel<NONE) { + aLevel=NONE; + } else if(aLevel>ALL) { + aLevel=ALL; + } + + level=aLevel; + + if(level>NONE) { + log(INFO,"Log level changed to",level,levels[level]); + } + } + + public static void setLogger(PrintWriter pw) + { + if(logger!=null) { + try { + logger.flush(); + logger.close(); + } catch(Exception ex) { + logger=pw; + log(ERROR,"Exception while closing logger",ex); + } + } + logger=pw; + } + + public static void log(String msg) + { + log(INFO,msg); + } + + public static void log(int aLevel,String msg) + { + write(aLevel,msg,null); + } + + public static void log(int aLevel,String msg,int arg1) + { + Object o[] = {new Integer(arg1)}; + write(aLevel,msg,o); + } + + public static void log(int aLevel,String msg,int arg1,Object arg2) + { + Object o[] = {new Integer(arg1),arg2}; + write(aLevel,msg,o); + } + + public static void log(int aLevel,String msg,double arg1) + { + Object o[] = {new Double(arg1)}; + write(aLevel,msg,o); + } + + public static void log(int aLevel,String msg,double arg1,Object arg2) + { + Object o[] = {new Double(arg1),arg2}; + write(aLevel,msg,o); + } + + public static void log(int aLevel,String msg,Object arg1) + { + Object o[] = {arg1}; + write(aLevel,msg,o); + } + + public static void log(int aLevel,String msg,Object arg1,Object arg2) + { + Object o[] = {arg1,arg2}; + write(aLevel,msg,o); + } + + public static void log(int aLevel,String msg,Object arg1,Object arg2,Object arg3) + { + Object o[] = {arg1,arg2,arg3}; + write(aLevel,msg,o); + } + + public static void log(int aLevel,String msg,Throwable t) + { + CharArrayWriter buffer = new CharArrayWriter(); + PrintWriter printWriter = new PrintWriter(buffer); + t.printStackTrace(printWriter); + Object o[] = {buffer.toString()}; + buffer.close(); + write(aLevel,msg,o); + } + + private static void write(int aLevel,String aMsg,Object args[]) + { + // Can't be above ALL + if(aLevel>ALL) { + aLevel=ALL; + } + + // Ignore if below or equal to NONE + if(aLevel<INFO || aLevel>level) { + return; + } + + logger.print("Logger:"); + logger.print(levels[aLevel]); + logger.print(aMsg); + if(args!=null) { + for(int a=0;a<args.length;a++) { + logger.print(":"); + logger.print(args[a]); + } + } + logger.println(); + logger.flush(); + } + +} diff --git a/contrib/retep/uk/org/retep/util/Main.java b/contrib/retep/uk/org/retep/util/Main.java new file mode 100644 index 00000000000..5df75e08024 --- /dev/null +++ b/contrib/retep/uk/org/retep/util/Main.java @@ -0,0 +1,42 @@ +package uk.org.retep.util; + +import uk.org.retep.util.StandaloneApp; +import javax.swing.JComponent; +import javax.swing.JLabel; + +/** + * This is a template for your own Tools. Copy not extend this class. Please + * refer to Implementation for details. + * + * All you need to to is implement the init() method. + * + * $Id: Main.java,v 1.1 2001/03/05 09:15:36 peter Exp $ + */ + +public class Main extends StandaloneApp +{ + public Main(String[] args) + throws Exception + { + super(args); + } + + public JComponent init() + throws Exception + { + // Create your tool here, then do things like load files based on the + // command line arguments. Then return that tool. + + // NB: This just allows us to compile. You're implementation must return + // the Tool itself. + return new JLabel("Replace with your own tool!"); + } + + public static void main(String[] args) + throws Exception + { + Main main = new Main(args); + main.pack(); + main.setVisible(true); + } +} diff --git a/contrib/retep/uk/org/retep/util/StandaloneApp.java b/contrib/retep/uk/org/retep/util/StandaloneApp.java new file mode 100644 index 00000000000..8340a566454 --- /dev/null +++ b/contrib/retep/uk/org/retep/util/StandaloneApp.java @@ -0,0 +1,85 @@ +package uk.org.retep.util; + +import uk.org.retep.tools.Tool; +import uk.org.retep.util.Globals; +import uk.org.retep.util.ExceptionDialog; + +import java.awt.*; +import javax.swing.*; +import java.awt.event.*; + +/** + * This provides the basic services needed for enabling some of the tools to + * run in a Stand-alone fassion. + * + * Note: Because it's designed for standalone use, if this window is closed, + * the JVM is terminated. Do not use for normal application use. + * + * $Id: StandaloneApp.java,v 1.2 2001/03/05 10:18:48 peter Exp $ + * + * @author + * @version 1.0 + */ + +public abstract class StandaloneApp extends JFrame +{ + public StandaloneApp(String[] aArgs) + throws Exception + { + super(); // Initialise JFrame + + // Allow dialogs to work with us + ExceptionDialog.setFrame(this); + + // Add a window listener + this.addWindowListener(new java.awt.event.WindowAdapter() + { + public void windowClosing(WindowEvent e) + { + System.exit(0); + } + }); + + // Parse the command line arguments + Globals.getInstance().parseArguments(aArgs); + + // Now initialise this tool (init is overidden) + JComponent tool = null; + try { + tool = init(); + } catch(Exception ex) { + ex.printStackTrace(); + System.exit(1); + } + + // Now add to this frame + this.getContentPane().add(tool, BorderLayout.CENTER); + + // Finally call the Tool interface + if(tool instanceof Tool) { + Tool t = (Tool) tool; + + // Notify the tool we are a standalone + t.setStandaloneMode(true); + + // Fetch the title + setTitle(t.getTitle()); + + // and a MenuBar (if needed) + JMenuBar mb = t.getMenuBar(); + if(mb!=null) { + setJMenuBar(t.getMenuBar()); + } + } else { + // Ok, set a default title string + setTitle("RetepTools Standalone"); + } + + } + + /** + * You must overide this method with your initialiser. + */ + public abstract JComponent init() throws Exception; + +}
\ No newline at end of file diff --git a/contrib/retep/uk/org/retep/util/hba/Editor.java b/contrib/retep/uk/org/retep/util/hba/Editor.java new file mode 100644 index 00000000000..6571bfebb7a --- /dev/null +++ b/contrib/retep/uk/org/retep/util/hba/Editor.java @@ -0,0 +1,141 @@ +package uk.org.retep.util.hba; + +import uk.org.retep.tools.Tool; +import uk.org.retep.util.models.HBATableModel; + +import java.awt.*; +import java.io.*; +import java.util.*; +import javax.swing.table.*; +import javax.swing.*; + +/** + * pg_hba.conf editor (& repairer) + * + * @author + * @version 1.0 + */ + +public class Editor extends JPanel implements Tool +{ + BorderLayout borderLayout1 = new BorderLayout(); + HBATableModel model = new HBATableModel(); + JPanel jPanel1 = new JPanel(); + GridBagLayout gridBagLayout1 = new GridBagLayout(); + JLabel jLabel1 = new JLabel(); + JComboBox typeEntry = new JComboBox(); + JLabel jLabel2 = new JLabel(); + JLabel jLabel3 = new JLabel(); + JLabel jLabel4 = new JLabel(); + JTextField ipEntry = new JTextField(); + JTextField maskEntry = new JTextField(); + JComboBox authEntry = new JComboBox(); + JTextField argEntry = new JTextField(); + JLabel jLabel5 = new JLabel(); + JPanel jPanel2 = new JPanel(); + FlowLayout flowLayout1 = new FlowLayout(); + JButton jButton1 = new JButton(); + JButton jButton2 = new JButton(); + JScrollPane jScrollPane1 = new JScrollPane(); + JButton jButton3 = new JButton(); + JTable jTable1 = new JTable(); + + public Editor() + { + try + { + jbInit(); + } + catch(Exception ex) + { + ex.printStackTrace(); + } + } + void jbInit() throws Exception + { + this.setLayout(borderLayout1); + jTable1.setPreferredSize(new Dimension(600, 300)); + jTable1.setModel(model); + this.setPreferredSize(new Dimension(600, 300)); + this.add(jScrollPane1, BorderLayout.CENTER); + jScrollPane1.getViewport().add(jTable1, null); + jPanel1.setLayout(gridBagLayout1); + jLabel1.setText("Type"); + jLabel2.setText("IP Address"); + jLabel3.setText("Mask"); + jLabel4.setText("Authentication"); + ipEntry.setText("jTextField1"); + maskEntry.setText("jTextField2"); + argEntry.setText("jTextField3"); + jLabel5.setText("Argument"); + jPanel2.setLayout(flowLayout1); + jButton1.setText("New entry"); + jButton2.setText("Validate"); + jButton3.setText("Devele"); + this.add(jPanel1, BorderLayout.SOUTH); + jPanel1.add(jLabel1, new GridBagConstraints(1, 0, 1, 1, 0.0, 0.0 + ,GridBagConstraints.EAST, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0)); + jPanel1.add(typeEntry, new GridBagConstraints(2, 0, 1, 1, 0.0, 0.0 + ,GridBagConstraints.CENTER, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0)); + jPanel1.add(jLabel2, new GridBagConstraints(1, 1, 1, 1, 0.0, 0.0 + ,GridBagConstraints.EAST, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0)); + jPanel1.add(jLabel3, new GridBagConstraints(3, 1, 1, 1, 0.0, 0.0 + ,GridBagConstraints.CENTER, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0)); + jPanel1.add(jLabel4, new GridBagConstraints(1, 2, 1, 1, 0.0, 0.0 + ,GridBagConstraints.EAST, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0)); + jPanel1.add(ipEntry, new GridBagConstraints(2, 1, 1, 1, 0.0, 0.0 + ,GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(0, 0, 0, 0), 0, 0)); + jPanel1.add(maskEntry, new GridBagConstraints(4, 1, 1, 1, 0.0, 0.0 + ,GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(0, 0, 0, 0), 0, 0)); + jPanel1.add(authEntry, new GridBagConstraints(2, 2, 1, 1, 0.0, 0.0 + ,GridBagConstraints.CENTER, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0)); + jPanel1.add(argEntry, new GridBagConstraints(4, 2, 1, 1, 0.0, 0.0 + ,GridBagConstraints.CENTER, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0)); + jPanel1.add(jLabel5, new GridBagConstraints(3, 2, 1, 1, 0.0, 0.0 + ,GridBagConstraints.CENTER, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0)); + jPanel1.add(jPanel2, new GridBagConstraints(0, 3, 5, 1, 0.0, 0.0 + ,GridBagConstraints.CENTER, GridBagConstraints.HORIZONTAL, new Insets(0, 0, 0, 0), 0, 0)); + jPanel2.add(jButton3, null); + jPanel2.add(jButton1, null); + jPanel2.add(jButton2, null); + } + + public void openFile(String aFilename) + throws IOException + { + FileInputStream fis = new FileInputStream(aFilename); + BufferedReader br = new BufferedReader(new InputStreamReader(fis)); + ArrayList list = model.getArray(); + + String s = br.readLine(); + while(s!=null) { + if(s.startsWith("#")) { + // ignore comments + } else { + Record rec = Record.parseLine(s); + if(rec!=null) { + rec.validate(); + list.add(rec); + } + } + s=br.readLine(); + } + + model.fireTableDataChanged(); + } + + public JMenuBar getMenuBar() + { + return null; + } + + public String getTitle() + { + return "pg_hba.conf Editor/Repair tool"; + } + + public void setStandaloneMode(boolean aMode) + { + } + +}
\ No newline at end of file diff --git a/contrib/retep/uk/org/retep/util/hba/Main.java b/contrib/retep/uk/org/retep/util/hba/Main.java new file mode 100644 index 00000000000..3d9343140b6 --- /dev/null +++ b/contrib/retep/uk/org/retep/util/hba/Main.java @@ -0,0 +1,47 @@ +package uk.org.retep.util.hba; + +import uk.org.retep.util.ExceptionDialog; +import uk.org.retep.util.Globals; +import uk.org.retep.util.Logger; +import uk.org.retep.util.StandaloneApp; + +import java.io.IOException; +import javax.swing.JComponent; +import javax.swing.JPanel; + +/** + * Standalone entry point for the Properties editor + * + * $Id: Main.java,v 1.1 2001/03/05 09:15:37 peter Exp $ + */ + +public class Main extends StandaloneApp +{ + public Main(String[] args) + throws Exception + { + super(args); + } + + public JComponent init() + throws Exception + { + Globals globals = Globals.getInstance(); + + Editor editor = new Editor(); + + if(globals.getArgumentCount()>0) { + editor.openFile(globals.getArgument(0)); + } + + return editor; + } + + public static void main(String[] args) + throws Exception + { + Main main = new Main(args); + main.pack(); + main.setVisible(true); + } +} diff --git a/contrib/retep/uk/org/retep/util/hba/Record.java b/contrib/retep/uk/org/retep/util/hba/Record.java new file mode 100644 index 00000000000..b91e6dc49df --- /dev/null +++ b/contrib/retep/uk/org/retep/util/hba/Record.java @@ -0,0 +1,238 @@ +package uk.org.retep.util.hba; + +import uk.org.retep.util.Logger; +import uk.org.retep.util.misc.IPAddress; +import uk.org.retep.util.misc.WStringTokenizer; + +/** + * Used to store the entries of a pg_hba.conf file + * @author + * @version 1.0 + */ + +public class Record +{ + int type; + String dbname; + IPAddress ip; + IPAddress mask; + int authType; + String authArg; + + public static final int TYPE_LOCAL = 0; + public static final int TYPE_HOST = 1; + public static final int TYPE_HOSTSSL = 2; + + public static final String types[] = { + "local","host","hostssl" + }; + + public static final int AUTH_TRUST = 0; + public static final int AUTH_PASSWORD = 1; + public static final int AUTH_CRYPT = 2; + public static final int AUTH_IDENT = 3; + public static final int AUTH_KRB4 = 4; + public static final int AUTH_KRB5 = 5; + public static final int AUTH_REJECT = 6; + + public static final String auths[] = { + "trust","password","crypt", + "ident", + "krb4","krb5", + "reject" + }; + + private static final String spc = " "; + + public Record() + { + } + + public int getType() + { + return type; + } + + public void setType(int aType) + { + type=aType; + } + + public String getDatabase() + { + return dbname; + } + + public void setDatabase(String aDB) + { + dbname=aDB; + } + + public int getAuthType() + { + return authType; + } + + public void setAuthType(int aType) + { + authType=aType; + } + + public String getAuthArgs() + { + return authArg; + } + + public void setAuthArgs(String aArg) + { + authArg=aArg; + } + + public IPAddress getIP() + { + return ip; + } + + public void setIP(String aArg) + { + setIP(new IPAddress(aArg)); + } + + public void setIP(IPAddress aArg) + { + ip=aArg; + } + + public IPAddress getMask() + { + return mask; + } + + public void setMask(String aArg) + { + setMask(new IPAddress(aArg)); + } + + public void setMask(IPAddress aArg) + { + mask=aArg; + } + + public String toString() + { + StringBuffer buf = new StringBuffer(); + write(buf); + return buf.toString(); + } + + public void write(StringBuffer buf) + { + buf.append(types[type]).append(spc); + + if(type==TYPE_HOST || type==TYPE_HOSTSSL) { + buf.append(getIP()).append(spc); + buf.append(getMask()).append(spc); + } + + buf.append(auths[authType]); + + // Now the authArg + switch(type) + { + // These have no authArgs + case AUTH_TRUST: + case AUTH_REJECT: + case AUTH_KRB4: + case AUTH_KRB5: + break; + + // These must have an arg + case AUTH_IDENT: + buf.append(spc).append(getAuthArgs()); + break; + + // These may have an optional arg + case AUTH_PASSWORD: + case AUTH_CRYPT: + if(!(authArg==null || authArg.equals(""))) + buf.append(spc).append(getAuthArgs()); + break; + } + } + + private static WStringTokenizer tok; + + public static Record parseLine(String s) + { + Record res = new Record(); + int type; + + if(s==null || s.equals("") || s.startsWith("#")) + return null; + + if(tok==null) + tok=new WStringTokenizer(); + + tok.setString(s); + + type=WStringTokenizer.matchToken(types,tok.nextToken()); + res.setType(type); + + res.setDatabase(tok.nextToken()); + + if(type==TYPE_HOST || type==TYPE_HOSTSSL) { + res.setIP(new IPAddress(tok.nextToken())); + res.setMask(new IPAddress(tok.nextToken())); + } + + res.setAuthType(WStringTokenizer.matchToken(auths,tok.nextToken())); + res.setAuthArgs(tok.nextToken()); + + return res; + } + + public static final int VALID = 0; + public static final int INVALID_TYPE = 1; + public static final int INVALID_IPREQUIRED = 2; + + /** + * Validates the record + */ + public int validate() + { + switch(type) + { + case TYPE_HOST: + case TYPE_HOSTSSL: + if(ip==null || ip.isInvalid()) { + Logger.log(Logger.INFO,"pg_hba.conf: IP missing or invalid - repairing"); + setMask("127.0.0.1"); + } + + if(mask==null || mask.isInvalid() || !ip.validateMask(mask)) { + Logger.log(Logger.INFO,"pg_hba.conf: IP address without mask - repairing"); + setMask(ip.getMask()); + } + + break; + + case TYPE_LOCAL: + break; + + default: + return INVALID_TYPE; + } + + return VALID; + } + + /* +# host all 192.168.54.1 255.255.255.255 reject +# host all 0.0.0.0 0.0.0.0 krb5 +# host all 192.168.0.0 255.255.0.0 ident omicron +# + +local all trust +host all 127.0.0.1 255.255.255.255 trust +*/ +}
\ No newline at end of file diff --git a/contrib/retep/uk/org/retep/util/misc/IPAddress.java b/contrib/retep/uk/org/retep/util/misc/IPAddress.java new file mode 100644 index 00000000000..a04babde3a2 --- /dev/null +++ b/contrib/retep/uk/org/retep/util/misc/IPAddress.java @@ -0,0 +1,125 @@ +package uk.org.retep.util.misc; + +import java.util.StringTokenizer; + +/** + * Represent an IP address + * @author + * @version 1.0 + */ + +public class IPAddress +{ + protected long address; + protected long b[] = new long[4]; + protected boolean invalid=true; + + public IPAddress() + { + } + + public IPAddress(String s) + { + setAddress(s); + } + + public synchronized void setAddress(String s) + { + if(s==null || s.equals("")) { + invalid=true; + return; + } + + address=0; + StringTokenizer tok = new StringTokenizer(s,"."); + int i=0; + while(i<4 && tok.hasMoreElements()) { + b[i++] = Long.parseLong(tok.nextToken()); + } + while(i<4) { + b[i++]=0; + } + + invalid=false; + refresh(); + } + + public void refresh() + { + if(invalid) + return; + address = (b[0]<<24) | (b[1]<<16) | (b[2]<<8) | (b[3]); + } + + public boolean isInvalid() + { + refresh(); + return invalid; + } + + public String toString() + { + refresh(); + if(invalid) + return "*INVALID*"; + + return Long.toString(b[0])+"."+Long.toString(b[1])+"."+Long.toString(b[2])+"."+Long.toString(b[3]); + } + + public boolean equals(Object o) + { + if(o instanceof IPAddress) { + IPAddress ip = (IPAddress) o; + + refresh(); + ip.refresh(); + + if(ip.invalid == invalid) + return false; + + return address==ip.address; + } + return false; + } + + private static int gethoststart(long b) + { + if((b & 0x80)==0x00) return 1; // class A + if((b & 0xc0)==0x80) return 2; // class B + if((b & 0xe0)==0xc0) return 3; // class C + return 4; // class D + } + + public boolean validateMask(IPAddress mask) + { + // If were a network check the host mask + int i=gethoststart(b[0]); +System.out.println("Host start "+i); + while(i<4 && b[i]==0) { + if(mask.b[i++]>0) + return false; + } + + for(i=0;i<4;i++) { + if((b[i]&mask.b[i])!=b[i]) + return false; + } + + return true; + } + + public IPAddress getMask() + { + IPAddress mask = new IPAddress(); + int i=3; + while(i>-1 && b[i]==0) { + mask.b[i--]=0; + } + while(i>-1) { + mask.b[i--]=255; + } + mask.invalid=false; + mask.refresh(); + return mask; + } +}
\ No newline at end of file diff --git a/contrib/retep/uk/org/retep/util/misc/PropertiesIO.java b/contrib/retep/uk/org/retep/util/misc/PropertiesIO.java new file mode 100644 index 00000000000..7bed62c4d28 --- /dev/null +++ b/contrib/retep/uk/org/retep/util/misc/PropertiesIO.java @@ -0,0 +1,157 @@ +package uk.org.retep.util.misc; + +import java.io.*; +import java.util.Date; +import java.util.Iterator; +import java.util.Properties; +import java.util.TreeMap; + +/** + * Misc Properties utilities.. + * @author + * @version 1.0 + */ + +public class PropertiesIO +{ + + public PropertiesIO() + { + } + + /** + * Builds a TreeMap based on the given Properties object. This is useful + * because the keys will be in sorted order. + */ + public static TreeMap getTreeMap(Properties p) + { + TreeMap map = new TreeMap(); + Iterator e = p.keySet().iterator(); + while(e.hasNext()) { + Object k = e.next(); + map.put(k,p.get(k)); + } + return map; + } + + /** + * Writes a Properties file to the writer. This is similar to Properties.save + * except you can pick the key/value separator + */ + public static synchronized void save(Properties p,OutputStream out,char sep,String header) + throws IOException + { + save(p,p.keySet().iterator(),out,sep,header); + } + + /** + * Writes a Properties file to the writer. This is similar to Properties.save + * except you can pick the key/value separator and the keys are written + * in a sorted manner + */ + public static synchronized void saveSorted(Properties p,OutputStream out,char sep,String header) + throws IOException + { + save(p,getTreeMap(p).keySet().iterator(),out,sep,header); + } + + /** + * This is the same as save, only the keys in the enumeration are written. + */ + public static synchronized void save(Properties p,Iterator e, OutputStream out,char sep,String header) + throws IOException + { + BufferedWriter w = new BufferedWriter(new OutputStreamWriter(out, "8859_1")); + + if (header != null) { + w.write('#'); + w.write(header); + w.newLine(); + } + + w.write('#'); + w.write(new Date().toString()); + w.newLine(); + + while(e.hasNext()) { + String key = (String)e.next(); + w.write(encode(key,true)); + w.write(sep); + w.write(encode((String)p.get(key),false)); + w.newLine(); + } + w.flush(); + } + + private static final String specialSaveChars = "=: \t\r\n\f#!"; + + /** + * Encodes a string in a way similar to the JDK's Properties method + */ + public static String encode(String s, boolean escapeSpace) + { + int l=s.length(); + StringBuffer buf = new StringBuffer(l<<1); + + for(int i=0;i<l;i++) { + char c = s.charAt(i); + switch(c) + { + case ' ': + if(i==0 || escapeSpace) { + buf.append('\\'); + } + buf.append(' '); + break; + + case '\\': + buf.append('\\').append('\\'); + break; + + case '\t': + buf.append('\\').append('t'); + break; + + case '\n': + buf.append('\\').append('n'); + break; + + case '\r': + buf.append('\\').append('r'); + break; + + case '\f': + buf.append('\\').append('f'); + break; + + default: + if((c<0x20)||(c>0x7e)) { + buf.append('\\').append('u'); + buf.append(toHex((c >> 12) & 0xF)); + buf.append(toHex((c >> 8) & 0xF)); + buf.append(toHex((c >> 4) & 0xF)); + buf.append(toHex( c & 0xF)); + } else { + if (specialSaveChars.indexOf(c) != -1) + buf.append('\\'); + buf.append(c); + } + } + } + return buf.toString(); + } + + /** + * Convert a nibble to a hex character + * @param nibble the nibble to convert. + */ + public static char toHex(int n) { + return hd[(n & 0xF)]; + } + + /** A table of hex digits */ + private static final char[] hd = { + '0','1','2','3','4','5','6','7', + '8','9','A','B','C','D','E','F' + }; +}
\ No newline at end of file diff --git a/contrib/retep/uk/org/retep/util/misc/WStringTokenizer.java b/contrib/retep/uk/org/retep/util/misc/WStringTokenizer.java new file mode 100644 index 00000000000..763676cfb3b --- /dev/null +++ b/contrib/retep/uk/org/retep/util/misc/WStringTokenizer.java @@ -0,0 +1,102 @@ +package uk.org.retep.util.misc; + +/** + * Similar to StringTokenizer but handles white spaces and multiple delimiters + * between tokens. It also handles quotes + * + * @author + * @version 1.0 + */ + +public class WStringTokenizer +{ + String string; + int pos,len; + + /** + * Constructor + */ + public WStringTokenizer() + { + } + + /** + * Constructor: set the initial string + * @param aString String to tokenise + */ + public WStringTokenizer(String aString) + { + setString(aString); + } + + /** + * @param aString String to tokenise + */ + public void setString(String aString) + { + string=aString; + pos=0; + len=string.length(); + } + + /** + * @return true if more tokens may be possible + */ + public boolean hasMoreTokens() + { + return !(string==null || pos==len); + } + + /** + * @return next token, null if complete. + */ + public String nextToken() + { + char c; + boolean q=false; + + if(!hasMoreTokens()) + return null; + + // find start of token + while(pos<len) { + c = string.charAt(pos); + if(c=='\'' || c=='\"') + q=!q; + if(q || c==' '||c=='\t') + pos++; + else + break; + } + + // find last char of token + int p=pos; + while(pos<len) { + c = string.charAt(pos); + if(c=='\'' || c=='\"') + q=!q; + if(!q && (c==' '||c=='\t') ) + break; + else + pos++; + } + + return string.substring(p,pos); + } + + /** + * Compare a string against an array of strings and return the index + * @param t array to compare against (all lowercase) + * @param s string to test + * @return index in t of s, -1 if not present + */ + public static int matchToken(String[] t,String s) + { + s=s.toLowerCase(); + for(int i=0;i<t.length;i++) + if(t[i].equals(s)) + return i; + return -1; + } + +}
\ No newline at end of file diff --git a/contrib/retep/uk/org/retep/util/models/HBATableModel.java b/contrib/retep/uk/org/retep/util/models/HBATableModel.java new file mode 100644 index 00000000000..fb7bb72baf4 --- /dev/null +++ b/contrib/retep/uk/org/retep/util/models/HBATableModel.java @@ -0,0 +1,91 @@ +package uk.org.retep.util.models; + +import uk.org.retep.util.hba.Record; + +import java.util.ArrayList; +import java.util.Iterator; +import javax.swing.table.*; + +/** + * A TableModel to display the contents of a pg_hba.conf file + * @author + * @version 1.0 + */ + +public class HBATableModel extends AbstractTableModel +{ + ArrayList list = new ArrayList(); + + private static final String cols[] = { + "Type","Database","IP Address","IP Mask","Authentication","Arguments" + }; + + + public HBATableModel() + { + } + + public ArrayList getArray() + { + return list; + } + + public int getColumnCount() + { + return cols.length; + } + + public Object getValueAt(int aRow, int aCol) + { + Record rec = (Record) list.get(aRow); + int t; + + switch(aCol) + { + case 0: + t = rec.getType(); + return t<0 ? "ERR" : Record.types[t] ; + + case 1: + return rec.getDatabase(); + + case 2: + return rec.getIP(); + + case 3: + return rec.getMask(); + + case 4: + t=rec.getAuthType(); + return t<0 ? "ERR" : Record.auths[t] ; + + case 5: + return rec.getAuthArgs(); + + default: + return ""; + } + } + + public int getRowCount() + { + return list.size(); + } + + public boolean isCellEditable(int rowIndex, int columnIndex) + { + /**@todo: Override this javax.swing.table.AbstractTableModel method*/ + return super.isCellEditable( rowIndex, columnIndex); + } + + public String getColumnName(int aColumn) + { + return cols[aColumn]; + } + + public void setValueAt(Object aValue, int rowIndex, int columnIndex) + { + /**@todo: Override this javax.swing.table.AbstractTableModel method*/ + super.setValueAt( aValue, rowIndex, columnIndex); + } +}
\ No newline at end of file diff --git a/contrib/retep/uk/org/retep/util/models/PropertiesTableModel.java b/contrib/retep/uk/org/retep/util/models/PropertiesTableModel.java new file mode 100644 index 00000000000..d48b166e9cd --- /dev/null +++ b/contrib/retep/uk/org/retep/util/models/PropertiesTableModel.java @@ -0,0 +1,176 @@ +package uk.org.retep.util.models; + +import uk.org.retep.util.Logger; +import uk.org.retep.util.misc.PropertiesIO; + +import java.io.*; +import java.util.*; +import javax.swing.table.*; + +import java.text.*; + +/** + * A TableModel that shows a view of a PropertyFile object + * + * $Id: PropertiesTableModel.java,v 1.1 2001/03/05 09:15:37 peter Exp $ + * + * @author + * @version 1.0 + */ +public class PropertiesTableModel extends AbstractTableModel +{ + // The properties + protected TreeMap properties; + protected Properties origProperties; + protected Object keys[]; + + public PropertiesTableModel() + { + this(new Properties()); + } + + public PropertiesTableModel(Properties aProperties) + { + setProperties(aProperties); + } + + public synchronized int getKeyRow(Object k) + { + for(int i=0;i<keys.length;i++) { + if(keys[i].equals(k)) { + return i; + } + } + return -1; + } + + /** + * Best not use this one to update, use the put method in this class! + */ + public Properties getProperties() + { + return origProperties; + } + + public synchronized void put(Object k,Object v) + { + properties.put(k,v); + origProperties.put(k,v); + refresh(); + } + + public Object get(Object k) + { + return origProperties.get(k); + } + + public synchronized void remove(Object k) + { + properties.remove(k); + origProperties.remove(k); + refresh(); + } + + public boolean contains(Object o) + { + return origProperties.contains(o); + } + + public boolean containsKey(Object o) + { + return origProperties.containsKey(o); + } + + public boolean containsValue(Object o) + { + return origProperties.containsValue(o); + } + + public void setProperties(Properties aProperties) + { + origProperties=aProperties; + properties = PropertiesIO.getTreeMap(aProperties); + refresh(); + } + + public void refresh() + { + keys = properties.keySet().toArray(); + fireTableDataChanged(); + } + + private static final String cols[] = { + "Property","Value" + }; + + public int getColumnCount() + { + return cols.length; + } + + public Object getValueAt(int aRow, int aColumn) + { + if(aRow<0 || aRow>=keys.length || aColumn<0 || aColumn>=cols.length) + return null; + + Object key = keys[aRow]; + + switch(aColumn) + { + case 0: + return key; + + case 1: + return properties.get(key); + + default: + return null; + } + } + + public int getRowCount() + { + return keys.length; + } + + public String getColumnName(int aColumn) + { + return cols[aColumn]; + } + + public void setValueAt(Object aValue, int aRow, int aColumn) + { + if(aRow<0 || aRow>=keys.length || aColumn<0 || aColumn>=cols.length) + return; + + switch(aColumn) + { + // Rename the key (only if not already present). If already present + // the refresh() will replace with the old one anyhow... + case 0: + if(!properties.containsKey(aValue)) { + Object oldValue = get(keys[aRow]); + remove(keys[aRow]); + put(aValue,oldValue); + } + refresh(); + break; + + // Update the value... + case 1: + put(keys[aRow],aValue); + //refresh(); + break; + + default: + // Should never be called + Logger.log(Logger.ERROR,"PropertiesTableModel: Column range",aColumn); + } + } + + public boolean isCellEditable(int aRow, int aColumn) + { + return true; + } + +} diff --git a/contrib/retep/uk/org/retep/util/proped/Main.java b/contrib/retep/uk/org/retep/util/proped/Main.java new file mode 100644 index 00000000000..6f2c73bc68f --- /dev/null +++ b/contrib/retep/uk/org/retep/util/proped/Main.java @@ -0,0 +1,53 @@ +package uk.org.retep.util.proped; + +import uk.org.retep.util.ExceptionDialog; +import uk.org.retep.util.Globals; +import uk.org.retep.util.Logger; +import uk.org.retep.util.StandaloneApp; + +import java.io.IOException; +import java.util.Iterator; +import javax.swing.JComponent; + +/** + * Standalone entry point for the Properties editor + * + * $Id: Main.java,v 1.1 2001/03/05 09:15:38 peter Exp $ + */ + +public class Main extends StandaloneApp +{ + public Main(String[] args) + throws Exception + { + super(args); + } + + public JComponent init() + throws Exception + { + Globals globals = Globals.getInstance(); + + PropertyEditor panel = new PropertyEditor(); + + // Only handle 1 open at a time in standalone mode + if(globals.getArgumentCount()>0) { + try { + panel.openFile(globals.getArgument(0)); + } catch(IOException ioe) { + ExceptionDialog.displayException(ioe,"while loading "+globals.getArgument(0)); + throw (Exception) ioe.fillInStackTrace(); + } + } + + return panel; + } + + public static void main(String[] args) + throws Exception + { + Main main = new Main(args); + main.pack(); + main.setVisible(true); + } +}
\ No newline at end of file diff --git a/contrib/retep/uk/org/retep/util/proped/PropertyEditor.java b/contrib/retep/uk/org/retep/util/proped/PropertyEditor.java new file mode 100644 index 00000000000..b5c19e10876 --- /dev/null +++ b/contrib/retep/uk/org/retep/util/proped/PropertyEditor.java @@ -0,0 +1,381 @@ +package uk.org.retep.util.proped; + +import uk.org.retep.util.ExceptionDialog; +import uk.org.retep.util.misc.PropertiesIO; +import uk.org.retep.util.models.PropertiesTableModel; + +import java.awt.*; +import java.io.*; +import java.util.*; +import javax.swing.*; +import java.awt.event.*; + +/** + * A property file editor + * + * $Id: PropertyEditor.java,v 1.1 2001/03/05 09:15:38 peter Exp $ + * + * @author + * @version 1.0 + */ + +public class PropertyEditor +extends JPanel +implements uk.org.retep.tools.Tool +{ + BorderLayout borderLayout1 = new BorderLayout(); + + // The filename, null if not set + String filename; + File file; + + JScrollPane jScrollPane1 = new JScrollPane(); + JTable contentTable = new JTable(); + + PropertiesTableModel model = new PropertiesTableModel(); + + boolean standaloneMode; + + private static final String TITLE_PREFIX = "Retep PropertyEditor"; + JPopupMenu popupMenu = new JPopupMenu(); + JMenuItem newPopupItem = new JMenuItem(); + JMenuItem dupPopupItem = new JMenuItem(); + JMenuItem delPopupItem = new JMenuItem(); + JMenuBar menuBar = new JMenuBar(); + JMenu jMenu1 = new JMenu(); + JMenuItem jMenuItem4 = new JMenuItem(); + JMenuItem jMenuItem5 = new JMenuItem(); + JMenuItem jMenuItem6 = new JMenuItem(); + JMenuItem jMenuItem7 = new JMenuItem(); + JMenuItem jMenuItem8 = new JMenuItem(); + JMenuItem closeMenuItem = new JMenuItem(); + + public PropertyEditor() + { + try + { + jbInit(); + } + catch(Exception ex) + { + ex.printStackTrace(); + } + } + + /** + * @return the default menubar + */ + public JMenuBar getMenuBar() + { + return menuBar; + } + + /** + * @return the File menu + */ + public JMenu getMenu() + { + return jMenu1; + } + + /** + * @return the recomended title string for the parent JFrame/JInternalFrame + */ + public String getTitle() + { + if(filename==null) { + return TITLE_PREFIX; + } + return TITLE_PREFIX+": "+filename; + } + + /** + * Sets menus up to Standalone mode + */ + public void setStandaloneMode(boolean aMode) + { + standaloneMode=aMode; + if(aMode) { + closeMenuItem.setText("Exit"); + } else { + closeMenuItem.setText("Close"); + } + } + + public boolean isStandalone() + { + return standaloneMode; + } + + public void openFile(String aFile) + throws IOException + { + openFile(new File(aFile)); + } + + public void openFile(File aFile) + throws IOException + { + FileInputStream fis = new FileInputStream(aFile); + Properties p = new Properties(); + p.load(fis); + fis.close(); + model.setProperties(p); + + file=aFile; + filename = aFile.getAbsolutePath(); + } + + public void saveFile(File aFile) + throws IOException + { + FileOutputStream fis = new FileOutputStream(aFile); + PropertiesIO.save(model.getProperties(),fis,'=',"Written by "+TITLE_PREFIX); + fis.close(); + + filename = aFile.getAbsolutePath(); + file = aFile; + } + + void jbInit() throws Exception + { + this.setLayout(borderLayout1); + contentTable.setToolTipText(""); + contentTable.setAutoResizeMode(JTable.AUTO_RESIZE_LAST_COLUMN); + contentTable.setModel(model); + contentTable.addMouseListener(new java.awt.event.MouseAdapter() + { + public void mouseClicked(MouseEvent e) + { + contentTable_mouseClicked(e); + } + public void mouseReleased(MouseEvent e) + { + contentTable_mouseReleased(e); + } + }); + newPopupItem.setText("New"); + newPopupItem.addActionListener(new java.awt.event.ActionListener() + { + public void actionPerformed(ActionEvent e) + { + newPopupItem_actionPerformed(e); + } + }); + dupPopupItem.setText("Duplicate"); + dupPopupItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(67, java.awt.event.KeyEvent.CTRL_MASK, false)); + dupPopupItem.addActionListener(new java.awt.event.ActionListener() + { + public void actionPerformed(ActionEvent e) + { + dupPopupItem_actionPerformed(e); + } + }); + delPopupItem.setText("Delete"); + delPopupItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(68, java.awt.event.KeyEvent.CTRL_MASK, false)); + delPopupItem.addActionListener(new java.awt.event.ActionListener() + { + public void actionPerformed(ActionEvent e) + { + delPopupItem_actionPerformed(e); + } + }); + jMenu1.setText("File"); + jMenuItem4.setText("Open"); + jMenuItem4.addActionListener(new java.awt.event.ActionListener() + { + public void actionPerformed(ActionEvent e) + { + jMenuItem4_actionPerformed(e); + } + }); + jMenuItem5.setText("Save"); + jMenuItem5.addActionListener(new java.awt.event.ActionListener() + { + public void actionPerformed(ActionEvent e) + { + jMenuItem5_actionPerformed(e); + } + }); + jMenuItem6.setText("Save As"); + jMenuItem6.addActionListener(new java.awt.event.ActionListener() + { + public void actionPerformed(ActionEvent e) + { + jMenuItem6_actionPerformed(e); + } + }); + jMenuItem7.setText("Revert"); + jMenuItem7.addActionListener(new java.awt.event.ActionListener() + { + public void actionPerformed(ActionEvent e) + { + jMenuItem7_actionPerformed(e); + } + }); + jMenuItem8.setText("Print"); + closeMenuItem.setText("Close"); + closeMenuItem.addActionListener(new java.awt.event.ActionListener() + { + public void actionPerformed(ActionEvent e) + { + closeMenuItem_actionPerformed(e); + } + }); + jMenu2.setText("Edit"); + jMenuItem1.setText("New"); + jMenuItem1.setAccelerator(javax.swing.KeyStroke.getKeyStroke(78, java.awt.event.KeyEvent.CTRL_MASK, false)); + jMenuItem1.addActionListener(new java.awt.event.ActionListener() + { + public void actionPerformed(ActionEvent e) + { + newPopupItem_actionPerformed(e); + } + }); + jMenuItem2.setText("Duplicate"); + jMenuItem3.setText("Delete"); + this.add(jScrollPane1, BorderLayout.CENTER); + jScrollPane1.getViewport().add(contentTable, null); + popupMenu.add(newPopupItem); + popupMenu.add(dupPopupItem); + popupMenu.add(delPopupItem); + menuBar.add(jMenu1); + menuBar.add(jMenu2); + jMenu1.add(jMenuItem4); + jMenu1.add(jMenuItem5); + jMenu1.add(jMenuItem6); + jMenu1.add(jMenuItem7); + jMenu1.addSeparator(); + jMenu1.add(jMenuItem8); + jMenu1.addSeparator(); + jMenu1.add(closeMenuItem); + jMenu2.add(jMenuItem1); + jMenu2.add(jMenuItem2); + jMenu2.add(jMenuItem3); + } + + Point popupPoint = new Point(); + JMenu jMenu2 = new JMenu(); + JMenuItem jMenuItem1 = new JMenuItem(); + JMenuItem jMenuItem2 = new JMenuItem(); + JMenuItem jMenuItem3 = new JMenuItem(); + void contentTable_mouseClicked(MouseEvent e) + { + if(e.isPopupTrigger()) { + popupPoint.setLocation(e.getX(),e.getY()); + popupMenu.show(contentTable,e.getX(),e.getY()); + } + } + + void contentTable_mouseReleased(MouseEvent e) + { + contentTable_mouseClicked(e); + } + + void jMenuItem4_actionPerformed(ActionEvent e) + { + JFileChooser fc = new JFileChooser(); + if(fc.showOpenDialog(this) == JFileChooser.APPROVE_OPTION) { + try { + openFile(fc.getSelectedFile()); + } catch(IOException ioe) { + ExceptionDialog.displayException(ioe); + } + } + } + + void closeMenuItem_actionPerformed(ActionEvent e) + { + if(standaloneMode) { + System.exit(0); + } else { + filename=""; + file=null; + model.setProperties(new Properties()); + } + } + + void newPopupItem_actionPerformed(ActionEvent e) + { + int y = contentTable.rowAtPoint(popupPoint); + + // create a new unique key based on the current one + String key=(String) model.getValueAt(y,0); + + if(key==null) { + key="new-key"; + } + + int uid=1; + while(model.containsKey(key+uid)) { + uid++; + } + + key=key+uid; + model.put(key,""); + contentTable.clearSelection(); + } + + void dupPopupItem_actionPerformed(ActionEvent e) + { + int y = contentTable.rowAtPoint(popupPoint); + + // create a new unique key based on the current one + String key=(String) model.getValueAt(y,0); + Object val=model.get(key); + + int uid=1; + while(model.containsKey(key+uid)) { + uid++; + } + + key=key+uid; + model.put(key,val); + contentTable.clearSelection(); + } + + void delPopupItem_actionPerformed(ActionEvent e) + { + int y = contentTable.rowAtPoint(popupPoint); + model.remove(model.getValueAt(y,0)); + } + + void jMenuItem6_actionPerformed(ActionEvent e) + { + JFileChooser fc = new JFileChooser(); + if(fc.showSaveDialog(this) == JFileChooser.APPROVE_OPTION) { + try { + saveFile(fc.getSelectedFile()); + } catch(IOException ioe) { + ExceptionDialog.displayException(ioe); + } + } + } + + void jMenuItem5_actionPerformed(ActionEvent e) + { + if(filename==null) { + jMenuItem6_actionPerformed(e); + } else { + try { + saveFile(file); + } catch(IOException ioe) { + ExceptionDialog.displayException(ioe); + } + } + } + + void jMenuItem7_actionPerformed(ActionEvent e) + { + // add check here + if(file!=null) { + try { + openFile(file); + } catch(IOException ioe) { + ExceptionDialog.displayException(ioe); + } + } else { + jMenuItem4_actionPerformed(e); + } + } +}
\ No newline at end of file diff --git a/contrib/retep/uk/org/retep/xml/core/XMLFactory.java b/contrib/retep/uk/org/retep/xml/core/XMLFactory.java new file mode 100644 index 00000000000..09565b00110 --- /dev/null +++ b/contrib/retep/uk/org/retep/xml/core/XMLFactory.java @@ -0,0 +1,334 @@ +package uk.org.retep.xml.core; + +import java.io.IOException; +import java.io.Writer; + +/** + * An XMLFactory is used to render XML Tags, accounting for nesting etc + */ +public class XMLFactory +{ + /** + * The lest level (ie, how many tags down the tree we are) + */ + protected int level; + + /** + * The size of our tag name cache + */ + protected int maxlevel; + + /** + * Our tag name cache + */ + protected String[] names; + + /** + * Used to keep track of how formatting is done + */ + protected boolean hascontent; + protected boolean[] contbuf; + + /** + * Scratch used by nest() + */ + private char[] nestbuf; + + /** + * The destination Writer + */ + protected Writer out; + + /** + * True if we are still within a tag + */ + protected boolean inTag; + + /** + * True if we have just created a tag so parameters are valid + */ + protected boolean inArg; + + /** + * Constructs an XMLFactory with no output Writer + */ + public XMLFactory() + { + this(10); + } + + /** + * Constructs an XMLFactory with no output Writer + * @param m Expected number of leaves in the XML Tree + */ + public XMLFactory(int m) + { + // Initialise the names cache + level=0; + maxlevel=m; + names=new String[maxlevel]; + contbuf=new boolean[maxlevel]; + + // This is used by nest() + nestbuf=new char[maxlevel]; + for(int i=0;i<maxlevel;i++) + nestbuf[i]=' '; + } + + /** + * Constructs an XMLFactory + * @param out Writer to send the output to + */ + public XMLFactory(Writer out) + throws IOException + { + this(); + setWriter(out); + } + + /** + * Constructs an XMLFactory + * @param out Writer to send the output to + * @param encoding The XML encoding + */ + public XMLFactory(Writer out,String encoding) + throws IOException + { + this(); + setWriter(out,encoding); + } + + /** + * Constructs an XMLFactory + * @param out Writer to send the output to + * @param m Expected number of leaves in the XML Tree + */ + public XMLFactory(int m,Writer out) + throws IOException + { + this(m); + setWriter(out); + } + + /** + * Constructs an XMLFactory + * @param out Writer to send the output to + * @param encoding The XML encoding + * @param m Expected number of leaves in the XML Tree + */ + public XMLFactory(int m,Writer out,String encoding) + throws IOException + { + this(m); + setWriter(out,encoding); + } + + /** + * Sets the Writer to send the output to. This call will also send the + * XML header. + * + * @param out Writer to send output to + */ + public void setWriter(Writer out) + throws IOException + { + setWriter(out,"ISO-8859-1"); + } + + /** + * Sets the Writer to send the output to. This call will also send the + * XML header using the supplied encoding. It is up to the user code to + * implement this encoding. + * + * @param out Writer to send output to + * @param encoding Encoding of the XML Output + */ + public void setWriter(Writer out,String encoding) + throws IOException + { + this.out=out; + out.write("<?xml version=\"1.0\" encoding=\""); + out.write(encoding); + out.write("\" ?>\n"); + } + + /** + * @return Writer the XML is being sent out on. + */ + public Writer getWriter() { + return out; + } + + /** + * This starts a tag + * @param name The tag name + */ + public void startTag(String name) + throws IOException + { + if(inTag && inArg) { + // Handles two startTag() calls in succession. + out.write(">"); + } + + nest(level); + out.write('<'); + out.write(name); + inTag=true; + inArg=true; + + // cache the current tag name + names[level]=name; + + // cache the current hascontent value & reset + contbuf[level]=hascontent; + hascontent=false; + + // increase the level and the cache's as necessary + level++; + if(level>maxlevel) { + maxlevel=maxlevel+10; + + String n[]=new String[maxlevel]; + System.arraycopy(names,0,n,0,level); + names=n; + + boolean b[] = new boolean[maxlevel]; + System.arraycopy(contbuf,0,b,0,level); + contbuf=b; + } + } + + /** + * This ends a tag + */ + public void endTag() + throws IOException, XMLFactoryException + { + if(level<1) + throw new XMLFactoryException("endTag called above root node"); + + level--; + + if(inArg) { + // We are still within the opening tag + out.write(" />"); + } else { + // We must have written some content or child tags + + // hascontent is true if addContent() was called. If it was never called + // to get here some child tags must have been written, so we call nest() + // so that the close tag is on it's own line, and everything looks neat + // and tidy. + if(!hascontent) + nest(level); + + out.write("</"); + out.write(names[level]); + out.write('>'); + } + + inArg=false; // The parent tag must be told it now has content + inTag= level>0; // Are we still in a tag? + hascontent=contbuf[level]; // retrieve this level's hascontent value + } + + /** + * This completes the document releasing any open resources. + */ + public void close() + throws IOException, XMLFactoryException + { + while(level>0) + endTag(); + out.write('\n'); + out.flush(); + } + + /** + * This writes an attribute to the current tag. If the value is null, then no action is taken. + * @param name Name of the parameter + * @param value Value of the parameter + * @throw XMLFactoryException if out of context + */ + public void addAttribute(String name,Object value) + throws IOException, XMLFactoryException + { + if(value==null) + return; + + if(inArg) { + out.write(' '); + out.write(name); + out.write("=\""); + out.write(encode(value.toString())); + out.write("\""); + } else + throw new XMLFactoryException("Cannot add attribute outside of a tag"); + } + + /** + * This writes some content to the current tag. Once this has been called, + * you cannot add any more attributes to the current tag. Note, if c is null, + * no action is taken. + * @param c content to add. + */ + public void addContent(Object c) + throws IOException, XMLFactoryException + { + if(c==null) + return; + + if(inTag) { + if(inArg) { + // close the open tag + out.write('>'); + inArg=false; + } + out.write(c.toString()); + + // This is used by endTag() + hascontent=true; + } else + throw new XMLFactoryException("Cannot add content outside of a tag"); + } + + /** + * This adds a comment to the XML file. This is normally used at the start of + * any XML output. + * @parm c Comment to include + */ + public void addComment(Object c) + throws IOException, XMLFactoryException + { + if(inTag) + throw new XMLFactoryException("Cannot add comments within a tag"); + + out.write("\n<!-- "); + out.write(c.toString()); + out.write(" -->"); + } + + /** + * Indents the output according to the level + * @param level The indent level to generate + */ + protected void nest(int level) + throws IOException + { + out.write('\n'); + while(level>nestbuf.length) { + out.write(nestbuf,0,nestbuf.length); + level-=nestbuf.length; + } + out.write(nestbuf,0,level); + } + + /** + * Encodes the string so that any XML tag chars are translated + */ + protected String encode(String s) { + return s; + } + +}
\ No newline at end of file diff --git a/contrib/retep/uk/org/retep/xml/core/XMLFactoryException.java b/contrib/retep/uk/org/retep/xml/core/XMLFactoryException.java new file mode 100644 index 00000000000..5f9d4972097 --- /dev/null +++ b/contrib/retep/uk/org/retep/xml/core/XMLFactoryException.java @@ -0,0 +1,19 @@ +package uk.org.retep.xml.core; + +/** + * Title: + * Description: + * Copyright: Copyright (c) 2001 + * Company: + * @author + * @version 1.0 + */ + +public class XMLFactoryException extends Exception +{ + + public XMLFactoryException(String s) + { + super(s); + } +}
\ No newline at end of file diff --git a/contrib/retep/uk/org/retep/xml/jdbc/XMLDatabase.java b/contrib/retep/uk/org/retep/xml/jdbc/XMLDatabase.java new file mode 100644 index 00000000000..50aaaa1d905 --- /dev/null +++ b/contrib/retep/uk/org/retep/xml/jdbc/XMLDatabase.java @@ -0,0 +1,237 @@ +package uk.org.retep.xml.jdbc; + +import java.io.IOException; +import java.sql.Connection; +import java.sql.DatabaseMetaData; +import java.sql.ResultSet; +import java.sql.SQLException; +import uk.org.retep.xml.core.XMLFactory; +import uk.org.retep.xml.core.XMLFactoryException; + +public class XMLDatabase +{ + /** + * The XMLFactory being used by this instance + */ + protected XMLFactory factory; + + /** + * Constructor. setXMLFactory() must be called if this method is used. + */ + public XMLDatabase() + { + } + + /** + * Constructor + * @param fac XMLFactory to use + */ + public XMLDatabase(XMLFactory fac) + { + this(); + setXMLFactory(fac); + } + + /** + * Sets the factory to use. + * @param factory XMLFactory to use + */ + public void setXMLFactory(XMLFactory factory) + { + this.factory=factory; + } + + /** + * @return the XMLFactory being used. + */ + public XMLFactory getXMLFactory() + { + return factory; + } + + /** + * Flushes all output to the Writer. + * @throw IOException from Writer + * @throw XMLFactoryException from XMLFactory + */ + public void close() + throws IOException, XMLFactoryException + { + factory.close(); + } + + /** + * writes the schema of a table. + * @param con Connection to database + * @param table Table name + * @throw IOException from Writer + * @throw SQLException from JDBC + * @throw XMLFactoryException from XMLFactory + */ + public void writeTable(Connection con,String table) + throws IOException,SQLException,XMLFactoryException + { + writeTable(con.getMetaData(),table); + } + + /** + * writes the schema of a table. + * @param db DatabaseMetaData for the database + * @param table Table name + * @throw IOException from Writer + * @throw SQLException from JDBC + * @throw XMLFactoryException from XMLFactory + */ + public void writeTable(DatabaseMetaData db,String table) + throws IOException,SQLException,XMLFactoryException + { + writeTable(db,null,null,table); + } + + /** + * writes the schema of a table. + * @param db DatabaseMetaData for the database + * @param table Table name + * @throw IOException from Writer + * @throw SQLException from JDBC + * @throw XMLFactoryException from XMLFactory + */ + public void writeTable(DatabaseMetaData db,String cat,String schem,String table) + throws IOException,SQLException,XMLFactoryException + { + ResultSet trs; + + factory.startTag("TABLE"); + factory.addAttribute("NAME",table); + // fetch the remarks for this table (if any) + trs = db.getTables(null,null,table,null); + if(trs!=null) { + if(trs.next()) { + String rem = trs.getString(5); + if(rem!=null) + factory.addContent(rem); + } + trs.close(); + } + + trs = db.getColumns(null,null,table,"%"); + if(trs!=null) { + while(trs.next()) { + factory.startTag("COLUMN"); + factory.addAttribute("NAME",trs.getString(4)); + factory.addAttribute("TYPE",trs.getString(6)); + factory.addAttribute("COLUMN_SIZE",trs.getString(7)); + factory.addAttribute("DECIMAL_DIGITS",trs.getString(9)); + factory.addAttribute("NUM_PREC_RADIX",trs.getString(10)); + factory.addAttribute("NULLABLE",trs.getString(11)); + factory.addAttribute("COLUMN_DEF",trs.getString(13)); + factory.addAttribute("CHAR_OCTET_LENGTH",trs.getString(16)); + factory.addAttribute("ORDINAL_POSITION",trs.getString(17)); + factory.addAttribute("IS_NULLABLE",trs.getString(18)); + factory.addAttribute("TABLE_CAT",trs.getString(1)); + factory.addAttribute("TABLE_SCHEM",trs.getString(2)); + String rem = trs.getString(12); + if(rem!=null) + factory.addContent(rem); + factory.endTag(); + } + trs.close(); + } + + factory.endTag(); + } + + /** + * This generates the schema of an entire database. + * @param db Connection to database + * @param table Table pattern + * @throw IOException from Writer + * @throw SQLException from JDBC + * @throw XMLFactoryException from XMLFactory + * @see java.sql.DatabaseMetaData.getTables() + */ + public void writeDatabase(Connection db,String table) + throws IOException, SQLException, XMLFactoryException + { + writeDatabase(db.getMetaData(),null,null,table); + } + + /** + * This generates the schema of an entire database. + * @param db DatabaseMetaData of database + * @param table Table pattern + * @throw IOException from Writer + * @throw SQLException from JDBC + * @throw XMLFactoryException from XMLFactory + * @see java.sql.DatabaseMetaData.getTables() + */ + public void writeDatabase(DatabaseMetaData db,String table) + throws IOException, SQLException, XMLFactoryException + { + writeDatabase(db,null,null,table); + } + + /** + * This generates the schema of an entire database. + * @param db DatabaseMetaData of database + * @param cat Catalog (may be null) + * @param schem Schema (may be null) + * @param table Table pattern + * @throw IOException from Writer + * @throw SQLException from JDBC + * @throw XMLFactoryException from XMLFactory + * @see java.sql.DatabaseMetaData.getTables() + */ + public void writeDatabase(Connection db) + throws IOException, SQLException, XMLFactoryException + { + writeDatabase(db.getMetaData(),null,null,"%"); + } + + /** + * This generates the schema of an entire database. + * @param db DatabaseMetaData of database + * @param cat Catalog (may be null) + * @param schem Schema (may be null) + * @param table Table pattern + * @throw IOException from Writer + * @throw SQLException from JDBC + * @throw XMLFactoryException from XMLFactory + * @see java.sql.DatabaseMetaData.getTables() + */ + public void writeDatabase(DatabaseMetaData db) + throws IOException, SQLException, XMLFactoryException + { + writeDatabase(db,null,null,"%"); + } + + /** + * This generates the schema of an entire database. + * @param db DatabaseMetaData of database + * @param cat Catalog (may be null) + * @param schem Schema (may be null) + * @param table Table pattern + * @throw IOException from Writer + * @throw SQLException from JDBC + * @throw XMLFactoryException from XMLFactory + * @see java.sql.DatabaseMetaData.getTables() + */ + public void writeDatabase(DatabaseMetaData db,String cat,String schem,String table) + throws IOException, SQLException, XMLFactoryException + { + ResultSet rs = db.getTables(cat,schem,table,null); + if(rs!=null) { + factory.startTag("DATABASE"); + factory.addAttribute("PRODUCT",db.getDatabaseProductName()); + factory.addAttribute("VERSION",db.getDatabaseProductVersion()); + + while(rs.next()) { + writeTable(db,rs.getString(1),rs.getString(2),rs.getString(3)); + } + + factory.endTag(); + rs.close(); + } + } + +}
\ No newline at end of file diff --git a/contrib/retep/uk/org/retep/xml/jdbc/XMLResultSet.java b/contrib/retep/uk/org/retep/xml/jdbc/XMLResultSet.java new file mode 100644 index 00000000000..ee020df940d --- /dev/null +++ b/contrib/retep/uk/org/retep/xml/jdbc/XMLResultSet.java @@ -0,0 +1,505 @@ +package uk.org.retep.xml.jdbc; + +import java.io.IOException; +import java.io.Writer; +import java.sql.ResultSet; +import java.sql.ResultSetMetaData; +import java.sql.SQLException; +import java.util.Properties; +import uk.org.retep.xml.core.XMLFactory; +import uk.org.retep.xml.core.XMLFactoryException; + +/** + * This class takes a java.sql.ResultSet object and generates an XML stream + * based on it's contents. + * + * $Id: XMLResultSet.java,v 1.1 2001/01/23 10:22:20 peter Exp $ + */ +public class XMLResultSet +{ + /** + * The current ResultSet to process + */ + protected ResultSet rs; + + /** + * The XMLFactory being used by this instance + */ + protected XMLFactory factory; + + /** + * The default properties used when none are supplied by the user + */ + protected static Properties defaults; + + /** + * The default property name for defining the tag name used to define a + * ResultSet + */ + public static String RESULTSET_NAME = "resultset.name"; + + /** + * The default tag name for a resultset + */ + public static String DEFAULT_RESULTSET_NAME = "RESULTSET"; + + /** + * The default property name for defining the tag name used to define a row + */ + public static String ROW_NAME = "row.name"; + + /** + * The default tag name for a row + */ + public static String DEFAULT_ROW_NAME = "RECORD"; + + /** + * The default tag name for a resultset + */ + public static String COLNAME = ".name"; + + /** + * The value of the property (named as its related column) used to define + * how the column is generated. This indicates that the columns data is + * enclosed within a pair of tags, ie: <id>1234</id> + */ + public static String CONTENT = "content"; + + /** + * The value of the property (named as its related column) used to define + * how the column is generated. This indicates that the columns data is + * an attribute in the columns tag. ie: <id value="1234" /> + */ + public static String ATTRIBUTE = "attribute"; + + /** + * This is the default attribute name used when the ATTRIBUTE option is set. + */ + public static String DEFAULT_ATTRIBUTE = "VALUE"; + + /** + * The value of the property (named as its related column) used to define + * how the column is generated. This indicates that the columns data is + * an attribute in the parent's tag. ie: <row id="1234" /> + */ + public static String ROW_ATTRIBUTE = "row"; + + /** + * This property name marks the begining row number within the ResultSet to + * start processing. + */ + public static String FIRST_ROW = "row.first"; + + /** + * This property name marks the last row number within the ResultSet to + * end processing. + */ + public static String LAST_ROW = "row.last"; + + /** + * Constructor + */ + public XMLResultSet() + { + factory = new XMLFactory(); + } + + /** + * Constructor + */ + public XMLResultSet(ResultSet rs) + { + this(); + setResultSet(rs); + } + + /** + * Sets the ResultSet to use + * @param rs ResultSet + */ + public void setResultSet(ResultSet rs) + { + this.rs=rs; + } + + /** + * @return the current ResultSet + * + */ + public ResultSet getResultSet() + { + return rs; + } + + /** + * Sets the Writer to send all output to + * @param out Writer + * @throws IOException from XMLFactory + * @see XMLFactory.setWriter + */ + public void setWriter(Writer out) + throws IOException + { + factory.setWriter(out); + } + + /** + * @return Writer output is going to + */ + public Writer getWriter() + { + return factory.getWriter(); + } + + /** + * @return XMLFactory being used + */ + public XMLFactory getXMLFactory() + { + return factory; + } + + /** + * Flushes all output to the Writer + * @throw IOException from Writer + * @throw XMLFactoryException from XMLFactory + */ + public void close() + throws IOException, XMLFactoryException + { + factory.close(); + } + + /** + * Returns the default properties used by translate() and buildDTD() + * @return Properties default property settings + */ + public static Properties getDefaultProperties() + { + if(defaults==null) { + defaults=new Properties(); + defaults.setProperty(RESULTSET_NAME,DEFAULT_RESULTSET_NAME); + defaults.setProperty(ROW_NAME,DEFAULT_ROW_NAME); + } + return defaults; + } + + /** + * This generates an XML version of a ResultSet sending it to the supplied + * Writer. + * @param rs ResultSet to convert + * @param p Properties for the conversion + * @param out Writer to send output to (replaces existing one) + * @throws XMLFactoryException from XMLFactory + * @throws IOException from Writer + * @throws SQLException from ResultSet + */ + public void translate(ResultSet rs,Properties p,Writer out) + throws XMLFactoryException, IOException, SQLException + { + factory.setWriter(out); + translate(rs,p); + } + + /** + * This generates an XML version of a ResultSet sending it to the supplied + * Writer using a default tag struct + * @param rs ResultSet to convert + * @param out Writer to send output to (replaces existing one) + * @throws XMLFactoryException from XMLFactory + * @throws IOException from Writer + * @throws SQLException from ResultSet + */ + public void translate(ResultSet rs,Writer out) + throws XMLFactoryException, IOException, SQLException + { + factory.setWriter(out); + translate(rs,(Properties)null); + } + + /** + * This generates an XML version of a ResultSet sending it to the current + * output stream using a default tag structure. + * @param rs ResultSet to convert + * @throws XMLFactoryException from XMLFactory + * @throws IOException from Writer + * @throws SQLException from ResultSet + */ + public void translate(ResultSet rs) + throws XMLFactoryException, IOException, SQLException + { + translate(rs,(Properties)null); + } + + /** + * This generates an XML version of a ResultSet sending it to the current + * output stream. + * @param rs ResultSet to convert + * @param p Properties for the conversion + * @throws XMLFactoryException from XMLFactory + * @throws IOException from Writer + * @throws SQLException from ResultSet + */ + public void translate(ResultSet rs,Properties p) + throws XMLFactoryException, IOException, SQLException + { + // if we don't pass any properties, create an empty one and cache it if + // further calls do the same + if(p==null) { + p=getDefaultProperties(); + } + + // Fetch some common values + String setName = p.getProperty(RESULTSET_NAME,DEFAULT_RESULTSET_NAME); + String rowName = p.getProperty(ROW_NAME,DEFAULT_ROW_NAME); + + ResultSetMetaData rsmd = rs.getMetaData(); + int numcols = rsmd.getColumnCount(); + + String colname[] = new String[numcols]; // field name cache + int coltype[] = new int[numcols]; // true to use attribute false content + String colattr[] = new String[numcols]; // Attribute name + + // These deal with when an attribute is to go into the row's tag parameters + int parentFields[] = getRowAttributes(numcols,colname,colattr,coltype,rsmd,p); // used to cache the id's + int numParents= parentFields==null ? 0 : parentFields.length; // number of parent fields + boolean haveParent= numParents>0; // true only if we need to us these + + // This allows some limiting of the output result + int firstRow = Integer.parseInt(p.getProperty(FIRST_ROW,"0")); + int lastRow = Integer.parseInt(p.getProperty(LAST_ROW,"0")); + int curRow=0; + + // Start the result set's tag + factory.startTag(setName); + + while(rs.next()) { + if(firstRow<=curRow && (lastRow==0 || curRow<lastRow)) { + factory.startTag(rowName); + + if(haveParent) { + // Add any ROW_ATTRIBUTE entries + for(int i=0;i<numParents;i++) + factory.addAttribute(colname[i],rs.getString(i+1)); + } + + // Process any CONTENT & ATTRIBUTE entries. + // This skips if all the entries are ROW_ATTRIBUTE's + if(numParents < numcols) { + for(int i=1;i<=numcols;i++) { + // Now do we write the value as an argument or as PCDATA? + switch(coltype[i-1]) { + case 1: + factory.startTag(colname[i-1]); + factory.addAttribute(colattr[i-1],rs.getString(i)); + factory.endTag(); + break; + + case 0: + factory.startTag(colname[i-1]); + factory.addContent(rs.getString(i)); + factory.endTag(); + break; + + default: + // Unknown type. This should only be called for ROW_ATTRIBUTE which + // is handled before this loop. + break; + } + } + } + + // End the row + factory.endTag(); + } + curRow++; + + } // check for firstRow <= curRow <= lastRow + + // Close the result set's tag + factory.endTag(); + } + + /** + * This method takes a ResultSet and writes it's DTD to the current writer + * @param rs ResultSet + */ + public void buildDTD(ResultSet rs) + throws IOException, SQLException + { + buildDTD(rs,null,getWriter()); + } + + /** + * This method takes a ResultSet and writes it's DTD to the current writer + * @param rs ResultSet + * @param out Writer to send output to + */ + public void buildDTD(ResultSet rs,Writer out) + throws IOException, SQLException + { + buildDTD(rs,null,out); + } + + /** + * This method takes a ResultSet and writes it's DTD to the current writer + * @param rs ResultSet + * @param out Writer to send output to + */ + public void buildDTD(ResultSet rs,Properties p) + throws IOException, SQLException + { + buildDTD(rs,p,getWriter()); + } + + /** + * This method takes a ResultSet and writes it's DTD to the current a. + * + * <p>ToDo:<ol> + * <li>Add ability to have NULLABLE columns appear as optional (ie instead of + * x, have x? (DTD for Optional). Can't use + or * as that indicates more than + * 1 instance). + * </ol> + * + * @param rs ResultSet + * @param p Properties defining tag types (as translate) + * @param out Writer to send output to + */ + public void buildDTD(ResultSet rs,Properties p,Writer out) + throws IOException, SQLException + { + // if we don't pass any properties, create an empty one and cache it if + // further calls do the same + if(p==null) { + p=getDefaultProperties(); + } + + // Fetch some common values + String setName = p.getProperty(RESULTSET_NAME,DEFAULT_RESULTSET_NAME); + String rowName = p.getProperty(ROW_NAME,DEFAULT_ROW_NAME); + + ResultSetMetaData rsmd = rs.getMetaData(); + int numcols = rsmd.getColumnCount(); + + String colname[] = new String[numcols]; // field name cache + int coltype[] = new int[numcols]; // true to use attribute false content + String colattr[] = new String[numcols]; // Attribute name + + // These deal with when an attribute is to go into the row's tag parameters + int parentFields[] = getRowAttributes(numcols,colname,colattr,coltype,rsmd,p); // used to cache the id's + int numParents= parentFields==null ? 0 : parentFields.length; // number of parent fields + boolean haveParent= numParents>0; // true only if we need to us these + + // Now the dtd defining the ResultSet + out.write("<!ELEMENT "); + out.write(setName); + out.write(" ("); + out.write(rowName); + out.write("*)>\n"); + + // Now the dtd defining each row + out.write("<!ELEMENT "); + out.write(rowName); + out.write(" ("); + boolean s=false; + for(int i=0;i<numcols;i++) { + if(coltype[i]!=2) { // not ROW_ATTRIBUTE + if(s) + out.write(","); + out.write(colname[i]); + s=true; + } + } + out.write(")>\n"); + + // Now handle any ROW_ATTRIBUTE's + if(haveParent) { + out.write("<!ATTLIST "); + out.write(rowName); + for(int i=0;i<numParents;i++) { + out.write("\n "); + out.write(colname[parentFields[i]]); + out.write(" CDATA #IMPLIED"); + } + out.write("\n>\n"); + } + + // Now add any CONTENT & ATTRIBUTE fields + for(int i=0;i<numcols;i++) { + if(coltype[i]!=2) { + out.write("<!ELEMENT "); + out.write(colname[i]); + + // CONTENT + if(coltype[i]==0) { + out.write(" (#PCDATA)"); + } else { + out.write(" EMPTY"); + } + + out.write(">\n"); + + // ATTRIBUTE + if(coltype[i]==1) { + out.write("<!ATTLIST "); + out.write(colname[i]); + out.write("\n "); + out.write(colattr[i]); + out.write(" CDATA #IMPLIED\n>\n"); + } + } + } + } + + /** + * Private method used by the core translate and buildDTD methods. + * @param numcols Number of columns in ResultSet + * @param colname Array of column names + * @param colattr Array of column attribute names + * @param coltype Array of column types + * @param rsmd ResultSetMetaData for ResultSet + * @param p Properties being used + * @return array containing field numbers which should appear as attributes + * within the rows tag. + * @throws SQLException from JDBC + */ + private int[] getRowAttributes(int numcols, + String colname[],String colattr[], + int coltype[], + ResultSetMetaData rsmd,Properties p) + throws SQLException + { + int pf[] = null; + int nf = 0; + + // Now we put a columns value as an attribute if the property + // fieldname=attribute (ie myname=attribute) + // and if the fieldname.name property exists, use it as the attribute name + for(int i=0;i<numcols;i++) { + colname[i] = rsmd.getColumnName(i+1); + colattr[i] = p.getProperty(colname[i]+COLNAME,DEFAULT_ATTRIBUTE); + if(p.getProperty(colname[i],CONTENT).equals(ROW_ATTRIBUTE)) { + // Ok, ROW_ATTRIBUTE's need to be cached, so add them in here + coltype[i]=2; + if(pf==null) { + pf = new int[numcols]; // Max possible number of entries + } + pf[nf++] = i; + } else { + // Normal CONTENT or ATTRIBUTE entry + coltype[i] = p.getProperty(colname[i],CONTENT).equals(ATTRIBUTE) ? 1 : 0; + } + } + + // Form an array exactly nf elements long + if(nf>0) { + int r[] = new int[nf]; + System.arraycopy(pf,0,r,0,nf); + return r; + } + + // Return null if no tags are to appear as attributes to the row's tag + return null; + } + +}
\ No newline at end of file diff --git a/contrib/retep/uk/org/retep/xml/parser/TagHandler.java b/contrib/retep/uk/org/retep/xml/parser/TagHandler.java new file mode 100644 index 00000000000..78deb0ec0aa --- /dev/null +++ b/contrib/retep/uk/org/retep/xml/parser/TagHandler.java @@ -0,0 +1,201 @@ +package uk.org.retep.xml.parser; + +import java.io.CharArrayWriter; +import java.io.IOException; +import java.util.List; +import java.util.Iterator; +import java.util.HashSet; +import java.util.ArrayList; +import java.util.HashMap; +import org.xml.sax.AttributeList; +import org.xml.sax.HandlerBase; +import org.xml.sax.InputSource; +import org.xml.sax.Parser; +import org.xml.sax.SAXException; +import javax.xml.parsers.ParserConfigurationException; +import javax.xml.parsers.SAXParser; +import javax.xml.parsers.SAXParserFactory; + +/** + * This class implements the base of the XML handler. You create an instance, + * register classes (who implement TagListener) that are interested in the tags + * and pass it to SAX. + * + * <p>Or you create an instance, register the TagListeners and use the getParser() + * method to create a Parser. Then start parsing by calling it's parse() method. + */ + +public class TagHandler extends HandlerBase { + + /** + * The current active level + */ + private int level; + + /** + * cache used to handle nesting of tags + */ + private List contents; + + /** + * cache used to handle nesting of tags + */ + private List tags; + + /** + * cache used to handle nesting of tags + */ + private List args; + + // Current active content writer + private CharArrayWriter content; + + // List of TagListener's who want to be fed data + private HashSet tagListeners; + + /** + * default constructor + */ + public TagHandler() { + level=0; + contents = new ArrayList(); + tags = new ArrayList(); + args = new ArrayList(); + tagListeners = new HashSet(); + } + + /** + * Called by SAX when a tag is begun. This simply creates a new level in the + * cache and stores the parameters and tag name in there. + */ + public void startElement(String p0, AttributeList p1) throws SAXException { + + // Now move up and fetch a CharArrayWriter from the cache + // creating if this is the first time at this level + if(contents.size()<=level) { + contents.add(new CharArrayWriter()); + tags.add(p0); + args.add(new HashMap()); + } + + content=(CharArrayWriter) contents.get(level); + content.reset(); + + // Also cache the tag's text and argument list + tags.set(level,p0); + + HashMap h = (HashMap) args.get(level); + h.clear(); + for(int i=p1.getLength()-1;i>-1;i--) { + h.put(p1.getName(i),p1.getValue(i)); + } + + // Now notify any TagListeners + Iterator it = tagListeners.iterator(); + while(it.hasNext()) + ( (TagListener) it.next() ).tagStart(level,p0,h); + + // Now move up a level + level++; + } + + /** + * This is called by SAX at the end of a tag. This calls handleTag() and then + * raises the level, so that the previous parent tag may continue. + */ + public void endElement(String p0) throws SAXException { + // move up a level retrieving that level's current content + // Now this exception should never occur as the underlying parser should + // actually trap it. + if(level<1) + throw new SAXException("Already at top level?"); + level--; + + // Now notify any TagListeners + Iterator it = tagListeners.iterator(); + while(it.hasNext()) + ( (TagListener) it.next() ).tagContent(content); + + // allows large content to be released early + content.reset(); + + // Now reset content to the previous level + content=(CharArrayWriter) contents.get(level); + } + + /** + * Called by SAX so that content between the start and end tags are captured. + */ + public void characters(char[] p0, int p1, int p2) throws SAXException { + content.write(p0,p1,p2); + } + + /** + * Adds a TagListener so that it is notified of tags as they are processed. + * @param handler TagListener to add + */ + public void addTagListener(TagListener h) { + tagListeners.add(h); + } + + /** + * Removes the TagListener so it no longer receives notifications of tags + */ + public void removeTagListener(TagListener h) { + tagListeners.remove(h); + } + + /** + * This method returns a org.xml.sax.Parser object that will parse the + * contents of a URI. + * + * <p>Normally you would call this method, then call the parse(uri) method of + * the returned object. + * @return org.xml.sax.Parser object + */ + public Parser getParser() + throws SAXException + { + try { + SAXParserFactory spf = SAXParserFactory.newInstance(); + + String validation = System.getProperty ("javax.xml.parsers.validation", "false"); + if (validation.equalsIgnoreCase("true")) + spf.setValidating (true); + + SAXParser sp = spf.newSAXParser(); + Parser parser = sp.getParser (); + + parser.setDocumentHandler(this); + + return(parser); + } catch(ParserConfigurationException pce) { + throw new SAXException(pce.toString()); + } + } + + /** + * This method will parse the specified URI. + * + * <p>Internally this is the same as getParser().parse(uri); + * @param uri The URI to parse + */ + public void parse(String uri) + throws IOException, SAXException + { + getParser().parse(uri); + } + + /** + * This method will parse the specified InputSource. + * + * <p>Internally this is the same as getParser().parse(is); + * @param is The InputSource to parse + */ + public void parse(InputSource is) + throws IOException, SAXException + { + getParser().parse(is); + } + +}
\ No newline at end of file diff --git a/contrib/retep/uk/org/retep/xml/parser/TagListener.java b/contrib/retep/uk/org/retep/xml/parser/TagListener.java new file mode 100644 index 00000000000..24146b3e245 --- /dev/null +++ b/contrib/retep/uk/org/retep/xml/parser/TagListener.java @@ -0,0 +1,30 @@ +package uk.org.retep.xml.parser; + +import java.util.HashMap; +import java.io.CharArrayWriter; + +/** + * This interface defines the methods a class needs to implement if it wants the + * xml parser to notify it of any xml tags. + */ + +public interface TagListener { + /** + * This is called when a tag has just been started. + * <p><b>NB:</b> args is volatile, so if you use it beyond the lifetime of + * this call, then you must make a copy of the HashMap (and not use simply + * store this HashMap). + * @param level The number of tags above this + * @param tag The tag name + * @param args A HashMap of any arguments + */ + public void tagStart(int level,String tag,HashMap args); + /** + * This method is called by ContHandler to process a tag once it has been + * fully processed. + * <p><b>NB:</b> content is volatile, so you must copy its contents if you use + * it beyond the lifetime of this call. + * @param content CharArrayWriter containing the content of the tag. + */ + public void tagContent(CharArrayWriter content); +}
\ No newline at end of file diff --git a/contrib/retep/uk/org/retep/xml/test/XMLExport.java b/contrib/retep/uk/org/retep/xml/test/XMLExport.java new file mode 100644 index 00000000000..116f2509060 --- /dev/null +++ b/contrib/retep/uk/org/retep/xml/test/XMLExport.java @@ -0,0 +1,191 @@ +package uk.org.retep.xml.test; + +import java.lang.Exception; +import java.io.*; +import java.sql.*; +import java.util.Properties; +import uk.org.retep.xml.core.XMLFactoryException; +import uk.org.retep.xml.jdbc.XMLDatabase; +import uk.org.retep.xml.jdbc.XMLResultSet; + +/** + * This "test" class is a fully functional tool in its own right. It utilises + * the xml classes to query and export to XML, or to dump database structures + * into XML. + */ + +public class XMLExport +{ + /** + * The current Database Connection + */ + protected Connection conn; + protected Statement stat; + protected String drvr,url,table; + + protected XMLResultSet xrs; + protected XMLDatabase xdb; + protected Properties prop; + protected boolean outXML; + protected boolean outDTD; + protected boolean outTAB; + protected int maxRows=0; + + public XMLExport(String[] args) + throws IOException,SQLException,XMLFactoryException,ClassNotFoundException + { + xrs = new XMLResultSet(); + xrs.setWriter(new OutputStreamWriter(System.out)); + //Properties p = new Properties(xrs.getDefaultProperties()); + prop = (Properties) xrs.getDefaultProperties().clone(); + + xdb = new XMLDatabase(xrs.getXMLFactory()); + + for(int i=0;i<args.length;i++) { + String arg=args[i]; + if(arg.startsWith("-D")) { + // Load JDBC Driver + drvr=arg.substring(2); + Class.forName(drvr); + System.out.println("Now using JDBC Driver: "+drvr); + } else if(arg.startsWith("-J")) { + // Open a JDBC Connection (closing the existing one, if any) + close(); + url = arg.substring(2); + conn = DriverManager.getConnection(url); + System.out.println("Opened "+url); + stat=null; + } else if(arg.startsWith("-M")) { + // Set the maximum number of rows to process (0=no limit) + maxRows=Integer.parseInt(arg.substring(2)); + if(maxRows<0) + maxRows=0; + prop.setProperty(XMLResultSet.FIRST_ROW,"0"); + prop.setProperty(XMLResultSet.LAST_ROW,Integer.toString(maxRows)); + } else if(arg.startsWith("-O")) { + // Set the output file for XML & DTD + xrs.setWriter(new FileWriter(arg.substring(2))); + System.out.println("XML/DTD Output now going to "+arg.substring(2)); + } else if(arg.startsWith("-P")) { + // Set a parameter for XML & DTD + int p = arg.indexOf('='); + prop.setProperty(arg.substring(2,p),arg.substring(p+1)); + } else if(arg.startsWith("-S")) { + // -Stable generate schema of just table + // -S generate schema of entire database + if(arg.length()>2) { + String table=arg.substring(2); + System.out.println("Generating XML Schema of table "+table); + xdb.writeTable(conn,table); + xdb.close(); + } else { + System.out.println("Generating XML Schema of database"); + xdb.writeDatabase(conn); + xdb.close(); + } + } else if(arg.equals("-V")) { + // Select table output + outXML=outDTD=false; + } else if(arg.equals("-X")) { + // Select XML output + outXML=true; + outDTD=outTAB=false; + } else if(arg.equals("-Y")) { + // Select DTD output + outXML=outTAB=false; + outDTD=true; + } else if(arg.startsWith("-")) { + System.err.println("Unknown argument: "+arg); + System.exit(1); + } else { + // Ok, anything not starting with "-" are queries + if(stat==null) + stat=conn.createStatement(); + + System.out.println("Executing "+arg); + ResultSet rs = stat.executeQuery(arg); + if(rs!=null) { + if(outXML) { + xrs.translate(rs,prop); + xrs.close(); + } else if(outDTD) { + // Output the DTD + xrs.buildDTD(rs,prop); + xrs.close(); + } else { + // Normal resultset output + int rc=0; + + ResultSetMetaData rsmd = rs.getMetaData(); + int nc = rsmd.getColumnCount(); + boolean us=false; + for(int c=0;c<nc;c++) { + if(us) + System.out.print("\t"); + System.out.print(rsmd.getColumnName(c+1)); + us=true; + } + System.out.println(); + + while(rs.next() && (maxRows==0 || rc<maxRows)) { + us=false; + for(int c=0;c<nc;c++) { + if(us) + System.out.print("\t"); + System.out.print(rs.getString(c+1)); + us=true; + } + System.out.println(); + rc++; + } + + System.out.println("Returned "+rc+" rows."); + } + rs.close(); + } + } + } + + close(); + } + + public void close() throws SQLException + { + if(conn!=null) { + conn.close(); + System.out.println("Closed "+url); + conn=null; + stat=null; + } + } + + public static void main(String[] args) + { + if(args.length==0) { + System.out.println("Useage: java uk.org.retep.xml.test.XMLExport [args ...]\nwhere args are:\n"+ + "-Dclass.name JDBC Driver Class\n"+ + "-Jurl JDBC URL\n"+ + "-Mmax Maximum number of rows to process\n"+ + "-Ofilename Send all XML or DTD output to file\n"+ + "-Pkey=value Property passed on to XMLResultSet\n"+ + "-S[table] Write XML description of table. Whole DB if table left out.\n"+ + "-V Default: Write result to System.out\n"+ + "-X Write result in XML to System.out\n"+ + "-Y Write DTD describing result to System.out\n"+ + "\nAny other argument not starting with - is treated as an SQL Query\n"+ + "\nFor example:\n"+ + "To dump the table structure of a database into db.xml, use\n $ java uk.org.retep.xml.test.XMLExport -Doracle.jdbc.driver.OracleDriver -Jjdbc:oracle:thin:dbname/username@localhost:1521:ISORCL -Odb.xml -S\n"+ + "To dump the structure of a single table PRODUCTS and write into products.xml, use\n $ clear;java uk.org.retep.xml.test.XMLExport -Doracle.jdbc.driver.OracleDriver-Jjdbc:oracle:thin:dbname/username@localhost:1521:ISORCL -Oproducts.xml -SPRODUCT\n"+ + "To query a table and write the results into standard out as XML, use\n $ java uk.org.retep.xml.test.XMLExport -Doracle.jdbc.driver.OracleDriver -Jjdbc:oracle:thin:dbname/username@localhost:1521:ISORCL -M5 -PSKU=row -PIMAGE=attribute -X \"select sku,image,template from product\"\n"+ + "To query a table and write a DTD describing the ResultSet, use\n $ java uk.org.retep.xml.test.XMLExport -Doracle.jdbc.driver.OracleDriver -Jjdbc:oracle:thin:dbname/username@localhost:1521:ISORCL -M5 -PSKU=row -PIMAGE=attribute -Y \"select sku,image,template from product\"\n" + ); + System.exit(1); + } + + try { + XMLExport XMLExport1 = new XMLExport(args); + } catch(Exception e) { + e.printStackTrace(); + } + } +}
\ No newline at end of file diff --git a/contrib/xml/README b/contrib/xml/README new file mode 100644 index 00000000000..6c714f74e12 --- /dev/null +++ b/contrib/xml/README @@ -0,0 +1,118 @@ +This package contains some simple routines for manipulating XML +documents stored in PostgreSQL. This is a work-in-progress and +somewhat basic at the moment (see the file TODO for some outline of +what remains to be done). + +At present, two modules (based on different XML handling libraries) +are provided. + +Prerequisite: + +pgxml.c: +expat parser 1.95.0 or newer (http://expat.sourceforge.net) + +or + +pgxml_dom.c: +libxml2 (http://xmlsoft.org) + +The libxml2 version provides more complete XPath functionality, and +seems like a good way to go. I've left the old versions in there for +comparison. + +Compiling and loading: +---------------------- + +The Makefile only builds the libxml2 version. + +To compile, just type make. + +Then you can use psql to load the two function definitions: +\i pgxml_dom.sql + + +Function documentation and usage: +--------------------------------- + +pgxml_parse(text) returns bool + parses the provided text and returns true or false if it is +well-formed or not. It returns NULL if the parser couldn't be +created for any reason. + +pgxml_xpath (XQuery functions) - differs between the versions: + +pgxml.c (expat version) has: + +pgxml_xpath(text doc, text xpath, int n) returns text + parses doc and returns the cdata of the nth occurence of +the "simple path" entry. + +However, the remainder of this document will cover the pgxml_dom.c version. + +pgxml_xpath(text doc, text xpath, text toptag, text septag) returns text + evaluates xpath on doc, and returns the result wrapped in +<toptag>...</toptag> and each result node wrapped in +<septag></septag>. toptag and septag may be empty strings, in which +case the respective tag will be omitted. + +Example: + +Given a table docstore: + + Attribute | Type | Modifier +-----------+---------+---------- + docid | integer | + document | text | + +containing documents such as (these are archaeological site +descriptions, in case anyone is wondering): + +<?XML version="1.0"?> +<site provider="Foundations" sitecode="ak97" version="1"> + <name>Church Farm, Ashton Keynes</name> + <invtype>watching brief</invtype> + <location scheme="osgb">SU04209424</location> +</site> + +one can type: + +select docid, +pgxml_xpath(document,'//site/name/text()','','') as sitename, +pgxml_xpath(document,'//site/location/text()','','') as location + from docstore; + +and get as output: + + docid | sitename | location +-------+--------------------------------------+------------ + 1 | Church Farm, Ashton Keynes | SU04209424 + 2 | Glebe Farm, Long Itchington | SP41506500 + 3 | The Bungalow, Thames Lane, Cricklade | SU10229362 +(3 rows) + +or, to illustrate the use of the extra tags: + +select docid as id, +pgxml_xpath(document,'//find/type/text()','set','findtype') +from docstore; + + id | pgxml_xpath +----+------------------------------------------------------------------------- + 1 | <set></set> + 2 | <set><findtype>Urn</findtype></set> + 3 | <set><findtype>Pottery</findtype><findtype>Animal bone</findtype></set> +(3 rows) + +Which produces a new, well-formed document. Note that document 1 had +no matching instances, so the set returned contains no +elements. document 2 has 1 matching element and document 3 has 2. + +This is just scratching the surface because XPath allows all sorts of +operations. + +Note: I've only implemented the return of nodeset and string values so +far. This covers (I think) many types of queries, however. + +John Gray <jgray@azuli.co.uk> 16 August 2001 + + diff --git a/contrib/xml/pgxml.source b/contrib/xml/pgxml.source new file mode 100644 index 00000000000..8a04fa2c9b2 --- /dev/null +++ b/contrib/xml/pgxml.source @@ -0,0 +1,7 @@ +--SQL for XML parser + +CREATE FUNCTION pgxml_parse(text) RETURNS bool + AS '_OBJWD_/pgxml_DLSUFFIX_' LANGUAGE 'c' WITH (isStrict); + +CREATE FUNCTION pgxml_xpath(text,text,text,text) RETURNS text + AS '_OBJWD_/pgxml_DLSUFFIX_' LANGUAGE 'c' WITH (isStrict);
\ No newline at end of file diff --git a/contrib/xml/pgxml_dom.source b/contrib/xml/pgxml_dom.source new file mode 100644 index 00000000000..a8582398b1e --- /dev/null +++ b/contrib/xml/pgxml_dom.source @@ -0,0 +1,7 @@ +--SQL for XML parser + +CREATE FUNCTION pgxml_parse(text) RETURNS bool + AS '_OBJWD_/pgxml_dom_DLSUFFIX_' LANGUAGE 'c' WITH (isStrict); + +CREATE FUNCTION pgxml_xpath(text,text,text,text) RETURNS text + AS '_OBJWD_/pgxml_dom_DLSUFFIX_' LANGUAGE 'c' WITH (isStrict);
\ No newline at end of file diff --git a/doc/src/sgml/libpgeasy.sgml b/doc/src/sgml/libpgeasy.sgml new file mode 100644 index 00000000000..4bb1b7949bd --- /dev/null +++ b/doc/src/sgml/libpgeasy.sgml @@ -0,0 +1,152 @@ +<!-- +$Header: /cvsroot/pgsql/doc/src/sgml/Attic/libpgeasy.sgml,v 2.9 2002/03/04 18:50:20 momjian Exp $ +--> + + <chapter id="pgeasy"> + <title><application>libpgeasy</application> - Simplified C Library</title> + + <note> + <title>Author</title> + + <para> + Written by Bruce Momjian + (<email>pgman@candle.pha.pa.us</email>) + and last updated 2002-03-04 + </para> + </note> + + <para> + <application>pgeasy</application> allows you to cleanly interface + to the <application>libpq</application> library, more like a 4GL + SQL interface. Refer to <xref linkend="libpq"> for more + information about <application>libpq</application>. + </para> + + <para> + It consists of a set of simplified C functions that encapsulate the + functionality of <application>libpq</application>. The functions are: + + <itemizedlist> + <listitem> +<synopsis> +PGresult *doquery(char *query); +</synopsis> + </listitem> + + <listitem> +<synopsis> +PGconn *connectdb(char *options); +</synopsis> + </listitem> + + <listitem> +<synopsis> +void disconnectdb(); +</synopsis> + </listitem> + + <listitem> +<synopsis> +int fetch(void *param,...); +</synopsis> + </listitem> + + <listitem> +<synopsis> +int fetchwithnulls(void *param,...); +</synopsis> + </listitem> + + <listitem> +<synopsis> +void reset_fetch(); +</synopsis> + </listitem> + + <listitem> +<synopsis> +void on_error_continue(); +</synopsis> + </listitem> + + <listitem> +<synopsis> +void on_error_stop(); +</synopsis> + </listitem> + + <listitem> +<synopsis> +PGresult *get_result(); +</synopsis> + </listitem> + + <listitem> +<synopsis> +void set_result(PGresult *newres); +</synopsis> + </listitem> + + </itemizedlist> + </para> + + <para> + Many functions return a structure or value, so you can work + with the result if required. + </para> + + <para> + You basically connect to the database with + <function>connectdb</function>, issue your query with + <function>doquery</function>, fetch the results with + <function>fetch</function>, and finish with + <function>disconnectdb</function>. + </para> + + <para> + For <literal>SELECT</literal> queries, <function>fetch</function> + allows you to pass pointers as parameters, and on return the + variables are filled with data from the binary cursor you opened. + These binary cursors cannot be used if you are running the + <application>pgeasy</application> client on a system with a different + architecture than the database server. If you pass a NULL pointer + parameter, the column is skipped. <function>fetchwithnulls</function> + allows you to retrieve the NULL status of the field by passing an + <literal>int*</literal> after each result pointer, which returns true + or false to indicate if the field is null. You can always use + <application>libpq</application> functions on the + <structname>PGresult</structname> pointer returned by + <function>doquery</function>. <function>reset_fetch</function> starts + the fetch back at the beginning. + </para> + + <para> + <function>get_result</function> and <function>set_result</function> + allow you to handle multiple open result sets. Use + <function>get_result</function> to save a result into an application + variable. You can then later use <function>set_result</function> to + return to the previously save result. + </para> + + <para> + There are several demonstration programs in + <filename>pgsql/src/interfaces/libpgeasy/examples</>. + </para> + </chapter> + +<!-- Keep this comment at the end of the file +Local variables: +mode:sgml +sgml-omittag:nil +sgml-shorttag:t +sgml-minimize-attributes:nil +sgml-always-quote-attributes:t +sgml-indent-step:1 +sgml-indent-data:t +sgml-parent-document:nil +sgml-default-dtd-file:"./reference.ced" +sgml-exposed-tags:nil +sgml-local-catalogs:("/usr/lib/sgml/catalog") +sgml-local-ecat-files:nil +End: +--> diff --git a/doc/src/sgml/odbc.sgml b/doc/src/sgml/odbc.sgml new file mode 100644 index 00000000000..cbc40624767 --- /dev/null +++ b/doc/src/sgml/odbc.sgml @@ -0,0 +1,805 @@ +<!-- +$Header: /cvsroot/pgsql/doc/src/sgml/Attic/odbc.sgml,v 1.30 2002/03/22 19:20:16 petere Exp $ +--> + + <chapter id="odbc"> + <docinfo> + <authorgroup> + <author> + <firstname>Tim</firstname> + <surname>Goeke</surname> + </author> + <author> + <firstname>Thomas</firstname> + <surname>Lockhart</surname> + </author> + </authorgroup> + <date>1998-10-21</date> + </docinfo> + + <title>ODBC Interface</title> + + <indexterm zone="odbc"> + <primary>ODBC</primary> + </indexterm> + + <sect1 id="odbc-intro"> + <title>Introduction</title> + + <note> + <para> + Background information originally by Tim Goeke + (<email>tgoeke@xpressway.com</email>) + </para> + </note> + + <para> + <acronym>ODBC</acronym> (Open Database Connectivity) is an abstract + <acronym>API</acronym> + that allows you to write applications that can interoperate + with various <acronym>RDBMS</acronym> servers. + <acronym>ODBC</acronym> provides a product-neutral interface + between frontend applications and database servers, + allowing a user or developer to write applications that are + portable between servers from different manufacturers.. + </para> + + <para> + The <acronym>ODBC</acronym> <acronym>API</acronym> matches up + on the backend to an <acronym>ODBC</acronym>-compatible data source. + This could be anything from a text file to an Oracle or + <productname>PostgreSQL</productname> <acronym>RDBMS</acronym>. + </para> + + <para> + The backend access comes from <acronym>ODBC</acronym> drivers, + or vendor-specific drivers that + allow data access. <productname>psqlODBC</productname>, which is included in the <productname>PostgreSQL</> distribution, is such a driver, + along with others that are + available, such as the <productname>OpenLink</productname> <acronym>ODBC</acronym> drivers. + </para> + + <para> + Once you write an <acronym>ODBC</acronym> application, + you <emphasis>should</emphasis> be able to connect to <emphasis>any</emphasis> + back-end database, regardless of the vendor, as long as the database schema + is the same. + </para> + + <para> + For example. you could have <productname>MS SQL Server</productname> + and <productname>PostgreSQL</productname> servers that have + exactly the same data. Using <acronym>ODBC</acronym>, + your Windows application would make exactly the + same calls and the back-end data source would look the same (to the Windows + application). + </para> + </sect1> + + <sect1 id="odbc-install"> + <title>Installation</title> + + <para> + In order to make use of an <acronym>ODBC</> driver there must + exist a <firstterm>driver manager</> on the system where the + <acronym>ODBC</> driver is to be used. There are two free + <acronym>ODBC</> driver managers for Unix-like operating systems + known to us: <indexterm><primary>iODBC</primary></indexterm> + <ulink url="http://www.iodbc.org"><productname>iODBC</></ulink> + and <indexterm><primary>unixODBC</primary></indexterm> <ulink + url="http://www.unixodbc.org"><productname>unixODBC</></ulink>. + Instructions for installing these driver managers are to be found + in the respective distribution. Software that provides database + access through <acronym>ODBC</acronym> should provide its own + driver manager (which may well be one of these two). Having said + that, any driver manager that you can find for your platform + should support the <productname>PostgreSQL</> <acronym>ODBC</> + driver, or any other <acronym>ODBC</> driver for that matter. + </para> + + <note> + <para> + The <productname>unixODBC</> distribution ships with a + <productname>PostgreSQL</> <acronym>ODBC</> driver of its own, + which is similar to the one contained in the + <productname>PostgreSQL</> distribution. It is up to you which + one you want to use. We plan to coordinate the development of + both drivers better in the future. + </para> + </note> + + <para> + To install the <acronym>ODBC</> you simply need to supply the + <option>--enable-odbc</> option to the <filename>configure</> + script when you are building the entire <productname>PostgreSQL</> + distribution. The library will then automatically be built and + installed with the rest of the programs. If you forget that option + or want to build the ODBC driver later you can change into the + directory <filename>src/interfaces/odbc</> and do <literal>make</> + and <literal>make install</> there. + </para> + + <para> + It is also possible to build the driver to be specifically tuned + for use with <productname>iODBC</> or <productname>unixODBC</>. + This means in particular that the driver will use the driver + manager's routines to process the configuration files, which is + probably desirable since it creates a more consistent + <acronym>ODBC</> environment on your system. If you want to do + that, then supply the <filename>configure</> options + <option>--with-iodbc</> or <option>--with-unixodbc</> (but not + both). + </para> + + <para> + If you build a <quote>stand-alone</quote> driver (not tied to + <productname>iODBC</> or <productname>unixODBC</>), then you can + specify where the driver should look for the configuration file + <filename>odbcinst.ini</>. By default it will be the directory + <filename>/usr/local/pgsql/etc/</>, or equivalent, depending on + what <option>--prefix</> and/or <option>--sysconfdir</> options + you supplied to <filename>configure</>. To select a specific + location outside the <productname>PostgreSQL</> installation + layout, use the <option>--with-odbcinst</> option. To be most + useful, it should be arranged that the driver and the driver + manager read the same configuration file. + </para> + + <para> + <indexterm><primary>odbc.sql</></> + Additionally, you should install the ODBC catalog extensions. That will + provide a number of functions mandated by the ODBC standard that are not + supplied by <productname>PostgreSQL</> by default. The file + <filename>/usr/local/pgsql/share/odbc.sql</> (in the default installation layout) + contains the appropriate definitions, which you can install as follows: +<programlisting> +psql -d template1 -f <replaceable>LOCATION</>/odbc.sql +</programlisting> + where specifying <literal>template1</literal> as the target + database will ensure that all subsequent new databases will have + these same definitions. If for any reason you want to remove + these functions again, run the file + <filename>odbc-drop.sql</filename> through + <command>psql</command>. + </para> + </sect1> + + <sect1 id="odbc-config"> + <title>Configuration Files</title> + + <indexterm zone="odbc-config"><primary>.odbc.ini</></> + + <para> + <filename>~/.odbc.ini</filename> contains user-specified access information + for the <productname>psqlODBC</productname> driver. + The file uses conventions typical for <productname>Windows</productname> + Registry files. + </para> + + <para> + The <filename>.odbc.ini</filename> file has three required sections. + The first is <literal>[ODBC Data Sources]</literal> + which is a list of arbitrary names and descriptions for each database + you wish to access. The second required section is the + Data Source Specification and there will be one of these sections + for each database. + Each section must be labeled with the name given in + <literal>[ODBC Data Sources]</literal> and must contain the following entries: + +<programlisting> +Driver = <replaceable>prefix</replaceable>/lib/libpsqlodbc.so +Database = <replaceable>DatabaseName</replaceable> +Servername = localhost +Port = 5432 +</programlisting> + + <tip> + <para> + Remember that the <productname>PostgreSQL</productname> database name is + usually a single word, without path names of any sort. + The <productname>PostgreSQL</productname> server manages the actual access + to the database, and you need only specify the name from the client. + </para> + </tip> + + Other entries may be inserted to control the format of the display. + The third required section is <literal>[ODBC]</literal> + which must contain the <literal>InstallDir</literal> keyword + and which may contain other options. + </para> + + <para> + Here is an example <filename>.odbc.ini</filename> file, + showing access information for three databases: + +<programlisting> +[ODBC Data Sources] +DataEntry = Read/Write Database +QueryOnly = Read-only Database +Test = Debugging Database +Default = Postgres Stripped + +[DataEntry] +ReadOnly = 0 +Servername = localhost +Database = Sales + +[QueryOnly] +ReadOnly = 1 +Servername = localhost +Database = Sales + +[Test] +Debug = 1 +CommLog = 1 +ReadOnly = 0 +Servername = localhost +Username = tgl +Password = "no$way" +Port = 5432 +Database = test + +[Default] +Servername = localhost +Database = tgl +Driver = /opt/postgres/current/lib/libpsqlodbc.so + +[ODBC] +InstallDir = /opt/applix/axdata/axshlib +</programlisting> + </para> + </sect1> + + <sect1 id="odbc-windows"> + <title><productname>Windows</productname> Applications</title> + + <para> + In the real world, differences in drivers and the level of + <acronym>ODBC</acronym> support + lessens the potential of <acronym>ODBC</acronym>: + + <itemizedlist spacing="compact" mark="bullet"> + <listitem> + <para> + Access, Delphi, and Visual Basic all support <acronym>ODBC</acronym> directly. + </para> + </listitem> + <listitem> + <para> + Under C++, such as Visual C++, + you can use the C++ <acronym>ODBC</acronym> <acronym>API</acronym>. + </para> + </listitem> + + <listitem> + <para> + In Visual C++, you can use the <classname>CRecordSet</classname> class, which wraps the + <acronym>ODBC</acronym> <acronym>API</acronym> + set within an <application>MFC</application> 4.2 class. This is the easiest route if you are doing + Windows C++ development under Windows NT. + </para> + </listitem> + </itemizedlist> + </para> + + <sect2> + <title>Writing Applications</title> + + <para> + <quote> + If I write an application for <productname>PostgreSQL</productname> + can I write it using <acronym>ODBC</acronym> calls + to the <productname>PostgreSQL</productname> server, + or is that only when another database program + like MS SQL Server or Access needs to access the data? + </quote> + </para> + <para> + The <acronym>ODBC</acronym> <acronym>API</acronym> + is the way to go. + For <productname>Visual C++</productname> coding you can find out more at + Microsoft's web site or in your <productname>Visual C++</productname> + documentation. + </para> + + <para> + Visual Basic and the other <acronym>RAD</acronym> tools have <classname>Recordset</classname> objects + that use <acronym>ODBC</acronym> + directly to access data. Using the data-aware controls, you can quickly + link to the <acronym>ODBC</acronym> back-end database + (<emphasis>very</emphasis> quickly). + </para> + + <para> + Playing around with <productname>MS Access</> will help you sort this out. Try using + <menuchoice><guimenu>File</><guimenuitem>Get External Data</></menuchoice>. + </para> + + <tip> + <para> + You'll have to set up a <acronym>DSN</acronym> first. + </para> + </tip> + + </sect2> + </sect1> + + <sect1 id="odbc-applixware"> + <title><application>ApplixWare</application></title> + + <indexterm zone="odbc-applixware"> + <primary>Applixware</primary> + </indexterm> + + <para> + <productname>Applixware</productname> has an + <acronym>ODBC</acronym> database interface + supported on at least some platforms. + <productname>Applixware</productname> 4.4.2 has been + demonstrated under Linux with <productname>PostgreSQL</productname> 7.0 + using the <productname>psqlODBC</productname> + driver contained in the <productname>PostgreSQL</productname> distribution. + </para> + + <sect2> + <title>Configuration</title> + + <para> + <productname>Applixware</productname> must be configured correctly + in order for it to + be able to access the <productname>PostgreSQL</productname> + <acronym>ODBC</acronym> software drivers. + </para> + + <procedure> + <title>Enabling <application>Applixware</application> Database Access</title> + + <para> + These instructions are for the 4.4.2 release of + <productname>Applixware</productname> on <productname>Linux</productname>. + Refer to the <citetitle>Linux Sys Admin</citetitle> on-line book + for more detailed information. + </para> + + <step performance="required"> + <para> + You must modify <filename>axnet.cnf</filename> so that + <filename>elfodbc</filename> can + find <filename>libodbc.so</filename> + (the <acronym>ODBC</acronym> driver manager) shared library. + This library is included with the <application>Applixware</application> distribution, + but <filename>axnet.cnf</filename> needs to be modified to point to the + correct location. + </para> + + <para> + As root, edit the file + <filename><replaceable>applixroot</replaceable>/applix/axdata/axnet.cnf</filename>. + </para> + + <substeps> + + <step performance="required"> + <para> + At the bottom of <filename>axnet.cnf</filename>, + find the line that starts with + +<programlisting> +#libFor elfodbc /ax/<replaceable>...</replaceable> +</programlisting> + </para> + </step> + <step performance="required"> + <para> + Change line to read + +<programlisting> +libFor elfodbc <replaceable>applixroot</replaceable>/applix/axdata/axshlib/lib +</programlisting> + + which will tell <literal>elfodbc</literal> to look in this directory + for the <acronym>ODBC</acronym> support library. + Typically <productname>Applix</productname> is installed in + <filename>/opt</filename> so the full path would be + <filename>/opt/applix/axdata/axshlib/lib</filename>, + but if you have installed <productname>Applix</productname> + somewhere else then change the path accordingly. + </para> + </step> + </substeps> + </step> + + <step performance="required"> + <para> + Create <filename>.odbc.ini</filename> as + described in <xref linkend="odbc-config">. You may also want to add the flag + +<programlisting> +TextAsLongVarchar=0 +</programlisting> + + to the database-specific portion of <filename>.odbc.ini</filename> + so that text fields will not be shown as <literal>**BLOB**</literal>. + </para> + </step> + </procedure> + + <procedure> + <title>Testing <application>Applixware</application> ODBC Connections</title> + + <step performance="required"> + <para> + Bring up <application>Applix Data</application> + </para> + </step> + + <step performance="required"> + <para> + Select the <productname>PostgreSQL</productname> database of interest. + </para> + + <substeps> + + <step performance="required"> + <para> + Select <menuchoice><guimenu>Query</guimenu><guimenuitem>Choose Server</guimenuitem></menuchoice>. + </para> + </step> + <step performance="required"> + <para> + Select <guimenuitem>ODBC</guimenuitem>, and click <guibutton>Browse</guibutton>. + The database you configured in <filename>.odbc.ini</filename> + should be shown. Make sure that the <guilabel>Host:</guilabel> field + is empty (if it is not, <literal>axnet</> will try to contact <literal>axnet</> on another machine + to look for the database). + </para> + </step> + <step performance="required"> + <para> + Select the database in the box that was launched by <guibutton>Browse</guibutton>, + then click <guibutton>OK</guibutton>. + </para> + </step> + <step performance="required"> + <para> + Enter user name and password in the login identification dialog, + and click <guibutton>OK</guibutton>. + </para> + </step> + </substeps> + + <para> + You should see <guilabel>Starting elfodbc server</guilabel> + in the lower left corner of the + data window. If you get an error dialog box, see the debugging section + below. + </para> + </step> + <step performance="required"> + <para> + The <quote>Ready</quote> message will appear in the lower left corner of the data + window. This indicates that you can now enter queries. + </para> + </step> + <step performance="required"> + <para> + Select a table from + <menuchoice><guimenu>Query</><guimenuitem>Choose + tables</></menuchoice>, and then select + <menuchoice><guimenu>Query</><guimenuitem>Query</></menuchoice> + to access the database. The first 50 or so rows from the table + should appear. + </para> + </step> + </procedure> + </sect2> + + <sect2> + <title>Common Problems</title> + + <para> + The following messages can appear while trying to make an + <acronym>ODBC</acronym> connection through + <productname>Applix Data</productname>: + + <variablelist> + <varlistentry> + <term> + <computeroutput>Cannot launch gateway on server</computeroutput> + </term> + <listitem> + <para> + <literal>elfodbc</literal> can't find <filename>libodbc.so</filename>. + Check your <filename>axnet.cnf</filename>. + </para> + </listitem> + </varlistentry> + + <varlistentry> + <term><computeroutput> + Error from ODBC Gateway: + IM003::[iODBC][Driver Manager]Specified driver could not be loaded</computeroutput> + </term> + <listitem> + <para> + <filename>libodbc.so</filename> cannot find the driver listed in + <filename>.odbc.ini</filename>. Verify the settings. + </para> + </listitem> + </varlistentry> + + <varlistentry> + <term> + <computeroutput>Server: Broken Pipe</computeroutput> + </term> + + <listitem> + <para> + The driver process has terminated due to some other + problem. You might not have an up-to-date version + of the <productname>PostgreSQL</productname> + <acronym>ODBC</acronym> package. + </para> + </listitem> + </varlistentry> + + <varlistentry> + <term> + <computeroutput>setuid to 256: failed to launch gateway</computeroutput> + </term> + + <listitem> + <para> + The September release of <application>Applixware</application> 4.4.1 (the first release with official + <acronym>ODBC</acronym> support under Linux) shows problems when user names + exceed eight (8) characters in length. + Problem description contributed by Steve Campbell + (<email>scampbell@lear.com</email>). + </para> + </listitem> + </varlistentry> + + </variablelist> + </para> + + <para> + <note> + <title>Author</title> + + <para> + Contributed by Steve Campbell (<email>scampbell@lear.com</email>), + 1998-10-20 + </para> + </note> + + The <application>axnet</application> program's security system + seems a little suspect. <application>axnet</application> does things + on behalf of the user and on a true + multiuser system it really should be run with root security + (so it can read/write in each user's directory). + I would hesitate to recommend this, however, since we have no idea what + security holes this creates. + </para> + </sect2> + + <sect2> + <title>Debugging <application>Applixware</application> ODBC Connections</title> + + <para> + One good tool for debugging connection problems uses the Unix system + utility <application>strace</application>. + </para> + <procedure> + <title>Debugging with <command>strace</command></title> + + <step performance="required"> + <para> + Start <application>Applixware</application>. + </para> + </step> + <step performance="required"> + <para> + Start an <application>strace</application> on + the <literal>axnet</literal> process. For example, if + +<screen> +<prompt>$</prompt> <userinput>ps -aucx | grep ax</userinput> +</screen> + + shows + +<screen> +cary 10432 0.0 2.6 1740 392 ? S Oct 9 0:00 axnet +cary 27883 0.9 31.0 12692 4596 ? S 10:24 0:04 axmain +</screen> + </para> + + <para> + Then run + +<screen> +<prompt>$</prompt> <userinput>strace -f -s 1024 -p 10432</userinput> +</screen> + </para> + </step> + + <step performance="required"> + <para> + Check the <command>strace</command> output. + </para> + <note> + <title>Note from Cary</title> + + <para> + Many of the error messages from <productname>Applixware</productname> + go to <filename>stderr</filename>, + but I'm not sure where <filename>stderr</filename> + is sent, so <command>strace</command> is the way to find out. + </para> + </note> + </step> + </procedure> + + <para> + For example, after getting + a <errorname>Cannot launch gateway on server</errorname>, + I ran <command>strace</command> on <literal>axnet</literal> and got + +<screen> +[pid 27947] open("/usr/lib/libodbc.so", O_RDONLY) = -1 ENOENT (No such file or directory) +[pid 27947] open("/lib/libodbc.so", O_RDONLY) = -1 ENOENT (No such file or directory) +[pid 27947] write(2, "/usr2/applix/axdata/elfodbc: can't load library 'libodbc.so'\n", 61) = -1 EIO (I/O error) +</screen> + So what is happening is that <literal>applix elfodbc</literal> is searching for <filename>libodbc.so</filename>, but it + cannot find it. That is why <filename>axnet.cnf</filename> needed to be changed. + </para> + </sect2> + + <sect2> + <title>Running the <application>Applixware</application> Demo</title> + + <comment>I think the condition this refers to is gone. -- petere 2002-01-07</comment> + + <para> + In order to go through the + <citetitle>Applixware Data Tutorial</citetitle>, you need to create + the sample tables that the Tutorial refers to. The ELF Macro used to + create the tables tries to use a NULL condition + on many of the database columns, + and <productname>PostgreSQL</productname> does not currently allow this option. + </para> + + <para> + To get around this problem, you can do the following: + </para> + + <procedure> + <title>Modifying the <application>Applixware</application> Demo</title> + + <step performance="required"> + <para> + Copy <filename>/opt/applix/axdata/eng/Demos/sqldemo.am</filename> + to a local directory. + </para> + </step> + + <step performance="required"> + <para> + Edit this local copy of <filename>sqldemo.am</filename>: + </para> + + <substeps> + + <step performance="required"> + <para> + Search for <literal>null_clause = "NULL"</literal>. + </para> + </step> + + <step performance="required"> + <para> + Change this to <literal>null_clause = ""</literal>. + </para> + </step> + + </substeps> + </step> + <step performance="required"> + <para> + Start <application>Applix Macro Editor</application>. + </para> + </step> + + <step performance="required"> + <para> + Open the <filename>sqldemo.am</filename> file from the <application>Macro Editor</application>. + </para> + </step> + + <step performance="required"> + <para> + Select <menuchoice><guimenu>File</><guimenuitem>Compile and Save</></menuchoice>. + </para> + </step> + + <step performance="required"> + <para> + Exit <application>Macro Editor</application>. + </para> + </step> + + <step performance="required"> + <para> + Start <application>Applix Data</application>. + </para> + </step> + + <step performance="required"> + <para> + Select <menuchoice><guimenu>*</><guimenuitem>Run Macro</guimenuitem></menuchoice>. + </para> + </step> + + <step performance="required"> + <para> + Enter the value <literal>sqldemo</literal>, then click <guibutton>OK</guibutton>. + </para> + + <para> + You should see the progress in the status line of the data window + (in the lower left corner). + </para> + </step> + + <step performance="required"> + <para> + You should now be able to access the demo tables. + </para> + </step> + </procedure> + </sect2> + + <sect2> + <title>Useful Macros</title> + + <para> + You can add information about your + database login and password to the standard <application>Applix</application> start-up + macro file. This is an example + <filename>~/axhome/macros/login.am</filename> file: + +<programlisting> +macro login +set_set_system_var@("sql_username@","tgl") +set_system_var@("sql_passwd@","no$way") +endmacro +</programlisting> + + <caution> + <para> + You should be careful about the file protections on any file containing + user name and password information. + </para> + </caution> + </para> + </sect2> + + </sect1> + </chapter> + +<!-- Keep this comment at the end of the file +Local variables: +mode:sgml +sgml-omittag:t +sgml-shorttag:t +sgml-minimize-attributes:nil +sgml-always-quote-attributes:t +sgml-indent-step:1 +sgml-indent-data:t +sgml-parent-document:nil +sgml-default-dtd-file:"./reference.ced" +sgml-exposed-tags:nil +sgml-local-catalogs:("/usr/lib/sgml/catalog") +sgml-local-ecat-files:nil +End: +--> diff --git a/doc/src/sgml/recovery.sgml b/doc/src/sgml/recovery.sgml new file mode 100644 index 00000000000..aa10b8cf640 --- /dev/null +++ b/doc/src/sgml/recovery.sgml @@ -0,0 +1,104 @@ +<chapter Id="failure"> + <title>Database Failures</title> + + <para> + Database failures (or the possibility of such) must be assumed to be + lurking, ready to strike at some time in the future. A prudent + database administrator will plan for the inevitability of failures + of all possible kinds, and will have appropriate plans and + procedures in place <emphasis>before</emphasis> the failure occurs. + </para> + + <para> + Database recovery is necessary in the event of hardware or software + failure. There are several categories of failures; some of these + require relatively minor adjustments to the database, while others + may depend on the existence of previously prepared database dumps + and other recovery data sets. It should be emphasized that if your + data is important and/or difficult to regenerate, then you should + have considered and prepared for various failure scenarios. + </para> + + <sect1 id="failure-disk-full"> + <title>Disk Filled</title> + + <para> + A filled data disk may result in subsequent corruption of database + indexes, but not of the fundamental data tables. If the WAL files + are on the same disk (as is the case for a default configuration) + then a filled disk during database initialization may result in + corrupted or incomplete WAL files. This failure condition is + detected and the database will refuse to start up. You must free + up additional space on the disk (or move the WAL area to another + disk; see <xref linkend="wal-configuration">) and then restart the + <application>postmaster</application> to recover from this condition. + </para> + </sect1> + + <sect1 id="failure-disk-failed"> + <title>Disk Failed</title> + + <para> + Failure of any disk (or of a logical storage device such as a RAID + subsystem) involved with an active database will require + that the database be recovered from a previously prepared database + dump. This dump must be prepared using + <application>pg_dumpall</application>, and updates to the database + occurring after the database installation was dumped will be lost. + </para> + </sect1> + +<!-- + <sect1> + <title>File Corrupted</title> + + <para> + </para> + </sect1> + + <sect1> + <title>Table Corrupted</title> + + <para> + </para> + </sect1> + + <sect1> + <title></title> + + <para> + </para> + </sect1> + + <sect1> + <title></title> + + <para> + </para> + </sect1> + + <sect1> + <title></title> + + <para> + </para> + </sect1> +--> + +</chapter> + +<!-- Keep this comment at the end of the file +Local variables: +mode:sgml +sgml-omittag:nil +sgml-shorttag:t +sgml-minimize-attributes:nil +sgml-always-quote-attributes:t +sgml-indent-step:1 +sgml-indent-data:t +sgml-parent-document: ("postgres.sgml" "set" "book" "chapter") +sgml-default-dtd-file:"./reference.ced" +sgml-exposed-tags:nil +sgml-local-ecat-files:nil +End: +--> diff --git a/doc/src/sgml/version.sgml b/doc/src/sgml/version.sgml new file mode 100644 index 00000000000..33ff27cd658 --- /dev/null +++ b/doc/src/sgml/version.sgml @@ -0,0 +1,7 @@ +<!-- +Update this file to propagate correct current version numbers to the +documentation. In text, use for example &version; to refer to them. +--> + +<!entity version "7.3"> +<!entity majorversion "7.3"> diff --git a/doc/src/sgml/y2k.sgml b/doc/src/sgml/y2k.sgml new file mode 100644 index 00000000000..60ad62e51ed --- /dev/null +++ b/doc/src/sgml/y2k.sgml @@ -0,0 +1,95 @@ +<!-- +$Header: /cvsroot/pgsql/doc/src/sgml/Attic/y2k.sgml,v 1.14 2002/01/08 20:03:58 momjian Exp $ +--> + +<sect1 id="y2k"> + <title>Y2K Statement</title> + + <note> + <title>Author</title> + + <para> + Written by Thomas Lockhart + (<email>lockhart@fourpalms.org</email>) + on 1998-10-22. Updated 2000-03-31. + </para> + </note> + + <para> + The <productname>PostgreSQL</productname> Global Development Group provides + the <productname>PostgreSQL</productname> software code tree as a public service, + without warranty and without liability for its behavior or performance. + However, at the time of writing: + </para> + + <itemizedlist> + <listitem> + <para> + The author of this statement, a volunteer on the + <productname>PostgreSQL</productname> + support team since November, 1996, is not aware of + any problems in the <productname>PostgreSQL</productname> code base related + to time transitions around Jan 1, 2000 (Y2K). + </para> + </listitem> + + <listitem> + <para> + The author of this statement is not aware of any reports of Y2K problems + uncovered in regression testing + or in other field use of recent or current versions + of <productname>PostgreSQL</productname>. We might have expected + to hear about problems if they existed, given the installed base and + the active participation of users on the support mailing lists. + </para> + </listitem> + + <listitem> + <para> + To the best of the author's knowledge, the + assumptions <productname>PostgreSQL</productname> + makes about dates specified with a two-digit year + are documented in the current <citetitle>User's Guide</citetitle> + in the chapter on data types. + For two-digit years, the significant transition year is 1970, not 2000; + e.g. <literal>70-01-01</literal> is interpreted as 1970-01-01, + whereas <literal>69-01-01</literal> is interpreted as 2069-01-01. + </para> + </listitem> + + <listitem> + <para> + Any Y2K problems in the underlying OS related to obtaining the + <quote>current time</quote> may propagate into apparent Y2K problems in + <productname>PostgreSQL</productname>. + </para> + </listitem> + </itemizedlist> + + <para> + Refer to + <ulink url="http://www.gnu.org/software/year2000.html">The GNU Project</ulink> + and + <ulink url="http://language.perl.com/news/y2k.html">The Perl Institute</ulink> + for further discussion of Y2K issues, particularly + as it relates to open source, no fee software. + </para> + +</sect1> + +<!-- Keep this comment at the end of the file +Local variables: +mode:sgml +sgml-omittag:nil +sgml-shorttag:t +sgml-minimize-attributes:nil +sgml-always-quote-attributes:t +sgml-indent-step:1 +sgml-indent-data:t +sgml-parent-document:nil +sgml-default-dtd-file:"./reference.ced" +sgml-exposed-tags:nil +sgml-local-catalogs:("/usr/lib/sgml/catalog") +sgml-local-ecat-files:nil +End: +--> diff --git a/src/interfaces/jdbc/CHANGELOG b/src/interfaces/jdbc/CHANGELOG new file mode 100644 index 00000000000..863f8360ba9 --- /dev/null +++ b/src/interfaces/jdbc/CHANGELOG @@ -0,0 +1,467 @@ +Tue Mar 06 12:05:00 GMT 2001 peter@retep.org.uk + - Removed org.postgresql.xa.Test from the JDBC EE driver as it's an old + test class and prevented it from compiling. + +Fri Mar 02 10:00:00 GMT 2001 peter@retep.org.uk + - Fixed build.xml so that PGclob is not built in the JDBC1.2 driver + + +Fri Feb 17 18:25:00 GMT 2001 peter@retep.org.uk + - Removed the last deprecation warnings from the Java2 driver. Now only + the old examples give deprecation warnings. + - Added a new class into core that (JDK1.3+) ensures all connections are + closed when the VM terminates. + +Fri Feb 17 15:11:00 GMT 2001 peter@retep.org.uk + - Reduced the object overhead in PreparedStatement by reusing the same + StringBuffer object throughout. Similarly SimpleDateStamp's are alse + reused in a thread save manner. + - Implemented in PreparedStatement: setNull(), setDate/Time/Timestamp + using Calendar, setBlob(), setCharacterStream() + - Clob's are now implemented in ResultSet & PreparedStatement! + - Implemented a lot of DatabaseMetaData & ResultSetMetaData methods. + We have about 18 unimplemented methods left in JDBC2 at the current + time. + +Web Feb 14 17:29:00 GMT 2001 peter@retep.org.uk + - Fixed bug in LargeObject & BlobOutputStream where the stream's output + was not flushed when either the stream or the blob were closed. + - Fixed PreparedStatement.setBinaryStream() where it ignored the length + +Tue Feb 13 16:33:00 GMT 2001 peter@retep.org.uk + - More TestCases implemented. Refined the test suite api's. + - Removed need for SimpleDateFormat in ResultSet.getDate() improving + performance. + - Rewrote ResultSet.getTime() so that it uses JDK api's better. + +Tue Feb 13 10:25:00 GMT 2001 peter@retep.org.uk + - Added MiscTest to hold reported problems from users. + - Fixed PGMoney. + - JBuilder4/JDBCExplorer now works with Money fields. Patched Field & + ResultSet (lots of methods) for this one. Also changed cash/money to + return type DOUBLE not DECIMAL. This broke JBuilder as zero scale + BigDecimal's can't have decimal places! + - When a Statement is reused, the previous ResultSet is now closed. + - Removed deprecated call in ResultSet.getTime() + +Thu Feb 08 18:53:00 GMT 2001 peter@retep.org.uk + - Changed a couple of settings in DatabaseMetaData where 7.1 now + supports those features + - Implemented the DatabaseMetaData TestCase. + +Wed Feb 07 18:06:00 GMT 2001 peter@retep.org.uk + - Added comment to Connection.isClosed() explaining why we deviate from + the JDBC2 specification. + - Fixed bug where the Isolation Level is lost while in autocommit mode. + - Fixed bug where several calls to getTransactionIsolationLevel() + returned the first call's result. + +Tue Feb 06 19:00:00 GMT 2001 peter@retep.org.uk + - Completed first two TestCase's for the test suite. JUnit is now + recognised by ant. + +Wed Jan 31 08:46:00 GMT 2001 peter@retep.org.uk + - Some minor additions to Statement to make our own extensions more + portable. + - Statement.close() will now call ResultSet.close() rather than just + dissasociating with it. + +Tue Jan 30 22:24:00 GMT 2001 peter@retep.org.uk + - Fixed bug where Statement.setMaxRows() was a global setting. Now + limited to just itself. + - Changed LargeObject.read(byte[],int,int) to return the actual number + of bytes read (used to be void). + - LargeObject now supports InputStream's! + - PreparedStatement.setBinaryStream() now works! + - ResultSet.getBinaryStream() now returns an InputStream that doesn't + copy the blob into memory first! + - Connection.isClosed() now tests to see if the connection is still alive + rather than if it thinks it's alive. +Thu Jan 25 09:11:00 GMT 2001 peter@retep.org.uk + - Added an alternative constructor to PGSQLException so that debugging + some more osteric bugs is easier. If only 1 arg is supplied and it's + of type Exception, then that Exception's stacktrace is now included. + +Wed Jan 24 09:18:00 GMT 2001 peter@retep.org.uk + - Removed the 8k limit by setting it to 64k + +Fri Jan 19 08:47:00 GMT 2001 peter@retep.org.uk + - Applied patch submitted by John Schutz <schutz@austin.rr.com> that + fixed a bug with ANT's SQL functions (not needed for building but nice + to have fixed). + +Thu Jan 18 17:30:00 GMT 2001 peter@retep.org.uk + - Added new error message into errors.properties "postgresql.notsensitive" + This is used by jdbc2.ResultSet when a method is called that should + fetch the current value of a row from the database refreshRow() for + example. + - These methods no longer throw the not implemented but the new noupdate + error. This is in preparation for the Updateable ResultSet support + which will overide these methods by extending the existing class to + implement that functionality, but needed to show something other than + notimplemented: + moveToCurrentRow() + moveToInsertRow() + rowDeleted() + rowInserted() + all update*() methods, except those that took the column as a String + as they were already implemented to convert the String to an int. + - getFetchDirection() and setFetchDirection() now throws + "postgresql.notimp" as we only support one direction. + The CursorResultSet will overide this when its implemented. + - Created a new class under jdbc2 UpdateableResultSet which extends + ResultSet and overides the relevent update methods. + This allows us to implement them easily at a later date. + - In jdbc2.Connection, the following methods are now implemented: + createStatement(type,concurrency); + getTypeMap(); + setTypeMap(Map); + - The JDBC2 type mapping scheme almost complete, just needs SQLInput & + SQLOutput to be implemented. + - Removed some Statement methods that somehow appeared in Connection. + - In jdbc2.Statement() + getResultSetConcurrency() + getResultSetType() + setResultSetConcurrency() + setResultSetType() + - Finally removed the old 6.5.x driver. + +Thu Jan 18 12:24:00 GMT 2001 peter@retep.org.uk + - These methods in org.postgresql.jdbc2.ResultSet are now implemented: + getBigDecimal(int) ie: without a scale (why did this get missed?) + getBlob(int) + getCharacterStream(int) + getConcurrency() + getDate(int,Calendar) + getFetchDirection() + getFetchSize() + getTime(int,Calendar) + getTimestamp(int,Calendar) + getType() + NB: Where int represents the column name, the associated version + taking a String were already implemented by calling the int + version. + - These methods no longer throw the not implemented but the new noupdate + error. This is in preparation for the Updateable ResultSet support + which will overide these methods by extending the existing class to + implement that functionality, but needed to show something other than + notimplemented: + cancelRowUpdates() + deleteRow() + - Added new error message into errors.properties "postgresql.noupdate" + This is used by jdbc2.ResultSet when an update method is called and + the ResultSet is not updateable. A new method notUpdateable() has been + added to that class to throw this exception, keeping the binary size + down. + - Added new error message into errors.properties "postgresql.psqlnotimp" + This is used instead of unimplemented when it's a feature in the + backend that is preventing this method from being implemented. + - Removed getKeysetSize() as its not part of the ResultSet API + +Thu Jan 18 09:46:00 GMT 2001 peter@retep.org.uk + - Applied modified patch from Richard Bullington-McGuire + <rbulling@microstate.com>. I had to modify it as some of the code + patched now exists in different classes, and some of it actually + patched obsolete code. + +Wed Jan 17 10:19:00 GMT 2001 peter@retep.org.uk + - Updated Implementation to include both ANT & JBuilder + - Updated README to reflect the changes since 7.0 + - Created jdbc.jpr file which allows JBuilder to be used to edit the + source. JBuilder _CAN_NOT_ be used to compile. You must use ANT for + that. It's only to allow JBuilders syntax checking to improve the + drivers source. Refer to Implementation for more details + +Wed Dec 20 16:19:00 GMT 2000 peter@retep.org.uk + - Finished build.xml and updated Driver.java.in and buildDriver to + match how Makefile and ANT operate. + +Tue Dec 19 17:30:00 GMT 2000 peter@retep.org.uk + - Finally created ant build.xml file + +Mon Nov 20 08:12:00 GMT 2000 peter@retep.org.uk + - Encoding patch to Connection by wrobell@posexperts.com.pl + +Tue Oct 17 15:35:00 BST 2000 petermount@maidstone.gov.uk + - Changed getTimestamp() again. This time Michael Stephenson's + <mstephenson@tirin.openworld.co.uk> solution looked far better + than the original solution put in June. + +Tue Oct 10 13:12:00 BST 2000 peter@retep.org.uk + - DatabaseMetaData.supportsAlterTableWithDropColumn() as psql doesn't + support dropping of individual columns + - Merged in some last patches. Only 1 left, which may not be compatible + with jdbc1 + - Merged in my old retepsql project. Makefile now includes it. + +Mon Oct 02 12:30:00 BST 2000 peter@retep.org.uk + - Merged in byte[] array allocation changes submitted by Gunnar R|nning + <gunnar@candleweb.no> + +Mon Sep 25 14:22:00 BST 2000 peter@retep.org.uk + - Removed the DriverClass kludge. Now the org.postgresql.Driver class + is compiled from a template file, and now has both the connection + class (ie jdbc1/jdbc2) and the current version's from Makefile.global + +Thu Jul 20 16:30:00 BST 2000 petermount@it.maidstone.gov.uk + - Fixed DatabaseMetaData.getTableTypes() + +Tue Jun 06 12:00:00 BST 2000 petermount@it.maidstone.gov.uk + - Added org/postgresql/DriverClass.java to the list of files removed + by make clean (it's dynamically built) + - Fixed Statement, so that the update count is valid when an SQL + DELETE operation is done. + - While fixing the update count, made it easier to get the OID of + the last insert as well. Example is in example/basic.java + +Tue Jun 06 08:37:00 BST 2000 petermount@it.maidstone.gov.uk + - Removed a hardwired 8K limit on query strings + - Added some missing org.'s in Connection that prevented + the use of the geometric types. + +Thu Jun 01 07:26:00 BST 2000 petermount@it.maidstone.gov.uk + - Removed timezone in getTimestamp() methods in ResultSet. + +Mon May 15 22:30:00 BST 2000 peter@retep.org.uk + - Fixed the message Makefile produces after compiling. It still said + about the old Driver class, not the new package. Spotted by + Joseph Shraibman <jks@p1.selectacast.net> + +Thu May 04 11:38:00 BST 2000 petermount@it.maidstone.gov.uk + - Corrected incorrect date in CHANGELOG + - Fixed the ImageViewer example + +Wed May 03 16:47:00 BST 2000 petermount@it.maidstone.gov.uk + - Fixed the Makefile so that postgresql.jar is built everytime + the jdbc1 or jdbc2 rules are called. + - Fixed the threadsafe example. It had problems with autocommit + +Wed May 03 14:32:00 BST 2000 petermount@it.maidstone.gov.uk + - Rewrote the README file (the old one was 18 months old!) + - Added @deprecated tags to org.postgresql.jdbc2.ResultSet + to clear some warnings issued during compilation. + +Wed Apr 12 22:14:00 BST 2000 peter@retep.org.uk + - Implemented the JDBC2 Blob interface, and ResultSet.getBlob(). + +Wed Apr 12 20:20:00 BST 2000 peter@retep.org.uk + - Fixed bug in ResultSet.absolute(). Negative rows are now supported. + - Implemented ResultSet.relative(), afterLast(). + +Tue Feb 1 21:40:00 GMT 2000 peter@retep.org.uk + - Finally imported the contributed javax extensions by Assaf Arkin + arkin@exoffice.com + +Mon Jan 24 21:00:00 GMT 2000 peter@retep.org.uk + - Finally introduced the 7.0 additions to the core CVS repository. + - All source files are now under the org.postgresql package (previously + they were under postgresql). The package lines now changed + accordingly. + - The Makefile was rewritten so it should now work on machines that + can't handle the $( ) syntax. + - Dutch translation by Arnout Kuiper (ajkuiper@wxs.nl) + +Mon Sep 13 23:56:00 BST 1999 peter@retep.org.uk + - PG_Stream.SendChar() optimised, increased default buffer size of + output stream to 8k, and introduced an 8k buffer on the input stream + Sverre H Huseby <sverrehu@online.no> + - Added a finalize() method to Connection class in both drivers so that + the connection to the backend is really closed. + - Due to many JVM's not returning a meaningful value for java.version + the decision for building the JDBC1.2 or JDBC2 driver is now a + compile time option. + - Replaced $$(cmd...) with `cmd...` in the Makefile. This should allow + the driver to compile when using shells other than Bash. + +Thu Sep 9 01:18:39 MEST 1999 jens@jens.de + - fixed bug in handling of DECIMAL type + +Wed Aug 4 00:25:18 CEST 1999 jens@jens.de + - updated ResultSetMetaData.getColumnDisplaySize() to return + the actual display size + - updated driver to use postgresql FE/BE-protocol version 2 + +Mon Aug 2 03:29:35 CEST 1999 jens@jens.de + - fixed bug in DatabaseMetaData.getPrimaryKeys() + +Sun Aug 1 18:05:42 CEST 1999 jens@jens.de + - added support for getTransactionIsolation and setTransactionIsolation + +Sun Jun 27 12:00:00 BST 1999 + - Fixed typo in postgresql.Driver that prevented compilation + - Implemented getTimestamp() fix submitted by Philipp Matthias Hahn + <pmhahn@titan.lahn.de> + - Cleaned up some comments in Connection + +Wed Jun 23 06:50:00 BST 1999 + - Fixed error in errors.properties where the arguments are 0 based not + 1 based + - Fixed bug in postgresql.Driver where exception is thrown, then + intercepted rather than being passed to the calling application. + - Removed the file postgresql/CallableStatement, as it's not used and + really exists in the jdbc1 & jdbc2 sub packages only. + +Wed May 19 00:20:00 BST 1999 + - Internationalisation now done. Surprising that there's 68 error + messages in the driver ;-) + +Tue May 18 07:00:00 BST 1999 + - Set the ImageViewer application to use transactions + +Tue May 18 00:00:00 BST 1999 + - Just after committing, I realised why internationalisation isn't + working. This is now fixed (in the Makefile). + +Mon May 17 23:40:00 BST 1999 + - PG_Stream.close() now attempts to send the close connection message + to the backend before closing the streams + - Added batch support in the JDBC2, supplied by Yutaka Tanida + <yutaka@marin.or.jp> + - Removed the old datestyle code. Now the driver uses only ISO. + - Removed some files in the postgresql directory still in CVS that were + moved since 6.4.x (DatabaseMetaData.java PreparedStatement.java + ResultSetMetaData.java Statement.java) + - Internationalisation of the error messages is partially implemented, + however it's not enabled as it only works when the jar file is + _not_ used, and work needs to be done. + +Sun Apr 11 17:00:00 BST 1999 + - getUpdateCount() now returns the actual update count (before it + simply returned 1 for everything). + - added some updates to example.basic so it would test the new update + count code. + - corrected typo in a comment in Statement.java + +Mon Jan 25 19:45:00 GMT 1999 + - created subfolders example/corba and example/corba/idl to hold the + new example showing how to hook CORBA and PostgreSQL via JDBC + - implemented some JDBC2 methods curtesy of Joachim.Gabler@t-online.de + +Sat Jan 23 10:30:00 GMT 1999 + - Changed imports in postgresql.jdbc1.ResultSetMetaData as for some + reason it didn't want to compile under jdk1.1.6 + +Tue Dec 29 15:45:00 GMT 1998 + - Refreshed the README (which was way out of date) + +Tue Dec 29 15:45:00 GMT 1998 + - Finished adding the additional methods into the JDBC2 driver. + - Had to add some explicit package references for the JDK1.2 Javac to + cope with the driver + +Tue Dec 29 12:40:00 GMT 1998 + - Fixed package imports and some references to java.sql.ResultSet in + various files. Compiled and tested the JDBC1 driver. + +Mon Dec 28 19:01:37 GMT 1998 + - created a new package postgresql.jdbc2 which will contain the JDBC 2 + specific classes. A similar new package (postgresql.jdbc1) has been + created to hold the JDBC 1 specific classes. + - modified Makefile to allow compilation of the JDBC 1 & 2 drivers, + with the possibility of building a dual-spec driver. + - changed the version number in postgresql.Driver to 6.5 + - modified postgresql.Driver class to initiate the correct driver when + used under a 1.1 or 1.2+ JVM. + - postgresql.Connection and postgresql.jdbc2.Connection now extends the + new class postgresql.ConnectionStub, which allows us to dynamically + open the JDBC1 or JDBC2 drivers. + - enabled compilation of the driver under Win32 when using the Make + from the CygWin package (Cygnus B20.1 was used). + - To make future development easier (now we have 2 specifications to + work with) the following classes have moved from the postgresql to + the postgresql.jdbc1 package: + CallableStatement Connection + DatabaseMetaData PreparedStatement + ResultSet ResultSetMetaData + Statement + Some of these classes have common code that is not dependent on + either JDBC specification. These common code are still in the + postgresql package. + Ie: postgresql.jdbc1.Connection extends postgresql.Connection + and postgresql.jdbc2.Connection extends postgresql.Connection + +Web Oct 7 22:00:00 BST 1998 + - removed syncronised from Connection.ExecSQL(). See next entry. + - added new syncronised locking in the Connection.ExecSQL() and + FastPath.fastpath() methods. They now lock against the PG_Steam + object for the connection, which now provides full Thread Safety. + - Reposted ChangeLog as it's missing from CVS. + +Modifications done since 6.3.2 was released and Sun Aug 30 11:33:06 BST 1998 + + - Fixed PreparedStatement.setObject as it didn't handle shorts + - ResultSet.getDate() now handles null dates (returns null ratrher + than a NullPointerException) + - ResultSetMetaData.getPrecision() new returns 0 for VARCHAR + - Field now caches the typename->oid in a Hashtable to speed things + up. It removes the need for some unnecessary queries to the backend. + - PreparedStatement.toString() now returns the SQL statement that it + will send to the backend. Before it did nothing. + - DatabaseMetaData.getTypeInfo() now does something. + - Connection now throws an exception if either of the user or password + properties are missing, as they are required for JDBC to work. + This occasionally occurs when the client uses the properties version + of getConnection(), and is a common question on the email lists. + +Sun Aug 30 11:33:06 BST 1998 + + - Created ChangeLog file, and entered stuff done since 6.3.2 and today + - Change version number to 6.4 in Driver.java + - Added fix to DatabaseMetaData.getTables() submitted by + Stefan Andreasen <stefan@linux.kapow.dk> + - Added fix to DatabaseMetaData.getColumns() to handle patterns + submitted by Stefan Andreasen <stefan@linux.kapow.dk> + - Set TcpNoDelay on the connection, as this gives us a 10x speed + improvement on FreeBSD (caused by a bug in their TCP Stack). They + should fix the bug before 6.4 is released, but will keep this + in here unless it causes more problems. + Submitted by Jason Venner <jason@idiom.com> + - Removed a duplicate definition of fieldCache + - Added a more meaningful message when the connection is refused. It + now says: + Connection refused. Check that the hostname and port is + correct, and that the postmaster is running with the -i flag, + which enables TCP/IP networking. + - Removed kludge in PreparedStatement.setDate() that acted as a + temporary fix to a bug in SimpleDateFormat, as it broke date + handling in JDK 1.1.6. + - Modified PG_Stream and Connection, so that outbound data is now + buffered. This should give us a speed improvement, and reduce the + ammount of network packets generated. + - Removed duplicate code and optimised PG_Stream. + - PG_Stream now returns a more meaningful message when the connection + is broken by the backend. It now returns: + The backend has broken the connection. Possibly the action you + have attempted has caused it to close. + - Removed obsolete code from Connection. + - The error message returned when the authentication scheme is unknown + has been extended. It now reads: + Authentication type ### not supported. Check that you have + configured the pg_hba.conf file to include the client's IP + address or Subnet, and is using a supported authentication + scheme. + - Connection.getMetaData() now caches the instance returned, so + multiple calls will return the same instance. + - Created a test application that tests the DatabaseMetaData and + ResultSetMetaData classes. + - Replaced getString(#).getBytes() with getBytes(#) which should speed + things up, and reduce memory useage. + - Optimised DatabaseMetaData.getProcedures(), and implemented patterns + - Fixed NullPointerExceptions thrown when a field is null (Internal + to the driver, not caused by results from the backend. + DatabaseMetaData.getProcedures() is an example of a method that + causes this): + - ResultSetMetaData.getColumnName() now returns field# where + # is the column name. + - ResultSet.getObject() fixed + - Fixed bug in psql example that was affected by null fields + - DatabaseMetaData.getTables() + - DatabaseMetaData.getPrimaryKeys() ran a query with an ambiguous field + fixed. + - getTypeInfo() optimised to increase speed and reduce memory useage + - ResultSetMetaData.isCurrency() optimised and is now smaller. + - Removed unnecessary code fromResultSetMetaData.getCatalogName() + and getSchemaName(). + - Created new class postgresql.util.PGmoney to map the money type + - Created new class postgresql.geometric.PGline to map the line type + diff --git a/src/interfaces/jdbc/Implementation b/src/interfaces/jdbc/Implementation new file mode 100644 index 00000000000..ecfc626d9d6 --- /dev/null +++ b/src/interfaces/jdbc/Implementation @@ -0,0 +1,199 @@ +This short document is provided to help programmers through the internals of +the PostgreSQL JDBC driver. + +Last update: January 17 2001 peter@retep.org.uk + +build.xml +--------- + +As of 7.1, we now use the ANT build tool to build the driver. ANT is part of +the Apache/Jakarta project, and provides far superior build capabilities. You +can find ANT from http://jakarta.apache.org/ant/index.html and being pure java +it will run on any java platform. + +So far I've tested it under JDK1.2.x & JDK1.3 (both Linux & NT) but not yet with +JDK1.1.8. Because of the latter the Makefile still works for now, but should be +gone for 7.2. + +Anyhow, to build, simply type ant and the .jar file will be created and put into +the jars directory. + +Tip: If you run ant from the sources root directory (ie: where the configure +script is located) you will find another build.xml file. It is advised to run +ant from that directory as it will then compile some auxilary Java/JDBC +utilities that are located under the /contrib/retep directory. + +Makefile +-------- + +Prior to 7.1, all compilation must be done by using Make. This is because there +are three versions of the driver, one for JDBC1 (for JDK 1.1.x) and the others +for JDBC2 (for JDK 1.2 or later, one standard and one enterprise). + +As of 7.1, ANT is the build tool of choice. Just compare Makefile and build.xml +to see why! Make just isn't suited to Java. + +Building with just the JDK +-------------------------- + +This is not advised, simply because you have to make sure you include the +correct classes, and the fact that org.postgresql.Driver is built on the fly. +Also, javac won't pick up all the classes because some (org.postgresql.geometric +for example) are loaded dynamically. + +org/postgresql/Driver.java.in +----------------------------- + +Because there are three versions of the driver, the org.postgresql.Driver class +is built dynamically. To build correctly ANT copies the Driver.java.in file to +Driver.java replacing certain values according to the required driver. + +The replaced values are of the format %VALUE%, ie: %MAJORVERSION% is replaced +with 7 in the 7.1 version of the driver. + +postgresql.jar +-------------- + +This jar file is produced by ANT, and contains the driver for your JDK platform. + +If you downloaded a precompiled binary from the web, you may find that the +jar file will be named differently. These are identical to this file but are +named according to the backend and jdk versions. + +The naming convention is of the form: jdbc-#.#-#.##.jar + +ie: for 7.1 + jdbc-7.1-1.1.jar JDBC Driver for JDK1.1.8 + jdbc-7.1-1.2.jar JDBC Driver for JDK1.2 & JDK1.3 + jdbc-7.1-1.2ent.jar JDBC Driver for JDK1.2 & JDK1.3 Enterprise Editions + +If in the future there are any 1.3 specific classes then there will be two new +jar files. + +Note: All the precompiled binaries are built under Linux. + +jdbc.jpx +-------- + +This is a JBuilder4 project file. It's here to allow JBuilder to be used to +develop the driver. Mainly for it's Editor's features like syntax checking and +auto-completion etc. + +IMPORTANT: You CAN NOT build the driver from within JBuilder. You must use ANT. + This is because of the three versions of the JDK. If you try to use + JBuilder, it will try to build everything, and it will just not work. + +Importing packages +------------------ + +In user code, you may have to import one or more packages, if and only if you +are using the non jdbc extensions (like FastPath, or LargeObject). + +DO NOT import the postgresql, postgresql.jdbc1 or postgresql.jdbc2 packages! + +Internally, some classes will import the packages when there is a link between +them and the other packages. However, the above rule still applies. It's there +because Javac becomes confused between the different places that similar class +names are present. + +However, there are places where they need to refer to classes in the postgresql +package. In this case, import the individual classes, and not the entire +package. + +ie: import postgresql.Field + + NOT import postgresql.* + +Package Layout +-------------- + +The driver is split into several packages: + +org.postgresql core classes that can be accessed by user code +org.postgresql.core core classes not normally used externally +org.postgresql.jdbc1 classes used only in implementing JDBC 1 +org.postgresql.jdbc2 classes used only in implementing JDBC 2 +org.postgresql.fastpath FastPath to backend functions +org.postgresql.geometric 2D Geometric types mapped to Java Objects +org.postgresql.largeobject Low level Large Object access +org.postgresql.util Utility classes + + +Package org.postgresql +------------------ + +This package holds the core classes. + +Driver registers the driver when it's loaded, and determines which + Connection class (in jdbc1 or jdbc2 packages) to use when + connecting to a database. + +Field Used internally to represent a Field +PG_Stream Used internally to manage the network stream. +PostgresqlDataSource + Exists in the Java2 Enterprise edition driver only and is the + enterprise equivalent to Driver + + These classes contains common code that is not dependent to the + two JDBC specifications. + +Connection Common code used in Connections, mainly Network Protocol stuff. +ResultSet Common code used in ResultSet's + +Package org.postgresql.core +----------------------- + +New in 7.1, this is where core classes (common to all versions) will exist. Any +new class that would have gone into org.postgresql must go in here instead. + +BytePoolDim1 Handles a pool of byte[] arrays. +BytePoolDim2 Handles a pool of byte[][] arrays +MemoryPool Interface for managing MemoryPools. Not used (yet). +ObjectPool Interface for an Object Pool +SimpleObjectPool Class that implements ObjectPool and used by BytePoolDim# +Encoding Character encoding logic, mainly for Connection and PG_Stream. + +Package org.postgresql.fastpath +--------------------------- + +Fastpath Handles executing a function on the PostgreSQL Backend +FastpathArg Defines an argument for a function call + +Package org.postgresql.geometric +---------------------------- + +PGbox Maps to postgresql type box +PGcircle Maps to postgresql type circle +PGline Maps to postgresql type line +PGlseg Maps to postgresql type lseg +PGpath Maps to postgresql type path +PGpoint Maps to postgresql type point +PGpolygon Maps to postgresql type polygon + +Package org.postgresql.jdbc1 +------------------------ + +The classes in this package handle the JDBC 1 Specification, for JDK 1.1.x +All interfaces in the java.sql package are present here. + +Package org.postgresql.jdbc2 +------------------------ + +The classes in this package handle the JDBC 2 Specification, for JDK 1.2 +All interfaces in the java.sql, and javax.sql packages are present here. + +Package org.postgresql.largeobject +------------------------------ + +LargeObject Represents an open LargeObject +LargeObjectManager Handles the opening and deleting of LargeObjects + +Package org.postgresql.util +----------------------- + +PGmoney Maps to postgresql type money +PGobject Used to represent postgresql types that have no Java equivalent +PGtokenizer Helper class for the geometric types +Serialize Used to serialise Java objects into tabes, rather than Blobs +UnixCrypt Used to handle crypt authentication + diff --git a/src/interfaces/jdbc/jdbc.jpx b/src/interfaces/jdbc/jdbc.jpx new file mode 100644 index 00000000000..8c17267ca1b --- /dev/null +++ b/src/interfaces/jdbc/jdbc.jpx @@ -0,0 +1,31 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<!--JBuilder XML Project--> +<project> + <property category="runtime.0" name="RunnableType" value="com.borland.jbuilder.runtime.ApplicationRunner" /> + <property category="runtime.0" name="jsprunner.docbase" value="." /> + <property category="runtime.0" name="jsprunner.jspfile" value="E%|/docs/java/xml/example6" /> + <property category="sys" name="BackupPath" value="bak" /> + <property category="sys" name="CheckStable" value="1" /> + <property category="sys" name="Company" value="" /> + <property category="sys" name="Copyright" value="Copyright (c) 2001" /> + <property category="sys" name="DefaultPackage" value="org.postgresql.core" /> + <property category="sys" name="Description" value="" /> + <property category="sys" name="DocPath" value="doc" /> + <property category="sys" name="ExcludeClassEnabled" value="0" /> + <property category="sys" name="JDK" value="java 1.3.0-C" /> + <property category="sys" name="LastTag" value="0" /> + <property category="sys" name="Libraries" value="JUnit" /> + <property category="sys" name="MakeStable" value="0" /> + <property category="sys" name="OutPath" value="build" /> + <property category="sys" name="SourcePath" value="." /> + <property category="sys" name="Title" value="" /> + <property category="sys" name="Version" value="1.0" /> + <property category="sys" name="WorkingDirectory" value="." /> + <node type="Package" name="org.postgresql.core" /> + <file path="build.xml" /> + <file path="CHANGELOG" /> + <file path="Implementation" /> + <file path="README" /> + <file path="org/postgresql/jdbc2/UpdateableResultSet.java" /> +</project> diff --git a/src/interfaces/jdbc/utils/CheckVersion.java b/src/interfaces/jdbc/utils/CheckVersion.java new file mode 100644 index 00000000000..a2438cd4f9f --- /dev/null +++ b/src/interfaces/jdbc/utils/CheckVersion.java @@ -0,0 +1,74 @@ +package utils; + +/* + * This little app checks to see what version of JVM is being used. + * It does this by checking first the java.vm.version property, and + * if that fails, it looks for certain classes that should be present. + */ +public class CheckVersion +{ + /* + * Check for the existence of a class by attempting to load it + */ + public static boolean checkClass(String c) + { + try + { + Class.forName(c); + } + catch (Exception e) + { + return false; + } + return true; + } + + /* + * This first checks java.vm.version for 1.1, 1.2 or 1.3. + * + * It writes jdbc1 to stdout for the 1.1.x VM. + * + * For 1.2 or 1.3, it checks for the existence of the javax.sql.DataSource + * interface, and if found writes enterprise to stdout. If the interface + * is not found, it writes jdbc2 to stdout. + * + * PS: It also looks for the existence of java.lang.Byte which appeared in + * JDK1.1.0 incase java.vm.version is not heeded by some JVM's. + * + * If it can't work it out, it writes huho to stdout. + * + * The make file uses the written results to determine which rule to run. + * + * Bugs: This needs thorough testing. + */ + public static void main(String args[]) + { + String vmversion = System.getProperty("java.vm.version"); + + System.out.println("postgresql.jdbc=" + System.getProperty("postgresql.jdbc")); + + // We are running a 1.1 JVM + if (vmversion.startsWith("1.1")) + { + System.out.println("jdbc1"); + //System.exit(0); + } + else + // We are running a 1.2 or 1.3 JVM + if (vmversion.startsWith("1.2") || + vmversion.startsWith("1.3") || + checkClass("java.lang.Byte") + ) + { + + // Check to see if we have the standard extensions. If so, then + // we want the enterprise edition, otherwise the jdbc2 driver. + if (checkClass("javax.sql.DataSource")) + System.out.println("enterprise"); + else + System.out.println("jdbc2"); + //System.exit(0); + } + System.setProperty("postgresql.jdbc", "yoyo"); + } +} diff --git a/src/interfaces/jdbc/utils/buildDriver b/src/interfaces/jdbc/utils/buildDriver new file mode 100755 index 00000000000..8cca1d9c36d --- /dev/null +++ b/src/interfaces/jdbc/utils/buildDriver @@ -0,0 +1,47 @@ +#!/bin/sh +# +# $Id: buildDriver,v 1.2 2000/12/20 16:22:49 peter Exp $ +# +# This script generates the org/postgresql/Driver.java file from the template +# org/postgresql/Driver.java.in +# +# We do this because we need to include the version number from Makefile.global +# and some other goodies. +# +# This used to be in Makefile, but as it's now done three times, it's better +# to have it as a separate script. +# +# If you have any problems, please let us know ;-) +# +# Syntax: buildDriver version class +# +# Where: +# version The version string from Makefile.global +# class The class implementing java.sql.Connection +# edition The driver edition being built +# source The file to build. We assume that ${source}.in exists +# + +VERSION=$1 +CLASS=$2 +EDITION=$3 +SOURCE=$4 + +#--------------------------------------------------------------------------- +# Extract the version. This will work until version x.9 (and assuming we don't +# have 7.10 etc). We only handle 1 digit for MINORVERSION to handle things like +# 7.1devel etc +# +MAJORVERSION=`echo $VERSION | cut -f1 -d'.'` +MINORVERSION=`echo $VERSION | cut -f2 -d'.' | cut -c1` + +#--------------------------------------------------------------------------- +# Now finally build the driver +sed \ + -e "s/@JDBCCONNECTCLASS@/$CLASS/g" \ + -e "s/@VERSION@/$VERSION $EDITION/g" \ + -e "s/@MAJORVERSION@/$MAJORVERSION/g" \ + -e "s/@MINORVERSION@/$MINORVERSION/g" \ + <${SOURCE}.in \ + >$SOURCE +#--------------------------------------------------------------------------- diff --git a/src/interfaces/jdbc/utils/changelog.pl b/src/interfaces/jdbc/utils/changelog.pl new file mode 100644 index 00000000000..3cba15aa91d --- /dev/null +++ b/src/interfaces/jdbc/utils/changelog.pl @@ -0,0 +1,23 @@ +#!/bin/perl + +while(<>) { + chomp(); + s/\t+/ /g; + if(substr($_,0,3) eq ' - ') { + print "<ul>" if !$inlist; + $inlist=1; + print "<li>".substr($_,3)."\n"; + } else { + if($_ eq "" || $_ eq " ") { + print "</ul>" if $inlist; + $inlist=0; + print "<br>\n"; + } elsif(substr($_,0,1) eq " ") { + print $_; + } else { + print "</ul>" if $inlist; + $inlist=0; + print "<h4>".$_."</h4>\n"; + } + } +} diff --git a/src/test/regress/expected/geometry-bsdi-precision.out b/src/test/regress/expected/geometry-bsdi-precision.out new file mode 100644 index 00000000000..7892b5dceda --- /dev/null +++ b/src/test/regress/expected/geometry-bsdi-precision.out @@ -0,0 +1,532 @@ +-- +-- GEOMETRY +-- +-- +-- Points +-- +SELECT '' AS four, center(f1) AS center + FROM BOX_TBL; + four | center +------+--------- + | (1,1) + | (2,2) + | (2.5,3) + | (3,3) +(4 rows) + +SELECT '' AS four, (@@ f1) AS center + FROM BOX_TBL; + four | center +------+--------- + | (1,1) + | (2,2) + | (2.5,3) + | (3,3) +(4 rows) + +SELECT '' AS six, point(f1) AS center + FROM CIRCLE_TBL; + six | center +-----+----------- + | (0,0) + | (1,2) + | (1,3) + | (1,2) + | (100,200) + | (100,0) +(6 rows) + +SELECT '' AS six, (@@ f1) AS center + FROM CIRCLE_TBL; + six | center +-----+----------- + | (0,0) + | (1,2) + | (1,3) + | (1,2) + | (100,200) + | (100,0) +(6 rows) + +SELECT '' AS two, (@@ f1) AS center + FROM POLYGON_TBL + WHERE (# f1) > 2; + two | center +-----+------------------------------------- + | (1.33333333333333,1.33333333333333) + | (2.33333333333333,1.33333333333333) +(2 rows) + +-- "is horizontal" function +SELECT '' AS two, p1.f1 + FROM POINT_TBL p1 + WHERE ishorizontal(p1.f1, point '(0,0)'); + two | f1 +-----+--------- + | (0,0) + | (-10,0) +(2 rows) + +-- "is horizontal" operator +SELECT '' AS two, p1.f1 + FROM POINT_TBL p1 + WHERE p1.f1 ?- point '(0,0)'; + two | f1 +-----+--------- + | (0,0) + | (-10,0) +(2 rows) + +-- "is vertical" function +SELECT '' AS one, p1.f1 + FROM POINT_TBL p1 + WHERE isvertical(p1.f1, point '(5.1,34.5)'); + one | f1 +-----+------------ + | (5.1,34.5) +(1 row) + +-- "is vertical" operator +SELECT '' AS one, p1.f1 + FROM POINT_TBL p1 + WHERE p1.f1 ?| point '(5.1,34.5)'; + one | f1 +-----+------------ + | (5.1,34.5) +(1 row) + +-- +-- Line segments +-- +-- intersection +SELECT '' AS count, p.f1, l.s, l.s # p.f1 AS intersection + FROM LSEG_TBL l, POINT_TBL p; +ERROR: Unable to identify an operator '#' for types 'lseg' and 'point' + You will have to retype this query using an explicit cast +-- closest point +SELECT '' AS thirty, p.f1, l.s, p.f1 ## l.s AS closest + FROM LSEG_TBL l, POINT_TBL p; + thirty | f1 | s | closest +--------+------------+-------------------------------+--------------------------------------- + | (0,0) | [(1,2),(3,4)] | (1,2) + | (-10,0) | [(1,2),(3,4)] | (1,2) + | (-3,4) | [(1,2),(3,4)] | (1,2) + | (5.1,34.5) | [(1,2),(3,4)] | (3,4) + | (-5,-12) | [(1,2),(3,4)] | (1,2) + | (10,10) | [(1,2),(3,4)] | (3,4) + | (0,0) | [(0,0),(6,6)] | (-0,0) + | (-10,0) | [(0,0),(6,6)] | (0,0) + | (-3,4) | [(0,0),(6,6)] | (0.5,0.5) + | (5.1,34.5) | [(0,0),(6,6)] | (6,6) + | (-5,-12) | [(0,0),(6,6)] | (0,0) + | (10,10) | [(0,0),(6,6)] | (6,6) + | (0,0) | [(10,-10),(-3,-4)] | (-2.04878048780488,-4.4390243902439) + | (-10,0) | [(10,-10),(-3,-4)] | (-3,-4) + | (-3,4) | [(10,-10),(-3,-4)] | (-3,-4) + | (5.1,34.5) | [(10,-10),(-3,-4)] | (-3,-4) + | (-5,-12) | [(10,-10),(-3,-4)] | (-1.60487804878049,-4.64390243902439) + | (10,10) | [(10,-10),(-3,-4)] | (2.39024390243902,-6.48780487804878) + | (0,0) | [(-1000000,200),(300000,-40)] | (0.0028402365895872,15.384614860264) + | (-10,0) | [(-1000000,200),(300000,-40)] | (-9.99715942258202,15.3864610140472) + | (-3,4) | [(-1000000,200),(300000,-40)] | (-2.99789812267519,15.3851688427303) + | (5.1,34.5) | [(-1000000,200),(300000,-40)] | (5.09647083221496,15.3836744976925) + | (-5,-12) | [(-1000000,200),(300000,-40)] | (-4.99494420845634,15.3855375281616) + | (10,10) | [(-1000000,200),(300000,-40)] | (10.000993741978,15.3827690473092) + | (0,0) | [(11,22),(33,44)] | (11,22) + | (-10,0) | [(11,22),(33,44)] | (11,22) + | (-3,4) | [(11,22),(33,44)] | (11,22) + | (5.1,34.5) | [(11,22),(33,44)] | (14.3,25.3) + | (-5,-12) | [(11,22),(33,44)] | (11,22) + | (10,10) | [(11,22),(33,44)] | (11,22) +(30 rows) + +-- +-- Lines +-- +-- +-- Boxes +-- +SELECT '' as six, box(f1) AS box FROM CIRCLE_TBL; + six | box +-----+---------------------------------------------------------------------------- + | (2.12132034355964,2.12132034355964),(-2.12132034355964,-2.12132034355964) + | (71.7106781186547,72.7106781186547),(-69.7106781186547,-68.7106781186547) + | (4.53553390593274,6.53553390593274),(-2.53553390593274,-0.535533905932737) + | (3.12132034355964,4.12132034355964),(-1.12132034355964,-0.121320343559642) + | (107.071067811865,207.071067811865),(92.9289321881345,192.928932188135) + | (170.710678118655,70.7106781186547),(29.2893218813453,-70.7106781186547) +(6 rows) + +-- translation +SELECT '' AS twentyfour, b.f1 + p.f1 AS translation + FROM BOX_TBL b, POINT_TBL p; + twentyfour | translation +------------+------------------------- + | (2,2),(0,0) + | (-8,2),(-10,0) + | (-1,6),(-3,4) + | (7.1,36.5),(5.1,34.5) + | (-3,-10),(-5,-12) + | (12,12),(10,10) + | (3,3),(1,1) + | (-7,3),(-9,1) + | (0,7),(-2,5) + | (8.1,37.5),(6.1,35.5) + | (-2,-9),(-4,-11) + | (13,13),(11,11) + | (2.5,3.5),(2.5,2.5) + | (-7.5,3.5),(-7.5,2.5) + | (-0.5,7.5),(-0.5,6.5) + | (7.6,38),(7.6,37) + | (-2.5,-8.5),(-2.5,-9.5) + | (12.5,13.5),(12.5,12.5) + | (3,3),(3,3) + | (-7,3),(-7,3) + | (0,7),(0,7) + | (8.1,37.5),(8.1,37.5) + | (-2,-9),(-2,-9) + | (13,13),(13,13) +(24 rows) + +SELECT '' AS twentyfour, b.f1 - p.f1 AS translation + FROM BOX_TBL b, POINT_TBL p; + twentyfour | translation +------------+--------------------------- + | (2,2),(0,0) + | (12,2),(10,0) + | (5,-2),(3,-4) + | (-3.1,-32.5),(-5.1,-34.5) + | (7,14),(5,12) + | (-8,-8),(-10,-10) + | (3,3),(1,1) + | (13,3),(11,1) + | (6,-1),(4,-3) + | (-2.1,-31.5),(-4.1,-33.5) + | (8,15),(6,13) + | (-7,-7),(-9,-9) + | (2.5,3.5),(2.5,2.5) + | (12.5,3.5),(12.5,2.5) + | (5.5,-0.5),(5.5,-1.5) + | (-2.6,-31),(-2.6,-32) + | (7.5,15.5),(7.5,14.5) + | (-7.5,-6.5),(-7.5,-7.5) + | (3,3),(3,3) + | (13,3),(13,3) + | (6,-1),(6,-1) + | (-2.1,-31.5),(-2.1,-31.5) + | (8,15),(8,15) + | (-7,-7),(-7,-7) +(24 rows) + +-- scaling and rotation +SELECT '' AS twentyfour, b.f1 * p.f1 AS rotation + FROM BOX_TBL b, POINT_TBL p; + twentyfour | rotation +------------+----------------------------- + | (0,0),(0,0) + | (-0,0),(-20,-20) + | (-0,2),(-14,0) + | (0,79.2),(-58.8,0) + | (14,-0),(0,-34) + | (0,40),(0,0) + | (0,0),(0,0) + | (-10,-10),(-30,-30) + | (-7,3),(-21,1) + | (-29.4,118.8),(-88.2,39.6) + | (21,-17),(7,-51) + | (0,60),(0,20) + | (0,0),(0,0) + | (-25,-25),(-25,-35) + | (-17.5,2.5),(-21.5,-0.5) + | (-73.5,104.1),(-108,99) + | (29.5,-42.5),(17.5,-47.5) + | (0,60),(-10,50) + | (0,0),(0,0) + | (-30,-30),(-30,-30) + | (-21,3),(-21,3) + | (-88.2,118.8),(-88.2,118.8) + | (21,-51),(21,-51) + | (0,60),(0,60) +(24 rows) + +SELECT '' AS twenty, b.f1 / p.f1 AS rotation + FROM BOX_TBL b, POINT_TBL p + WHERE (p.f1 <-> point '(0,0)') >= 1; + twenty | rotation +--------+----------------------------------------------------------------------------------- + | (0,-0),(-0.2,-0.2) + | (-0.1,-0.1),(-0.3,-0.3) + | (-0.25,-0.25),(-0.25,-0.35) + | (-0.3,-0.3),(-0.3,-0.3) + | (0.08,-0),(0,-0.56) + | (0.12,-0.28),(0.04,-0.84) + | (0.26,-0.7),(0.1,-0.82) + | (0.12,-0.84),(0.12,-0.84) + | (0.0651176557643925,0),(0,-0.0483449262493217) + | (0.0976764836465887,-0.0241724631246608),(0.0325588278821962,-0.0725173893739825) + | (0.109762715208919,-0.0562379754328844),(0.0813970697054906,-0.0604311578116521) + | (0.0976764836465887,-0.0725173893739825),(0.0976764836465887,-0.0725173893739825) + | (-0,0.0828402366863905),(-0.201183431952663,0) + | (-0.100591715976331,0.124260355029586),(-0.301775147928994,0.0414201183431953) + | (-0.251479289940828,0.103550295857988),(-0.322485207100592,0.0739644970414201) + | (-0.301775147928994,0.124260355029586),(-0.301775147928994,0.124260355029586) + | (0.2,0),(0,0) + | (0.3,0),(0.1,0) + | (0.3,0.05),(0.25,0) + | (0.3,0),(0.3,0) +(20 rows) + +-- +-- Paths +-- +SET geqo TO 'off'; +SELECT '' AS eight, npoints(f1) AS npoints, f1 AS path FROM PATH_TBL; + eight | npoints | path +-------+---------+--------------------------- + | 2 | [(1,2),(3,4)] + | 2 | ((1,2),(3,4)) + | 4 | [(0,0),(3,0),(4,5),(1,6)] + | 2 | ((1,2),(3,4)) + | 2 | ((1,2),(3,4)) + | 2 | [(1,2),(3,4)] + | 2 | [(11,12),(13,14)] + | 2 | ((11,12),(13,14)) +(8 rows) + +SELECT '' AS four, path(f1) FROM POLYGON_TBL; + four | path +------+--------------------- + | ((2,0),(2,4),(0,0)) + | ((3,1),(3,3),(1,0)) + | ((0,0)) + | ((0,1),(0,1)) +(4 rows) + +-- translation +SELECT '' AS eight, p1.f1 + point '(10,10)' AS dist_add + FROM PATH_TBL p1; + eight | dist_add +-------+----------------------------------- + | [(11,12),(13,14)] + | ((11,12),(13,14)) + | [(10,10),(13,10),(14,15),(11,16)] + | ((11,12),(13,14)) + | ((11,12),(13,14)) + | [(11,12),(13,14)] + | [(21,22),(23,24)] + | ((21,22),(23,24)) +(8 rows) + +-- scaling and rotation +SELECT '' AS eight, p1.f1 * point '(2,-1)' AS dist_mul + FROM PATH_TBL p1; + eight | dist_mul +-------+------------------------------ + | [(4,3),(10,5)] + | ((4,3),(10,5)) + | [(0,0),(6,-3),(13,6),(8,11)] + | ((4,3),(10,5)) + | ((4,3),(10,5)) + | [(4,3),(10,5)] + | [(34,13),(40,15)] + | ((34,13),(40,15)) +(8 rows) + +RESET geqo; +-- +-- Polygons +-- +-- containment +SELECT '' AS twentyfour, p.f1, poly.f1, poly.f1 ~ p.f1 AS contains + FROM POLYGON_TBL poly, POINT_TBL p; + twentyfour | f1 | f1 | contains +------------+------------+---------------------+---------- + | (0,0) | ((2,0),(2,4),(0,0)) | t + | (-10,0) | ((2,0),(2,4),(0,0)) | f + | (-3,4) | ((2,0),(2,4),(0,0)) | f + | (5.1,34.5) | ((2,0),(2,4),(0,0)) | f + | (-5,-12) | ((2,0),(2,4),(0,0)) | f + | (10,10) | ((2,0),(2,4),(0,0)) | f + | (0,0) | ((3,1),(3,3),(1,0)) | f + | (-10,0) | ((3,1),(3,3),(1,0)) | f + | (-3,4) | ((3,1),(3,3),(1,0)) | f + | (5.1,34.5) | ((3,1),(3,3),(1,0)) | f + | (-5,-12) | ((3,1),(3,3),(1,0)) | f + | (10,10) | ((3,1),(3,3),(1,0)) | f + | (0,0) | ((0,0)) | t + | (-10,0) | ((0,0)) | f + | (-3,4) | ((0,0)) | f + | (5.1,34.5) | ((0,0)) | f + | (-5,-12) | ((0,0)) | f + | (10,10) | ((0,0)) | f + | (0,0) | ((0,1),(0,1)) | f + | (-10,0) | ((0,1),(0,1)) | f + | (-3,4) | ((0,1),(0,1)) | f + | (5.1,34.5) | ((0,1),(0,1)) | f + | (-5,-12) | ((0,1),(0,1)) | f + | (10,10) | ((0,1),(0,1)) | f +(24 rows) + +SELECT '' AS twentyfour, p.f1, poly.f1, p.f1 @ poly.f1 AS contained + FROM POLYGON_TBL poly, POINT_TBL p; + twentyfour | f1 | f1 | contained +------------+------------+---------------------+----------- + | (0,0) | ((2,0),(2,4),(0,0)) | t + | (-10,0) | ((2,0),(2,4),(0,0)) | f + | (-3,4) | ((2,0),(2,4),(0,0)) | f + | (5.1,34.5) | ((2,0),(2,4),(0,0)) | f + | (-5,-12) | ((2,0),(2,4),(0,0)) | f + | (10,10) | ((2,0),(2,4),(0,0)) | f + | (0,0) | ((3,1),(3,3),(1,0)) | f + | (-10,0) | ((3,1),(3,3),(1,0)) | f + | (-3,4) | ((3,1),(3,3),(1,0)) | f + | (5.1,34.5) | ((3,1),(3,3),(1,0)) | f + | (-5,-12) | ((3,1),(3,3),(1,0)) | f + | (10,10) | ((3,1),(3,3),(1,0)) | f + | (0,0) | ((0,0)) | t + | (-10,0) | ((0,0)) | f + | (-3,4) | ((0,0)) | f + | (5.1,34.5) | ((0,0)) | f + | (-5,-12) | ((0,0)) | f + | (10,10) | ((0,0)) | f + | (0,0) | ((0,1),(0,1)) | f + | (-10,0) | ((0,1),(0,1)) | f + | (-3,4) | ((0,1),(0,1)) | f + | (5.1,34.5) | ((0,1),(0,1)) | f + | (-5,-12) | ((0,1),(0,1)) | f + | (10,10) | ((0,1),(0,1)) | f +(24 rows) + +SELECT '' AS four, npoints(f1) AS npoints, f1 AS polygon + FROM POLYGON_TBL; + four | npoints | polygon +------+---------+--------------------- + | 3 | ((2,0),(2,4),(0,0)) + | 3 | ((3,1),(3,3),(1,0)) + | 1 | ((0,0)) + | 2 | ((0,1),(0,1)) +(4 rows) + +SELECT '' AS four, polygon(f1) + FROM BOX_TBL; + four | polygon +------+------------------------------------------- + | ((0,0),(0,2),(2,2),(2,0)) + | ((1,1),(1,3),(3,3),(3,1)) + | ((2.5,2.5),(2.5,3.5),(2.5,3.5),(2.5,2.5)) + | ((3,3),(3,3),(3,3),(3,3)) +(4 rows) + +SELECT '' AS four, polygon(f1) + FROM PATH_TBL WHERE isclosed(f1); + four | polygon +------+------------------- + | ((1,2),(3,4)) + | ((1,2),(3,4)) + | ((1,2),(3,4)) + | ((11,12),(13,14)) +(4 rows) + +SELECT '' AS four, f1 AS open_path, polygon( pclose(f1)) AS polygon + FROM PATH_TBL + WHERE isopen(f1); + four | open_path | polygon +------+---------------------------+--------------------------- + | [(1,2),(3,4)] | ((1,2),(3,4)) + | [(0,0),(3,0),(4,5),(1,6)] | ((0,0),(3,0),(4,5),(1,6)) + | [(1,2),(3,4)] | ((1,2),(3,4)) + | [(11,12),(13,14)] | ((11,12),(13,14)) +(4 rows) + +-- convert circles to polygons using the default number of points +SELECT '' AS six, polygon(f1) + FROM CIRCLE_TBL; + six | polygon +-----+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + | ((-3,0),(-2.59807621135076,1.50000000000442),(-1.49999999999116,2.59807621135842),(1.53102359078377e-11,3),(1.50000000001768,2.59807621134311),(2.59807621136607,1.4999999999779),(3,-3.06204718156754e-11),(2.59807621133545,-1.50000000003094),(1.49999999996464,-2.59807621137373),(-4.59307077235131e-11,-3),(-1.5000000000442,-2.5980762113278),(-2.59807621138138,-1.49999999995138)) + | ((-99,2),(-85.6025403783588,52.0000000001473),(-48.9999999997054,88.602540378614),(1.00000000051034,102),(51.0000000005893,88.6025403781036),(87.6025403788692,51.9999999992634),(101,1.99999999897932),(87.6025403778485,-48.0000000010313),(50.9999999988214,-84.6025403791243),(0.999999998468976,-98),(-49.0000000014732,-84.6025403775933),(-85.6025403793795,-47.9999999983795)) + | ((-4,3),(-3.33012701891794,5.50000000000737),(-1.49999999998527,7.3301270189307),(1.00000000002552,8),(3.50000000002946,7.33012701890518),(5.33012701894346,5.49999999996317),(6,2.99999999994897),(5.33012701889242,0.499999999948437),(3.49999999994107,-1.33012701895622),(0.999999999923449,-2),(-1.50000000007366,-1.33012701887967),(-3.33012701896897,0.500000000081028)) + | ((-2,2),(-1.59807621135076,3.50000000000442),(-0.499999999991161,4.59807621135842),(1.00000000001531,5),(2.50000000001768,4.59807621134311),(3.59807621136607,3.4999999999779),(4,1.99999999996938),(3.59807621133545,0.499999999969062),(2.49999999996464,-0.598076211373729),(0.999999999954069,-1),(-0.500000000044197,-0.598076211327799),(-1.59807621138138,0.500000000048616)) + | ((90,200),(91.3397459621641,205.000000000015),(95.0000000000295,208.660254037861),(100.000000000051,210),(105.000000000059,208.66025403781),(108.660254037887,204.999999999926),(110,199.999999999898),(108.660254037785,194.999999999897),(104.999999999882,191.339745962088),(99.9999999998469,190),(94.9999999998527,191.339745962241),(91.3397459620621,195.000000000162)) + | ((0,0),(13.3974596216412,50.0000000001473),(50.0000000002946,86.602540378614),(100.00000000051,100),(150.000000000589,86.6025403781036),(186.602540378869,49.9999999992634),(200,-1.02068239385585e-09),(186.602540377848,-50.0000000010313),(149.999999998821,-86.6025403791243),(99.999999998469,-100),(49.9999999985268,-86.6025403775933),(13.3974596206205,-49.9999999983795)) +(6 rows) + +-- convert the circle to an 8-point polygon +SELECT '' AS six, polygon(8, f1) + FROM CIRCLE_TBL; + six | polygon +-----+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + | ((-3,0),(-2.12132034355423,2.12132034356506),(1.53102359078377e-11,3),(2.12132034357588,2.1213203435434),(3,-3.06204718156754e-11),(2.12132034353258,-2.12132034358671),(-4.59307077235131e-11,-3),(-2.12132034359753,-2.12132034352175)) + | ((-99,2),(-69.7106781184743,72.7106781188352),(1.00000000051034,102),(71.710678119196,72.7106781181134),(101,1.99999999897932),(71.7106781177526,-68.7106781195569),(0.999999998468976,-98),(-69.7106781199178,-68.7106781173917)) + | ((-4,3),(-2.53553390592372,6.53553390594176),(1.00000000002552,8),(4.5355339059598,6.53553390590567),(6,2.99999999994897),(4.53553390588763,-0.535533905977846),(0.999999999923449,-2),(-2.53553390599589,-0.535533905869586)) + | ((-2,2),(-1.12132034355423,4.12132034356506),(1.00000000001531,5),(3.12132034357588,4.1213203435434),(4,1.99999999996938),(3.12132034353258,-0.121320343586707),(0.999999999954069,-1),(-1.12132034359753,-0.121320343521752)) + | ((90,200),(92.9289321881526,207.071067811884),(100.000000000051,210),(107.07106781192,207.071067811811),(110,199.999999999898),(107.071067811775,192.928932188044),(99.9999999998469,190),(92.9289321880082,192.928932188261)) + | ((0,0),(29.2893218815257,70.7106781188352),(100.00000000051,100),(170.710678119196,70.7106781181134),(200,-1.02068239385585e-09),(170.710678117753,-70.7106781195569),(99.999999998469,-100),(29.2893218800822,-70.7106781173917)) +(6 rows) + +-- +-- Circles +-- +SELECT '' AS six, circle(f1, 50.0) + FROM POINT_TBL; + six | circle +-----+----------------- + | <(0,0),50> + | <(-10,0),50> + | <(-3,4),50> + | <(5.1,34.5),50> + | <(-5,-12),50> + | <(10,10),50> +(6 rows) + +SELECT '' AS four, circle(f1) + FROM BOX_TBL; + four | circle +------+------------------------- + | <(1,1),1.4142135623731> + | <(2,2),1.4142135623731> + | <(2.5,3),0.5> + | <(3,3),0> +(4 rows) + +SELECT '' AS two, circle(f1) + FROM POLYGON_TBL + WHERE (# f1) >= 3; + two | circle +-----+-------------------------------------------------------- + | <(1.33333333333333,1.33333333333333),2.04168905063636> + | <(2.33333333333333,1.33333333333333),1.47534300379185> +(2 rows) + +SELECT '' AS twentyfour, c1.f1 AS circle, p1.f1 AS point, (p1.f1 <-> c1.f1) AS distance + FROM CIRCLE_TBL c1, POINT_TBL p1 + WHERE (p1.f1 <-> c1.f1) > 0 + ORDER BY distance, circle, point using <<; + twentyfour | circle | point | distance +------------+----------------+------------+------------------ + | <(100,0),100> | (5.1,34.5) | 0.97653192697797 + | <(1,2),3> | (-3,4) | 1.47213595499958 + | <(0,0),3> | (-3,4) | 2 + | <(100,0),100> | (-3,4) | 3.07764064044152 + | <(100,0),100> | (-5,-12) | 5.68348972285122 + | <(1,3),5> | (-10,0) | 6.40175425099138 + | <(1,3),5> | (10,10) | 6.40175425099138 + | <(0,0),3> | (-10,0) | 7 + | <(1,2),3> | (-10,0) | 8.18033988749895 + | <(1,2),3> | (10,10) | 9.0415945787923 + | <(0,0),3> | (-5,-12) | 10 + | <(100,0),100> | (-10,0) | 10 + | <(0,0),3> | (10,10) | 11.142135623731 + | <(1,3),5> | (-5,-12) | 11.1554944214035 + | <(1,2),3> | (-5,-12) | 12.2315462117278 + | <(1,3),5> | (5.1,34.5) | 26.7657047773223 + | <(1,2),3> | (5.1,34.5) | 29.757594539282 + | <(0,0),3> | (5.1,34.5) | 31.8749193547455 + | <(100,200),10> | (5.1,34.5) | 180.778038568384 + | <(100,200),10> | (10,10) | 200.237960416286 + | <(100,200),10> | (-3,4) | 211.415898254845 + | <(100,200),10> | (0,0) | 213.606797749979 + | <(100,200),10> | (-10,0) | 218.254244210267 + | <(100,200),10> | (-5,-12) | 226.577682802077 +(24 rows) + |