Class ZipFileStructureProvider
java.lang.Object
org.eclipse.ui.wizards.datatransfer.ZipFileStructureProvider
- All Implemented Interfaces:
- IImportStructureProvider
This class provides information regarding the context structure and
 content of specified zip file entry objects.
- 
Constructor SummaryConstructorsConstructorDescriptionZipFileStructureProvider(ZipFile sourceFile) Creates aZipFileStructureProvider, which will operate on the passed zip file.
- 
Method SummaryModifier and TypeMethodDescriptionprotected voidaddToChildren(ZipEntry parent, ZipEntry child) Adds the specified child to the internal collection of the parent's children.protected voidcreateContainer(IPath pathname) Creates a new container zip entry with the specified name, iff it has not already been created.protected voidcreateFile(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.getContents(Object element) Returns the contents of the specified structured element, ornullif there is a problem determining the element's contents.getFullPath(Object element) Returns the full path of the specified structured element.Returns the display label of the specified structured element.getRoot()Returns the entry that this importer uses as the root sentinel.Returns the zip file that this provider provides structure for.protected voidInitializes this object's children table based on the contents of the specified source file.booleanReturns a boolean indicating whether the passed structured element represents a container element (as opposed to a leaf element).
- 
Constructor Details- 
ZipFileStructureProviderCreates aZipFileStructureProvider, which will operate on the passed zip file.- Parameters:
- sourceFile- the zip file used to create this structure provider
 
 
- 
- 
Method Details- 
addToChildrenAdds the specified child to the internal collection of the parent's children.
- 
createContainerCreates a new container zip entry with the specified name, iff it has not already been created.
- 
createFileCreates a new file zip entry with the specified name.
- 
getChildrenDescription copied from interface:IImportStructureProviderReturns a collection with the children of the specified structured element.- Specified by:
- getChildrenin interface- IImportStructureProvider
- Parameters:
- element- the element for which to compute the children
- Returns:
- the list of child elements
 
- 
getContentsDescription copied from interface:IImportStructureProviderReturns the contents of the specified structured element, ornullif there is a problem determining the element's contents.Note:: The client is responsible for closing the stream when finished. - Specified by:
- getContentsin interface- IImportStructureProvider
- Parameters:
- element- a structured element
- Returns:
- the contents of the structured element, or null
 
- 
getFullPathDescription copied from interface:IImportStructureProviderReturns the full path of the specified structured element.- Specified by:
- getFullPathin interface- IImportStructureProvider
- Parameters:
- element- a structured element
- Returns:
- the display label of the structured element
 
- 
getLabelDescription copied from interface:IImportStructureProviderReturns the display label of the specified structured element.- Specified by:
- getLabelin interface- IImportStructureProvider
- Parameters:
- element- a structured element
- Returns:
- the display label of the structured element
 
- 
getRootReturns the entry that this importer uses as the root sentinel.- Returns:
- java.util.zip.ZipEntry
 
- 
getZipFileReturns the zip file that this provider provides structure for.- Returns:
- the zip file this provider provides structure for
 
- 
initializeprotected void initialize()Initializes this object's children table based on the contents of the specified source file.
- 
isFolderDescription copied from interface:IImportStructureProviderReturns a boolean indicating whether the passed structured element represents a container element (as opposed to a leaf element).- Specified by:
- isFolderin interface- IImportStructureProvider
- Parameters:
- element- java.lang.Object
- Returns:
- boolean
 
 
-