|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.goerntkai.scot.app.document.SCoTDocument
Every file that is a source to SCoT is a SCoTDocument
. The
file consists of SCoTBlock
s and lines.
Constructor Summary | |
SCoTDocument(java.lang.String path,
Configuration aConfiguration)
Instantiates and reads the file. |
Method Summary | |
SCoTBlock[] |
getBlocks(int start)
Returns the lines beginning with the starting index as an array of block definitions. |
Configuration |
getConfiguration()
|
java.lang.String |
getLine(int index)
Returns the line with the given index. |
java.lang.String[] |
getLines()
Returns an array with all the lines in the file. |
java.lang.String[] |
getLines(int end)
Returns an array of the lines from the file. |
java.lang.String[] |
getLines(int start,
int end)
Returns an array of lines from the file. |
java.lang.String |
getReference()
Returns the reference that another file will need to set a link to this HTML document. |
java.lang.String |
toString()
This method is mainly contained for debugging. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public SCoTDocument(java.lang.String path, Configuration aConfiguration) throws java.io.FileNotFoundException
Instantiates and reads the file.
path
- path and name of the fileaConfiguration
- the configuration of this application
java.io.FileNotFoundException
Method Detail |
public SCoTBlock[] getBlocks(int start) throws java.io.FileNotFoundException
Returns the lines beginning with the starting index as an array of
block definitions. Returns null if start
is not in the
range.
start
- the index for the starting line
java.io.FileNotFoundException
public Configuration getConfiguration()
public java.lang.String getLine(int index)
Returns the line with the given index. Returns ""
when
the index is not in the range.
index
- the number of the line to return
public java.lang.String[] getLines()
Returns an array with all the lines in the file.
public java.lang.String[] getLines(int end)
Returns an array of the lines from the file. Not all lines will be
returned but all beginning from the first to the one indexed by
end-1
.
end
- the index for the line after the endig one
public java.lang.String[] getLines(int start, int end)
Returns an array of lines from the file. The array beginns with the
one indexed by start
and ends with the one indexed by
end-1
. If end
is greater than
lines.length
it returns every line beginning with
start
.
start
- the index for the starting lineend
- the index for the ending line
public java.lang.String getReference()
Returns the reference that another file will need to set a link to
this HTML document. The reference is the plain file name without any
extension or parent folder structure. It has to be concatenated with
.html
for referencing a HTML document or can be used as it
is for referencing an anchor withing an HTML document.
public java.lang.String toString()
This method is mainly contained for debugging.
Object.toString()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |