1 package org.simantics.spreadsheet.graph;
3 import java.util.Collections;
6 import org.simantics.db.layer0.StandardNodeManager;
7 import org.simantics.layer0.Layer0;
8 import org.simantics.simulator.variable.exceptions.NodeManagerException;
9 import org.simantics.spreadsheet.resource.SpreadsheetResource;
10 import org.simantics.structural.stubs.StructuralResource2;
12 @SuppressWarnings("rawtypes")
13 public class SpreadsheetNodeManager extends StandardNodeManager<SheetNode, SpreadsheetBook> {
15 public SpreadsheetNodeManager(SpreadsheetRealm realm) {
16 super(realm, realm.getEngine());
19 static final Set<String> COMPONENT_CLASS = Collections.singleton(StructuralResource2.URIs.Component);
22 public Set<String> getClassifications(SheetNode node) throws NodeManagerException {
25 return COMPONENT_CLASS;
27 return Collections.emptySet();
31 public String getPropertyURI(SheetNode parent, SheetNode property) {
32 if(property instanceof SpreadsheetCellContent) {
33 return SpreadsheetResource.URIs.Cell_content;
34 } else if(property instanceof SpreadsheetTypeNode) {
35 return Layer0.URIs.typeURI;
36 } else if(property instanceof SpreadsheetCellContentExpression) {
37 return Layer0.URIs.SCLValue_expression;
38 } else if (property instanceof SpreadsheetCellStyle) {
39 return SpreadsheetResource.URIs.Cell_style;
40 } else if (property instanceof SpreadsheetCellEditable){
41 return SpreadsheetResource.URIs.Cell_editable;