package org.etsi.mts.tdl.document.model;

import java.util.LinkedHashMap;
import java.util.TreeMap;

public class Document extends Content {
	private static final long serialVersionUID = -886387704081982886L;
	TreeMap<String,Content> index = new TreeMap<>();
	public LinkedHashMap<String,String> meta = new LinkedHashMap<>();
	String filename;
	String title;
	public String getFilename() {
		return filename;
	}
	public void setFilename(String filename) {
		this.filename = filename;
	}
	public String getTitle() {
		return title;
	}
	public void setTitle(String title) {
		this.title = title;
	}
	public void index(Content c) {
		if (c.getText()!=null && !c.getText().isEmpty()) {
			index.put(c.getText(), c);
		}
	}
	public Content get(String title) {
		return index.get(title);
	}
}
