2 * This file is part of NeverNote
\r
3 * Copyright 2009 Randy Baumgarte
\r
5 * This file may be licensed under the terms of of the
\r
6 * GNU General Public License Version 2 (the ``GPL'').
\r
8 * Software distributed under the License is distributed
\r
9 * on an ``AS IS'' basis, WITHOUT WARRANTY OF ANY KIND, either
\r
10 * express or implied. See the GPL for the specific language
\r
11 * governing rights and limitations.
\r
13 * You should have received a copy of the GPL along with this
\r
14 * program. If not, go to http://www.gnu.org/licenses/gpl.html
\r
15 * or write to the Free Software Foundation, Inc.,
\r
16 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
\r
21 package cx.fbn.nevernote.sql;
\r
22 import java.text.SimpleDateFormat;
\r
23 import java.util.ArrayList;
\r
24 import java.util.List;
\r
26 import com.evernote.edam.type.Data;
\r
27 import com.evernote.edam.type.Resource;
\r
28 import com.evernote.edam.type.ResourceAttributes;
\r
29 import com.trolltech.qt.core.QByteArray;
\r
31 import cx.fbn.nevernote.sql.driver.NSqlQuery;
\r
32 import cx.fbn.nevernote.utilities.ApplicationLogger;
\r
36 public class NoteResourceTable {
\r
40 private static final long serialVersionUID = 1L;
\r
41 private final ApplicationLogger logger;
\r
42 private final DatabaseConnection db;
\r
45 public NoteResourceTable(ApplicationLogger l, DatabaseConnection d) {
\r
50 public void createTable() {
\r
51 NSqlQuery query = new NSqlQuery(db.getConnection());
\r
52 // Create the NoteResource table
\r
53 logger.log(logger.HIGH, "Creating table NoteResource...");
\r
54 if (!query.exec("Create table NoteResources (guid varchar primary key, " +
\r
55 "noteGuid varchar, updateSequenceNumber integer, dataHash varchar, "+
\r
56 "dataSize integer, dataBinary blob, "+
\r
57 "mime varchar, width integer, height integer, duration integer, "+
\r
58 "active integer, recognitionHash varchar, recognitionSize integer, " +
\r
59 "recognitionBinary varchar, attributeSourceUrl varchar, attributeTimestamp timestamp, " +
\r
60 "attributeLatitude double, attributeLongitude double, "+
\r
61 "attributeAltitude double, attributeCameraMake varchar, attributeCameraModel varchar, "
\r
62 +"attributeClientWillIndex varchar, attributeRecoType varchar, attributeFileName varchar,"+
\r
63 "attributeAttachment boolean, isDirty boolean, indexNeeded boolean)"))
\r
64 logger.log(logger.HIGH, "Table NoteResource creation FAILED!!!");
\r
65 if (!query.exec("CREATE INDEX unindexed_resources on noteresources (indexneeded desc, guid);"))
\r
66 logger.log(logger.HIGH, "Noteresources unindexed_resources index creation FAILED!!!");
\r
67 if (!query.exec("CREATE INDEX resources_dataheshhex on noteresources (datahash, guid);"))
\r
68 logger.log(logger.HIGH, "Noteresources resources_datahash index creation FAILED!!!");
\r
72 public void dropTable() {
\r
73 NSqlQuery query = new NSqlQuery(db.getConnection());
\r
74 query.exec("Drop table NoteResources");
\r
76 // Reset the dirty flag
\r
77 public void resetDirtyFlag(String guid) {
\r
78 NSqlQuery query = new NSqlQuery(db.getConnection());
\r
80 query.prepare("Update noteresources set isdirty=false where guid=:guid");
\r
81 query.bindValue(":guid", guid);
\r
83 logger.log(logger.EXTREME, "Error resetting noteresource dirty field. " +query.lastError());
\r
85 // Set if the resource should be indexed
\r
86 public void setIndexNeeded(String guid, Boolean indexNeeded) {
\r
87 NSqlQuery query = new NSqlQuery(db.getConnection());
\r
88 query.prepare("Update noteresources set indexNeeded=:needed where guid=:guid");
\r
89 query.bindValue(":needed", indexNeeded);
\r
90 query.bindValue(":guid", guid);
\r
92 logger.log(logger.EXTREME, "Error setting noteresource indexneeded field: " +query.lastError());
\r
94 // get any unindexed resource
\r
95 public List<String> getNextUnindexed(int limit) {
\r
96 List<String> guids = new ArrayList<String>();
\r
97 NSqlQuery query = new NSqlQuery(db.getConnection());
\r
99 if (!query.exec("Select guid from NoteResources where indexNeeded = true limit " +limit))
\r
100 logger.log(logger.EXTREME, "NoteResources SQL retrieve has failed on getNextUnindexed(): " +query.lastError());
\r
102 // Get a list of the notes
\r
104 while (query.next()) {
\r
105 guid = new String();
\r
106 guid = query.valueString(0);
\r
112 public List<String> findInkNotes() {
\r
113 List<String> guids = new ArrayList<String>();
\r
114 NSqlQuery query = new NSqlQuery(db.getConnection());
\r
116 query.prepare("Select guid from noteresources where mime='application/vnd.evernote.ink'");
\r
118 logger.log(logger.EXTREME, "Error searching for ink notes. " +query.lastError());
\r
120 while (query.next()) {
\r
121 guids.add(query.valueString(0));
\r
126 public void saveNoteResource(Resource r, boolean isDirty) {
\r
127 logger.log(logger.HIGH, "Entering DBRunner.saveNoteResources");
\r
129 NSqlQuery query = new NSqlQuery(db.getConnection());
\r
130 SimpleDateFormat simple = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
\r
132 check = query.prepare("Insert Into NoteResources ("
\r
133 +"guid, noteGuid, dataHash, dataSize, dataBinary, updateSequenceNumber, "
\r
134 +"mime, width, height, duration, active, recognitionHash, "
\r
135 +"recognitionSize, recognitionBinary, attributeSourceUrl, attributeTimestamp, "
\r
136 +"attributeLatitude, attributeLongitude, attributeAltitude, attributeCameraMake, "
\r
137 +"attributeCameraModel, "
\r
138 +"attributeClientWillIndex, attributeRecoType, attributeFileName, attributeAttachment, isDirty, "
\r
139 +"indexNeeded) Values("
\r
140 +":guid, :noteGuid, :dataHash,:dataSize, :dataBody, :updateSequenceNumber, "
\r
141 +":mime, :width, :height, :duration, :active, :recognitionHash, "
\r
142 +":recognitionSize, :recognitionBody, :attributeSourceUrl, :attributeTimestamp, "
\r
143 +":attributeLatitude, :attributeLongitude, :attributeAltitude, :attributeCameraMake, "
\r
144 +":attributeCameraModel, "
\r
145 +":attributeClientWillIndex, :attributeRecoType, :attributeFileName, :attributeAttachment, "
\r
146 +":isDirty, true)");
\r
148 logger.log(logger.EXTREME, "NoteResource SQL insert prepare has failed.");
\r
149 logger.log(logger.MEDIUM, query.lastError());
\r
152 query.bindValue(":guid", r.getGuid());
\r
153 query.bindValue(":noteGuid", r.getNoteGuid());
\r
154 if (r.getData() != null) {
\r
155 // query.bindValue(":dataHash", new QByteArray(r.getData().getBodyHash()).toHex());
\r
156 // query.bindValue(":dataHash", "");
\r
157 query.bindValue(":dataHash", byteArrayToHexString(r.getData().getBodyHash()));
\r
158 query.bindValue(":dataSize", r.getData().getSize());
\r
159 query.bindBlob(":dataBody", r.getData().getBody());
\r
161 query.bindValue(":updateSequenceNumber", r.getUpdateSequenceNum());
\r
162 query.bindValue(":mime", r.getMime());
\r
163 query.bindValue(":width", new Integer(r.getWidth()));
\r
164 query.bindValue(":height", new Integer(r.getHeight()));
\r
165 query.bindValue(":duration", new Integer(r.getDuration()));
\r
166 query.bindValue(":active", r.isActive());
\r
167 if (r.getRecognition() != null) {
\r
168 query.bindValue(":recognitionHash", r.getRecognition().getBodyHash());
\r
169 query.bindValue(":recognitionSize", r.getRecognition().getSize());
\r
170 if (r.getRecognition().getBody() != null)
\r
171 query.bindValue(":recognitionBody", new String(r.getRecognition().getBody()));
\r
173 query.bindValue(":recognitionBody", "");
\r
175 query.bindValue(":recognitionHash", "");
\r
176 query.bindValue(":recognitionSize", 0);
\r
177 query.bindValue(":recognitionBody", "");
\r
179 if (r.getAttributes() != null) {
\r
180 query.bindValue(":attributeSourceUrl", r.getAttributes().getSourceURL());
\r
181 StringBuilder ts = new StringBuilder(simple.format(r.getAttributes().getTimestamp()));
\r
182 query.bindValue(":attributeTimestamp", ts.toString());
\r
183 query.bindValue(":attributeLatitude", r.getAttributes().getLatitude());
\r
184 query.bindValue(":attributeLongitude", r.getAttributes().getLongitude());
\r
185 query.bindValue(":attributeAltitude", r.getAttributes().getAltitude());
\r
186 query.bindValue(":attributeCameraMake", r.getAttributes().getCameraMake());
\r
187 query.bindValue(":attributeCameraModel", r.getAttributes().getCameraModel());
\r
188 query.bindValue(":attributeClientWillIndex", r.getAttributes().isClientWillIndex());
\r
189 query.bindValue(":attributeRecoType", r.getAttributes().getRecoType());
\r
190 query.bindValue(":attributeFileName", r.getAttributes().getFileName());
\r
191 query.bindValue(":attributeAttachment", r.getAttributes().isAttachment());
\r
193 query.bindValue(":isDirty", isDirty);
\r
195 check = query.exec();
\r
197 logger.log(logger.MEDIUM, "*** NoteResource Table insert failed.");
\r
198 logger.log(logger.MEDIUM, query.lastError());
\r
202 logger.log(logger.HIGH, "Leaving DBRunner.saveNoteResources");
\r
204 // delete an old resource
\r
205 public void expungeNoteResource(String guid) {
\r
206 NSqlQuery query = new NSqlQuery(db.getConnection());
\r
207 query.prepare("delete from NoteResources where guid=:guid");
\r
208 query.bindValue(":guid", guid);
\r
211 query.prepare("delete from InkImages where guid=:guid");
\r
212 query.bindValue(":guid", guid);
\r
218 // Get a note resource from the database by it's hash value
\r
219 public String getNoteResourceGuidByHashHex(String noteGuid, String hash) {
\r
220 logger.log(logger.HIGH, "Entering DBRunner.getNoteResourceGuidByHashHex");
\r
223 NSqlQuery query = new NSqlQuery(db.getConnection());
\r
225 check = query.prepare("Select guid from NoteResources " +
\r
226 "where noteGuid=:noteGuid and dataHash=:hash");
\r
228 logger.log(logger.EXTREME, "NoteResource SQL select prepare was successful.");
\r
230 logger.log(logger.EXTREME, "NoteResource SQL select prepare has failed.");
\r
231 logger.log(logger.MEDIUM, query.lastError());
\r
233 query.bindValue(":noteGuid", noteGuid);
\r
234 query.bindValue(":hash", hash);
\r
236 check = query.exec();
\r
238 logger.log(logger.MEDIUM, "dbRunner.getNoteResourceGuidByHashHex Select failed." +
\r
239 "Note Guid:" +noteGuid+
\r
240 "Data Body Hash:" +hash);
\r
241 logger.log(logger.MEDIUM, query.lastError());
\r
243 if (!query.next()) {
\r
244 logger.log(logger.MEDIUM, "Note Resource not found.");
\r
247 return query.valueString(0);
\r
250 // Get a note resource from the database by it's hash value
\r
251 public Resource getNoteResourceDataBodyByHashHex(String noteGuid, String hash) {
\r
252 logger.log(logger.HIGH, "Entering DBRunner.getNoteResourceDataBodyByHash");
\r
255 NSqlQuery query = new NSqlQuery(db.getConnection());
\r
257 check = query.prepare("Select guid, mime, from NoteResources " +
\r
258 "where noteGuid=:noteGuid and dataHash=:hash");
\r
260 logger.log(logger.EXTREME, "NoteResource SQL select prepare has failed.");
\r
261 logger.log(logger.MEDIUM, query.lastError());
\r
263 query.bindValue(":noteGuid", noteGuid);
\r
264 query.bindValue(":hash", hash);
\r
266 if (!query.exec()) {
\r
267 logger.log(logger.MEDIUM, "NoteResource Select failed." +
\r
268 "Note Guid:" +noteGuid+
\r
269 "Data Body Hash:" +hash);
\r
270 logger.log(logger.MEDIUM, query.lastError());
\r
272 if (!query.next()) {
\r
273 logger.log(logger.MEDIUM, "Note Resource not found.");
\r
277 Resource r = new Resource();
\r
278 r.setGuid(query.valueString(0));
\r
279 r.setMime(query.valueString(1));
\r
281 NSqlQuery binary = new NSqlQuery(db.getConnection());
\r
282 if (!binary.prepare("Select databinary from NoteResources " +
\r
283 "where guid=:guid")) {
\r
284 logger.log(logger.MEDIUM, "Prepare for NoteResources Binary failed");
\r
285 logger.log(logger.MEDIUM, binary.lastError());
\r
288 if (!binary.exec()) {
\r
289 logger.log(logger.MEDIUM, "NoteResources Binary Select failed." +
\r
290 "Note Guid:" +noteGuid+
\r
291 "Data Body Hash:" +hash);
\r
292 logger.log(logger.MEDIUM, binary.lastError());
\r
294 if (!binary.next()) {
\r
295 logger.log(logger.MEDIUM, "Note Resource Binary not found.");
\r
299 Data d = new Data();
\r
301 d.setBody(binary.valueString(0).getBytes());
\r
302 logger.log(logger.HIGH, "Leaving DBRunner.getNoteResourceDataBodyByHash");
\r
307 // Get a note's resourcesby Guid
\r
308 public Resource getNoteResource(String guid, boolean withBinary) {
\r
312 NSqlQuery query = new NSqlQuery(db.getConnection());
\r
313 String queryString;
\r
314 queryString = new String("Select guid, noteGuid, mime, width, height, duration, "
\r
315 +"active, updateSequenceNumber, dataHash, dataSize, "
\r
316 +"recognitionHash, recognitionSize, "
\r
317 +"attributeLatitude, attributeLongitude, attributeAltitude, "
\r
318 +"attributeCameraMake, attributeCameraModel, attributeClientWillIndex, "
\r
319 +"attributeRecoType, attributeFileName, attributeAttachment, recognitionBinary "
\r
320 +" from NoteResources where guid=:guid");
\r
323 query.prepare(queryString);
\r
325 query.bindValue(":guid", guid);
\r
326 if (!query.exec()) {
\r
327 logger.log(logger.EXTREME, "NoteResources SQL select has failed.");
\r
328 logger.log(logger.MEDIUM, query.lastError());
\r
332 if (query.next()) {
\r
334 r = new Resource();
\r
335 r.setGuid(query.valueString(0)); // Resource Guid
\r
336 r.setNoteGuid(query.valueString(1)); // note Guid
\r
337 r.setMime(query.valueString(2)); // Mime Type
\r
338 r.setWidth(new Short(query.valueString(3))); // Width
\r
339 r.setHeight(new Short(query.valueString(4))); // Height
\r
340 r.setDuration(new Short(query.valueString(5))); // Duration
\r
341 r.setActive(new Boolean(query.valueString(6))); // active
\r
342 r.setUpdateSequenceNum(new Integer(query.valueString(7))); // update sequence number
\r
344 Data d = new Data();
\r
345 byte[] h = query.valueString(8).getBytes(); // data hash
\r
346 QByteArray hData = new QByteArray(h);
\r
347 QByteArray bData = new QByteArray(QByteArray.fromHex(hData));
\r
348 d.setBodyHash(bData.toByteArray());
\r
349 d.setSize(new Integer(query.valueString(9)));
\r
352 Data rec = new Data();
\r
353 if (query.valueObject(10) != null)
\r
354 rec.setBodyHash(query.valueString(10).getBytes()); // Recognition Hash
\r
355 if (query.valueObject(11) != null)
\r
356 rec.setSize(new Integer(query.valueString(11)));
\r
359 r.setRecognition(rec);
\r
361 ResourceAttributes a = new ResourceAttributes();
\r
362 if (!query.valueString(12).equals("")) // Latitude
\r
363 a.setLatitude(new Float(query.valueString(12)));
\r
364 if (!query.valueString(13).equals("")) // Longitude
\r
365 a.setLongitude(new Float(query.valueString(13)));
\r
366 if (!query.valueString(14).equals("")) // Altitude
\r
367 a.setAltitude(new Float(query.valueString(14)));
\r
368 a.setCameraMake(stringValue(query.valueString(15))); // Camera Make
\r
369 a.setCameraModel(stringValue(query.valueString(16)));
\r
370 a.setClientWillIndex(booleanValue(query.valueString(17).toString(),false)); // Camera Model
\r
371 a.setRecoType(stringValue(query.valueString(18))); // Recognition Type
\r
372 a.setFileName(stringValue(query.valueString(19))); // File Name
\r
373 a.setAttachment(booleanValue(query.valueString(20).toString(),false));
\r
374 r.setAttributes(a);
\r
378 query.prepare("Select dataBinary from NoteResources where guid=:guid");
\r
379 query.bindValue(":guid", r.getGuid());
\r
381 if (query.next()) {
\r
382 byte[] b = query.getBlob(0);
\r
383 r.getData().setBody(b);
\r
391 // Get a note's resourcesby Guid
\r
392 public List<Resource> getNoteResources(String noteGuid, boolean withBinary) {
\r
393 if (noteGuid == null)
\r
395 List<Resource> res = new ArrayList<Resource>();
\r
397 NSqlQuery query = new NSqlQuery(db.getConnection());
\r
398 query.prepare("Select guid"
\r
399 +" from NoteResources where noteGuid = :noteGuid");
\r
400 query.bindValue(":noteGuid", noteGuid);
\r
401 if (!query.exec()) {
\r
402 logger.log(logger.EXTREME, "NoteResources SQL select has failed.");
\r
403 logger.log(logger.MEDIUM, query.lastError());
\r
406 while (query.next()) {
\r
407 String guid = (query.valueString(0));
\r
408 res.add(getNoteResource(guid, withBinary));
\r
412 // Get all of a note's recognition data by the note guid
\r
413 public List<Resource> getNoteResourcesRecognition(String noteGuid) {
\r
414 if (noteGuid == null)
\r
417 List<Resource> res = new ArrayList<Resource>();
\r
418 NSqlQuery query = new NSqlQuery(db.getConnection());
\r
419 check = query.prepare("Select "
\r
420 +"recognitionHash, recognitionSize, recognitionBinary "
\r
421 +" from NoteResources where noteGuid=:guid");
\r
423 logger.log(logger.EXTREME, "NoteTable.getNoteRecognition SQL prepare has failed.");
\r
424 logger.log(logger.MEDIUM, query.lastError());
\r
427 query.bindValue(":guid", noteGuid);
\r
429 logger.log(logger.EXTREME, "NoteTable.getNoteRecognition exec has failed.");
\r
430 logger.log(logger.MEDIUM, query.lastError());
\r
433 while (query.next()) {
\r
434 Resource r = new Resource();
\r
436 Data rec = new Data();
\r
437 rec.setBodyHash(query.valueString(0).getBytes());
\r
438 String x = new String(query.valueString(1));
\r
439 if (!x.equals("")) {
\r
440 rec.setSize(new Integer(x));
\r
441 rec.setBody(query.valueString(2).getBytes());
\r
444 r.setRecognition(rec);
\r
450 // Get a note's recognition data by it's guid.
\r
451 public Resource getNoteResourceRecognition(String guid) {
\r
455 NSqlQuery query = new NSqlQuery(db.getConnection());
\r
456 check = query.prepare("Select "
\r
457 +"recognitionHash, recognitionSize, recognitionBinary, noteGuid "
\r
458 +" from NoteResources where guid=:guid");
\r
460 logger.log(logger.EXTREME, "NoteTable.getNoteRecognition SQL prepare has failed.");
\r
461 logger.log(logger.MEDIUM, query.lastError());
\r
464 query.bindValue(":guid", guid);
\r
467 logger.log(logger.EXTREME, "NoteTable.getNoteRecognition exec has failed.");
\r
468 logger.log(logger.MEDIUM, query.lastError());
\r
472 while (query.next()) {
\r
474 r = new Resource();
\r
475 Data rec = new Data();
\r
476 rec.setBodyHash(query.valueString(0).getBytes());
\r
477 String x = new String(query.valueString(1));
\r
478 if (!x.equals("")) {
\r
479 rec.setSize(new Integer(x));
\r
480 rec.setBody(query.valueString(2).getBytes());
\r
483 r.setRecognition(rec);
\r
484 r.setNoteGuid(query.valueString(3));
\r
489 // Save Note Resource
\r
490 public void updateNoteResource(Resource r, boolean isDirty) {
\r
491 logger.log(logger.HIGH, "Entering ListManager.updateNoteResource");
\r
492 NSqlQuery query = new NSqlQuery(db.getConnection());
\r
493 query.prepare("delete from NoteResources where guid=:recGuid");
\r
494 query.bindValue(":recGuid", r.getGuid());
\r
496 saveNoteResource(r, isDirty);
\r
497 logger.log(logger.HIGH, "Leaving RNoteResourceTable.updateNoteResource");
\r
499 // Update note resource GUID
\r
500 public void updateNoteResourceGuid(String oldGuid, String newGuid, boolean isDirty) {
\r
501 logger.log(logger.HIGH, "Entering RNoteResourceTable.updateNoteResourceGuid");
\r
502 NSqlQuery query = new NSqlQuery(db.getConnection());
\r
503 query.prepare("update NoteResources set guid=:newGuid, isDirty=:isDirty where guid=:oldGuid");
\r
504 query.bindValue(":newGuid", newGuid);
\r
505 query.bindValue(":isDirty", isDirty);
\r
506 query.bindValue(":oldGuid", oldGuid);
\r
508 logger.log(logger.HIGH, "Leaving RNoteResourceTable.updateNoteResourceGuid");
\r
510 // Update note resource GUID
\r
511 public void resetUpdateSequenceNumber(String guid, boolean isDirty) {
\r
512 logger.log(logger.HIGH, "Entering RNoteResourceTable.updateNoteResourceGuid");
\r
513 NSqlQuery query = new NSqlQuery(db.getConnection());
\r
514 query.prepare("update NoteResources set updateSequenceNumber=0, isDirty=:isDirty where guid=:guid");
\r
515 query.bindValue(":isDirty", isDirty);
\r
516 query.bindValue(":guid", guid);
\r
518 logger.log(logger.HIGH, "Leaving RNoteResourceTable.updateNoteResourceGuid");
\r
522 public void reindexAll() {
\r
523 NSqlQuery query = new NSqlQuery(db.getConnection());
\r
524 query.exec("Update NoteResources set indexneeded=true");
\r
526 // Count attachments
\r
527 public int getResourceCount() {
\r
528 NSqlQuery query = new NSqlQuery(db.getConnection());
\r
529 query.exec("select count(*) from noteresources");
\r
531 int returnValue = new Integer(query.valueString(0));
\r
532 return returnValue;
\r
535 // Count unindexed notes
\r
536 public int getUnindexedCount() {
\r
537 NSqlQuery query = new NSqlQuery(db.getConnection());
\r
538 query.exec("select count(*) from noteresources where indexneeded=true");
\r
540 int returnValue = new Integer(query.valueString(0));
\r
541 return returnValue;
\r
544 //********************************************
\r
545 //** Utility Functions
\r
546 //********************************************
\r
547 // Convert a byte array to a hex string
\r
548 private static String byteArrayToHexString(byte data[]) {
\r
549 StringBuffer buf = new StringBuffer();
\r
550 for (byte element : data) {
\r
551 int halfbyte = (element >>> 4) & 0x0F;
\r
554 if ((0 <= halfbyte) && (halfbyte <= 9))
\r
555 buf.append((char) ('0' + halfbyte));
\r
557 buf.append((char) ('a' + (halfbyte - 10)));
\r
558 halfbyte = element & 0x0F;
\r
559 } while(two_halfs++ < 1);
\r
561 return buf.toString();
\r
565 private String stringValue(Object value) {
\r
566 if (value != null && value.toString() != null)
\r
567 return value.toString();
\r
572 private boolean booleanValue(Object value, boolean unknown) {
\r
573 if (value != null && value.toString() != null) {
\r
575 if ((Integer)value > 0)
\r
579 } catch (java.lang.ClassCastException e) {
\r
581 String stringValue = (String)value;
\r
582 if (stringValue.equalsIgnoreCase("true"))
\r
586 } catch (java.lang.ClassCastException e1) {
\r