Interface VTLSession

  • All Superinterfaces:
    TransformationScheme
    All Known Implementing Classes:
    VTLSessionImpl

    public interface VTLSession
    extends TransformationScheme
    This interface provide the user with the ability to manage all VTL code, data and metadata by providing high-level methods that the user can interact with.
    Author:
    Valentino Pinna
    • Method Detail

      • getEngine

        Engine getEngine()
        Returns:
        the computing Engine used by this session
      • addStatements

        VTLSession addStatements​(String statements)
        Adds some VTL statements to this session. Code is parsed but not compiled.
        Parameters:
        statements - A string containing the statements to add
        Returns:
        this instance.
      • addStatements

        VTLSession addStatements​(Reader reader)
                          throws IOException
        Adds some VTL statements to this session. Code is parsed but not compiled. The Reader will be consumed entirely and closed.
        Parameters:
        reader - a Reader which provides the VTL statements to add.
        Returns:
        this instance.
        Throws:
        IOException
      • addStatements

        VTLSession addStatements​(InputStream inputStream,
                                 Charset charset)
                          throws IOException
        Adds some VTL statements to this session. Code is parsed but not compiled. The InputStream will be consumed entirely and closed.
        Parameters:
        inputStream - an InputStream which provides the VTL statements to add
        charset - a Charset instance which will be used to interpret the stream contents.
        Returns:
        this instance.
        Throws:
        IOException
      • addStatements

        VTLSession addStatements​(Path path,
                                 Charset charset)
                          throws IOException
        Adds some VTL statements to this session. Code is parsed but not compiled.
        Parameters:
        path - a Path describing the position of a local file which provides the VTL statements to add
        charset - a Charset instance which will be used to interpret the file contents.
        Returns:
        this instance.
        Throws:
        IOException
      • compile

        List<VTLValueMetadata> compile()
        Compile all the VTL code submitted to this session, and returns the metadata of all the objects contained in this session.
        Returns:
        a List of VTLValueMetadata instances, describing a VTL object each.