Re-implemented taxonomic tree using Common Navigator Framework.
[taxeditor.git] / taxeditor-store / src / main / java / eu / etaxonomy / taxeditor / store / datasource / view / CdmDataSourceContentProvider.java
1 // $Id$
2 /**
3 * Copyright (C) 2007 EDIT
4 * European Distributed Institute of Taxonomy
5 * http://www.e-taxonomy.eu
6 *
7 * The contents of this file are subject to the Mozilla Public License Version 1.1
8 * See LICENSE.TXT at the top of this package for the full license terms.
9 */
10
11 package eu.etaxonomy.taxeditor.store.datasource.view;
12
13 import java.util.List;
14
15 import org.eclipse.jface.viewers.IStructuredContentProvider;
16 import org.eclipse.jface.viewers.Viewer;
17
18 import eu.etaxonomy.cdm.database.CdmDataSource;
19
20 /**
21 * @author n.hoffmann
22 * @created 14.04.2009
23 * @version 1.0
24 */
25 public class CdmDataSourceContentProvider implements IStructuredContentProvider {
26 /* (non-Javadoc)
27 * @see org.eclipse.jface.viewers.IContentProvider#dispose()
28 */
29 public void dispose() {
30
31 }
32
33 /* (non-Javadoc)
34 * @see org.eclipse.jface.viewers.IContentProvider#inputChanged(org.eclipse.jface.viewers.Viewer, java.lang.Object, java.lang.Object)
35 */
36 public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
37
38 }
39
40 /*
41 * (non-Javadoc)
42 * @see org.eclipse.jface.viewers.IStructuredContentProvider#getElements(java.lang.Object)
43 */
44 @SuppressWarnings("unchecked")
45 public Object[] getElements(Object inputElement) {
46 List<CdmDataSource> datasources = (List<CdmDataSource>) inputElement;
47 return datasources.toArray();
48 }
49 }