CollectionRepositoryServiceDefault.java

package org.linkedopenactors.rdfpub.adapter.driven;

import org.eclipse.rdf4j.repository.Repository;
import org.linkedopenactors.rdfpub.domain.Actor;
import org.linkedopenactors.rdfpub.domain.CollectionRepository;
import org.linkedopenactors.rdfpub.domain.CollectionRepositoryService;
import org.linkedopenactors.rdfpub.domain.DomainObjectBuilders;
import org.linkedopenactors.rdfpub.domain.ResourceFactory;
import org.springframework.stereotype.Component;

@Component
class CollectionRepositoryServiceDefault implements CollectionRepositoryService {

	private Repository repository;
	private ResourceFactory resourceFactory;
	private RdfTypeRepository rdfTypeRepository;
	private DomainObjectBuilders domainObjectBuilders;
	
	public CollectionRepositoryServiceDefault(Repository repository, ResourceFactory resourceFactory,
			RdfTypeRepository rdfTypeRepository, DomainObjectBuilders domainObjectBuilders) {
		this.repository = repository;
		this.resourceFactory = resourceFactory;
		this.rdfTypeRepository = rdfTypeRepository;
		this.domainObjectBuilders = domainObjectBuilders;
	}
	
	@Override
	public CollectionRepository getCollectionRepository(Actor actor) {
		return new CollectionRepositoryDefault(actor, repository, resourceFactory, rdfTypeRepository, domainObjectBuilders);
	}
}