/[svn]/jlscp/trunk/src/org/linuxsampler/lscp/DbInstrumentInfo.java
ViewVC logotype

Diff of /jlscp/trunk/src/org/linuxsampler/lscp/DbInstrumentInfo.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1538 by iliev, Sun Sep 16 23:15:57 2007 UTC revision 1539 by iliev, Mon Dec 3 22:59:39 2007 UTC
# Line 40  public class DbInstrumentInfo extends Ab Line 40  public class DbInstrumentInfo extends Ab
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 = "";
# Line 108  public class DbInstrumentInfo extends Ab Line 106  public class DbInstrumentInfo extends Ab
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
# Line 176  public class DbInstrumentInfo extends Ab Line 162  public class DbInstrumentInfo extends Ab
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.
# Line 194  public class DbInstrumentInfo extends Ab Line 186  public class DbInstrumentInfo extends Ab
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) {

Legend:
Removed from v.1538  
changed lines
  Added in v.1539

  ViewVC Help
Powered by ViewVC