Main Page | Packages | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | Related Pages

com.arcle.rmt.j2se.bridge.BridgeFacade Class Reference

Singleton facade class that encapsulates the import/export functionalities. More...

List of all members.

Public Member Functions

RQMLDocument importSuperwabaDocument (File pdbFile, PrintWriter log) throws BridgeFacadeException
 Loads a SuperWaba .pdb file into an RQMLDocument suitable for editing in the desktop.

void exportSuperwabaDocument (RQMLDocument desktopDoc, File pdbFile, PrintWriter log) throws BridgeFacadeException
 Exports a desktop document to the specified file formatted as a handheld document (SuperWaba .pdb file).


Static Public Member Functions

synchronized BridgeFacade getInstance ()
 Returns the singleton instance.


Protected Member Functions

Document openSuperwabaDocument (File pdbFile) throws IOException
 Opens a handheld document file.

void pumpElements (Document source, RQMLDocument destination, PrintWriter log)
 Exports the first-class elements from the handheld document into the desktop document.

int pumpElements (RQMLDocument source, Document destination, PrintWriter log)
 Exports first-class elements from a desktop document to the specified handheld document.

String makeCatalogFileName (File file) throws IOException
 Strips the ".pdb" extension from the back of a filename since SuperWaba's Catalog class doesn't like it.

String stripPDBSuffix (String str)
void rethrowException (Exception real) throws BridgeFacadeException
 Packages an exception in a BridgeFacadeException object and rethrow it.


Private Member Functions

 BridgeFacade ()
 This is a singleton class -- do not instantiate this class directly.


Static Private Attributes

BridgeFacade _instance = null
 The singleton instance.


Detailed Description

Singleton facade class that encapsulates the import/export functionalities.

Author:
Sasmito Adibowo
Version:
Id
BridgeFacade.java,v 1.6 2003/05/15 19:43:31 adib Exp

Definition at line 91 of file BridgeFacade.java.


Constructor & Destructor Documentation

com.arcle.rmt.j2se.bridge.BridgeFacade.BridgeFacade  )  [private]
 

This is a singleton class -- do not instantiate this class directly.

Use getInstance() instead.

See also:
getInstance();

Definition at line 97 of file BridgeFacade.java.

Referenced by com.arcle.rmt.j2se.bridge.BridgeFacade.getInstance().


Member Function Documentation

void com.arcle.rmt.j2se.bridge.BridgeFacade.exportSuperwabaDocument RQMLDocument  desktopDoc,
File  pdbFile,
PrintWriter  log
throws BridgeFacadeException
 

Exports a desktop document to the specified file formatted as a handheld document (SuperWaba .pdb file).

Parameters:
desktopDoc The source desktop document.
pdbFile The destination handheld document file.
log Stream that will contain export error messages.

Definition at line 133 of file BridgeFacade.java.

References com.arcle.rmt.j2se.bridge.BridgeFacade.makeCatalogFileName(), com.arcle.rmt.j2se.bridge.BridgeFacade.pumpElements(), com.arcle.rmt.j2se.bridge.BridgeFacade.rethrowException(), com.arcle.rmt.superwaba.model.Document.setTitle(), and com.arcle.rmt.j2se.bridge.BridgeFacade.stripPDBSuffix().

synchronized BridgeFacade com.arcle.rmt.j2se.bridge.BridgeFacade.getInstance  )  [static]
 

Returns the singleton instance.

Definition at line 237 of file BridgeFacade.java.

References com.arcle.rmt.j2se.bridge.BridgeFacade._instance, and com.arcle.rmt.j2se.bridge.BridgeFacade.BridgeFacade().

RQMLDocument com.arcle.rmt.j2se.bridge.BridgeFacade.importSuperwabaDocument File  pdbFile,
PrintWriter  log
throws BridgeFacadeException
 

Loads a SuperWaba .pdb file into an RQMLDocument suitable for editing in the desktop.

Parameters:
pdbFile the handheld document .pdb file.
log Used to record import error messages.
Returns:
an RQMLDocument suitable for editing in the desktop.

