forked from asciidoctor/asciidoctorj
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Document.java
105 lines (88 loc) · 2.61 KB
/
Document.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
package org.asciidoctor.ast;
import java.util.List;
import java.util.Map;
public interface Document extends StructuralNode {
/**
* @return The Title structure for this document.
* @see Title
*/
Title getStructuredDoctitle();
/**
* @return The title as a String.
* @see Title
*/
String getDoctitle();
/**
* @deprecated Please use {@link #getDoctitle()}
* @return The title as a String.
* @see Title
*/
@Deprecated
String doctitle();
/**
* Gets the author(s) information as defined in the author line
* in the document header, or in author & email attributes.
*
* @return authors information
*/
List<Author> getAuthors();
/**
* @return basebackend attribute value
*/
boolean isBasebackend(String backend);
/**
* @deprecated Please use {@link #isBasebackend(String)}
* @return basebackend attribute value
*/
@Deprecated
boolean basebackend(String backend);
/**
*
* @return options defined in document.
*/
Map<Object, Object> getOptions();
/**
* Gets the current counter with the given name and increases its value.
* At the first invocation the counter will return 1.
* After the call the value of the counter is set to the returned value plus 1.
* @param name
* @return
*/
int getAndIncrementCounter(String name);
/**
* Gets the current counter with the given name and increases its value.
* At the first invocation the counter will return the given initial value.
* After the call the value of the counter is set to the returned value plus 1.
* @param name
* @param initialValue
* @return
*/
int getAndIncrementCounter(String name, int initialValue);
/**
* @return Whether the sourcemap is enabled.
*/
boolean isSourcemap();
/**
* Toggles the sourcemap option.
*
* This method must be called before the document is parsed, such as
* from a Preprocessor extension. Otherwise, it has no effect.
*
* @param state The state in which to put the sourcemap (true = on, false = off).
*/
void setSourcemap(boolean state);
/**
* The catalog contains data collected by asciidoctor that is useful to a converter.
*
* Note that the catalog is not part of the asciidoctor public API and is subject to change.
*
* @return catalog
*/
Catalog getCatalog();
/**
* The revision information with: date, number and remark.
*
* @return revisionInfo
*/
RevisionInfo getRevisionInfo();
}