|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectix.iface.domain.DomainParser
public abstract class DomainParser
An object that parses a domain description to populate a Domain.
| Nested Class Summary | |
|---|---|
protected static class |
DomainParser.DomainParserWrapper
Class used to wrap a FileSyntax as a DomainParser. |
| Constructor Summary | |
|---|---|
protected |
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. |
protected static DomainParser |
makeParser(java.io.File domainFile)
Factory method that returns an appropriate parser for the indicated file based on the file name's type or extension. |
abstract Domain |
readDomain()
|
abstract Domain |
readDomain(Domain dom)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
protected DomainParser()
| Method Detail |
|---|
public abstract Domain readDomain()
public abstract Domain readDomain(Domain dom)
public static java.io.File getLibraryDirectory()
Parameters.setParameter(String, String) method.
If no such value has been specified, a File constructed
from the name "domain-library" is returned as a default.
For backwards compatibility, the parameter "domain-library" will also be recognized if no "library-directory" is supplied.
Parameters
protected static DomainParser makeParser(java.io.File domainFile)
throws java.io.FileNotFoundException
File domainName = ...;
Domain domain = ...;
try {
DomainParser.makeParser(domainName).readDomain(domain);
}
catch (FileNotFoundException e) { ... }
java.io.FileNotFoundException
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 modify
nullmakeParser(File)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||