You are viewing a plain text version of this content. The canonical link for it is here.
Posted to xindice-dev@xml.apache.org by vg...@apache.org on 2004/01/22 04:23:37 UTC

cvs commit: xml-xindice/java/src/org/apache/xindice/client/xmldb/xmlrpc DatabaseImpl.java

vgritsenko    2004/01/21 19:23:37

  Modified:    java/src/org/apache/xindice/client/xmldb DatabaseImpl.java
               java/src/org/apache/xindice/client/xmldb/embed
                        DatabaseImpl.java
               java/src/org/apache/xindice/client/xmldb/managed
                        ManagedDatabaseImpl.java
               java/src/org/apache/xindice/client/xmldb/xmlrpc
                        DatabaseImpl.java
  Added:       java/lib xmldb-api-20030701.jar xmldb-api-sdk-20030701.jar
                        xmldb-common-20030701.jar
  Removed:     java/lib xmldb-api-20021118.jar xmldb-api-sdk-20021118.jar
                        xmldb-common.jar
  Log:
  Update XML:DB APIs to the latest snapshot (last change was sometime in 200306).
  Add getNames() method to DatabaseImpls.
  
  Revision  Changes    Path
  1.1                  xml-xindice/java/lib/xmldb-api-20030701.jar
  
  	<<Binary file>>
  
  
  1.1                  xml-xindice/java/lib/xmldb-api-sdk-20030701.jar
  
  	<<Binary file>>
  
  
  1.1                  xml-xindice/java/lib/xmldb-common-20030701.jar
  
  	<<Binary file>>
  
  
  1.24      +24 -7     xml-xindice/java/src/org/apache/xindice/client/xmldb/DatabaseImpl.java
  
  Index: DatabaseImpl.java
  ===================================================================
  RCS file: /home/cvs/xml-xindice/java/src/org/apache/xindice/client/xmldb/DatabaseImpl.java,v
  retrieving revision 1.23
  retrieving revision 1.24
  diff -u -r1.23 -r1.24
  --- DatabaseImpl.java	14 Dec 2003 18:02:14 -0000	1.23
  +++ DatabaseImpl.java	22 Jan 2004 03:23:37 -0000	1.24
  @@ -92,19 +92,24 @@
        *
        * XML-RPC is the default.
        */
  -    public static String XMLRPC_URI = "xindice://";
  -    public static String EMBED_URI = "xindice-embed://";
  -    public static String MANAGED_URI = "xindice-managed://";
  +    public static final String XMLRPC_URI = "xindice://";
  +    public static final String EMBED_URI = "xindice-embed://";
  +    public static final String MANAGED_URI = "xindice-managed://";
   
       /**
        * Name used in the uri for collections associated with this instance.
        */
  -    public static String INSTANCE_NAME = "xindice, xindice-embed, xindice-managed";
  +    public static final String INSTANCE_NAME = "xindice, xindice-embed, xindice-managed";
  +
  +    /**
  +     * Name used in the uri for collections associated with this instance.
  +     */
  +    private static final String[] INSTANCE_NAMES = {"xindice", "xindice-embed", "xindice-managed"};
   
       /**
        * The XML:DB API Core Level Conformance of this implementation.
        */
  -    public static String CONFORMANCE_LEVEL = "0";
  +    public static final String CONFORMANCE_LEVEL = "0";
   
       /**
        * Constructor for the DatabaseImpl object
  @@ -124,6 +129,18 @@
        */
       public String getName() throws XMLDBException {
           return INSTANCE_NAME;
  +    }
  +
  +    /**
  +     * Returns an array of names associated with the Database instance.
  +     *
  +     * @return the array of name of the object.
  +     * @exception XMLDBException with expected error codes.<br />
  +     *  <code>ErrorCodes.VENDOR_ERROR</code> for any vendor
  +     *  specific errors that occur.<br />
  +     */
  +    public String[] getNames() throws XMLDBException {
  +        return INSTANCE_NAMES;
       }
   
       /**
  
  
  
  1.22      +15 -3     xml-xindice/java/src/org/apache/xindice/client/xmldb/embed/DatabaseImpl.java
  
  Index: DatabaseImpl.java
  ===================================================================
  RCS file: /home/cvs/xml-xindice/java/src/org/apache/xindice/client/xmldb/embed/DatabaseImpl.java,v
  retrieving revision 1.21
  retrieving revision 1.22
  diff -u -r1.21 -r1.22
  --- DatabaseImpl.java	14 Dec 2003 18:02:14 -0000	1.21
  +++ DatabaseImpl.java	22 Jan 2004 03:23:37 -0000	1.22
  @@ -97,7 +97,7 @@
       /**
        * XML:DB conformance level of this driver
        */
  -    private String CONFORMANCE_LEVEL = "0";
  +    private static final String CONFORMANCE_LEVEL = "0";
   
       /**
        * Database instance
  @@ -330,6 +330,18 @@
        */
       public String getName() throws XMLDBException {
           return DRIVER_NAME;
  +    }
  +
  +    /**
  +     * Returns an array of names associated with the Database instance.
  +     *
  +     * @return the array of name of the object.
  +     * @exception XMLDBException with expected error codes.<br />
  +     *  <code>ErrorCodes.VENDOR_ERROR</code> for any vendor
  +     *  specific errors that occur.<br />
  +     */
  +    public String[] getNames() throws XMLDBException {
  +        return new String[]{ getName() };
       }
   
       /**
  
  
  
  1.7       +9 -2      xml-xindice/java/src/org/apache/xindice/client/xmldb/managed/ManagedDatabaseImpl.java
  
  Index: ManagedDatabaseImpl.java
  ===================================================================
  RCS file: /home/cvs/xml-xindice/java/src/org/apache/xindice/client/xmldb/managed/ManagedDatabaseImpl.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- ManagedDatabaseImpl.java	11 Dec 2003 11:48:54 -0000	1.6
  +++ ManagedDatabaseImpl.java	22 Jan 2004 03:23:37 -0000	1.7
  @@ -142,6 +142,13 @@
           return DRIVER_NAME;
       }
   
  +    /* (non-Javadoc)
  +    * @see org.xmldb.api.base.Database#getNames()
  +    */
  +    public String[] getNames() {
  +        return new String[]{ DRIVER_NAME };
  +    }
  +
       /**
        * Retrieves a <code>Collection</code> instance based on the URI provided
        * in the <code>uri</code> parameter. The format of the URI is defined in the
  
  
  
  1.18      +16 -4     xml-xindice/java/src/org/apache/xindice/client/xmldb/xmlrpc/DatabaseImpl.java
  
  Index: DatabaseImpl.java
  ===================================================================
  RCS file: /home/cvs/xml-xindice/java/src/org/apache/xindice/client/xmldb/xmlrpc/DatabaseImpl.java,v
  retrieving revision 1.17
  retrieving revision 1.18
  diff -u -r1.17 -r1.18
  --- DatabaseImpl.java	16 Aug 2003 03:47:36 -0000	1.17
  +++ DatabaseImpl.java	22 Jan 2004 03:23:37 -0000	1.18
  @@ -117,12 +117,12 @@
       /**
        * Prefix used to denote XML:DB URI's that should use this driver
        */
  -    static String DRIVER_NAME = "xindice";
  +    public static final String DRIVER_NAME = "xindice";
   
       /**
        * XML:DB conformance level of this driver
        */
  -    private String CONFORMANCE_LEVEL = "0";
  +    private static final String CONFORMANCE_LEVEL = "0";
   
       /**
        * Ensures that XML-RPC initialized just once
  @@ -315,6 +315,18 @@
        */
       public String getName() throws XMLDBException {
           return DRIVER_NAME;
  +    }
  +
  +    /**
  +     * Returns an array of names associated with the Database instance.
  +     *
  +     * @return the array of name of the object.
  +     * @exception XMLDBException with expected error codes.<br />
  +     *  <code>ErrorCodes.VENDOR_ERROR</code> for any vendor
  +     *  specific errors that occur.<br />
  +     */
  +    public String[] getNames() throws XMLDBException {
  +        return new String[]{ getName() };
       }
   
       /**