@Override
public void setValue(WriteGraph graph, Variable context, Object value, Binding binding) throws DatabaseException {
- System.out.println("contentValueAccessor.context=" + context.getURI(graph));
if(value instanceof String) {
// Expressions are given as string
} else {
Variable cell = context.getParent(graph);
- System.out.println("setValue : " + cell.getURI(graph));
String formula = text.substring(1);
Variant v = new Variant(ExcelFormula.BINDING, new ExcelFormula(formula));
Layer0Utils.claimLiteral(graph, cell.getRepresents(graph), SHEET.Cell_content, SHEET.Cell_content_Inverse, Layer0.getInstance(graph).Variant, v, Bindings.VARIANT);
-
+
}
} else {
private void setValueToEngine(WriteGraph graph, Variable cell, Variable context, Object value, Binding binding) throws DatabaseException {
Variable sheet = cell.getParent(graph);
- if(Bindings.STRING.equals(binding) && !(value instanceof String))
- System.err.println("asd");
-
SpreadsheetResource SHEET = SpreadsheetResource.getInstance(graph);
while(!sheet.getType(graph).equals(SHEET.Spreadsheet)) {
return super.getVariable(graph, context, name);
-// TMap<String, Variable> map = new THashMap<String, Variable>();
-// getVariables(graph, context, map);
-// return map.get(name);
-
}
@Override
public Map<String, Variable> getVariables(ReadGraph graph, Variable context, Map<String, Variable> map) throws DatabaseException {
- System.err.println("getVariables " + context.getURI(graph));
-
if(ProxyVariables.isProxy(graph, context))
return StandardChildDomainChildren.getStandardChildDomainChildVariables(graph, context, Collections.emptyMap(), map);
@SCLValue(type = "ReadGraph -> Resource -> Variable -> CellEditor")
public static CellEditor<Write> textCellEditor(ReadGraph graph, Resource resource, final Variable context_) throws DatabaseException {
- System.out.println("Context URI : " + context_.getURI(graph));
Variable cells = context_.getParent(graph);
- System.out.println("Cell URI : " + cells.getURI(graph));
return new GraphCellEditorAdapter(cells) {
if (runCell != null)
runCell.setPropertyValue(graph, SHEET.Cell_content, value, Bindings.VARIANT);
} else if(ClientModel.CONTENT_EXPRESSION.equals(property)) {
- System.err.println("cell: " + cell.getURI(graph));
cell.setPropertyValue(graph, SHEET.Cell_content, value, Bindings.STRING);
Variable runCell = null;
Object transactionContext = transaction.getContext();
runCell = Variables.switchRealization(graph, cell, context.getRepresents(graph), context);
}
- //Variant content = cell.getPropertyValue(graph, SHEET.Cell_content, Bindings.VARIANT);
Object object = cell.getPropertyValue(graph, SHEET.Cell_content);
Variant content = null;
if (object instanceof Variant) {