Interface EMFFormsSpreadsheetValueConverter
-
- All Known Implementing Classes:
EMFFormsSpreadsheetMultiAttributeConverter
,EMFFormsSpreadsheetMultiReferenceConverter
,EMFFormsSpreadsheetSingleAttributeConverter
,EMFFormsSpreadsheetSingleReferenceConverter
public interface EMFFormsSpreadsheetValueConverter
A value converter is used to convert a value to its string representation in the spreadsheer and vice versa.- Author:
- Johannes Faltermeier
-
-
Field Summary
Fields Modifier and Type Field Description static double
NOT_APPLICABLE
Constant defining that this converter can not be used to convert the value.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.lang.Object
getCellValue(org.apache.poi.ss.usermodel.Cell cell, org.eclipse.emf.ecore.EStructuralFeature eStructuralFeature)
Read the value of theCell
using theEStructuralFeature
as meta information about the value.double
isApplicable(org.eclipse.emf.ecore.EObject domainObject, VDomainModelReference dmr)
Returns whether this converter is applicable to convert the value for the givendomain model reference
.void
setCellValue(org.apache.poi.ss.usermodel.Cell cell, java.lang.Object value, org.eclipse.emf.ecore.EStructuralFeature eStructuralFeature, ViewModelContext viewModelContext)
Write the value to theCell
using theEStructuralFeature
as meta information about the value.
-
-
-
Field Detail
-
NOT_APPLICABLE
static final double NOT_APPLICABLE
Constant defining that this converter can not be used to convert the value.- See Also:
- Constant Field Values
-
-
Method Detail
-
isApplicable
double isApplicable(org.eclipse.emf.ecore.EObject domainObject, VDomainModelReference dmr)
Returns whether this converter is applicable to convert the value for the givendomain model reference
. Theconverter
with the highest priority will be used to convert this value. If this converter cannot convert the value this method should indicate this by returningNOT_APPLICABLE
.- Parameters:
domainObject
- the domain objectdmr
- the domain model reference for which the value is to be converted- Returns:
- the priority or
NOT_APPLICABLE
-
setCellValue
void setCellValue(org.apache.poi.ss.usermodel.Cell cell, java.lang.Object value, org.eclipse.emf.ecore.EStructuralFeature eStructuralFeature, ViewModelContext viewModelContext) throws EMFFormsConverterException
Write the value to theCell
using theEStructuralFeature
as meta information about the value.- Parameters:
cell
- The Cell to write tovalue
- The value to writeeStructuralFeature
- TheEStructuralFeature
describing the meta information of the valueviewModelContext
- TheViewModelContext
to use- Throws:
EMFFormsConverterException
- Whenever the eStructuralFeature and the value don't match
-
getCellValue
java.lang.Object getCellValue(org.apache.poi.ss.usermodel.Cell cell, org.eclipse.emf.ecore.EStructuralFeature eStructuralFeature) throws EMFFormsConverterException
Read the value of theCell
using theEStructuralFeature
as meta information about the value.- Parameters:
cell
- The Cell to read fromeStructuralFeature
- TheEStructuralFeature
describing the meta information of the value- Returns:
- The Object of de-serialized from the cell
- Throws:
EMFFormsConverterException
- Whenever the eStructuralFeature and the cell value don't match
-
-