|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--ix.iface.domain.DomainParser
An object that parses a domain description to populate a Domain.
Constructor Summary | |
DomainParser()
|
Method Summary | |
static java.io.File |
getLibraryDirectory()
Returns an abstract pathname (File) that refers to the default library of domain descriptions. |
static java.io.File |
loadDomain(java.awt.Component parentComponent,
Domain domain)
Reads a description of a domain from a file selected by the user, conducting all necessary dialogs along the way. |
static DomainParser |
makeParser(java.io.File file)
Factory method that returns an appropriate parser for the indicated file, based on the file's type or extension. |
static DomainParser |
makeParser(java.lang.String filename)
Factory method that returns an appropriate parser for the indicated file. |
abstract Domain |
readDomain()
|
abstract Domain |
readDomain(Domain dom)
|
Methods inherited from class java.lang.Object |
|
Constructor Detail |
public DomainParser()
Method Detail |
public abstract Domain readDomain()
public abstract Domain readDomain(Domain dom)
public static java.io.File getLibraryDirectory()
Parameters.setParameter
method.Parameters
public static DomainParser makeParser(java.lang.String filename) throws java.io.FileNotFoundException
makeParser(File)
method.public static DomainParser makeParser(java.io.File file) throws java.io.FileNotFoundException
getLibraryDirectory()
is used. Here's how it might be used:
File domainName = ...; Domain domain = ...; ... try { DomainParser.makeParser(domainName).readDomain(domain); } catch (FileNotFoundException e) { ... }
public static java.io.File loadDomain(java.awt.Component parentComponent, Domain domain)
null
.
The input syntax is a function of the file's type as
understood by makeParser(File)
.
Note that this method modifies an existing Domain object rather than creating a new one. However, no modifications occur until after the file has been completely processed without an exception being thrown.
parentComponent
- determines the Frame in which dialogs
are displayed.domain
- the Domain object to modifynull
makeParser(File)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |