Interface ISQLDatasetMapper

  • All Known Implementing Classes:
    MySQLDatasetMapper

    public interface ISQLDatasetMapper
    This interface is meant to offer the ability to serialize and unserialize datasets from and to database tables. The assumption is that the mapper has information about the database hose and the database itself, so that the interface only allows to specify the table on which the operations take place.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      org.api4.java.ai.ml.core.dataset.schema.IInstanceSchema getInstanceSchemaForQuery​(java.lang.String sqlQuery)  
      org.api4.java.ai.ml.core.dataset.schema.ILabeledInstanceSchema getInstanceSchemaForQuery​(java.lang.String sqlQuery, java.lang.String labelField)  
      org.api4.java.ai.ml.core.dataset.schema.IInstanceSchema getInstanceSchemaOfTable​(java.lang.String tableName)  
      org.api4.java.ai.ml.core.dataset.schema.ILabeledInstanceSchema getInstanceSchemaOfTable​(java.lang.String tableName, java.lang.String labelField)  
      org.api4.java.ai.ml.core.dataset.IDataset<?> readDatasetFromQuery​(java.lang.String sqlQuery)  
      org.api4.java.ai.ml.core.dataset.supervised.ILabeledDataset<?> readDatasetFromQuery​(java.lang.String sqlQuery, java.lang.String labelField)  
      org.api4.java.ai.ml.core.dataset.IDataset<?> readDatasetFromTable​(java.lang.String tableName)  
      org.api4.java.ai.ml.core.dataset.supervised.ILabeledDataset<?> readDatasetFromTable​(java.lang.String tableName, java.lang.String labelField)  
      void writeDatasetToDatabase​(org.api4.java.ai.ml.core.dataset.IDataset<?> dataset, java.lang.String tableName)  
    • Method Detail

      • readDatasetFromTable

        org.api4.java.ai.ml.core.dataset.IDataset<?> readDatasetFromTable​(java.lang.String tableName)
                                                                   throws java.sql.SQLException,
                                                                          java.io.IOException
        Throws:
        java.sql.SQLException
        java.io.IOException
      • getInstanceSchemaOfTable

        org.api4.java.ai.ml.core.dataset.schema.IInstanceSchema getInstanceSchemaOfTable​(java.lang.String tableName)
                                                                                  throws java.sql.SQLException,
                                                                                         java.io.IOException
        Throws:
        java.sql.SQLException
        java.io.IOException
      • getInstanceSchemaOfTable

        org.api4.java.ai.ml.core.dataset.schema.ILabeledInstanceSchema getInstanceSchemaOfTable​(java.lang.String tableName,
                                                                                                java.lang.String labelField)
                                                                                         throws java.sql.SQLException,
                                                                                                java.io.IOException
        Throws:
        java.sql.SQLException
        java.io.IOException
      • readDatasetFromTable

        org.api4.java.ai.ml.core.dataset.supervised.ILabeledDataset<?> readDatasetFromTable​(java.lang.String tableName,
                                                                                            java.lang.String labelField)
                                                                                     throws java.sql.SQLException,
                                                                                            java.io.IOException
        Throws:
        java.sql.SQLException
        java.io.IOException
      • readDatasetFromQuery

        org.api4.java.ai.ml.core.dataset.IDataset<?> readDatasetFromQuery​(java.lang.String sqlQuery)
                                                                   throws java.sql.SQLException,
                                                                          java.io.IOException
        Throws:
        java.sql.SQLException
        java.io.IOException
      • getInstanceSchemaForQuery

        org.api4.java.ai.ml.core.dataset.schema.IInstanceSchema getInstanceSchemaForQuery​(java.lang.String sqlQuery)
                                                                                   throws java.sql.SQLException,
                                                                                          java.io.IOException
        Throws:
        java.sql.SQLException
        java.io.IOException
      • getInstanceSchemaForQuery

        org.api4.java.ai.ml.core.dataset.schema.ILabeledInstanceSchema getInstanceSchemaForQuery​(java.lang.String sqlQuery,
                                                                                                 java.lang.String labelField)
                                                                                          throws java.sql.SQLException,
                                                                                                 java.io.IOException
        Throws:
        java.sql.SQLException
        java.io.IOException
      • readDatasetFromQuery

        org.api4.java.ai.ml.core.dataset.supervised.ILabeledDataset<?> readDatasetFromQuery​(java.lang.String sqlQuery,
                                                                                            java.lang.String labelField)
                                                                                     throws java.sql.SQLException,
                                                                                            java.io.IOException
        Throws:
        java.sql.SQLException
        java.io.IOException
      • writeDatasetToDatabase

        void writeDatasetToDatabase​(org.api4.java.ai.ml.core.dataset.IDataset<?> dataset,
                                    java.lang.String tableName)
                             throws java.sql.SQLException,
                                    java.io.IOException
        Throws:
        java.sql.SQLException
        java.io.IOException