|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--dke.smwp.db.DB_XML_Document
handling XML document which are stored in database.
no method for update necessary; updating Clob data works by getting the
Reader handle via the read
method to manipulate the Reader
directly
Field Summary | |
private static java.lang.String |
TABLENAME_SMWP_XML_DOCUMENT
tablename for storing xml documents |
private static java.lang.String |
TABLENAME_SMWP_XML_DOCUMENT_PARAMS
tablename for storing metadata for xml documents |
Constructor Summary | |
DB_XML_Document()
default constructor |
Method Summary | |
void |
delete(java.sql.Connection con,
java.lang.String file_systemID)
deletes xml document saved in database designated by file_systemID |
boolean |
documentExists(java.sql.Connection con,
java.lang.String file_systemID)
checks if xml document designated by file_systemID
exists in database |
java.lang.String[] |
getAllSystemid(java.sql.Connection con)
gets the filenames (systemID's) of all saved xml documents |
java.io.Reader |
read(java.sql.Connection con,
java.lang.String file_systemID)
gets the reader handle for xml document saved in database, designated by file_systemID |
void |
save(java.sql.Connection con,
java.lang.String pc_name,
java.lang.String file_systemID,
java.io.Reader file_content,
java.util.Hashtable parameters)
saves xml document and to database |
Methods inherited from class java.lang.Object |
|
Field Detail |
private static final java.lang.String TABLENAME_SMWP_XML_DOCUMENT
private static final java.lang.String TABLENAME_SMWP_XML_DOCUMENT_PARAMS
Constructor Detail |
public DB_XML_Document()
Method Detail |
public void delete(java.sql.Connection con, java.lang.String file_systemID) throws java.sql.SQLException
file_systemID
con
- Connection handlefile_systemID
- complete filename (with folder path) for xml documentjava.sql.SQLException
- deletion from database failedpublic boolean documentExists(java.sql.Connection con, java.lang.String file_systemID) throws java.sql.SQLException
file_systemID
exists in databasecon
- Connection handlefile_systemID
- complete filename (with folderpath) for xml document
whose existence is checkedjava.sql.SQLException
- fetching data failedpublic java.lang.String[] getAllSystemid(java.sql.Connection con) throws java.sql.SQLException
con
- Connection handlejava.sql.SQLException
- fetching data failedpublic java.io.Reader read(java.sql.Connection con, java.lang.String file_systemID) throws java.sql.SQLException, java.io.IOException
file_systemID
con
- Connection handlefile_systemID
- complete filename (with folder path) for
xml document whose existence is checkedjava.sql.SQLException
- fetching data failedjava.io.IOException
- getting Reader handle for xml documentpublic void save(java.sql.Connection con, java.lang.String pc_name, java.lang.String file_systemID, java.io.Reader file_content, java.util.Hashtable parameters) throws java.sql.SQLException, java.io.IOException
con
- Connection hanldefile_systemID
- String containing folder and file information
e.g. wineries/winery_styria.xmlfile_content
- file contentpc_name
- name of page class the page belongs toparameters
- parameter names and values used by page class instance;
using parameter names as key and parameter values as valuejava.sql.SQLException
- failed to save datajava.io.IOException
- failed to save Clob
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |