|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectdd.util.MapMaker
A command-line utility for creating maps. This class takes as input text files specifying maps and outputs the XML representation of the map.
Map input lines should contain a map cell coordinate, a layer name, and attributes and can take the following forms:
(1) <x,y> layerName attributeValue (2) <x,y> layerName:attributeName attributeValue index ... (3) <x,y> layerName v: value v: value ... (unimplemented) (4) <x,y> layerName v-v: value v-v: value ... (unimplemented)
In all the examples, x, y, and v are integer values.
Form (1) will create a layer and an attribute on that layer with
the name of the layer and the value specified. Form (2) will use
the name / value pair requested. If indices are present, they are
placed in a HashMap for use by placeIcons(). Form (3) takes an
arbitrary number of vertex numbers (0 <= v <= 5) and creates
a "vertex attribute", meaning something is located at that vertex
with the attribute provided. Form (4) is similar, defining an
"edge attribute", the edge specified by two vertices provided.
Vertex numbering is described in HexView.getVertex(int)
.
Constructor Summary | |
MapMaker(java.lang.String inFile,
java.lang.String outFile)
Creates the map utility. |
Method Summary | |
void |
convert()
Begins the conversion process. |
static void |
main(java.lang.String[] args)
Command line support. |
void |
placeIcons()
Places map icons for land-use. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public MapMaker(java.lang.String inFile, java.lang.String outFile)
inFile
- input file nameoutFile
- output file nameMethod Detail |
public void convert()
public void placeIcons()
public static void main(java.lang.String[] args)
args
- command line arguments, input and output file names
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |