30 |
private String desc = null; |
private String desc = null; |
31 |
private String ver = null; |
private String ver = null; |
32 |
private String protoVer = null; |
private String protoVer = null; |
33 |
|
private boolean instrumentsDbSupport = false; |
34 |
|
|
35 |
/** |
/** |
36 |
* Creates a new instance of <code>ServerInfo</code> and parses the information |
* Creates a new instance of <code>ServerInfo</code> and parses the information |
65 |
getProtocolVersion() { return protoVer; } |
getProtocolVersion() { return protoVer; } |
66 |
|
|
67 |
/** |
/** |
68 |
|
* Determines whether the backend is |
69 |
|
* build with instruments database support. |
70 |
|
*/ |
71 |
|
public boolean |
72 |
|
hasInstrumentsDbSupport() { return instrumentsDbSupport; } |
73 |
|
|
74 |
|
/** |
75 |
* Parses a line of text. |
* Parses a line of text. |
76 |
* @param s The string to be parsed. |
* @param s The string to be parsed. |
77 |
* @return <code>true</code> if the line has been processed, <code>false</code> otherwise. |
* @return <code>true</code> if the line has been processed, <code>false</code> otherwise. |
84 |
ver = s.substring("VERSION: ".length()); |
ver = s.substring("VERSION: ".length()); |
85 |
} else if(s.startsWith("PROTOCOL_VERSION: ")) { |
} else if(s.startsWith("PROTOCOL_VERSION: ")) { |
86 |
protoVer = s.substring("PROTOCOL_VERSION: ".length()); |
protoVer = s.substring("PROTOCOL_VERSION: ".length()); |
87 |
|
} else if(s.startsWith("INSTRUMENTS_DB_SUPPORT: ")) { |
88 |
|
s = s.substring("INSTRUMENTS_DB_SUPPORT: ".length()); |
89 |
|
if(s.equalsIgnoreCase("yes")) instrumentsDbSupport = true; |
90 |
} else return false; |
} else return false; |
91 |
|
|
92 |
return true; |
return true; |