]> gerrit.simantics Code Review - simantics/platform.git/blob - bundles/org.simantics.spreadsheet.common/src/org/simantics/spreadsheet/common/cell/TextStringCellParser.java
Fixed all line endings of the repository
[simantics/platform.git] / bundles / org.simantics.spreadsheet.common / src / org / simantics / spreadsheet / common / cell / TextStringCellParser.java
1 package org.simantics.spreadsheet.common.cell;
2
3 import java.util.Collection;
4 import java.util.Collections;
5
6 import org.simantics.databoard.binding.mutable.Variant;
7 import org.simantics.db.layer0.variable.VariableSpaceManipulator.PropertyCreationData;
8 import org.simantics.scl.reflection.OntologyVersions;
9
10 public class TextStringCellParser implements StringCellParser {
11
12         final static String TYPE = OntologyVersions.getInstance().currentVersion("http://www.simantics.org/Spreadsheet-0.0/TextCell"); 
13         
14     @Override
15     public Collection<PropertyCreationData> parse(String text) {
16         return Collections.singletonList(PropertyCreationData.build(Parsers.CONTENT_PROPERTY, Variant.ofInstance(text)));
17     }
18     
19     @Override
20     public String getType() { 
21         return TYPE;
22     }
23     
24 }