Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 


Eclipse Platform
Release 3.5

org.eclipse.ui.wizards.datatransfer
Class ZipFileStructureProvider


java.lang.Object
  extended by 
org.eclipse.ui.wizards.datatransfer.ZipFileStructureProvider
All Implemented Interfaces:
IImportStructureProvider

public class ZipFileStructureProvider
extends Object
implements IImportStructureProvider

This class provides information regarding the context structure and content of specified zip file entry objects.


Constructor Summary
ZipFileStructureProvider ( ZipFile sourceFile)
          Creates a ZipFileStructureProvider, which will operate on the passed zip file.
 
Method Summary
protected  void addToChildren ( ZipEntry parent, ZipEntry child)
          Adds the specified child to the internal collection of the parent's children.
protected  void createContainer ( IPath pathname)
          Creates a new container zip entry with the specified name, iff it has not already been created.
protected  void createFile ( ZipEntry entry)
          Creates a new file zip entry with the specified name.
  List getChildren ( Object element)
          Returns a collection with the children of the specified structured element.
  InputStream getContents ( Object element)
          Returns the contents of the specified structured element, or null if there is a problem determining the element's contents.
  String getFullPath ( Object element)
          Returns the full path of the specified structured element.
  String getLabel ( Object element)
          Returns the display label of the specified structured element.
  ZipEntry getRoot ()
          Returns the entry that this importer uses as the root sentinel.
  ZipFile getZipFile ()
          Returns the zip file that this provider provides structure for.
protected  void initialize ()
          Initializes this object's children table based on the contents of the specified source file.
 boolean isFolder ( Object element)
          Returns a boolean indicating whether the passed structured element represents a container element (as opposed to a leaf element).
 
Methods inherited from class java.lang. Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ZipFileStructureProvider

public ZipFileStructureProvider(
ZipFile sourceFile)
Creates a ZipFileStructureProvider, which will operate on the passed zip file.

Parameters:
sourceFile - the zip file used to create this structure provider
Method Detail

addToChildren

protected void addToChildren(
ZipEntry parent,
                             
ZipEntry child)
Adds the specified child to the internal collection of the parent's children.


createContainer

protected void createContainer(
IPath pathname)
Creates a new container zip entry with the specified name, iff it has not already been created.


createFile

protected void createFile(
ZipEntry entry)
Creates a new file zip entry with the specified name.


getChildren

public 
List getChildren(
Object element)
Description copied from interface: IImportStructureProvider
Returns a collection with the children of the specified structured element.

Specified by:
getChildren in interface IImportStructureProvider
Parameters:
element - the element for which to compute the children
Returns:
the list of child elements

getContents

public 
InputStream getContents(
Object element)
Description copied from interface: IImportStructureProvider
Returns the contents of the specified structured element, or null if there is a problem determining the element's contents.

Note:: The client is responsible for closing the stream when finished.

Specified by:
getContents in interface IImportStructureProvider
Parameters:
element - a structured element
Returns:
the contents of the structured element, or null

getFullPath

public 
String getFullPath(
Object element)
Description copied from interface: IImportStructureProvider
Returns the full path of the specified structured element.

Specified by:
getFullPath in interface IImportStructureProvider
Parameters:
element - a structured element
Returns:
the display label of the structured element

getLabel

public 
String getLabel(
Object element)
Description copied from interface: IImportStructureProvider
Returns the display label of the specified structured element.

Specified by:
getLabel in interface IImportStructureProvider
Parameters:
element - a structured element
Returns:
the display label of the structured element

getRoot

public 
ZipEntry getRoot()
Returns the entry that this importer uses as the root sentinel.

Returns:
java.util.zip.ZipEntry

getZipFile

public 
ZipFile getZipFile()
Returns the zip file that this provider provides structure for.

Returns:
the zip file this provider provides structure for

initialize

protected void initialize()
Initializes this object's children table based on the contents of the specified source file.


isFolder

public boolean isFolder(
Object element)
Description copied from interface: IImportStructureProvider
Returns a boolean indicating whether the passed structured element represents a container element (as opposed to a leaf element).

Specified by:
isFolder in interface IImportStructureProvider
Parameters:
element - java.lang.Object
Returns:
boolean

Eclipse Platform
Release 3.5

Guidelines for using Eclipse APIs.

Copyright (c) Eclipse contributors and others 2000, 2008. All rights reserved.


 
 
  Published under the terms of the Eclipse Public License Version 1.0 ("EPL") Design by Interspire