|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--net.aerith.misao.io.FileManager
The FileManager is a class which consists of static
methods to search or copy files.
| Field Summary | |
private java.io.File |
home_directory
The home directory. |
| Constructor Summary | |
FileManager()
Constructs a FileManager. |
|
FileManager(java.io.File directory)
Constructs a FileManager at the specified
directory. |
|
| Method Summary | |
static void |
copy(java.io.File src_file,
java.io.File dst_file)
Copies the file. |
Format |
createFileFormat(XmlImage image)
Creates the image file format object. |
static boolean |
endsWith(java.lang.String filename,
java.lang.String extension)
Checks if the specified file name ends with the specified extension. |
static java.io.File |
find(java.io.File directory,
java.io.File file)
Searches the specified file of relative path from the specified directory. |
java.io.File |
newFile(java.lang.String path)
Creates a new file object for the specified relative path in the home directory. |
XmlInformation |
readInformation(XmlMagRecord mag_record)
Reads the XML information document recorded in the specified magnitude record. |
XmlInformation |
readInformation(XmlMagRecord mag_record,
InformationDBManager db_manager)
Reads the XML information document recorded in the specified magnitude record, from the XML report document file or specified information database. |
XmlReport |
readReport(XmlInformation info)
Reads the XML report document recorded in the specified XML information element. |
XmlReport |
readReport(XmlInformation info,
Coor coor,
double radius)
Reads the XML report document recorded in the specified XML information element with only star data around the specified R.A. |
XmlReport |
readReport(XmlMagRecord mag_record)
Reads the XML report document recorded in the specified magnitude record. |
XmlStar |
readStar(XmlInformation info,
java.lang.String name)
Reads the star element in the XML report document with the specified name. |
static java.lang.String |
relativatePathFrom(java.lang.String path,
java.io.File file)
Converts the absolute file path into the relative path from the specified file if possible. |
static java.lang.String |
relativatePathFromDirectory(java.lang.String path,
java.io.File directory)
Converts the absolute file path into the relative path from the specified directory if possible. |
static java.lang.String |
unitePath(java.lang.String path1,
java.lang.String path2)
Unites the two paths. |
| Methods inherited from class java.lang.Object |
|
| Field Detail |
private java.io.File home_directory
| Constructor Detail |
public FileManager()
FileManager.public FileManager(java.io.File directory)
FileManager at the specified
directory.directory - the home directory.| Method Detail |
public static final java.io.File find(java.io.File directory,
java.io.File file)
throws java.io.FileNotFoundException
directory - the directory to search the file.file - the file to search.
public static final void copy(java.io.File src_file,
java.io.File dst_file)
throws java.io.IOException
src_file - the file to copy from.dst_file - the file to copy to.
public static final java.lang.String relativatePathFrom(java.lang.String path,
java.io.File file)
path - the absolute path.file - the file to relativate the path from.
public static final java.lang.String relativatePathFromDirectory(java.lang.String path,
java.io.File directory)
path - the absolute path.directory - the directory to relativate the path from.
public static final java.lang.String unitePath(java.lang.String path1,
java.lang.String path2)
path1 - the first path.path2 - the second path.
public static final boolean endsWith(java.lang.String filename,
java.lang.String extension)
filename - the filename.extension - the extension including the period.public java.io.File newFile(java.lang.String path)
If the file does not exists, it searches a file with ".gz" suffix, or a file without ".gz" suffix when it is already attached.
path - the path of a file.
public XmlReport readReport(XmlInformation info)
throws java.io.IOException
info - the XML information element.
public XmlReport readReport(XmlInformation info,
Coor coor,
double radius)
throws java.io.IOException
info - the XML information element.coor - the R.A. and Decl.radius - the radius in degree.
public XmlReport readReport(XmlMagRecord mag_record)
throws java.io.IOException
mag_record - the magnitude record.
public XmlInformation readInformation(XmlMagRecord mag_record)
throws java.io.IOException
mag_record - the magnitude record.
public XmlInformation readInformation(XmlMagRecord mag_record,
InformationDBManager db_manager)
throws java.io.IOException
mag_record - the magnitude record.db_manager - the information database manager.
public XmlStar readStar(XmlInformation info,
java.lang.String name)
throws java.io.IOException
info - the XML information element.name - the name.
public Format createFileFormat(XmlImage image)
throws java.io.FileNotFoundException,
java.net.MalformedURLException,
UnsupportedFileTypeException
image - the XML image element.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||