KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > ui > wizards > datatransfer > IImportStructureProvider


1 /*******************************************************************************
2  * Copyright (c) 2000, 2006 IBM Corporation and others.
3  * All rights reserved. This program and the accompanying materials
4  * are made available under the terms of the Eclipse Public License v1.0
5  * which accompanies this distribution, and is available at
6  * http://www.eclipse.org/legal/epl-v10.html
7  *
8  * Contributors:
9  * IBM Corporation - initial API and implementation
10  *******************************************************************************/

11 package org.eclipse.ui.wizards.datatransfer;
12
13 import java.io.InputStream JavaDoc;
14 import java.util.List JavaDoc;
15
16 /**
17  * Interface which can provide structure and content information
18  * for an element (for example, a file system element).
19  * Used by the import wizards to abstract the commonalities
20  * between importing from the file system and importing from an archive.
21  */

22 public interface IImportStructureProvider {
23     /**
24      * Returns a collection with the children of the specified structured element.
25      */

26     List JavaDoc getChildren(Object JavaDoc element);
27
28     /**
29      * Returns the contents of the specified structured element, or
30      * <code>null</code> if there is a problem determining the element's
31      * contents.
32      *
33      * @param element a structured element
34      * @return the contents of the structured element, or <code>null</code>
35      */

36     InputStream JavaDoc getContents(Object JavaDoc element);
37
38     /**
39      * Returns the full path of the specified structured element.
40      *
41      * @param element a structured element
42      * @return the display label of the structured element
43      */

44     String JavaDoc getFullPath(Object JavaDoc element);
45
46     /**
47      * Returns the display label of the specified structured element.
48      *
49      * @param element a structured element
50      * @return the display label of the structured element
51      */

52     String JavaDoc getLabel(Object JavaDoc element);
53
54     /**
55      * Returns a boolean indicating whether the passed structured element represents
56      * a container element (as opposed to a leaf element).
57      *
58      * @return boolean
59      * @param element java.lang.Object
60      */

61     boolean isFolder(Object JavaDoc element);
62 }
63
Popular Tags