package org.forkalsrud.album.exif;

import java.io.File;
import java.io.IOException;

import org.forkalsrud.album.db.DirectoryDatabase;
import org.forkalsrud.album.video.MovieMetadataGenerator;

public class DirectoryEntryFactory implements DirectoryEntry.ServiceApi {

    private DirectoryDatabase dirDb;
    private DirectoryMetadataGenerator generator;
    private MovieMetadataGenerator movieGenerator;

    public DirectoryEntryFactory(DirectoryDatabase dirDb) throws IOException, InterruptedException {
        this.dirDb = dirDb;
        this.generator = new DirectoryMetadataGenerator(new MovieMetadataGenerator());
    }


    public DirectoryEntry getEntry(File dir, DirectoryEntry parent) {
        return new DirectoryEntry(this, parent, dir);
    }


    @Override
    public DirectoryDatabase getDirectoryDatabase() {
        return dirDb;
    }


    @Override
    public DirectoryMetadataGenerator getMetadataGenerator() {
        return generator;
    }
}
