public class NamedStationTable extends StationTableImpl
| Modifier and Type | Field and Description | 
|---|---|
static java.lang.String | 
KEY_BULLETIN
Key for bulletin id in properties 
 | 
static java.lang.String | 
KEY_COUNTRY
Key for country in properties 
 | 
static java.lang.String | 
KEY_EXTRA
Key for priority properties 
 | 
static java.lang.String | 
KEY_IDNUMBER
Key for Station number in properties 
 | 
static java.lang.String | 
KEY_PRIORITY
Key for priority properties 
 | 
static java.lang.String | 
KEY_STATE
Key for state in properties 
 | 
byId_, stations| Constructor and Description | 
|---|
NamedStationTable()
Default constructor 
 | 
NamedStationTable(org.w3c.dom.Element root)
Create a NamedStationTable from an XML specification 
 | 
NamedStationTable(java.lang.String name)
Create a new NamedStationTable with  
name | 
| Modifier and Type | Method and Description | 
|---|---|
static NamedStationTable | 
createStationTable(org.w3c.dom.Element root)
Creates a station table from an XML file with station information,
 such as profilerstns.xml 
 | 
static NamedStationTable | 
createStationTable(java.lang.String xml)
Creates a station table from an XML file with station information,
 such as profilerstns.xml 
 | 
void | 
createStationTableFromBulletin(java.lang.String tbl)
Create a station table from a Gempak bulletin table 
 | 
void | 
createStationTableFromCsv(java.lang.String csv)
Create a station table from a csv string 
 | 
static NamedStationTable | 
createStationTableFromFile(java.lang.String filename)
Create a station table from a file 
 | 
void | 
createStationTableFromGempak(java.lang.String tbl)
Create a station table from a Gempak table 
 | 
void | 
createStationTableFromKmlFile(java.lang.String filename)
Create a station table from KML 
 | 
static java.util.List | 
createStationTables(XmlResourceCollection xrc)
Create a list of NamedStationTables from a set of resources 
 | 
java.lang.String | 
getCategory()
Get the Category property. 
 | 
java.lang.String | 
getDescription()
Get the Description property. 
 | 
java.lang.String | 
getFullName()
Get the full name of the table. 
 | 
java.lang.String | 
getId()
Get the Id property. 
 | 
protected java.util.Map | 
getMap()
Override the base class method to lazily instantiate the stations
 from the XML root element if we have not done so already. 
 | 
java.lang.String | 
getName()
Get the name of the table 
 | 
static java.lang.String | 
getStationXml(java.lang.String name,
             java.lang.String category,
             java.util.List stations)
Get the station xml 
 | 
java.lang.String | 
getType()
Get the Type property. 
 | 
boolean | 
isEmpty()
Is the table empty? 
 | 
static void | 
main(java.lang.String[] args)
Test a particular file 
 | 
static java.util.List<javax.swing.JMenuItem> | 
makeMenuItems(java.util.List locations,
             ObjectListener listener)
Make a set of menu items from the list of locations 
 | 
void | 
setCategory(java.lang.String value)
Set the Category property. 
 | 
void | 
setDescription(java.lang.String value)
Set the Description property. 
 | 
void | 
setId(java.lang.String value)
Set the Id property. 
 | 
void | 
setName(java.lang.String name)
Set the name of the station table 
 | 
void | 
setType(java.lang.String value)
Set the Type property. 
 | 
java.lang.String | 
toString()
Return table name and size 
 | 
static java.util.List | 
xxxxmakeMenuItems(java.util.List stations,
                 ObjectListener listener)
Make stations from the root element. 
 | 
public static final java.lang.String KEY_IDNUMBER
public static final java.lang.String KEY_STATE
public static final java.lang.String KEY_COUNTRY
public static final java.lang.String KEY_BULLETIN
public static final java.lang.String KEY_PRIORITY
public static final java.lang.String KEY_EXTRA
public NamedStationTable(org.w3c.dom.Element root)
root - root element for XMLpublic NamedStationTable()
public NamedStationTable(java.lang.String name)
namename - name of the tablepublic void setType(java.lang.String value)
value - The new value for Typepublic java.lang.String getType()
public void setName(java.lang.String name)
name - new namepublic java.lang.String getName()
public java.lang.String getFullName()
public void setCategory(java.lang.String value)
value - The new value for Categorypublic java.lang.String getCategory()
public static java.lang.String getStationXml(java.lang.String name,
                                             java.lang.String category,
                                             java.util.List stations)
name - name of the documentcategory - the categorystations - the list of stationspublic static java.util.List createStationTables(XmlResourceCollection xrc)
xrc - XML resourcespublic void createStationTableFromKmlFile(java.lang.String filename)
                                   throws java.lang.Exception
filename - java.lang.Exception - problem reading th estationpublic void createStationTableFromCsv(java.lang.String csv)
                               throws java.lang.Exception
csv - The actual csv textjava.lang.Exception - problem creating table from filepublic void createStationTableFromGempak(java.lang.String tbl)
                                  throws java.lang.Exception
tbl - The actual Gempak table as textjava.lang.Exception - problem creating table from filepublic void createStationTableFromBulletin(java.lang.String tbl)
                                    throws java.lang.Exception
tbl - The actual Gempak bulletin table as textjava.lang.Exception - problem creating table from filepublic static NamedStationTable createStationTableFromFile(java.lang.String filename) throws java.lang.Exception
filename - filenamejava.lang.Exception - problem creating table from filepublic static NamedStationTable createStationTable(java.lang.String xml) throws java.lang.Exception
xml - xmljava.lang.Exception - problem creating tablepublic static NamedStationTable createStationTable(org.w3c.dom.Element root)
root - root XML element defining tableprotected java.util.Map getMap()
getMap in class StationTableImplpublic static java.util.List xxxxmakeMenuItems(java.util.List stations,
                                               ObjectListener listener)
stations - stationslistener - listener for changespublic static java.util.List<javax.swing.JMenuItem> makeMenuItems(java.util.List locations,
                                                                  ObjectListener listener)
locations - list of locationslistener - listener on the objectspublic boolean isEmpty()
public java.lang.String toString()
toString in class java.lang.Objectpublic void setId(java.lang.String value)
value - The new value for Idpublic java.lang.String getId()
public void setDescription(java.lang.String value)
value - The new value for Descriptionpublic java.lang.String getDescription()
public static void main(java.lang.String[] args)
                 throws java.lang.Exception
args - test the filejava.lang.Exception - problem reading the file