[Ejtools-cvs] libraries/common/src/main/org/ejtools/archive package.html,NONE,1.1 Archive.java,1.1,1
Brought to you by:
letiemble
From: <let...@us...> - 2003-12-14 10:42:42
|
Update of /cvsroot/ejtools/libraries/common/src/main/org/ejtools/archive In directory sc8-pr-cvs1:/tmp/cvs-serv18971/common/src/main/org/ejtools/archive Modified Files: Archive.java Entry.java JarArchive.java JarEntry.java Added Files: package.html Log Message: Add more javadocs. Add package.html files. --- NEW FILE: package.html --- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> <!-- EJTools, the Enterprise Java Tools Distributable under LGPL license. See terms of license at www.gnu.org. $Revision: 1.1 $ --> <html> <head/> <body> Provides a simple API to read/write/browse archive (nested or not). </body> </html> Index: Archive.java =================================================================== RCS file: /cvsroot/ejtools/libraries/common/src/main/org/ejtools/archive/Archive.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Archive.java 15 Sep 2003 23:14:31 -0000 1.1 --- Archive.java 13 Dec 2003 21:27:48 -0000 1.2 *************** *** 11,14 **** --- 11,16 ---- /** + * Interface that defines an archive. Note that an archive can also be an archive entry. + * * @author Laurent Etiemble * @version $Revision$ *************** *** 17,21 **** { /** ! * Gets the parent attribute of the Archive object * * @return The parent value --- 19,23 ---- { /** ! * Return the parent archive of this archive * * @return The parent value *************** *** 25,31 **** /** ! * Gets the nested attribute of the Archive object * ! * @return The nested value */ public boolean isNested(); --- 27,33 ---- /** ! * Returns whether or not this archive is nested in an other archive * ! * @return True if it is nested */ public boolean isNested(); *************** *** 33,39 **** /** ! * Gets the entries attribute of the Archive object * ! * @return The entries value */ public Enumeration getEntries(); --- 35,41 ---- /** ! * Returns an enumeration of entries contained in this archive * ! * @return The entries enumeration */ public Enumeration getEntries(); *************** *** 41,47 **** /** ! * Description of the Method * ! * @return Description of the Return Value */ public Iterator iterator(); --- 43,49 ---- /** ! * Return an Iterator of the entries contained in this archive * ! * @return The entries Iterator */ public Iterator iterator(); *************** *** 49,55 **** /** ! * Adds a feature to the Entry attribute of the Archive object * ! * @param entry The feature to be added to the Entry attribute */ public void addEntry(Entry entry); --- 51,57 ---- /** ! * Adds an entry to this archive * ! * @param entry The archive entry to be added */ public void addEntry(Entry entry); *************** *** 57,63 **** /** ! * Description of the Method * ! * @param uri Description of the Parameter */ public void removeEntry(String uri); --- 59,65 ---- /** ! * Removes an entry from this archive * ! * @param uri The archive entry to be removed */ public void removeEntry(String uri); *************** *** 65,71 **** /** ! * Description of the Method * ! * @param entry Description of the Parameter */ public void removeEntry(Entry entry); --- 67,73 ---- /** ! * Removes an entry from this archive * ! * @param entry The archive entry to be removed */ public void removeEntry(Entry entry); *************** *** 73,80 **** /** ! * Gets the entry attribute of the Archive object * ! * @param uri Description of the Parameter ! * @return The entry value */ public Entry getEntry(String uri); --- 75,82 ---- /** ! * Returns the archive entry designated by this URI * ! * @param uri The URI of the entry ! * @return The archiev entry if exists */ public Entry getEntry(String uri); *************** *** 82,88 **** /** ! * Gets the manifest attribute of the Archive object * ! * @return The manifest value */ public Entry getManifest(); --- 84,90 ---- /** ! * Returns the manifest entry of this archive * ! * @return The manifest entry */ public Entry getManifest(); Index: Entry.java =================================================================== RCS file: /cvsroot/ejtools/libraries/common/src/main/org/ejtools/archive/Entry.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Entry.java 15 Sep 2003 23:14:31 -0000 1.1 --- Entry.java 13 Dec 2003 21:27:48 -0000 1.2 *************** *** 12,15 **** --- 12,17 ---- /** + * Interface that defines an archive entry. + * * @author Laurent Etiemble * @version $Revision$ *************** *** 18,24 **** { /** ! * Description of the Method * ! * @param visitor Description of the Parameter */ public void accept(Reader visitor); --- 20,26 ---- { /** ! * Visitor Pattern method to accept a Reader visitor * ! * @param visitor The reader visitor */ public void accept(Reader visitor); *************** *** 26,32 **** /** ! * Description of the Method * ! * @param visitor Description of the Parameter */ public void accept(Writer visitor); --- 28,34 ---- /** ! * Visitor Pattern method to accept a Writer visitor * ! * @param visitor The writer visitor */ public void accept(Writer visitor); *************** *** 34,40 **** /** ! * Adds a feature to the To attribute of the Entry object * ! * @param archive The feature to be added to the To attribute */ public void addTo(Archive archive); --- 36,42 ---- /** ! * Adds this entry to an archive * ! * @param archive The archive to be added to */ public void addTo(Archive archive); *************** *** 42,48 **** /** ! * Gets the archive attribute of the ArchiveEntry object * ! * @return The archive value */ public boolean isArchive(); --- 44,50 ---- /** ! * Is this entry an archive ? * ! * @return True if this entry is an archive */ public boolean isArchive(); *************** *** 50,56 **** /** ! * Gets the uRI attribute of the ArchiveEntry object * ! * @return The uRI value */ public String getURI(); --- 52,58 ---- /** ! * Return the absolute URI of this entry * ! * @return The URI */ public String getURI(); *************** *** 58,64 **** /** ! * Sets the uRI attribute of the Entry object * ! * @param uri The new uRI value */ public void setURI(String uri); --- 60,66 ---- /** ! * Sets the URI of this entry * ! * @param uri The new URI */ public void setURI(String uri); *************** *** 66,72 **** /** ! * Sets the content attribute of the ArchiveEntry object * ! * @param content The new content value */ public void setContent(byte[] content); --- 68,74 ---- /** ! * Sets the content of this entry * ! * @param content The new content */ public void setContent(byte[] content); *************** *** 74,80 **** /** ! * Gets the content attribute of the ArchiveEntry object * ! * @return The content value */ public byte[] getContent(); --- 76,82 ---- /** ! * Returns the content of this entry * ! * @return The content */ public byte[] getContent(); Index: JarArchive.java =================================================================== RCS file: /cvsroot/ejtools/libraries/common/src/main/org/ejtools/archive/JarArchive.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** JarArchive.java 15 Sep 2003 23:14:31 -0000 1.1 --- JarArchive.java 13 Dec 2003 21:27:48 -0000 1.2 *************** *** 17,20 **** --- 17,22 ---- /** + * Implementation for a Jar based archive. + * * @author Laurent Etiemble * @version $Revision$ *************** *** 29,35 **** /** ! *Constructor for the JarArchive object * ! * @param uri Description of the Parameter */ public JarArchive(String uri) --- 31,37 ---- /** ! * Constructor for the JarArchive object * ! * @param uri The URI of the archive */ public JarArchive(String uri) *************** *** 40,48 **** /** ! * Description of the Method * ! * @param visitor Description of the Parameter */ ! public void accept(Reader visitor) { visitor.visit(this); --- 42,50 ---- /** ! * Visitor Pattern method to accept a Writer visitor * ! * @param visitor The writer visitor */ ! public void accept(Writer visitor) { visitor.visit(this); *************** *** 51,59 **** /** ! * Description of the Method * ! * @param visitor Description of the Parameter */ ! public void accept(Writer visitor) { visitor.visit(this); --- 53,61 ---- /** ! * Visitor Pattern method to accept a Reader visitor * ! * @param visitor The reader visitor */ ! public void accept(Reader visitor) { visitor.visit(this); *************** *** 62,68 **** /** ! * Adds a feature to the Entry attribute of the JarArchive object * ! * @param entry The feature to be added to the Entry attribute */ public void addEntry(Entry entry) --- 64,70 ---- /** ! * Adds an entry to this archive * ! * @param entry The archive entry to be added */ public void addEntry(Entry entry) *************** *** 85,91 **** /** ! * Gets the entries attribute of the JarArchive object * ! * @return The entries value */ public Enumeration getEntries() --- 87,93 ---- /** ! * Returns an enumeration of entries contained in this archive * ! * @return The entries enumeration */ public Enumeration getEntries() *************** *** 96,103 **** /** ! * Gets the entry attribute of the JarArchive object * ! * @param uri Description of the Parameter ! * @return The entry value */ public Entry getEntry(String uri) --- 98,105 ---- /** ! * Returns the archive entry designated by this URI * ! * @param uri The URI of the entry ! * @return The archiev entry if exists */ public Entry getEntry(String uri) *************** *** 108,114 **** /** ! * Gets the manifest attribute of the JarArchive object * ! * @return The manifest value */ public Entry getManifest() --- 110,116 ---- /** ! * Returns the manifest entry of this archive * ! * @return The manifest entry */ public Entry getManifest() *************** *** 119,123 **** /** ! * Gets the parent attribute of the JarArchive object * * @return The parent value --- 121,125 ---- /** ! * Return the parent archive of this archive * * @return The parent value *************** *** 130,137 **** /** ! * Gets the archive attribute of the JarArchiveEntry object * ! * @return The archive value ! * @see test.archive.ArchiveEntry#isArchive() */ public boolean isArchive() --- 132,138 ---- /** ! * Always returns true as it is an archive * ! * @return Always true */ public boolean isArchive() *************** *** 142,148 **** /** ! * Gets the nested attribute of the JarArchive object * ! * @return The nested value */ public boolean isNested() --- 143,149 ---- /** ! * Returns whether or not this archive is nested in an other archive * ! * @return True if it is nested */ public boolean isNested() *************** *** 153,159 **** /** ! * Description of the Method * ! * @return Description of the Return Value */ public Iterator iterator() --- 154,160 ---- /** ! * Return an Iterator of the entries contained in this archive * ! * @return The entries Iterator */ public Iterator iterator() *************** *** 164,170 **** /** ! * Description of the Method * ! * @param uri Description of the Parameter */ public void removeEntry(String uri) --- 165,171 ---- /** ! * Removes an entry from this archive * ! * @param uri The archive entry to be removed */ public void removeEntry(String uri) *************** *** 175,181 **** /** ! * Description of the Method * ! * @param entry Description of the Parameter */ public void removeEntry(Entry entry) --- 176,182 ---- /** ! * Removes an entry from this archive * ! * @param entry The archive entry to be removed */ public void removeEntry(Entry entry) Index: JarEntry.java =================================================================== RCS file: /cvsroot/ejtools/libraries/common/src/main/org/ejtools/archive/JarEntry.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** JarEntry.java 15 Sep 2003 23:14:31 -0000 1.1 --- JarEntry.java 13 Dec 2003 21:27:48 -0000 1.2 *************** *** 11,14 **** --- 11,16 ---- /** + * Implementation for a Jar based entry. + * * @author Laurent Etiemble * @version $Revision$ *************** *** 16,29 **** public class JarEntry implements Entry { ! /** Description of the Field */ private byte[] content; ! /** Description of the Field */ private String uri = ""; /** ! *Constructor for the JarEntry object * ! * @param uri Description of the Parameter */ public JarEntry(String uri) --- 18,31 ---- public class JarEntry implements Entry { ! /** The binary content */ private byte[] content; ! /** The absolute URI */ private String uri = ""; /** ! * Constructor for the JarEntry object * ! * @param uri The URI of the entry */ public JarEntry(String uri) *************** *** 34,40 **** /** ! * Description of the Method * ! * @param visitor Description of the Parameter */ public void accept(Writer visitor) --- 36,42 ---- /** ! * Visitor Pattern method to accept a Writer visitor * ! * @param visitor The writer visitor */ public void accept(Writer visitor) *************** *** 45,51 **** /** ! * Description of the Method * ! * @param visitor Description of the Parameter */ public void accept(Reader visitor) --- 47,53 ---- /** ! * Visitor Pattern method to accept a Reader visitor * ! * @param visitor The reader visitor */ public void accept(Reader visitor) *************** *** 56,62 **** /** ! * Adds a feature to the To attribute of the JarArchiveEntry object * ! * @param archive The feature to be added to the To attribute */ public void addTo(Archive archive) --- 58,64 ---- /** ! * Adds this entry to an archive * ! * @param archive The archive to be added to */ public void addTo(Archive archive) *************** *** 67,73 **** /** ! * Gets the content attribute of the JarArchiveEntry object * ! * @return The content value */ public byte[] getContent() --- 69,75 ---- /** ! * Returns the content of this entry * ! * @return The content */ public byte[] getContent() *************** *** 78,85 **** /** ! * Gets the uRI attribute of the JarArchiveEntry object * ! * @return The uRI value ! * @see test.archive.ArchiveEntry#getURI() */ public String getURI() --- 80,86 ---- /** ! * Return the absolute URI of this entry * ! * @return The URI */ public String getURI() *************** *** 90,97 **** /** ! * Gets the archive attribute of the JarArchiveEntry object * ! * @return The archive value ! * @see test.archive.ArchiveEntry#isArchive() */ public boolean isArchive() --- 91,97 ---- /** ! * Always returns false as it is not an archive * ! * @return Always false */ public boolean isArchive() *************** *** 102,108 **** /** ! * Sets the content attribute of the JarArchiveEntry object * ! * @param content The new content value */ public void setContent(byte[] content) --- 102,108 ---- /** ! * Sets the content of this entry * ! * @param content The new content */ public void setContent(byte[] content) *************** *** 113,119 **** /** ! * Sets the uRI attribute of the JarEntry object * ! * @param uri The new uRI value */ public void setURI(String uri) --- 113,119 ---- /** ! * Sets the URI of this entry * ! * @param uri The new URI */ public void setURI(String uri) |