All Downloads are FREE. Search and download functionalities are using the official Maven repository.

angry1980.audio.ImportFromNetflixToNeo4jConfig Maven / Gradle / Ivy

There is a newer version: 0.0.10
Show newest version
package angry1980.audio;

import angry1980.audio.dao.*;
import org.neo4j.graphdb.GraphDatabaseService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;

@Configuration
@ComponentScan(value = {"angry1980.audio.config"})
public class ImportFromNetflixToNeo4jConfig {

    @Autowired
    private TrackDAO trackDAO;
    @Autowired
    private TrackSimilarityDAO trackSimilarityDAO;
    @Autowired
    private GraphDatabaseService graphDB;

    @Bean
    public DataImporter dataImporter(){
        return new DataImporter(
                new DataImporter.TrackDataEnvironment(
                        trackDAO,
                        trackSimilarityDAO
                )
        );
    }

    @Bean
    public DataImporter.TrackDataEnvironment sourceEnvironment(){
        return new DataImporter.TrackDataEnvironment(
                new TrackDAONeo4jImpl(graphDB),
                new TrackSimilarityDAONeo4jImpl(graphDB)
        );
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy