/*
 * Copyright
 *   2007 axYus - www.axyus.com
 *   2010 C.Marchand - christophe.marchand@axyus.com
 *
 * This file is part of XEMELIOS.
 *
 * XEMELIOS is free software; you can redistribute it and/or modify
 * it under the terms of the GNU Lesser General Public License as published by
 * the Free Software Foundation; either version 3 of the License, or
 * (at your option) any later version.
 *
 * XEMELIOS is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public License
 * along with XEMELIOS; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */

package fr.gouv.finances.dgfip.xemelios.web.gwt.client.dto;

import java.io.Serializable;
import java.util.ArrayList;

public class CollectiviteTreeDTO implements Serializable {
    private String documentId;
    private String libelleCollectivite;
    private ArrayList<ParentCollectiviteDTO> parentModels;
    private ArrayList<SpecialKeyDefDTO> specialKeys;

    public CollectiviteTreeDTO() {
        super();
        parentModels = new ArrayList<ParentCollectiviteDTO>();
    }

    public String getDocumentId() {
        return documentId;
    }

    public void setDocumentId(String documentId) {
        this.documentId = documentId;
    }
    public int getCollectivitesParentModelCount() {
        return parentModels.size();
    }
    public ParentCollectiviteDTO getParentModel(int i) {
        return parentModels.get(i);
    }
    public void addParentCollectivite(ParentCollectiviteDTO pc) {
        parentModels.add(pc);
    }

    public String getLibelleCollectivite() {
        return libelleCollectivite;
    }

    public void setLibelleCollectivite(String libelleCollectivite) {
        this.libelleCollectivite = libelleCollectivite;
    }

    public ArrayList<SpecialKeyDefDTO> getSpecialKeys() { return specialKeys; }

    public void addSpecialKey(SpecialKeyDefDTO sk) {
        if(specialKeys==null) specialKeys = new ArrayList<SpecialKeyDefDTO>();
        specialKeys.add(sk);
    }
    
}
