/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package cz.csu.sdmx.validation.model.data;

import cz.csu.sdmx.validation.model.DataSet;
import cz.csu.sdmx.validation.model.dsds.Dsd;
import cz.csu.sdmx.validation.xml.XmlHandler;
import java.util.ArrayList;
import java.util.List;
import org.w3c.dom.Document;

/**
 *
 * @author themi
 */
public abstract class SDMXData {
    public static final String COMPACT = "CompactData";
    public static final String UTILITY = "UtilityData";
    public static final String CROSS = "CrossSectionalData";
    
    protected String filename;
    protected List<DataSet> dataSetList;
    protected Document doc;
    
    protected List<String> datasetElementName;
    protected List<String> seriesElementName;
    protected List<String> obsElementName;
    
    public SDMXData(Document doc){
          this.doc = doc;
          this.dataSetList = new ArrayList<>();
          
          this.datasetElementName = new ArrayList<>();
          this.seriesElementName = new ArrayList<>();
          this.obsElementName = new ArrayList<>();
    }

    public String getFilename() {
        return (String)doc.getUserData(XmlHandler.FILENAME_KEY_NAME);
    }
    
    public abstract boolean parseDatasets(Dsd dsd);

    public Document getDocument() {
        return doc;
    }

    public List<DataSet> getDataSets() {
        return dataSetList;
    }
    
}
