net.sourceforge.toscanaj.dbviewer
Class DatabaseViewerManager

java.lang.Object
  extended bynet.sourceforge.toscanaj.dbviewer.DatabaseViewerManager
All Implemented Interfaces:
XMLizable

public class DatabaseViewerManager
extends java.lang.Object
implements XMLizable

To do:
the actual storing of the available viewers should not be part of this class, but should be in the ConceptualSchema instead, this class should just have a reference to a list., create some less db-specific abstraction, external templates are automatically inlined when loading from and saving into XML, fix that

Constructor Summary
DatabaseViewerManager(org.jdom.Element viewerDefinition, DatabaseInfo databaseInfo, DatabaseConnection connection)
           
 
Method Summary
static java.util.List getAttributeViewNames()
           
static java.net.URL getBaseURL()
           
 DatabaseConnection getConnection()
           
 java.lang.String getKeyName()
           
static int getNumberOfAttributeViews()
           
static int getNumberOfObjectListViews()
           
static int getNumberOfObjectViews()
           
static java.util.List getObjectListViewNames(DatabaseRetrievedObject object)
           
static java.util.List getObjectViewNames(DatabaseRetrievedObject object)
           
 java.util.Dictionary getParameters()
           
static java.awt.Frame getParentWindow()
           
 java.lang.String getTableName()
           
 org.jdom.Element getTemplate()
           
 java.lang.String getTemplateString()
           
protected  void insertXML(org.jdom.Element elem)
           
static void listsReadXML(org.jdom.Element parentElem, DatabaseInfo databaseInfo, DatabaseConnection connection)
           
static void listsToXML(org.jdom.Element parentElem)
           
protected  void loadText(org.jdom.Element elem)
           
 void readXML(org.jdom.Element elem)
          Read this element as the content of elem.
static void resetRegistry()
           
static void setBaseURL(java.net.URL baseURL)
           
static void setParentComponent(java.awt.Component parentComponent)
           
static void showAttribute(int viewerID, java.lang.String attribute)
           
static void showAttribute(java.lang.String viewName, java.lang.String attribute)
           
static void showObject(int viewerID, DatabaseRetrievedObject object)
           
static void showObject(java.lang.String viewName, DatabaseRetrievedObject object)
           
static void showObjectList(int viewerID, DatabaseRetrievedObject object)
           
static void showObjectList(java.lang.String viewName, DatabaseRetrievedObject object)
           
 org.jdom.Element toXML()
          Write this element as the content of elem.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DatabaseViewerManager

public DatabaseViewerManager(org.jdom.Element viewerDefinition,
                             DatabaseInfo databaseInfo,
                             DatabaseConnection connection)
                      throws DatabaseViewerException
Method Detail

setParentComponent

public static void setParentComponent(java.awt.Component parentComponent)

getParentWindow

public static java.awt.Frame getParentWindow()

showObject

public static void showObject(int viewerID,
                              DatabaseRetrievedObject object)
                       throws DatabaseViewerException
Throws:
DatabaseViewerException

showObject

public static void showObject(java.lang.String viewName,
                              DatabaseRetrievedObject object)
                       throws DatabaseViewerException
Throws:
DatabaseViewerException

showObjectList

public static void showObjectList(int viewerID,
                                  DatabaseRetrievedObject object)
                           throws DatabaseViewerException
Throws:
DatabaseViewerException

showObjectList

public static void showObjectList(java.lang.String viewName,
                                  DatabaseRetrievedObject object)
                           throws DatabaseViewerException
Throws:
DatabaseViewerException

showAttribute

public static void showAttribute(int viewerID,
                                 java.lang.String attribute)
                          throws DatabaseViewerException
Throws:
DatabaseViewerException

showAttribute

public static void showAttribute(java.lang.String viewName,
                                 java.lang.String attribute)
                          throws DatabaseViewerException
Throws:
DatabaseViewerException

getTemplate

public org.jdom.Element getTemplate()

getTemplateString

public java.lang.String getTemplateString()

insertXML

protected void insertXML(org.jdom.Element elem)

loadText

protected void loadText(org.jdom.Element elem)

getParameters

public java.util.Dictionary getParameters()

getTableName

public java.lang.String getTableName()

getKeyName

public java.lang.String getKeyName()

getConnection

public DatabaseConnection getConnection()

getObjectViewNames

public static java.util.List getObjectViewNames(DatabaseRetrievedObject object)

getObjectListViewNames

public static java.util.List getObjectListViewNames(DatabaseRetrievedObject object)

getAttributeViewNames

public static java.util.List getAttributeViewNames()

getNumberOfObjectViews

public static int getNumberOfObjectViews()

getNumberOfObjectListViews

public static int getNumberOfObjectListViews()

getNumberOfAttributeViews

public static int getNumberOfAttributeViews()

resetRegistry

public static void resetRegistry()

listsToXML

public static void listsToXML(org.jdom.Element parentElem)

listsReadXML

public static void listsReadXML(org.jdom.Element parentElem,
                                DatabaseInfo databaseInfo,
                                DatabaseConnection connection)
                         throws DatabaseViewerException
Throws:
DatabaseViewerException

toXML

public org.jdom.Element toXML()
Description copied from interface: XMLizable
Write this element as the content of elem.

Specified by:
toXML in interface XMLizable

readXML

public void readXML(org.jdom.Element elem)
             throws XMLSyntaxError
Description copied from interface: XMLizable
Read this element as the content of elem.

Specified by:
readXML in interface XMLizable
Throws:
XMLSyntaxError

setBaseURL

public static void setBaseURL(java.net.URL baseURL)

getBaseURL

public static java.net.URL getBaseURL()


The ToscanaJ project