|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object ix.util.xml.FileSyntaxManager
public class FileSyntaxManager
Maps file names, URLs, etc to FileSyntax
es.
Field Summary | |
---|---|
protected FileSyntax |
defaultSyntax
|
protected java.util.List |
syntaxes
|
Constructor Summary | |
---|---|
FileSyntaxManager()
|
Method Summary | |
---|---|
void |
addAboutInfo(java.util.List about)
|
void |
addSyntax(FileSyntax s)
|
protected void |
addSyntaxes()
|
boolean |
canRead(FileSyntax syntax,
java.lang.Class c)
|
boolean |
canWrite(FileSyntax syntax,
java.lang.Class c)
|
protected void |
checkSyntax(FileSyntax syntax,
java.lang.Class objClass,
java.lang.String direction)
|
java.util.List |
getAllSyntaxes()
|
java.lang.String |
getExceptType(java.lang.String filename)
|
java.io.File[] |
getFiles(java.lang.Class desiredClass,
java.lang.String directoryName)
Returns an array of Files in a specified directory that might contain instances of a desired class. |
java.util.Set |
getInputTypesForClass(java.lang.Class c)
|
java.util.Set |
getOutputTypesForClass(java.lang.Class c)
|
FileSyntax |
getSyntax(java.io.File file)
|
FileSyntax |
getSyntax(java.lang.String filename)
|
FileSyntax |
getSyntax(java.net.URL url)
|
FileSyntax |
getSyntaxForType(java.lang.String fileType)
|
java.lang.String |
getType(java.lang.String filename)
|
java.util.SortedMap |
readAllObjects(java.lang.Class desiredClass,
java.lang.String directoryName)
Returns a sorted-map from the Files in a specified directory to objects that are instances of a desired class. |
java.lang.Object |
readObject(java.lang.Class desiredClass,
java.lang.String resourceName)
|
java.lang.Object |
readObject(java.lang.Class desiredClass,
java.net.URL url)
|
java.net.URL |
requireURL(java.lang.String resourceName)
Like toURL(String) but throws an IllegalArgumentException
rather than returning null. |
void |
setDefault(FileSyntax s)
|
java.net.URL |
toURL(java.lang.String resourceName)
Converts the name to a URL where the name can be a URL, the name of an existing file, or a resource accessible via this FileSyntaxManager's class's class loader. |
void |
writeObject(java.lang.Object obj,
java.lang.String filename)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected java.util.List syntaxes
protected FileSyntax defaultSyntax
Constructor Detail |
---|
public FileSyntaxManager()
Method Detail |
---|
protected void addSyntaxes()
public java.util.List getAllSyntaxes()
public void addSyntax(FileSyntax s)
public void setDefault(FileSyntax s)
public FileSyntax getSyntax(java.lang.String filename)
public FileSyntax getSyntax(java.io.File file)
public FileSyntax getSyntax(java.net.URL url)
public java.lang.String getType(java.lang.String filename)
public java.lang.String getExceptType(java.lang.String filename)
public FileSyntax getSyntaxForType(java.lang.String fileType)
public java.util.Set getInputTypesForClass(java.lang.Class c)
public java.util.Set getOutputTypesForClass(java.lang.Class c)
public boolean canRead(FileSyntax syntax, java.lang.Class c)
public boolean canWrite(FileSyntax syntax, java.lang.Class c)
public void addAboutInfo(java.util.List about)
public java.lang.Object readObject(java.lang.Class desiredClass, java.lang.String resourceName)
public java.lang.Object readObject(java.lang.Class desiredClass, java.net.URL url)
public java.util.SortedMap readAllObjects(java.lang.Class desiredClass, java.lang.String directoryName)
public java.io.File[] getFiles(java.lang.Class desiredClass, java.lang.String directoryName)
java.lang.IllegalArgumentException
- if the directoryName
is not the name of a directory.
Warning
- if the directory does not contain any suitable files.public void writeObject(java.lang.Object obj, java.lang.String filename)
protected void checkSyntax(FileSyntax syntax, java.lang.Class objClass, java.lang.String direction)
public java.net.URL toURL(java.lang.String resourceName)
public java.net.URL requireURL(java.lang.String resourceName)
toURL(String)
but throws an IllegalArgumentException
rather than returning null.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |