package com.k_int.discover.sru.service;

import java.util.List;

import com.k_int.aggregator.dto.AggregatorCollectionDTO;
import com.k_int.aggregator.dto.AggregatorSourceDTO;

public class CollectionHierarchy {
	public int level = 0;
	public AggregatorCollectionDTO collection = null;
	public boolean hasChildren = false;
	public boolean lastChild = false;
	public List<AggregatorSourceDTO> sources = null;
	public int numOfSources = 0;
	
	public CollectionHierarchy(int level, AggregatorCollectionDTO collection, boolean hasChildren, boolean isLastChild, List<AggregatorSourceDTO> sources) {
		this.level = level;
		this.collection = collection;
		this.hasChildren = hasChildren;
		this.lastChild = isLastChild;
		this.sources = sources;
		if ( sources != null ) {
			this.numOfSources = sources.size();
		}
	}
	
	public int getLevel() {
		return this.level;
	}
	
	public AggregatorCollectionDTO getCollection() {
		return this.collection;
	}
	
	public boolean getHasChildren() {
		return this.hasChildren;
	}
	
	public boolean getLastChild() {
		return this.lastChild;
	}
	
	public List<AggregatorSourceDTO> getSources() {
		return this.sources;
	}
	
	public int getNumOfSources() {
		return this.numOfSources;
	}
}
