Java Code Examples for org.asciidoctor.ast.StructuralNode#getLevel()

The following examples show how to use org.asciidoctor.ast.StructuralNode#getLevel() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: DescriptionListEntryImpl.java    From swagger2markup with Apache License 2.0 4 votes vote down vote up
public DescriptionListEntryImpl(StructuralNode parent, Map<String, Object> attributes, List<String> roles,
                                Object content, List<StructuralNode> blocks, String contentModel, List<String> subs,
                                List<ListItem> terms, ListItem description) {
    this(parent, attributes, roles, content, blocks, null != parent ? parent.getLevel() : 1, contentModel, subs, terms, description);
}
 
Example 2
Source File: StructuralNodeImpl.java    From swagger2markup with Apache License 2.0 4 votes vote down vote up
protected static Integer calculateLevel(StructuralNode parent) {
    return null != parent ? parent.getLevel() + 1 : 0;
}
 
Example 3
Source File: DocumentImpl.java    From swagger2markup with Apache License 2.0 4 votes vote down vote up
public DocumentImpl(StructuralNode parent, String context, Map<String, Object> attributes, List<String> roles,
                    Object content, List<StructuralNode> blocks, String contentModel,
                    List<String> subs) {
    this(parent, context, attributes, roles, content, blocks, null != parent ? parent.getLevel() + 1 : 0, contentModel, subs);
}
 
Example 4
Source File: ListImpl.java    From swagger2markup with Apache License 2.0 4 votes vote down vote up
public ListImpl(StructuralNode parent, String context, Map<String, Object> attributes, java.util.List<String> roles,
                Object content, java.util.List<StructuralNode> blocks,
                String contentModel, java.util.List<String> subs, java.util.List<StructuralNode> items) {
    this(parent, context, attributes, roles, content, blocks, null != parent ? parent.getLevel() + 1 : 0, contentModel, subs, items);
}
 
Example 5
Source File: ListItemImpl.java    From swagger2markup with Apache License 2.0 4 votes vote down vote up
public ListItemImpl(StructuralNode parent, String context, Map<String, Object> attributes, List<String> roles,
                    Object content, List<StructuralNode> blocks, String contentModel,
                    List<String> subs, String marker, String text) {
    this(parent, context, attributes, roles, content, blocks, null != parent ? parent.getLevel() : 1, contentModel, subs, marker, text);
}
 
Example 6
Source File: DescriptionListImpl.java    From swagger2markup with Apache License 2.0 4 votes vote down vote up
protected static Integer calculateLevel(StructuralNode parent) {
    int level = 1;
    if (parent instanceof DescriptionList)
        level = parent.getLevel() + 1;
    return level;
}