Package edu.ie3.datamodel.io.naming
Class DefaultDirectoryHierarchy
java.lang.Object
edu.ie3.datamodel.io.naming.DefaultDirectoryHierarchy
- All Implemented Interfaces:
FileHierarchy
Default directory hierarchy for input models
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidCreates all mandatory subdirectories of this default directory hierarchyvoidcreateDirs(boolean withOptionals) Creates all subdirectories of this default directory hierarchy.Gives thebaseDirectory).getSubDirectory(Class<? extends UniqueEntity> cls, String fileSeparator) Gives the correct sub directory (w.r.t.voidvalidate()Checks, if the structure beneathbaseDirectoryis okay.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface edu.ie3.datamodel.io.naming.FileHierarchy
getSubDirectory
-
Field Details
-
FILE_SEPARATOR
Use the unix file separator here.
-
-
Constructor Details
-
DefaultDirectoryHierarchy
-
-
Method Details
-
validate
Checks, if the structure beneathbaseDirectoryis okay.- Throws:
FileException- if not
-
createDirs
Creates all mandatory subdirectories of this default directory hierarchy- Throws:
IOException- If the creation of sub directories is not possible
-
createDirs
Creates all subdirectories of this default directory hierarchy. Upon request, also the optional directories are created.- Parameters:
withOptionals- if true, also optional directories get created.- Throws:
IOException- If the creation of sub directories is not possible
-
getBaseDirectory
Gives thebaseDirectory).- Specified by:
getBaseDirectoryin interfaceFileHierarchy- Returns:
- An Option to the base directory as a string
-
getSubDirectory
Gives the correct sub directory (w.r.t.baseDirectory) for the provided class.- Specified by:
getSubDirectoryin interfaceFileHierarchy- Parameters:
cls- Class to define the sub directory forfileSeparator- The file separator to use- Returns:
- An Option to the regarding sub directory as a string
-