Interface SymbolResolver


  • public interface SymbolResolver
    EFX expressions contain references to eForms fields and nodes. These references are in the form of field or node identifiers (a.k.a. symbols). The role of the SymbolResolver is to provide further information on these referenced fields or nodes by looking them up in a repository.
    • Method Detail

      • getParentNodeOfField

        String getParentNodeOfField​(String fieldId)
        Gets the identifier of the parent node of the given field.
        Parameters:
        fieldId - The identifier of the field to look for.
        Returns:
        The identifier of the parent node of the given field.
      • getRelativePathOfField

        Expression.PathExpression getRelativePathOfField​(String fieldId,
                                                         Expression.PathExpression contextPath)
        Gets the path that can be used to locate the give field in the data source, relative to another given path.
        Parameters:
        fieldId - The identifier of the field to look for.
        contextPath - The path relative to which we expect to find the return value.
        Returns:
        The path to the given field relative to the given context path.
      • getRelativePathOfNode

        Expression.PathExpression getRelativePathOfNode​(String nodeId,
                                                        Expression.PathExpression contextPath)
        Gets the path that can be used to locate the given node in the data source, relative to another given path.
        Parameters:
        nodeId - The identifier of the node to look for.
        contextPath - The path relative to which we expect to find the return value.
        Returns:
        The path to the given node relative to the given context path.
      • getAbsolutePathOfField

        Expression.PathExpression getAbsolutePathOfField​(String fieldId)
        Gets the absolute path that can be used to locate a field in the data source.
        Parameters:
        fieldId - The identifier of the field to look for.
        Returns:
        The absolute path to the field as a PathExpression.
      • getAbsolutePathOfNode

        Expression.PathExpression getAbsolutePathOfNode​(String nodeId)
        Gets the absolute path the can be used to locate a node in the data source.
        Parameters:
        nodeId - The identifier of the node to look for.
        Returns:
        The absolute path to the node as a PathExpression.
      • getTypeOfField

        String getTypeOfField​(String fieldId)
        Gets the type of the given field.
        Parameters:
        fieldId - The identifier of the field to look for.
        Returns:
        The type of the field as a string.
      • getRootCodelistOfField

        String getRootCodelistOfField​(String fieldId)
        Gets the codelist associated with the given field. If the codelist is a tailored codelist the this method will return the its codelist.
        Parameters:
        fieldId - The identifier of the field to look for.
        Returns:
        The "root" codelist associated ith the given field.
      • expandCodelist

        List<String> expandCodelist​(String codelistId)
        Gets the list of all codes in a given codelist as a list of strings.
        Parameters:
        codelistId - The identifier of the codelist to expand.
        Returns:
        The list of codes in the given codelist.