Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #104 from smigielski/structureddocuments
Structure documents
- Loading branch information
Showing
12 changed files
with
917 additions
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
package org.asciidoctor; | ||
|
||
import java.util.List; | ||
import java.util.Map; | ||
|
||
public class ContentPart { | ||
private String id; | ||
private int level; | ||
private String context; | ||
private String style; | ||
private String role; | ||
private String title; | ||
private Map<String, Object> attributes; | ||
private String content; | ||
private List<ContentPart> parts; | ||
|
||
private ContentPart() { | ||
super(); | ||
} | ||
|
||
public String getId() { | ||
return id; | ||
} | ||
|
||
public int getLevel() { | ||
return level; | ||
} | ||
|
||
public String getContext() { | ||
return context; | ||
} | ||
|
||
public String getStyle() { | ||
return style; | ||
} | ||
|
||
public String getRole() { | ||
return role; | ||
} | ||
|
||
public String getTitle() { | ||
return title; | ||
} | ||
|
||
public Map<String, Object> getAttributes() { | ||
return attributes; | ||
} | ||
|
||
public String getContent() { | ||
return content; | ||
} | ||
|
||
public List<ContentPart> getParts() { | ||
return parts; | ||
} | ||
|
||
public void setParts(List<ContentPart> parts) { | ||
this.parts = parts; | ||
} | ||
|
||
public static ContentPart createContentPart(String id, int level,String context, String title, | ||
String style, String role, Map<String, Object> attributes, | ||
String textContent) { | ||
ContentPart contentPart = new ContentPart(); | ||
contentPart.level=level; | ||
contentPart.id=id; | ||
contentPart.context=context; | ||
contentPart.style=style; | ||
contentPart.role=role; | ||
contentPart.title=title; | ||
contentPart.attributes=attributes; | ||
contentPart.content=textContent; | ||
|
||
return contentPart; | ||
} | ||
|
||
} |
Oops, something went wrong.