public class Document extends Object
| Constructor and Description |
|---|
Document(String text)
Creates a document.
|
| Modifier and Type | Method and Description |
|---|---|
int |
getLineNumber(int offsetInDocument)
Gets the line number for a given offset within the document.
|
List<Line> |
getLines()
Gets the parsed lines.
|
SourceInfo |
getSourceInfo()
Gets the source info.
|
String |
getText()
Gets the document text.
|
protected Line |
nextLine(Line currentLine)
Gets the next line.
|
protected List<Line> |
parse()
Parses the document and returns a list of lines.
|
public Document(String text)
text - the model specification sourcepublic String getText()
public SourceInfo getSourceInfo()
public List<Line> getLines() throws ModelException
ModelException - if parsing failedpublic int getLineNumber(int offsetInDocument)
offsetInDocument - the offsetprotected List<Line> parse() throws ModelException
ModelException - if parsing failedprotected Line nextLine(Line currentLine) throws ModelException
currentLine - the current line, null if start of documentModelException - if parsing failedCopyright © 2016 Krake Softwaretechnik. All rights reserved.