27 |
import java.text.SimpleDateFormat; |
import java.text.SimpleDateFormat; |
28 |
import java.util.Date; |
import java.util.Date; |
29 |
|
|
30 |
|
import static org.linuxsampler.lscp.Parser.*; |
31 |
|
|
32 |
|
|
33 |
/** |
/** |
34 |
* Provides information about a database instrument directory. |
* Provides information about a database instrument directory. |
98 |
if(getParentDirectoryPath() == null) return null; |
if(getParentDirectoryPath() == null) return null; |
99 |
if(getParentDirectoryPath().length() == 1) { |
if(getParentDirectoryPath().length() == 1) { |
100 |
if(!getParentDirectoryPath().equals("/")) return null; |
if(!getParentDirectoryPath().equals("/")) return null; |
101 |
return getParentDirectoryPath() + getName(); |
return getParentDirectoryPath() + toEscapedFileName(getName()); |
102 |
} |
} |
103 |
|
|
104 |
return getParentDirectoryPath() + "/" + getName(); |
return getParentDirectoryPath() + "/" + toEscapedFileName(getName()); |
105 |
} |
} |
106 |
|
|
107 |
/** |
/** |
126 |
parse(String s) throws LscpException { |
parse(String s) throws LscpException { |
127 |
if(s.startsWith("DESCRIPTION: ")) { |
if(s.startsWith("DESCRIPTION: ")) { |
128 |
description = s.substring("DESCRIPTION: ".length()); |
description = s.substring("DESCRIPTION: ".length()); |
129 |
|
description = toNonEscapedText(description); |
130 |
} else if(s.startsWith("CREATED: ")) { |
} else if(s.startsWith("CREATED: ")) { |
131 |
s = s.substring("CREATED: ".length()); |
s = s.substring("CREATED: ".length()); |
132 |
try { dateCreated.setTime(dateFormat.parse(s).getTime()); } |
try { dateCreated.setTime(dateFormat.parse(s).getTime()); } |