Interface EMFFormsSpreadsheetValueConverter

    • 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 the Cell using the EStructuralFeature 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 given domain 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 the Cell using the EStructuralFeature 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 given domain model reference. The converter with the highest priority will be used to convert this value. If this converter cannot convert the value this method should indicate this by returning NOT_APPLICABLE.
        Parameters:
        domainObject - the domain object
        dmr - 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 the Cell using the EStructuralFeature as meta information about the value.
        Parameters:
        cell - The Cell to write to
        value - The value to write
        eStructuralFeature - The EStructuralFeature describing the meta information of the value
        viewModelContext - The ViewModelContext 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 the Cell using the EStructuralFeature as meta information about the value.
        Parameters:
        cell - The Cell to read from
        eStructuralFeature - The EStructuralFeature 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