|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectdasher.CAlphIO
public class CAlphIO
Responsible for reading a given list of XML files, extracting alphabet information, and creating a list of AlphInfo objects for each.
Further, after doing so, responsible for returning an AlphInfo object corresponding to a given alphabet name, and of giving a full list of available alphabets.
| Nested Class Summary | |
|---|---|
(package private) static class |
CAlphIO.AlphInfo
Simple struct representing an alphabet. |
(package private) static class |
CAlphIO.character
Simple struct representing a character in an alphabet. |
| Field Summary | |
|---|---|
protected java.util.HashMap<java.lang.String,CAlphIO.AlphInfo> |
Alphabets
Map from Strings to AlphInfo objects, used in getting an alphabet by name. |
protected java.util.ArrayList<java.lang.String> |
Filenames
List of filenames to parse. |
boolean |
LoadMutable
Whether the loaded alphabet may be altered. |
CDasherInterfaceBase |
m_Interface
Pointer to the DasherInterfaceBase which requested this enumeration. |
protected javax.xml.parsers.SAXParser |
parser
Parser to be used to import XML data. |
java.util.HashMap<java.lang.String,java.lang.Integer> |
StoT
Map from String alphabet types to enumerated constants (members of Opts.AlphabetTypes). |
protected java.lang.String |
SystemLocation
Path of system resource files, used in the course of locating DTD files where necessary. |
java.util.HashMap<java.lang.Integer,java.lang.String> |
TtoS
Map from Opts.AlphabetTypes constants to their String names. |
protected java.lang.String |
UserLocation
Path of user resource files, used in the course of locating DTD files where necessary. |
| Constructor Summary | |
|---|---|
CAlphIO(java.lang.String SysLoc,
java.lang.String UserLoc,
java.util.ArrayList<java.lang.String> Fnames,
CDasherInterfaceBase Interface)
Sole constructor. |
|
| Method Summary | |
|---|---|
protected void |
CreateDefault()
Creates the default alphabet and stores as an available alphabet. |
void |
Delete(java.lang.String AlphID)
Removes a given alphabet; it will no longer appear in enumerations of alphabets. |
void |
GetAlphabets(java.util.Collection<java.lang.String> AlphabetList)
Fills the passed Collection with the names of all available alphabets. |
java.lang.String |
GetDefault()
Retrieves the name of the default alphabet. |
CAlphIO.AlphInfo |
GetInfo(java.lang.String AlphID)
Returns an AlphInfo object representing the alphabet with a given name. |
void |
ParseFile(java.lang.String filename)
Parse a given XML file for alphabets. |
void |
Save(java.lang.String AlphID)
Stub. |
void |
SetInfo(CAlphIO.AlphInfo NewInfo)
Registers a new AlphInfo object as a valid alphabet, which will henceforth be included in enumerations of available alphabets. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public CDasherInterfaceBase m_Interface
protected java.lang.String SystemLocation
protected java.lang.String UserLocation
protected java.util.HashMap<java.lang.String,CAlphIO.AlphInfo> Alphabets
protected java.util.ArrayList<java.lang.String> Filenames
public java.util.HashMap<java.lang.String,java.lang.Integer> StoT
public java.util.HashMap<java.lang.Integer,java.lang.String> TtoS
public boolean LoadMutable
protected javax.xml.parsers.SAXParser parser
| Constructor Detail |
|---|
public CAlphIO(java.lang.String SysLoc,
java.lang.String UserLoc,
java.util.ArrayList<java.lang.String> Fnames,
CDasherInterfaceBase Interface)
SysLoc - System data location, for retrieval of DTD files. Optional; if not supplied, this location will not be considered for DTD location.UserLoc - User data location, for retrieval of DTD files. Optional; if not supplied, this location will not be considered for DTD location.Fnames - Filenames to parse; these may be relative or absolute.Interface - Reference to the InterfaceBase parent class for applet-style IO. Optional; if not supplied, applet-style IO will fail.| Method Detail |
|---|
public void ParseFile(java.lang.String filename)
filename - File to parsepublic void GetAlphabets(java.util.Collection<java.lang.String> AlphabetList)
AlphabetList - Collection to be filled.public java.lang.String GetDefault()
public CAlphIO.AlphInfo GetInfo(java.lang.String AlphID)
AlphID - Name of the alphabet to be retrieved.
public void SetInfo(CAlphIO.AlphInfo NewInfo)
NewInfo - New alphabetpublic void Delete(java.lang.String AlphID)
AlphID - public void Save(java.lang.String AlphID)
AlphID - Name of alphabet to save.protected void CreateDefault()
The constructor calls this method prior to attempting to read XML files; it should not need to be called more than once unless the Default is deleted.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||