poi/build/jakarta-poi/docs/hssf/use-case.html
Andrew C. Oliver d6e98794b4 added logo updates
git-svn-id: https://svn.apache.org/repos/asf/jakarta/poi/trunk@352224 13f79535-47bb-0310-9956-ffa450edef68
2002-03-16 01:41:58 +00:00

517 lines
10 KiB
HTML

<html>
<head>
<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta content="text/html; charset=ISO-8859-1">
<title>HSSF Use Cases</title>
<style type="text/css">
body { background-color: white; font-size: normal; color: black ; }
a { color: #525d76; }
a.black { color: #000000;}
table {border-width: 0; width: 100%}
table.centered {text-align: center}
table.title {text-align: center; width: 80%}
img{border-width: 0;}
span.s1 {font-family: Helvetica, Arial, sans-serif; font-weight: bold; color: #000000; }
span.s1_white { font-family: Helvetica, Arial, sans-serif; font-weight: bold; color: #ffffff; }
span.title {font-family: Helvetica, Arial, sans-serif; font-weight: bold; color: #000000; }
span.c1 {color: #000000; font-family: Helvetica, Arial, sans-serif}
tr.left {text-align: left}
hr { width: 100%; size: 2}
</style>
</head>
<body>
<table width="100%" cellspacing="0" cellpadding="0" border="0">
<tr>
<td valign="top" align="left"><a href="http://jakarta.apache.org/index.html"><img hspace="0" vspace="0" border="0" src="images/jakarta-logo.gif"></a></td><td width="100%" valign="top" align="left" bgcolor="#ffffff"><img hspace="0" vspace="0" border="0" align="right" src="images/header.gif"></td>
</tr>
<tr>
<td colspan="2" bgcolor="#525d76"><span class="c1"><a class="black" href="http://www.apache.org/">www.apache.org &gt;</a><a class="black" href="http://jakarta.apache.org/">jakarta.apache.org &gt;</a><a href="http://jakarta.apache.org/poi/" class="black">jakarta.apache.org/poi</a></span></td>
</tr>
<tr>
<td height="8"></td>
</tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td width="1%">
<br>
</td><td nowrap="1" valign="top" width="14%">
<hr>
<span class="s1">Navigation</span>
<br>
<a class="s1" href="../index.html">Main</a>
<br>
<hr>
<span class="s1">HSSF</span>
<br>
<a class="s1" href="how-to.html">HOWTO</a>
<br>
<a class="s1" href="use-case.html">Use Case</a>
<br>
<a class="s1" href="diagrams.html">Pictorial Docs</a>
<br>
<hr>
<span class="s1">Contributer's Guide</span>
<br>
<a class="s1" href="record-generator.html">Record Generator</a>
<br>
</td><td width="1%">
<br>
</td><td align="left" valign="top" width="*">
<title>HSSF Use Cases</title>
<table width="100%" align="center" class="centered">
<tbody>
<tr>
<td align="center">
<table border="0" cellpadding="1" cellspacing="0" class="title">
<tbody>
<tr>
<td bgcolor="#525d76">
<table width="100%" border="0" cellpadding="2" cellspacing="0" class="centered">
<tbody>
<tr>
<td bgcolor="#f3dd61"><span class="title">HSSF Use Cases</span></td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
<font size="-2" color="#000000">
<p>
<a href="mailto:"></a>
</p>
</font>
<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 width="100%" border="0" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td>
<hr noshade="" size="1">
</td>
</tr>
<tr>
<td align="center"><i>Copyright &copy; 2002 Apache Software Foundation</i></td>
</tr>
<tr>
<td align="right" width="100%">
<br>
</td>
</tr>
<tr>
<td align="right" width="100%"><a href="http://krysalis.org/"><img alt="Krysalis Logo" src="images/krysalis-compatible.png"></a><a href="http://xml.apache.org/cocoon/"><img alt="Cocoon Logo" src="images/built-with-cocoon.png"></a></td>
</tr>
</tbody>
</table>
</body>
</html>