40 |
private String directoryPath = null; |
private String directoryPath = null; |
41 |
private final Date dateCreated = new EnhancedDate(); |
private final Date dateCreated = new EnhancedDate(); |
42 |
private final Date dateModified = new EnhancedDate(); |
private final Date dateModified = new EnhancedDate(); |
|
private String formatFamily = ""; |
|
|
private String formatVersion = ""; |
|
43 |
private long size = 0; |
private long size = 0; |
44 |
private boolean drum = false; |
private boolean drum = false; |
45 |
private String product = ""; |
private String product = ""; |
106 |
getDateModified() { return dateModified; } |
getDateModified() { return dateModified; } |
107 |
|
|
108 |
/** |
/** |
|
* Returns the format family of the instrument. |
|
|
**/ |
|
|
public String |
|
|
getFormatFamily() { return formatFamily; } |
|
|
|
|
|
/** |
|
|
* Returns the format version of the instrument. |
|
|
**/ |
|
|
public String |
|
|
getFormatVersion() { return formatVersion; } |
|
|
|
|
|
/** |
|
109 |
* Returns the size of the instrument in bytes. |
* Returns the size of the instrument in bytes. |
110 |
**/ |
**/ |
111 |
public long |
public long |
162 |
public String |
public String |
163 |
getKeywords() { return keywords; } |
getKeywords() { return keywords; } |
164 |
|
|
165 |
|
public String |
166 |
|
getEngine() { |
167 |
|
// TODO: engine lookup? |
168 |
|
return getFormatFamily(); |
169 |
|
} |
170 |
|
|
171 |
/** |
/** |
172 |
* Parses a line of text. |
* Parses a line of text. |
173 |
* @param s The string to be parsed. |
* @param s The string to be parsed. |
186 |
s = s.substring("MODIFIED: ".length()); |
s = s.substring("MODIFIED: ".length()); |
187 |
try { dateModified.setTime(dateFormat.parse(s).getTime()); } |
try { dateModified.setTime(dateFormat.parse(s).getTime()); } |
188 |
catch(ParseException e) { throw new LscpException(e.getMessage()); } |
catch(ParseException e) { throw new LscpException(e.getMessage()); } |
|
} else if(s.startsWith("FORMAT_FAMILY: ")) { |
|
|
formatFamily = s.substring("FORMAT_FAMILY: ".length()); |
|
|
} else if(s.startsWith("FORMAT_VERSION: ")) { |
|
|
formatVersion = s.substring("FORMAT_VERSION: ".length()); |
|
189 |
} else if(s.startsWith("SIZE: ")) { |
} else if(s.startsWith("SIZE: ")) { |
190 |
try { size = Long.parseLong(s.substring("SIZE: ".length())); } |
try { size = Long.parseLong(s.substring("SIZE: ".length())); } |
191 |
catch(NumberFormatException x) { |
catch(NumberFormatException x) { |