public final class MPDDatabaseReader extends Object implements ProjectReader
| Constructor and Description |
|---|
MPDDatabaseReader() |
| Modifier and Type | Method and Description |
|---|---|
void |
addProjectListener(ProjectListener listener)
Add a listener to receive events as a project is being read.
|
Map<Integer,String> |
listProjects()
Populates a Map instance representing the IDs and names of
projects available in the current database.
|
ProjectFile |
read()
Read project data from a database.
|
ProjectFile |
read(File file)
Read a file where a File instance is supplied.
|
ProjectFile |
read(InputStream inputStream)
Read a file where the contents of the project file
are supplied via an input stream.
|
ProjectFile |
read(String accessDatabaseFileName)
This is a convenience method which reads the first project
from the named MPD file using the JDBC-ODBC bridge driver.
|
void |
setConnection(Connection connection)
Sets the connection.
|
void |
setDataSource(DataSource dataSource)
Set the data source.
|
void |
setPreserveNoteFormatting(boolean preserveNoteFormatting)
This method sets a flag to indicate whether the RTF formatting associated
with notes should be preserved or removed.
|
void |
setProjectID(int projectID)
Set the ID of the project to be read.
|
public void addProjectListener(ProjectListener listener)
addProjectListener in interface ProjectReaderlistener - ProjectListener instancepublic Map<Integer,String> listProjects() throws MPXJException
MPXJExceptionpublic ProjectFile read() throws MPXJException
MPXJExceptionpublic void setProjectID(int projectID)
projectID - project IDpublic void setPreserveNoteFormatting(boolean preserveNoteFormatting)
preserveNoteFormatting - boolean flagpublic void setDataSource(DataSource dataSource)
dataSource - data sourcepublic void setConnection(Connection connection)
connection - database connectionpublic ProjectFile read(String accessDatabaseFileName) throws MPXJException
read in interface ProjectReaderaccessDatabaseFileName - access database file nameMPXJExceptionpublic ProjectFile read(File file) throws MPXJException
read in interface ProjectReaderfile - File instanceMPXJExceptionpublic ProjectFile read(InputStream inputStream)
read in interface ProjectReaderinputStream - InputStream instanceCopyright © 2013. All Rights Reserved.