01: /*******************************************************************************
02: * Copyright (c) 2000, 2006 IBM Corporation and others.
03: * All rights reserved. This program and the accompanying materials
04: * are made available under the terms of the Eclipse Public License v1.0
05: * which accompanies this distribution, and is available at
06: * http://www.eclipse.org/legal/epl-v10.html
07: *
08: * Contributors:
09: * IBM Corporation - initial API and implementation
10: *******************************************************************************/package org.eclipse.ui.wizards.datatransfer;
11:
12: import java.io.InputStream;
13: import java.util.List;
14:
15: /**
16: * Interface which can provide structure and content information
17: * for an element (for example, a file system element).
18: * Used by the import wizards to abstract the commonalities
19: * between importing from the file system and importing from an archive.
20: */
21: public interface IImportStructureProvider {
22: /**
23: * Returns a collection with the children of the specified structured element.
24: */
25: List getChildren(Object element);
26:
27: /**
28: * Returns the contents of the specified structured element, or
29: * <code>null</code> if there is a problem determining the element's
30: * contents.
31: *
32: * @param element a structured element
33: * @return the contents of the structured element, or <code>null</code>
34: */
35: InputStream getContents(Object element);
36:
37: /**
38: * Returns the full path of the specified structured element.
39: *
40: * @param element a structured element
41: * @return the display label of the structured element
42: */
43: String getFullPath(Object element);
44:
45: /**
46: * Returns the display label of the specified structured element.
47: *
48: * @param element a structured element
49: * @return the display label of the structured element
50: */
51: String getLabel(Object element);
52:
53: /**
54: * Returns a boolean indicating whether the passed structured element represents
55: * a container element (as opposed to a leaf element).
56: *
57: * @return boolean
58: * @param element java.lang.Object
59: */
60: boolean isFolder(Object element);
61: }
|