Class EMFFormsSpreadsheetSingleAttributeConverter
- java.lang.Object
-
- org.eclipse.emfforms.internal.spreadsheet.core.converter.EMFFormsSpreadsheetSingleAttributeConverter
-
- All Implemented Interfaces:
EMFFormsSpreadsheetValueConverter
public class EMFFormsSpreadsheetSingleAttributeConverter extends java.lang.Object implements EMFFormsSpreadsheetValueConverter
Converter
for singleattributes
.- Author:
- Johannes Faltermeier
-
-
Field Summary
-
Fields inherited from interface org.eclipse.emfforms.spi.spreadsheet.core.converter.EMFFormsSpreadsheetValueConverter
NOT_APPLICABLE
-
-
Constructor Summary
Constructors Constructor Description EMFFormsSpreadsheetSingleAttributeConverter()
-
Method Summary
All Methods Instance Methods Concrete 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.void
setDatabinding(EMFFormsDatabindingEMF databinding)
Sets the databinding service.void
setReportService(ReportService reportService)
Sets the report service.
-
-
-
Method Detail
-
setDatabinding
public void setDatabinding(EMFFormsDatabindingEMF databinding)
Sets the databinding service.- Parameters:
databinding
- the service
-
setReportService
public void setReportService(ReportService reportService)
Sets the report service.- Parameters:
reportService
- the service
-
isApplicable
public double isApplicable(org.eclipse.emf.ecore.EObject domainObject, VDomainModelReference dmr)
Description copied from interface:EMFFormsSpreadsheetValueConverter
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 returningEMFFormsSpreadsheetValueConverter.NOT_APPLICABLE
.- Specified by:
isApplicable
in interfaceEMFFormsSpreadsheetValueConverter
- Parameters:
domainObject
- the domain objectdmr
- the domain model reference for which the value is to be converted- Returns:
- the priority or
EMFFormsSpreadsheetValueConverter.NOT_APPLICABLE
-
setCellValue
public 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.- Specified by:
setCellValue
in interfaceEMFFormsSpreadsheetValueConverter
- 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- See Also:
EMFFormsSpreadsheetValueConverter.setCellValue(org.apache.poi.ss.usermodel.Cell, java.lang.Object, org.eclipse.emf.ecore.EStructuralFeature, org.eclipse.emf.ecp.view.spi.context.ViewModelContext)
-
getCellValue
public 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.- Specified by:
getCellValue
in interfaceEMFFormsSpreadsheetValueConverter
- 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- See Also:
EMFFormsSpreadsheetValueConverter.getCellValue(org.apache.poi.ss.usermodel.Cell, org.eclipse.emf.ecore.EStructuralFeature)
-
-