Definition at line 112 of file BridgeFacade.java.

References com.arcle.rmt.j2se.bridge.BridgeFacade.openSuperwabaDocument(), com.arcle.rmt.j2se.bridge.BridgeFacade.pumpElements(), and com.arcle.rmt.j2se.bridge.BridgeFacade.rethrowException().

String com.arcle.rmt.j2se.bridge.BridgeFacade.makeCatalogFileName File  file  )  throws IOException [protected]
 

Strips the ".pdb" extension from the back of a filename since SuperWaba's Catalog class doesn't like it.

Definition at line 207 of file BridgeFacade.java.

References com.arcle.rmt.j2se.bridge.BridgeFacade.stripPDBSuffix().

Referenced by com.arcle.rmt.j2se.bridge.BridgeFacade.exportSuperwabaDocument(), and com.arcle.rmt.j2se.bridge.BridgeFacade.openSuperwabaDocument().

Document com.arcle.rmt.j2se.bridge.BridgeFacade.openSuperwabaDocument File  pdbFile  )  throws IOException [protected]
 

Opens a handheld document file.

Parameters:
pdbFile the handheld document file to open.
Returns:
A handheld document instance containing data from the file.

Definition at line 156 of file BridgeFacade.java.

References com.arcle.rmt.superwaba.model.DocumentManager.loadDocument(), and com.arcle.rmt.j2se.bridge.BridgeFacade.makeCatalogFileName().

Referenced by com.arcle.rmt.j2se.bridge.BridgeFacade.importSuperwabaDocument().

int com.arcle.rmt.j2se.bridge.BridgeFacade.pumpElements RQMLDocument  source,
Document  destination,
PrintWriter  log
[protected]
 

Exports first-class elements from a desktop document to the specified handheld document.

Parameters:
source The source desktop document.
destination The destination handheld document.
log Stream to write export error messages.
Returns:
the number of elements successfully exported.

Definition at line 185 of file BridgeFacade.java.

References com.arcle.rmt.j2se.bridge.swexport.SwExportFacade.export(), and com.arcle.rmt.j2se.model.RQMLDocument.getElements().

void com.arcle.rmt.j2se.bridge.BridgeFacade.pumpElements Document  source,
RQMLDocument  destination,
PrintWriter  log
[protected]
 

Exports the first-class elements from the handheld document into the desktop document.

Parameters:
source The source handheld document containg the RQML first-class element data.
destination The target desktop document to fill the data.
log Used to record export error messages.

Definition at line 173 of file BridgeFacade.java.

Referenced by com.arcle.rmt.j2se.bridge.BridgeFacade.exportSuperwabaDocument(), and com.arcle.rmt.j2se.bridge.BridgeFacade.importSuperwabaDocument().

void com.arcle.rmt.j2se.bridge.BridgeFacade.rethrowException Exception  real  )  throws BridgeFacadeException [protected]
 

Packages an exception in a BridgeFacadeException object and rethrow it.

Parameters:
real the "real" exception that was caught.

Definition at line 229 of file BridgeFacade.java.

Referenced by com.arcle.rmt.j2se.bridge.BridgeFacade.exportSuperwabaDocument(), and com.arcle.rmt.j2se.bridge.BridgeFacade.importSuperwabaDocument().

String com.arcle.rmt.j2se.bridge.BridgeFacade.stripPDBSuffix String  str  )  [protected]
 

Definition at line 211 of file BridgeFacade.java.

Referenced by com.arcle.rmt.j2se.bridge.BridgeFacade.exportSuperwabaDocument(), and com.arcle.rmt.j2se.bridge.BridgeFacade.makeCatalogFileName().


Member Data Documentation

BridgeFacade com.arcle.rmt.j2se.bridge.BridgeFacade._instance = null [static, private]
 

The singleton instance.

Definition at line 247 of file BridgeFacade.java.

Referenced by com.arcle.rmt.j2se.bridge.BridgeFacade.getInstance().


The documentation for this class was generated from the following file:
Generated on Fri Jun 18 19:51:36 2004 for Arcle Rambutan by doxygen 1.3.5