Added a bunch of functionality that will be needed when opening the editor with an...
[taxeditor.git] / taxeditor-navigation / src / main / java / eu / etaxonomy / taxeditor / navigation / navigator / Root.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.navigation.navigator;
12
13 import java.util.List;
14
15 import org.apache.log4j.Logger;
16 import org.eclipse.core.runtime.IAdaptable;
17 import org.eclipse.core.runtime.PlatformObject;
18 import org.eclipse.ui.IElementFactory;
19 import org.eclipse.ui.IMemento;
20 import org.eclipse.ui.IPersistableElement;
21
22 import eu.etaxonomy.cdm.model.taxon.TaxonomicTree;
23 import eu.etaxonomy.taxeditor.store.CdmStore;
24
25 /**
26 * @author p.ciardelli
27 * @created 02.06.2009
28 * @version 1.0
29 */
30 public class Root extends PlatformObject implements IAdaptable, IPersistableElement, IElementFactory {
31
32 private static final Logger logger = Logger.getLogger(Root.class);
33
34 public List<TaxonomicTree> getParentBeans() {
35 List<TaxonomicTree> trees = CdmStore.getDefault().getTaxonomicTrees();
36 return trees;
37 }
38
39 /* (non-Javadoc)
40 * @see org.eclipse.ui.IPersistableElement#getFactoryId()
41 */
42 public String getFactoryId() {
43 return null;
44 }
45
46 /* (non-Javadoc)
47 * @see org.eclipse.ui.IPersistable#saveState(org.eclipse.ui.IMemento)
48 */
49 public void saveState(IMemento memento) {
50 }
51
52 /* (non-Javadoc)
53 * @see org.eclipse.ui.IElementFactory#createElement(org.eclipse.ui.IMemento)
54 */
55 public IAdaptable createElement(IMemento memento) {
56 return null;
57 }
58 }