package mediawiki.request.generic;

import javat.xml.Element;

public abstract class IndirectContinuingRequest<T> extends
		AbstractContinuingRequest<T> {

	private String[] groups;
	
	public IndirectContinuingRequest(String[] groups, String entry, String prefix) {
		super(entry, prefix);
		setGroups(groups);
	}
	
	@Override
	protected Element findGroup(Element query) {
		for(String g : getGroups())
			query = query.getChildren(g).get(0);
		return query;
	}

	public String[] getGroups() {
		return groups;
	}

	public void setGroups(String[] groups) {
		this.groups = groups;
	}

}
