org.naftulin.classpathexplorer.dublicate.imlp
Class AccessibleArchive

java.lang.Object
  |
  +--org.naftulin.classpathexplorer.dublicate.imlp.AccessibleArchive
All Implemented Interfaces:
AccessibleResource

public abstract class AccessibleArchive
extends java.lang.Object
implements AccessibleResource

Representing an archive which is a directory or jar (zip).

Version:
1.0
Author:
henry naftulin

Method Summary
abstract  AccessibleResource[] getAccessibleResources()
          Returns all of the resources in this archive or directory.
 AccessibleArchive getArchive()
          Returns the archive the resource is located in.
 java.lang.String getFullPath()
          Returns the path for the resource.
 java.lang.String getKey()
          Returns the path, since for archives key is the path.
 long getLastModified()
          Returns the last modified Date as long
 java.lang.String getName()
          Returns the name of the archive.
 java.lang.String getPath()
          Returns the path for the resource.
 java.lang.String toString()
          Supplies part of the toString implementation for the overwriting classes
 java.lang.String toXml()
          Supplies part of the toXml implementation for the overwriting classes
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

getPath

public java.lang.String getPath()
Returns the path for the resource.

Specified by:
getPath in interface AccessibleResource
Returns:
the path for the resource.

getKey

public java.lang.String getKey()
Returns the path, since for archives key is the path. Key is needed for resource registry.

Specified by:
getKey in interface AccessibleResource
Returns:
key which is the path

getName

public java.lang.String getName()
Returns the name of the archive.

Specified by:
getName in interface AccessibleResource
Returns:
the name of the archive.

getArchive

public AccessibleArchive getArchive()
Returns the archive the resource is located in. By default returns null.

Specified by:
getArchive in interface AccessibleResource
Returns:
null

getFullPath

public java.lang.String getFullPath()
Returns the path for the resource. If resource resides in an archive, (e.g. zip or jar) path represents a full path: path to the archive and path of the resource within an archive.

Specified by:
getFullPath in interface AccessibleResource
Returns:
the path for the resource.

getLastModified

public long getLastModified()
Returns the last modified Date as long

Specified by:
getLastModified in interface AccessibleResource
Returns:
the last modified Date as long

getAccessibleResources

public abstract AccessibleResource[] getAccessibleResources()
                                                     throws java.io.IOException
Returns all of the resources in this archive or directory.

Returns:
all of the resources in this archive or directory.
Throws:
java.io.IOException - if an error occurs while reading the content of the archive or the directory.

toString

public java.lang.String toString()
Supplies part of the toString implementation for the overwriting classes

Specified by:
toString in interface AccessibleResource
Overrides:
toString in class java.lang.Object
Returns:
part of the toString implementation for the overwriting classes

toXml

public java.lang.String toXml()
Supplies part of the toXml implementation for the overwriting classes

Specified by:
toXml in interface AccessibleResource
Returns:
part of the toXml implementation for the overwriting classes


Copyright © 2006 Henry Naftulin. All Rights Reserved.