* physical file may not exist at instantiation time.
*
* @author Daniel Brunier-Coulin
- * @copyright OPEN CASCADE 2012
+ * @copyright OPEN CASCADE 2012-2015
*/
import java.util.Calendar;
this.myfile = null;
}
// Internal constructors
- protected File (String path) {
+ public File (final String path) {
// ----------------------------
Calendar current = Calendar.getInstance();
String[] table = path.split("\\x2E");
this.date = current.getTime(); // Today
this.myfile = null;
}
- protected File (String path, String format, Date date) {
+ protected File (final String path, final String format, final Date date) {
// ------------------------------------------------------
this.path = path; // The corresponding physical file may not exist yet
this.format = format; // The format name may be different from the physical file extension
*/
public java.io.File asFile () {
// -----------------------------
- if (myfile == null) myfile = new java.io.File(Database.getRepositoryVaultPath() + path);
+ if (myfile == null) {
+ myfile = new java.io.File(Database.getRepositoryVaultPath() + path);
+ }
return myfile;
}
// Protected service
// ==============================================================================================================================
- protected void changePath (String path) {
+ public void changePath (final String path) {
// ---------------------------------------
this.path = path;
this.myfile = null;
}
+ /**
+ * Set the date.
+ * @param date the date to set
+ */
+ public void setDate(final Date date) {
+ this.date = date;
+ }
}
\ No newline at end of file