KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > ejtools > archive > Archive


1 /*
2  * EJTools, the Enterprise Java Tools
3  *
4  * Distributable under LGPL license.
5  * See terms of license at www.gnu.org.
6  */

7 package org.ejtools.archive;
8
9 import java.util.Enumeration JavaDoc;
10 import java.util.Iterator JavaDoc;
11
12 /**
13  * Interface that defines an archive. Note that an archive can also be an archive entry.
14  *
15  * @author Laurent Etiemble
16  * @version $Revision: 1.2 $
17  */

18 public interface Archive extends Entry
19 {
20    /**
21     * Return the parent archive of this archive
22     *
23     * @return The parent value
24     */

25    public Archive getParent();
26
27
28    /**
29     * Returns whether or not this archive is nested in an other archive
30     *
31     * @return True if it is nested
32     */

33    public boolean isNested();
34
35
36    /**
37     * Returns an enumeration of entries contained in this archive
38     *
39     * @return The entries enumeration
40     */

41    public Enumeration JavaDoc getEntries();
42
43
44    /**
45     * Return an Iterator of the entries contained in this archive
46     *
47     * @return The entries Iterator
48     */

49    public Iterator JavaDoc iterator();
50
51
52    /**
53     * Adds an entry to this archive
54     *
55     * @param entry The archive entry to be added
56     */

57    public void addEntry(Entry entry);
58
59
60    /**
61     * Removes an entry from this archive
62     *
63     * @param uri The archive entry to be removed
64     */

65    public void removeEntry(String JavaDoc uri);
66
67
68    /**
69     * Removes an entry from this archive
70     *
71     * @param entry The archive entry to be removed
72     */

73    public void removeEntry(Entry entry);
74
75
76    /**
77     * Returns the archive entry designated by this URI
78     *
79     * @param uri The URI of the entry
80     * @return The archiev entry if exists
81     */

82    public Entry getEntry(String JavaDoc uri);
83
84
85    /**
86     * Returns the manifest entry of this archive
87     *
88     * @return The manifest entry
89     */

90    public Entry getManifest();
91 }
92
Popular Tags