|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectuk.me.parabola.mkgmap.osmstyle.StyleFileLoader
uk.me.parabola.mkgmap.osmstyle.CombinedStyleFileLoader
public class CombinedStyleFileLoader
Load a style from a single file. All the files that make up the style are held in the same file and delimited by a simple header.
Lines before the first header are ignored. A header looks like this: <<<filename>>>, that is three opening angle brackets, the name of the file and three closing angle brackets. The opening brackets must be at the beginning of the line, there can be trailing junk after the closing brackets which is ignored.
All lines after the header and before the next header or end of file are part of the named file.
If there are no headers in the file, then we create a fake version 0 file and place the complete file in the name 'map-features.csv'. This allows us to wrap an existing map-features.csv file in the new style system.
Constructor Summary | |
---|---|
CombinedStyleFileLoader(java.lang.String filename)
|
Method Summary | |
---|---|
void |
close()
Close the FileLoader. |
java.lang.String[] |
list()
List the names of the styles that are contained in this loader. |
static void |
main(java.lang.String[] args)
Covert between the single file simple-archive form and the directory form. |
java.io.Reader |
open(java.lang.String filename)
Open the specified file in the style definition. |
Methods inherited from class uk.me.parabola.mkgmap.osmstyle.StyleFileLoader |
---|
createStyleLoader |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CombinedStyleFileLoader(java.lang.String filename) throws java.io.FileNotFoundException
java.io.FileNotFoundException
Method Detail |
---|
public java.io.Reader open(java.lang.String filename) throws java.io.FileNotFoundException
open
in class StyleFileLoader
filename
- The name of the file in the style.
java.io.FileNotFoundException
- When the file can't be opened.public void close()
open(java.lang.String)
. After this call then you shouldn't open any
more files.
close
in class StyleFileLoader
public java.lang.String[] list()
StyleFileLoader
list
in class StyleFileLoader
public static void main(java.lang.String[] args)
args
- Arguments, you supply a directory or a file. If its a
directory then covert into a simple-archive file and if it is a
file then expand into separate files.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |