Changeset: a8dc8ea760e7 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=a8dc8ea760e7
Modified Files:
        java/ChangeLog
        java/build.properties
        java/build.xml
        java/src/nl/cwi/monetdb/xmldb/base/MonetDBCollection.java
        java/src/nl/cwi/monetdb/xmldb/base/MonetDBConfigurable.java
        java/src/nl/cwi/monetdb/xmldb/base/MonetDBDatabase.java.in
        java/src/nl/cwi/monetdb/xmldb/base/MonetDBResourceSet.java
        java/src/nl/cwi/monetdb/xmldb/modules/MonetDBXMLResource.java
        java/src/nl/cwi/monetdb/xmldb/modules/MonetDBXQueryService.java
Branch: default
Log Message:

java: remove XQuery related XML:DB


diffs (truncated from 1723 to 300 lines):

diff --git a/java/ChangeLog b/java/ChangeLog
--- a/java/ChangeLog
+++ b/java/ChangeLog
@@ -2,5 +2,5 @@
 # This file is updated with Maddlog
 
 * Mon Feb  7 2011 Fabian Groffen <[email protected]>
-- Removed XQuery related XRPC wrapper code
+- Removed XQuery related XRPC wrapper and XML:DB code
 
diff --git a/java/build.properties b/java/build.properties
--- a/java/build.properties
+++ b/java/build.properties
@@ -24,8 +24,6 @@
 JDBC_VER_SUFFIX=Magnistipula
 # the default port to connect on, if no port given when using SQL
 JDBC_DEF_PORT=50000
-# the default port to connect on, if no port given when using XML:DB
-JDBC_DEF_PORT_XQUERY=50000
 
 
 ##
diff --git a/java/build.xml b/java/build.xml
--- a/java/build.xml
+++ b/java/build.xml
@@ -36,7 +36,6 @@
   <property name="builddir"             value="build" />
   <property name="docdir"               value="doc" />
   <property name="jdbc-package"         value="nl/cwi/monetdb/jdbc" />
-  <property name="xmldb-package"        value="nl/cwi/monetdb/xmldb" />
   <property name="mcl-package"          value="nl/cwi/monetdb/mcl" />
   <property name="client-package"       value="nl/cwi/monetdb/client" />
   <property name="util-package"         value="nl/cwi/monetdb/util" />
@@ -51,8 +50,6 @@
     value="${jardir}/jdbcclient.jar" />
   <property name="mcl-jar"
     value="${jardir}/monetdb-${MCL_MAJOR}.${MCL_MINOR}-mcl.jar" />
-  <property name="xmldb-jar"
-    value="${jardir}/monetdb-${JDBC_MAJOR}.${JDBC_MINOR}-xmldb.jar" />
 
   <property name="mero-control-jar"
     value="${jardir}/merocontrol.jar" />
@@ -61,10 +58,6 @@
   <target name="all">
     <antcall target="distjdbc" />
 
-    <!-- xmldb is not in distjdbc because it needs a library which needs
-         to be fetched first -->
-    <antcall target="jar_xmldb" />
-
     <antcall target="distmerocontrol" />
 
     <antcall target="doc" />
@@ -101,14 +94,6 @@
     </jar>
   </target>
 
-  <target name="jar_xmldb" depends="compile_xmldb">
-    <jar jarfile="${xmldb-jar}">
-      <fileset dir="${builddir}">
-        <include name="${xmldb-package}/**/*.class" />
-      </fileset>
-    </jar>
-  </target>
-
   <target name="jar_mcl" depends="compile_mcl">
     <jar jarfile="${mcl-jar}">
       <fileset dir="${builddir}">
@@ -174,22 +159,6 @@
     </javac>
   </target>
 
-  <target name="compile_xmldb" depends="prepare,driver">
-    <echo message="Compiling XML:DB driver" />
-    <javac
-      classpath="${srcdir}:${libdir}/xmldb.jar"
-      destdir="${builddir}"
-      debug="${debug}"
-      optimize="${optimize}"
-      target="${javac_version}"
-      source="${javac_version}"
-      >
-      <src path="${srcdir}" />
-      <src path="${builddir}/src" />
-      <include name="${xmldb-package}/**/*.java" />
-    </javac>
-  </target>
-
   <target name="compile_mcl" depends="prepare">
     <echo message="Compiling MCL" />
     <javac
@@ -281,11 +250,6 @@
       tofile="${builddir}/src/${jdbc-package}/MonetDriver.java"
       filtering="yes" />
 
-    <copy file="${srcdir}/${xmldb-package}/base/MonetDBDatabase.java.in"
-      overwrite="true"
-      tofile="${builddir}/src/${xmldb-package}/base/MonetDBDatabase.java"
-      filtering="yes" />
-
     <echo message="Configured build for the ${JDBC_MAJOR}.${JDBC_MINOR} 
(${JDBC_VER_SUFFIX}) edition driver" />
   </target>
 
@@ -332,14 +296,6 @@
             <include name="${jdbc-package}/**/*.java" />
           </srcfiles>
         </uptodate>
-        <uptodate
-          
targetfile="${builddir}/src/${xmldb-package}/base/MonetDBDatabase.java">
-          <srcfiles dir="${srcdir}">
-            <include name="build.properties" />
-            <include name="build.local.properties" />
-            <include name="${xmldb-package}/base/MonetDBDatabase.java.in" />
-          </srcfiles>
-        </uptodate>
       </and>
     </condition>
 
diff --git a/java/src/nl/cwi/monetdb/xmldb/base/MonetDBCollection.java 
b/java/src/nl/cwi/monetdb/xmldb/base/MonetDBCollection.java
deleted file mode 100644
--- a/java/src/nl/cwi/monetdb/xmldb/base/MonetDBCollection.java
+++ /dev/null
@@ -1,411 +0,0 @@
-/*
- * The contents of this file are subject to the MonetDB Public License
- * Version 1.1 (the "License"); you may not use this file except in
- * compliance with the License. You may obtain a copy of the License at
- * http://monetdb.cwi.nl/Legal/MonetDBLicense-1.1.html
- *
- * Software distributed under the License is distributed on an "AS IS"
- * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
- * License for the specific language governing rights and limitations
- * under the License.
- *
- * The Original Code is the MonetDB Database System.
- *
- * The Initial Developer of the Original Code is CWI.
- * Portions created by CWI are Copyright (C) 1997-July 2008 CWI.
- * Copyright August 2008-2011 MonetDB B.V.
- * All Rights Reserved.
- */
-
-package nl.cwi.monetdb.xmldb.base;
-
-import org.xmldb.api.base.*;
-import java.sql.*;
-import nl.cwi.monetdb.jdbc.*;
-import nl.cwi.monetdb.xmldb.modules.*;
-
-
-/**
- * A Collection represents a collection of Resources stored within an
- * XML database.  An XML database MAY expose collections as a
- * hierarchical set of parent and child collections.
- * <p />
- * MonetDB/XQuery at the moment exposes no collection at all.
- * <p />
- * A Collection provides access to the Resources stored by the
- * Collection and to Service instances that can operate against the
- * Collection and the Resources stored within it.  The Service mechanism
- * provides the ability to extend the functionality of a Collection in
- * ways that allows optional functionality to be enabled for the
- * Collection. 
- *
- * @author Fabian Groffen <[email protected]>
- */
-public class MonetDBCollection extends MonetDBConfigurable implements 
Collection {
-       private Service[] serviceInstances;
-       private final Connection jdbccon;
-
-       /**
-        * Constructs a new MonetDB Collection and initialises its
-        * knownServices array.
-        *
-        * @param con a JDBC connection to a MonetDB database
-        */
-       MonetDBCollection(MonetConnection con) {
-               jdbccon = con;
-               // initially fill the serviceInstances array
-               serviceInstances = new Service[1];
-               serviceInstances[0] = new MonetDBXQueryService();
-       }
-       
-       /**
-        * Returns the name associated with the Collection instance.
-        *
-        * @return the name of the object.
-        * @throws XMLDBException with expected error codes.<br />
-        *  ErrorCodes.VENDOR_ERROR for any vendor specific errors that
-        *  occur.
-        */
-       public String getName() throws XMLDBException {
-               return("MonetDBCollection");
-       }
-
-       /**
-        * Provides a list of all services known to the collection.  If no
-        * services are known an empty list is returned.
-        * <p />
-        * In MonetDB/XQuery's case we return a list with an XQueryService
-        * implementation.
-        *
-        * @return An array of registered Service implementations.
-        * @throws XMLDBException with expected error codes.<br />
-        *  ErrorCodes.VENDOR_ERROR for any vendor specific errors that
-        *  occur.<br />
-        *  ErrorCodes.COLLECTION_CLOSED if the close method has been called
-        *  on the Collection
-        */
-       public Service[] getServices() throws XMLDBException {
-               if (!isOpen()) throw
-                       new XMLDBException(ErrorCodes.COLLECTION_CLOSED);
-
-               // We should return a list with all supported Services.
-               return((Service[])(serviceInstances.clone()));
-       }
-
-       /**
-        * Returns a Service instance for the requested service name and
-        * version.  If no Service exists for those parameters a null value
-        * is returned.
-        *
-        * @param name Description of Parameter
-        * @param version Description of Parameter
-        * @return the Service instance or null if no Service could be found.
-        * @throws XMLDBException with expected error codes.<br />
-        *  ErrorCodes.VENDOR_ERROR for any vendor specific errors that
-        *  occur.<br />
-        *  ErrorCodes.COLLECTION_CLOSED if the close method has been called
-        *  on the Collection
-        */
-       public Service getService(String name, String version) throws 
XMLDBException {
-               if (!isOpen()) throw
-                       new XMLDBException(ErrorCodes.COLLECTION_CLOSED);
-               
-               // Iterate over all known Services.  Get their name and version
-               // using getName() and getVersion and do the comparison.
-               for (int i = 0; i < serviceInstances.length; i++) {
-                       if (serviceInstances[i].getName().equals(name) &&
-                                       
serviceInstances[i].getVersion().equals(version))
-                       {
-                               // use reflection to call the right constructor
-                               try {
-                                       Class[] param = { MonetStatement.class, 
MonetDBCollection.class };
-                                       Object[] args = new Object[2];
-                                       args[0] = 
(MonetStatement)(jdbccon.createStatement());
-                                       args[1] = this;
-                                       return((Service)
-                                               
serviceInstances[i].getClass().getConstructor(param).newInstance(args));
-                               } catch (NoSuchMethodException e) {
-                                       throw new 
XMLDBException(ErrorCodes.VENDOR_ERROR, "Internal error: no suitable 
constructor for the requested service found!");
-                               } catch (Exception e) {
-                                       // intentionally include the Exception 
name, this
-                                       // includes: InstantiationException,
-                                       // IllegalAccessException,
-                                       // InvocationTargetException, 
SQLException
-                                       throw new 
XMLDBException(ErrorCodes.VENDOR_ERROR, e.toString());
-                               }
-                       }
-               }
-
-               // finally, if not found, return null
-               return(null);
-       }
-
-       /**
-        * Returns the parent collection for this collection or null if no
-        * parent collection exists.
-        *
-        * @return the parent Collection instance.
-        * @throws XMLDBException with expected error codes.<br />
-        *  ErrorCodes.VENDOR_ERROR for any vendor specific errors that
-        *  occur.<br />
-        *  ErrorCodes.COLLECTION_CLOSED if the close method has been called
-        *  on the Collection
-        */
-       public Collection getParentCollection() throws XMLDBException {
-               if (!isOpen()) throw
-                       new XMLDBException(ErrorCodes.COLLECTION_CLOSED);
-               
-               // I do it quick 'n' dirty for now.  There exists no recursion,
-               // so there is never a parent.
-               return(null);
-       }
-
-       /**
-        * Returns the number of child collections under this Collection or
-        * 0 if no child collections exist.
-        *
-        * @return the number of child collections.
-        * @throws XMLDBException with expected error codes.<br />
-        *  ErrorCodes.VENDOR_ERROR for any vendor specific errors that
-        *  occur.<br />
-        *  ErrorCodes.COLLECTION_CLOSED if the close method has been called
-        *  on the Collection
-        */
-       public int getChildCollectionCount() throws XMLDBException {
-               if (!isOpen()) throw
-                       new XMLDBException(ErrorCodes.COLLECTION_CLOSED);
-               
_______________________________________________
Checkin-list mailing list
[email protected]
http://mail.monetdb.org/mailman/listinfo/checkin-list

Reply via email to