package ru.yandex.webmaster3.core.semantic.semantic_document_parser.struct_data;

import ru.yandex.common.util.xml.Xmler;

import java.util.Set;

import static ru.yandex.common.util.xml.Xmler.header;

/**
 * Created by IntelliJ IDEA.
 * User: rasifiel
 * Date: 13.08.12
 * Time: 17:17
 */
public abstract class XmlStructData implements StructData {

    public abstract Set<String> getEntityTags();

    public abstract Xmler.Tag toXml();

    @Override
    public String getContent() {
        final StringBuilder sb = new StringBuilder();
        header().toXml(sb);
        sb.append("\n");
        toXml().toXml(sb);
        return sb.toString();
    }
}
