poi/build/jakarta-poi/docs/hssf/use-case.html
Andrew C. Oliver 1ecca52edb PR:
Obtained from:
Submitted by:
Reviewed by:
added built doc files


git-svn-id: https://svn.apache.org/repos/asf/jakarta/poi/trunk@352105 13f79535-47bb-0310-9956-ffa450edef68
2002-02-18 16:12:48 +00:00

481 lines
8.9 KiB
HTML

<html>
<head>
<META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>HSSF Use Cases</title>
</head>
<body bgcolor="#ffffff" marginheight="4" marginwidth="4" leftmargin="4" topmargin="4" alink="#023264" vlink="#023264" link="#525D76" text="#000000">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td align="left" valign="top"><a href="http://jakarta.apache.org/index.html"><img src="images/jakarta-logo.gif" border="0" vspace="0" hspace="0"></a></td><td bgcolor="#ffffff" align="left" valign="top" width="100%"><img src="images/header.gif" align="right" border="0" vspace="0" hspace="0"></td>
</tr>
<tr>
<td colspan="2" height="2" width="100%">
<hr size="1" noshade="">
</td>
</tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td valign="top" width="1%"></td><td nowrap="1" valign="top" width="14%">
<br>
<font face="arial,helvetica,sanserif">
<br>
<font size="+1" color="#000000">Navigation</font><font size="-1">
<ul>
<li>
<a href="../index.html"><font size="-1">Main</font></a>
</li>
</ul>
</font>
<br>
<font size="+1" color="#000000">HSSF</font><font size="-1">
<ul>
<li>
<a href="how-to.html"><font size="-1">HOWTO</font></a>
</li>
<li>
<a href="use-case.html"><font size="-1">Use Case</font></a>
</li>
</ul>
</font>
<br>
<br>
</font></td><td align="left" valign="top" width="*">
<title>HSSF Use Cases</title>
<center>
<table width="80%">
<tr>
<td bgcolor="#F3DD61"><font face="Arial,sans-serif" size="+1">
<center>
<b>HSSF Use Cases</b>
</center>
</font></td>
</tr>
</table>
</center>
<font size="-2" color="#000000">
<p>
<a href="mailto:"></a>
</p>
</font>
<br>
<div align="right">
<table cellspacing="0" cellpadding="2" border="0" width="100%">
<tr>
<td bgcolor="#525D76"><font color="#ffffff" size="+1"><font face="Arial,sans-serif"><b>HSSF Use Cases</b></font></font></td>
</tr>
<tr>
<td>
<br>
<div align="right">
<table cellspacing="0" cellpadding="2" border="0" width="99%">
<tr>
<td bgcolor="#525D76"><font color="#ffffff" size="+0"><font face="Arial,sans-serif"><b>Use Case 1: Read existing HSSF</b></font></font></td>
</tr>
<tr>
<td>
<br>
<p align="justify">
<em>Primary Actor:</em> HSSF client</p>
<p align="justify">
<em>Scope:</em> HSSF</p>
<p align="justify">
<em>Level:</em> Summary</p>
<p align="justify">
<em>Stakeholders and Interests:</em>
</p>
<ul>
<li>HSSF client- wants to read content
of HSSF file</li>
<li>HSSF - understands HSSF file</li>
<li>POIFS - understands underlying POI
file system</li>
</ul>
<p align="justify">
<em>Precondition:</em> None</p>
<p align="justify">
<em>Minimal Guarantee:</em> None</p>
<p align="justify">
<em>Main Success Guarantee:</em>
</p>
<ol>
<li>HSSF client requests HSSF to read
a HSSF file, providing an InputStream
containing HSSF file in question.</li>
<li>HSSF requests POIFS to read the HSSF
file, passing the InputStream
object to POIFS (POIFS use case 1, read existing file system)</li>
<li>HSSF reads the "Workbook"
file (use case 4, read workbook entry)</li>
</ol>
<p align="justify">
<em>Extensions:</em>
</p>
<p align="justify">2a. Exceptions
thrown by POIFS will be passed on to the HSSF client.</p>
</td>
</tr>
</table>
</div>
<br>
<div align="right">
<table cellspacing="0" cellpadding="2" border="0" width="99%">
<tr>
<td bgcolor="#525D76"><font color="#ffffff" size="+0"><font face="Arial,sans-serif"><b>Use Case 2: Write HSSF file</b></font></font></td>
</tr>
<tr>
<td>
<br>
<p align="justify">
<em>Primary Actor:</em> HSSF client</p>
<p align="justify">
<em>Scope:</em> HSSF</p>
<p align="justify">
<em>Level:</em> Summary</p>
<p align="justify">
<em>Stakeholders and Interests:</em>
</p>
<ul>
<li>HSSF client- wants to write file
out.</li>
<li>HSSF - knows how to write file
out.</li>
<li>POIFS - knows how to write file
system out.</li>
</ul>
<p align="justify">
<em>Precondition:</em>
</p>
<ul>
<li>File has been
read (use case 1, read existing HSSF file) and subsequently modified
or file has been created (use case 3, create HSSF file)</li>
</ul>
<p align="justify">
<em>Minimal Guarantee:</em> None</p>
<p align="justify">
<em>Main Success Guarantee:</em>
</p>
<ol>
<li>HSSF client
provides an OutputStream to
write the file to.</li>
<li>HSSF writes
the "Workbook" to its associated POIFS file system (use case
5, write workbook entry)</li>
<li>HSSF
requests POIFS to write its file system out, using the OutputStream
obtained from the HSSF client (POIFS use case 2, write file system).</li>
</ol>
<p align="justify">
<em>Extensions:</em>
</p>
<p align="justify">3a. Exceptions
from POIFS are passed to the HSSF client.</p>
</td>
</tr>
</table>
</div>
<br>
<div align="right">
<table cellspacing="0" cellpadding="2" border="0" width="99%">
<tr>
<td bgcolor="#525D76"><font color="#ffffff" size="+0"><font face="Arial,sans-serif"><b>Use Case 3:Create HSSF file</b></font></font></td>
</tr>
<tr>
<td>
<br>
<p align="justify">
<em>Primary Actor:</em> HSSF client</p>
<p align="justify">
<em>Scope:</em> HSSF</p>
<p align="justify">
<em>Level:</em> Summary</p>
<p align="justify">
<em>Stakeholders and Interests:</em>
</p>
<ul>
<li>HSSF client- wants to create a new
file.</li>
<li>HSSF - knows how to create a new
file.</li>
<li>POIFS - knows how to creat a new
file system.</li>
</ul>
<p align="justify">
<em>Precondition:</em>
</p>
<p align="justify">
<em>Minimal Guarantee:</em> None</p>
<p align="justify">
<em>Main Success Guarantee:</em>
</p>
<ol>
<li>HSSF requests
POIFS to create a new file system (POIFS use case 3, create new file
system)</li>
</ol>
<p align="justify">
<em>Extensions:</em>
None</p>
</td>
</tr>
</table>
</div>
<br>
<div align="right">
<table cellspacing="0" cellpadding="2" border="0" width="99%">
<tr>
<td bgcolor="#525D76"><font color="#ffffff" size="+0"><font face="Arial,sans-serif"><b>Use Case 4: Read workbook entry</b></font></font></td>
</tr>
<tr>
<td>
<br>
<p align="justify">
<em>Primary Actor:</em> HSSF</p>
<p align="justify">
<em>Scope:</em> HSSF</p>
<p align="justify">
<em>Level:</em> Summary</p>
<p align="justify">
<em>Stakeholders and Interests:</em>
</p>
<ul>
<li>HSSF - knows how to read the
workbook entry</li>
<li>POIFS - knows how to manage the file
system.</li>
</ul>
<p align="justify">
<em>Precondition:</em>
</p>
<ul>
<li>The file
system has been read (use case 1, read existing HSSF file) or has
been created and written to (use case 3, create HSSF file system;
use case 5, write workbook entry).</li>
</ul>
<p align="justify">
<em>Minimal
Guarantee:</em> None</p>
<p align="justify">
<em>Main Success Guarantee:</em>
</p>
<ol>
<li>
HSSF requests POIFS for the "Workbook" file</li>
<li>POIFS returns
an InputStream for the file.</li>
<li>HSSF reads
from the InputStream provided by POIFS</li>
<li>HSSF closes
the InputStream provided by POIFS</li>
</ol>
<p align="justify">
<em>Extensions:</em>
</p>
<p align="justify">3a. Exceptions
thrown by POIFS will be passed on</p>
</td>
</tr>
</table>
</div>
<br>
<div align="right">
<table cellspacing="0" cellpadding="2" border="0" width="99%">
<tr>
<td bgcolor="#525D76"><font color="#ffffff" size="+0"><font face="Arial,sans-serif"><b>Use Case 5: Write workbook entry</b></font></font></td>
</tr>
<tr>
<td>
<br>
<p align="justify">
<em>Primary Actor:</em> HSSF</p>
<p align="justify">
<em>Scope:</em> HSSF</p>
<p align="justify">
<em>Level:</em> Summary</p>
<p align="justify">
<em>Stakeholders and Interests:</em>
</p>
<ul>
<li>HSSF - knows how to manage the
write the workbook entry.</li>
<li>POIFS - knows how to manage the file
system.</li>
</ul>
<p align="justify">
<em>Precondition:</em>
</p>
<ul>
<li>Either an existing HSSF file has
been read (use case 1, read existing HSSF file) or an HSSF file has
been created (use case 3, create HSSF file).</li>
</ul>
<p align="justify">
<em>Minimal Guarantee:</em> None</p>
<p align="justify">
<em>Main Success Guarantee:</em>
</p>
<ol>
<li>HSSF
checks the POIFS file system directory for the "Workbook"
file (POIFS use case 8, read file system directory)</li>
<li>If "Workbook" is in the directory, HSSF requests POIFS to
replace it with the new workbook entry (POIFS use case 4, replace file
in file system). Otherwise, HSSF requests POIFS to write the new
workbook file, with the name "Workbook" (POIFS use case 6,
write new file to file system)</li>
</ol>
<p align="justify">
<em>Extensions:</em>None</p>
</td>
</tr>
</table>
</div>
<br>
</td>
</tr>
</table>
</div>
<br>
</td>
</tr>
</table>
<br>
<table cellpadding="0" cellspacing="0" border="0" width="100%">
<tr>
<td>
<hr size="1" noshade="">
</td>
</tr>
<tr>
<td align="center"><font color="#525D76" size="-1" face="arial,helvetica,sanserif"><i>
Copyright &copy;2002 Apache Software Foundation
</i></font></td><td width="5%" align="right"><img src="images/cocoon2-small.jpg" align="right" border="0" vspace="0" hspace="0"></td>
</tr>
</table>
</body>
</html>