org.vizzini.database
Class DBDescriptor

java.lang.Object
  extended by org.vizzini.database.DBDescriptor

 class DBDescriptor
extends Object

Provides a database descriptor.

Since:
v0.3
Version:
v0.3
Author:
Jeffrey M. Thompson

Constructor Summary
DBDescriptor(Document document)
          Construct this object from the given file.
DBDescriptor(File file)
          Construct this object from the given file.
DBDescriptor(InputStream inputStream)
          Construct this object from the given input stream.
 
Method Summary
 void add(JoinData joinData)
          Add the given join data.
 void add(TableData tableData)
          Add the given table data.
protected  TableData createJunctionTableData(JunctionData junctionData)
          Create a junction table data object from the given junction data.
 Iterator getJoinData()
          Return an iterator over the join data.
 String getName()
          Return the database name prefix.
 Iterator getTableData()
          Return an iterator over the table data.
 TableData getTableData(String tableName)
          Return the table data with the given name.
protected  void inflate(Element element)
          Inflate this object from the given XML element.
protected  void init(Document document)
          Construct this object from the given file.
 String toString()
          Return a string representation of this object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DBDescriptor

public DBDescriptor(Document document)
             throws ClassNotFoundException
Construct this object from the given file.

Throws:
ClassNotFoundException
Since:
v0.3

DBDescriptor

public DBDescriptor(File file)
             throws ParserConfigurationException,
                    SAXException,
                    IOException,
                    ClassNotFoundException
Construct this object from the given file.

Throws:
ParserConfigurationException
SAXException
IOException
ClassNotFoundException
Since:
v0.3

DBDescriptor

public DBDescriptor(InputStream inputStream)
             throws ParserConfigurationException,
                    SAXException,
                    IOException,
                    ClassNotFoundException
Construct this object from the given input stream.

Throws:
ParserConfigurationException
SAXException
IOException
ClassNotFoundException
Since:
v0.3
Method Detail

add

public void add(TableData tableData)
Add the given table data.

Since:
v0.3

add

public void add(JoinData joinData)
Add the given join data.

Since:
v0.3

getJoinData

public Iterator getJoinData()
Return an iterator over the join data.

Since:
v0.3

getName

public String getName()
Return the database name prefix.

Since:
v0.3

getTableData

public Iterator getTableData()
Return an iterator over the table data.

Since:
v0.3

getTableData

public TableData getTableData(String tableName)
Return the table data with the given name.

Since:
v0.3

toString

public String toString()
Return a string representation of this object.

Overrides:
toString in class Object
Since:
v0.3

createJunctionTableData

protected TableData createJunctionTableData(JunctionData junctionData)
Create a junction table data object from the given junction data.

Since:
v0.3

inflate

protected void inflate(Element element)
                throws ClassNotFoundException
Inflate this object from the given XML element.

Throws:
ClassNotFoundException
Since:
v0.3

init

protected void init(Document document)
             throws ClassNotFoundException
Construct this object from the given file.

Throws:
ClassNotFoundException
Since:
v0.3


Copyright © 2007 Vizzini.org. All Rights Reserved. 2007.12.25.03.00.02