org.mmbase.storage.implementation.database
Class DatabaseStorageLookup

Package class diagram package DatabaseStorageLookup
java.lang.Object
  extended by org.mmbase.util.xml.DocumentReader
      extended by org.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 45315 2011-02-18 20:23:11Z michiel $
Author:
Pierre van Rooden

Field Summary
static String DTD_DATABASE_STORAGE_LOOKUP
          DTD resource filename of the most Database DTD
static String DTD_DATABASE_STORAGE_LOOKUP_1_0
          DTD resource filename of the Database DTD version 1.0
static String PUBLIC_ID_DATABASE_STORAGE_LOOKUP
          Public ID of the most recent Database DTD
static 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
DatabaseStorageLookup()
          Constructor, accesses the storage lookup xml resource
 
Method Summary
(package private)  String getMetaURL(Class clazz)
          Returns an given connection URL for a given Driver CLass.
(package private)  String getResourcePath(DatabaseMetaData dmd)
          Obtain an path to a database configuration resource
 
Methods inherited from class org.mmbase.util.xml.DocumentReader
appendChild, getAttribute, getChildElements, getChildElements, getChildElements, getChildElements, getDocument, getDocumentBuilder, getDocumentBuilder, getDocumentBuilder, getDocumentBuilder, getElementAttributeValue, getElementAttributeValue, getElementByPath, getElementByPath, getElementName, getElementValue, getElementValue, getNodeTextValue, getNodeTextValue, getRootElement, getSystemId, hasAttribute, main, registerPublicIDs, setNodeTextValue, setPrefix, setSystemId, toDocument, validate, 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 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 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 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 String DTD_DATABASE_STORAGE_LOOKUP
DTD resource filename of the most Database DTD

See Also:
Constant Field Values
Constructor Detail

DatabaseStorageLookup

DatabaseStorageLookup()
Constructor, accesses the storage lookup xml resource

Method Detail

getResourcePath

String getResourcePath(DatabaseMetaData dmd)
                 throws 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:
SQLException
StorageConfigurationException

getMetaURL

String getMetaURL(Class clazz)
Returns an given connection URL for a given Driver CLass. Or null if no such thing was defined in lookup.xml. In that case the configured URL in MMBase can be used.

Since:
MMBase-1.8


MMBase2 Core 2.0-SNAPSHOT - 2013-03-30T06:36