org.mmbase.storage.implementation.database
Class DatabaseStorageLookup

java.lang.Object
  extended byorg.mmbase.util.xml.DocumentReader
      extended byorg.mmbase.storage.implementation.database.DatabaseStorageLookup

public class DatabaseStorageLookup
extends DocumentReader

Represents a xml document that can be used to determine the database configuration resource, based on a database's metadata.

Since:
MMBase-1.7
Version:
$Id: DatabaseStorageLookup.java,v 1.4 2004/02/05 08:23:58 pierre Exp $
Author:
Pierre van Rooden

Field Summary
static java.lang.String DTD_DATABASE_STORAGE_LOOKUP
          DTD resource filename of the most Database DTD
static java.lang.String DTD_DATABASE_STORAGE_LOOKUP_1_0
          DTD resource filename of the Database DTD version 1.0
static java.lang.String PUBLIC_ID_DATABASE_STORAGE_LOOKUP
          Public ID of the most recent Database DTD
static java.lang.String PUBLIC_ID_DATABASE_STORAGE_LOOKUP_1_0
          Public ID of the Storage DTD version 1.0
 
Fields inherited from class org.mmbase.util.xml.DocumentReader
document, DTD_ERROR, DTD_ERROR_1_0, FILENOTFOUND, PUBLIC_ID_ERROR, PUBLIC_ID_ERROR_1_0
 
Constructor Summary
protected DatabaseStorageLookup()
          Constructor, accesses the storage lookup xml resource
 
Method Summary
protected  java.lang.String getResourcePath(java.sql.DatabaseMetaData dmd)
          Obtain an path to a database configuration resource
static void registerPublicIDs()
          Register the Public Ids for DTDs used by StorageReader This method is called by XMLEntityResolver.
 
Methods inherited from class org.mmbase.util.xml.DocumentReader
getDocumentBuilder, getDocumentBuilder, getFileName, getNodeTextValue, validate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PUBLIC_ID_DATABASE_STORAGE_LOOKUP_1_0

public static final java.lang.String PUBLIC_ID_DATABASE_STORAGE_LOOKUP_1_0
Public ID of the Storage DTD version 1.0

See Also:
Constant Field Values

DTD_DATABASE_STORAGE_LOOKUP_1_0

public static final java.lang.String DTD_DATABASE_STORAGE_LOOKUP_1_0
DTD resource filename of the Database DTD version 1.0

See Also:
Constant Field Values

PUBLIC_ID_DATABASE_STORAGE_LOOKUP

public static final java.lang.String PUBLIC_ID_DATABASE_STORAGE_LOOKUP
Public ID of the most recent Database DTD

See Also:
Constant Field Values

DTD_DATABASE_STORAGE_LOOKUP

public static final java.lang.String DTD_DATABASE_STORAGE_LOOKUP
DTD resource filename of the most Database DTD

See Also:
Constant Field Values
Constructor Detail

DatabaseStorageLookup

protected DatabaseStorageLookup()
Constructor, accesses the storage lookup xml resource

Method Detail

registerPublicIDs

public static void registerPublicIDs()
Register the Public Ids for DTDs used by StorageReader This method is called by XMLEntityResolver.


getResourcePath

protected java.lang.String getResourcePath(java.sql.DatabaseMetaData dmd)
                                    throws java.sql.SQLException,
                                           StorageConfigurationException
Obtain an path to a database configuration resource

Parameters:
dmd - the database meta data
Returns:
The database configuration resource, or null if it cannot be determined
Throws:
java.sql.SQLException
StorageConfigurationException


MMBase build 1.7.1.20041002