Package gov.usgs.earthquake.qdm
Class Regions
- java.lang.Object
-
- gov.usgs.earthquake.qdm.Regions
-
public class Regions extends java.lang.Object
Set of regions.
-
-
Field Summary
Fields Modifier and Type Field Description java.lang.String
defaultNetid
Default networkjava.util.ArrayList<java.lang.String>
netids
Array of network ids, e.g.java.util.ArrayList<Region>
regions
Array of regions
-
Constructor Summary
Constructors Constructor Description Regions()
Create a new set of regions.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
isAuthor(EQEvent eq)
Determines if the event is from the authoritative network.boolean
isAuthor(java.lang.String netid, Point p)
Determines if the event is from the authoritative network.boolean
isDefaultNetID(EQEvent eq)
Checks if an event's network ID is the default network.boolean
isDefaultNetID(java.lang.String netid)
Checks if network ID is the default network.boolean
isValidnetID(java.lang.String netid)
Is this netid in the set of regions? The default net covers the whole world so it is always valid since it has no finite boundaries.
-
-
-
Field Detail
-
defaultNetid
public java.lang.String defaultNetid
Default network
-
netids
public java.util.ArrayList<java.lang.String> netids
Array of network ids, e.g. nc, us, etc.
-
regions
public java.util.ArrayList<Region> regions
Array of regions
-
-
Method Detail
-
isValidnetID
public boolean isValidnetID(java.lang.String netid)
Is this netid in the set of regions? The default net covers the whole world so it is always valid since it has no finite boundaries.- Parameters:
netid
- A netid (nc, us, etc.)- Returns:
- boolean if netid is valid
-
isDefaultNetID
public boolean isDefaultNetID(java.lang.String netid)
Checks if network ID is the default network.- Parameters:
netid
- network ID- Returns:
- true if default network.
-
isDefaultNetID
public boolean isDefaultNetID(EQEvent eq)
Checks if an event's network ID is the default network.- Parameters:
eq
- EQ event- Returns:
- true if default network.
-
isAuthor
public boolean isAuthor(java.lang.String netid, Point p)
Determines if the event is from the authoritative network.- Parameters:
netid
- network IDp
- event point- Returns:
- true if event is authoritative
-
isAuthor
public boolean isAuthor(EQEvent eq)
Determines if the event is from the authoritative network.- Parameters:
eq
- EQ event- Returns:
- true if event is authoritative
-
-