--- /dev/null
+package org.simantics.document.linking.report;\r
+\r
+/**\r
+ * Interface for creating documents.\r
+ * \r
+ * @author Marko Luukkainen <marko.luukkainen@vtt.fi>\r
+ *\r
+ */\r
+public interface Document {\r
+ \r
+ public static String TOC = "toc";\r
+ \r
+ public enum TextSize {TINY,SMALL,MEDIUM,LARGE,HUGE};\r
+\r
+ /**\r
+ * Creates a new element of given class\r
+ * @param cls\r
+ * @return\r
+ * @throws Exception\r
+ */\r
+ public <T extends DocumentElement> T newElement(Class<T> cls,String... options) throws Exception;\r
+ \r
+ /**\r
+ * Creates a new element of given class, copies parameters from previous element of the same class.\r
+ * @param cls\r
+ * @return\r
+ * @throws Exception\r
+ */\r
+ public <T extends DocumentElement> T nextElement(Class<T> cls, String... options) throws Exception;\r
+ \r
+ /**\r
+ * Returns last element of given class.\r
+ * @param cls\r
+ * @return\r
+ */\r
+ public <T extends DocumentElement> T getCurrentElement(Class<T> cls);\r
+ \r
+ \r
+ /**\r
+ * Creates a new item of given class\r
+ * @param cls\r
+ * @return\r
+ * @throws Exception\r
+ */\r
+ public <T extends DocumentItem> T newItem(Class<T> cls,String... options) throws Exception;\r
+\r
+ /**\r
+ * Requests a new page. After this call getCurrentLine() is expected to return 1.\r
+ * @throws Exception\r
+ */\r
+ public void nextPage() throws Exception;\r
+ \r
+ /**\r
+ * Returns current line (of the page). The number for first line is 1. \r
+ * @return\r
+ */\r
+ public int getCurrentLine();\r
+ \r
+ /**\r
+ * Returns estimated available lines for current page. For non-paged implementations returns Integer.MAX_VALUE;\r
+ * @return\r
+ */\r
+ public int getAvailableLines();\r
+ \r
+ /**\r
+ * Closes the document. \r
+ * \r
+ * @throws Exception\r
+ */\r
+ public void close() throws Exception;\r
+\r
+\r
+}
\ No newline at end of file