|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjmri.jmrit.XmlFile
jmri.jmrit.decoderdefn.DecoderIndexFile
public class DecoderIndexFile
DecoderIndex represents a decoderIndex.xml file in memory.
This allows a program to navigate to various decoder descriptions without having to manipulate files.
This class doesn't provide tools for defining the index; that's done manually, or at least not done here.
Multiple DecoderIndexFile objects don't make sense, so we use an "instance" member to navigate to a single one.
| Field Summary | |
|---|---|
protected Hashtable<String,String> |
_mfgIdFromNameHash
|
protected Hashtable<String,String> |
_mfgNameFromIdHash
|
protected static String |
decoderIndexFileName
|
protected List<DecoderFile> |
decoderList
|
protected ArrayList<String> |
mMfgNameList
|
| Fields inherited from class jmri.jmrit.XmlFile |
|---|
dtdLocation, xsltLocation |
| Constructor Summary | |
|---|---|
DecoderIndexFile()
|
|
| Method Summary | |
|---|---|
boolean |
checkEntry(int i,
String mfgName,
String family,
String mfgID,
String decoderVersionID,
String decoderProductID,
String model)
Check if an entry consistent with specific properties. |
protected static String |
defaultDecoderIndexFilename()
Return the filename String for the default decoder index file, including location. |
DecoderFile |
fileFromTitle(String title)
Return DecoderFile from a "title" string, ala selection in matchingComboBox. |
static void |
forceCreationOfNewIndex()
Force creation of a new user index |
List<String> |
getMfgNameList()
|
static DecoderIndexFile |
instance()
|
static JComboBox |
jComboBoxFromList(List<DecoderFile> l)
Return a JComboBox made with the titles from a list of DecoderFile entries |
static ComboBoxModel |
jComboBoxModelFromList(List<DecoderFile> l)
Return a new ComboBoxModel made with the titles from a list of DecoderFile entries |
JComboBox |
matchingComboBox(String mfg,
String family,
String decoderMfgID,
String decoderVersionID,
String decoderProductID,
String model)
Get a JComboBox representing the choices that match some information |
List<DecoderFile> |
matchingDecoderList(String mfg,
String family,
String decoderMfgID,
String decoderVersionID,
String decoderProductID,
String model)
Get a List of decoders matching some information |
String |
mfgIdFromName(String name)
|
String |
mfgNameFromId(String name)
|
int |
numDecoders()
|
static void |
resetInstance()
|
void |
writeFile(String name,
DecoderIndexFile oldIndex,
String[] files)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected List<DecoderFile> decoderList
protected Hashtable<String,String> _mfgIdFromNameHash
protected Hashtable<String,String> _mfgNameFromIdHash
protected ArrayList<String> mMfgNameList
protected static final String decoderIndexFileName
| Constructor Detail |
|---|
public DecoderIndexFile()
| Method Detail |
|---|
public int numDecoders()
public List<String> getMfgNameList()
public String mfgIdFromName(String name)
public String mfgNameFromId(String name)
public List<DecoderFile> matchingDecoderList(String mfg,
String family,
String decoderMfgID,
String decoderVersionID,
String decoderProductID,
String model)
public JComboBox matchingComboBox(String mfg,
String family,
String decoderMfgID,
String decoderVersionID,
String decoderProductID,
String model)
public static JComboBox jComboBoxFromList(List<DecoderFile> l)
public static ComboBoxModel jComboBoxModelFromList(List<DecoderFile> l)
public DecoderFile fileFromTitle(String title)
public boolean checkEntry(int i,
String mfgName,
String family,
String mfgID,
String decoderVersionID,
String decoderProductID,
String model)
public static void resetInstance()
public static DecoderIndexFile instance()
public static void forceCreationOfNewIndex()
public void writeFile(String name,
DecoderIndexFile oldIndex,
String[] files)
throws IOException
IOExceptionprotected static String defaultDecoderIndexFilename()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||