
package nlib.col.service.impl;

import java.util.List;

import javax.annotation.Resource;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Service;

import nlib.col.service.RisService;
import nlib.col.service.CollectionVO;
import nlib.col.service.DeptVO;
import nlib.col.service.RisVO;
import nlib.restful.service.DataApiReqVO;
import nlib.restful.service.DataApiResVO;

@Service("risService")
public class RisServiceImpl implements RisService
{
	private static final Logger log = LoggerFactory.getLogger(RisServiceImpl.class);
	
	@Resource(name = "risDAO")
	private RisDAO risDAO;

	/* 
	 * 소장자료 목록을 조회한다.
	 * 
	 * (non-Javadoc)
	 * @see nlib.col.service.CollectionService#listItems(nlib.restful.service.DataApiReqVO)
	 */
	public DataApiResVO listItems(DataApiReqVO reqVO)  {
		return ((RisService) risDAO).listItems(reqVO);
	}

	public DataApiResVO insertInterest(DataApiReqVO reqVO)  {
		return null;
	}

	public DataApiResVO reserveItem(DataApiReqVO reqVO)  {
		return null;
	}

	public DataApiResVO viewOriginalCopy(DataApiReqVO reqVO)  {
		return null;
	}

	public DataApiResVO requestViewingItem(DataApiReqVO reqVO)  {
		return null;
	}
	/* 
	 * 소장자료를 상세 조회한다.
	 * 
	 * (non-Javadoc)
	 * @see nlib.col.service.CollectionService#selectItemInfo(nlib.restful.service.DataApiReqVO)
	 */
	public DataApiResVO selectItemInfo(DataApiReqVO reqVO)  {
		return ((RisService) risDAO).selectItemInfo(reqVO);
	}

	/* 
	 * RIS파일 다운로드 데이터를 조회한다.
	 * (non-Javadoc)
	 * @see nlib.col.service.CollectionService#selectRisInfo(nlib.col.service.CollectionVO)
	 */
	public RisVO selectRisInfo(RisVO vo) {
		return risDAO.selectRisInfo(vo);
	}
	
	/* 
	 * 문화원 목록 조회(검색 필터용)
	 * (non-Javadoc)
	 * @see nlib.col.service.CollectionService#selectOrgList()
	 */
	public List<DeptVO> selectOrgList() {
		return risDAO.selectOrgList();
	}

	/* 
	 * 소장자료 목록 조회
	 * (non-Javadoc)
	 * @see nlib.col.service.CollectionService#listItems(nlib.col.service.CollectionVO)
	 */
	public List<CollectionVO> listItems(CollectionVO searchCollectionVO) {
		return risDAO.listItems(searchCollectionVO);
	}

	/* 
	 * 소장자료 목록 개수 조회
	 * (non-Javadoc)
	 * @see nlib.col.service.CollectionService#countListItems(nlib.col.service.CollectionVO)
	 */
	public int countListItems(CollectionVO searchCollectionVO) {
		return risDAO.countListItems(searchCollectionVO);
	}
}