1 /*******************************************************************************
2 * Copyright (c) 2007, 2010 Association for Decentralized Information Management
4 * All rights reserved. This program and the accompanying materials
5 * are made available under the terms of the Eclipse Public License v1.0
6 * which accompanies this distribution, and is available at
7 * http://www.eclipse.org/legal/epl-v10.html
10 * VTT Technical Research Centre of Finland - initial API and implementation
11 *******************************************************************************/
12 package org.simantics.modeling.ui.modelBrowser.model;
14 import java.util.Collection;
16 import org.eclipse.core.runtime.IAdaptable;
17 import org.eclipse.jface.resource.ImageDescriptor;
18 import org.eclipse.jface.viewers.ISelection;
19 import org.simantics.browsing.ui.common.node.IDeletable;
20 import org.simantics.browsing.ui.common.node.IModifiable;
21 import org.simantics.browsing.ui.common.node.IRefreshable;
22 import org.simantics.browsing.ui.content.Labeler.Modifier;
23 import org.simantics.db.ReadGraph;
24 import org.simantics.db.Session;
25 import org.simantics.db.WriteGraph;
26 import org.simantics.db.exception.DatabaseException;
29 * INode represents a node in the graph based object model.
36 * @deprecated <a href="https://www.simantics.org/wiki/index.php/Org.simantics.browsing.ui_Manual">See tutorial for new features</a>
39 public interface INode extends IAdaptable {
40 String getLabel(ReadGraph graph) throws DatabaseException;
41 int getCategory(ReadGraph graph) throws DatabaseException;
42 Collection<?> getChildren(ReadGraph graph) throws DatabaseException;
43 boolean hasChildren(ReadGraph graph) throws DatabaseException;
44 ImageDescriptor getImage(ReadGraph graph) throws DatabaseException;
45 void handleDrop(Session session, ISelection selection);
46 Modifier getModifier(Session session, String columnId);
49 * Delete node in the background system. The node is considered deletable
50 * only if it implements {@link IDeletable}.
52 void handleDelete(WriteGraph graph) throws DatabaseException;