-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPower.java
More file actions
34 lines (29 loc) · 771 Bytes
/
Power.java
File metadata and controls
34 lines (29 loc) · 771 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
32
33
34
import java.io.*;
import de.kumakyoo.omalibjava.*;
// Compile:
//
// javac -cp ../omalibjava.jar Power.java
//
// Aufruf:
//
// java -classpath .:../omalibjava.jar Power <oma-file>
//
public class Power
{
public static void main(String[] args) throws IOException
{
Filter f1 = new BlockFilter("power");
Filter f2 = new BoundingBoxFilter(8.194,49.563,8.195,49.564);
Filter f3 = new LifecycleFilter(); // try new LifecycleFilter("removed") instead...
Filter f4 = new AndFilter(f1,f2,f3);
OmaReader r = new OmaReader(args[0]);
r.setFilter(f4);
while (true)
{
Element e = r.next();
if (e==null) break;
System.out.println(e);
}
r.close();
}
}