-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTypes.java
More file actions
31 lines (26 loc) · 937 Bytes
/
Types.java
File metadata and controls
31 lines (26 loc) · 937 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
import java.io.*;
import de.kumakyoo.omalibjava.*;
// Compile:
//
// javac -cp ../omalibjava.jar Types.java
//
// Aufruf:
//
// java -classpath .:../omalibjava.jar Types <oma-file>
//
public class Types
{
public static void main(String[] args) throws IOException
{
OmaReader r = new OmaReader(args[0]);
System.out.println("File contains blocks of type highway: "+(r.containsBlocks((byte)'W',"highway")?"yes":"no"));
System.out.println("File contains slices of type highway=micepath: "+(r.containsSlices((byte)'W',"highway","micepath")?"yes":"no"));
System.out.println("Keys of area blocks:");
for (String key:r.keySet((byte)'A'))
System.out.println(" "+key);
System.out.println("Values of node slices of block with key 'natural':");
for (String value:r.valueSet((byte)'N',"natural"))
System.out.println(" "+value);
r.close();
}
}