~ubuntu-branches/ubuntu/lucid/virtuoso-opensource/lucid

« back to all changes in this revision

Viewing changes to libsrc/JDBCDriverType4/virtuoso/jdbc2/Driver.java

  • Committer: Bazaar Package Importer
  • Author(s): Jonathan Riddell
  • Date: 2010-02-05 01:22:09 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20100205012209-h2dhz20vxpx55oam
Tags: 6.1.0-0ubuntu1
* New upstream release
* Sync with Debian packaging from Git
 - Add no_do_os_calls.diff patch, don't allow do_os_calls
 - Install to /usr/lib/virtuoso instead of /usr/bin, not a user
   binary
 - virtuoso-t installed to /usr/lib/virtuoso/
* Update build-gmake-to-make.patch
* Add package virtuoso-nepomuk to install only the files needed by nepomuk
* Remove virtuoso-nepomuk files from virtuoso-opensource-6.0-bin and libvirtodbc0
* Add virtuoso-opensource-6.0-bin.links to link to virtuoso-t from /usr/bin
* libvirtodbc0 and virtuoso-opensource-6.0-bin depends on virtuoso-nepomuk
* Remove build-dep on libwbxml2-dev

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*
2
 
 *  $Id: Driver.java,v 1.31 2009/10/05 08:44:26 source Exp $
 
2
 *  $Id: Driver.java,v 1.16.2.20 2010/02/01 15:10:03 source Exp $
3
3
 *
4
4
 *  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
5
5
 *  project.
62
62
   // The major and minor version number
63
63
   protected static final int major = 3;
64
64
 
65
 
   protected static final int minor = 38;
 
65
   protected static final int minor = 47;
66
66
 
67
67
   // Some variables
68
68
   private String host = "localhost";
329
329
    */
330
330
   public DriverPropertyInfo[] getPropertyInfo(String url, Properties info) throws VirtuosoException
331
331
   {
 
332
      Vector pinfo = new Vector();
 
333
      DriverPropertyInfo pr;
332
334
      // First check the URL
333
335
      if(acceptsURL(url))
334
336
      {
335
 
         DriverPropertyInfo[] pinfo = new DriverPropertyInfo[7];
336
337
         if(info.get("user") == null)
337
338
         {
338
 
            pinfo[0] = new DriverPropertyInfo("user",null);
339
 
            pinfo[0].required = true;
 
339
            pr = new DriverPropertyInfo("user",null);
 
340
            pr.required = true;
 
341
            pinfo.add(pr);
340
342
         }
341
343
         if(info.get("password") == null)
342
344
         {
343
 
            pinfo[1] = new DriverPropertyInfo("password",null);
344
 
            pinfo[1].required = true;
 
345
            pr = new DriverPropertyInfo("password",null);
 
346
            pr.required = true;
 
347
            pinfo.add(pr);
345
348
         }
346
349
         if(info.get("database") == null)
347
350
         {
348
 
            pinfo[2] = new DriverPropertyInfo("database",null);
349
 
            pinfo[2].required = false;
 
351
            pr = new DriverPropertyInfo("database",null);
 
352
            pr.required = false;
 
353
            pinfo.add(pr);
350
354
         }
351
355
#ifdef SSL
352
356
         if(info.get("certificate") == null)
353
357
         {
354
 
            pinfo[3] = new DriverPropertyInfo("certificate",null);
355
 
            pinfo[3].required = false;
 
358
            pr = new DriverPropertyInfo("certificate",null);
 
359
            pr.required = false;
 
360
            pinfo.add(pr);
356
361
         }
357
362
         if(info.get("keystorepass") == null)
358
363
         {
359
 
            pinfo[4] = new DriverPropertyInfo("keystorepass",null);
360
 
            pinfo[4].required = false;
 
364
            pr = new DriverPropertyInfo("keystorepass",null);
 
365
            pr.required = false;
 
366
            pinfo.add(pr);
361
367
         }
362
368
         if(info.get("keystorepath") == null)
363
369
         {
364
 
            pinfo[5] = new DriverPropertyInfo("keystorepath",null);
365
 
            pinfo[5].required = false;
 
370
            pr = new DriverPropertyInfo("keystorepath",null);
 
371
            pr.required = false;
 
372
            pinfo.add(pr);
366
373
         }
367
374
         if(info.get("provider") == null)
368
375
         {
369
 
            pinfo[6] = new DriverPropertyInfo("provider",null);
370
 
            pinfo[6].required = false;
 
376
            pr = new DriverPropertyInfo("provider",null);
 
377
            pr.required = false;
 
378
            pinfo.add(pr);
371
379
         }
372
380
#endif
373
 
         return pinfo;
 
381
         DriverPropertyInfo drv_info[] = new DriverPropertyInfo[pinfo.size()];
 
382
         pinfo.copyInto(drv_info);
 
383
         return drv_info;
374
384
      }
375
 
      DriverPropertyInfo[] pinfo = new DriverPropertyInfo[8];
376
 
      pinfo[0] = new DriverPropertyInfo("url",url);
377
 
      pinfo[0].required = true;
 
385
 
 
386
      pr = new DriverPropertyInfo("url",url);
 
387
      pr.required = true;
 
388
      pinfo.add(pr);
378
389
      if(info.get("user") == null)
379
390
      {
380
 
         pinfo[1] = new DriverPropertyInfo("user",null);
381
 
         pinfo[1].required = true;
 
391
         pr = new DriverPropertyInfo("user",null);
 
392
         pr.required = true;
 
393
         pinfo.add(pr);
382
394
      }
383
395
      if(info.get("password") == null)
384
396
      {
385
 
         pinfo[2] = new DriverPropertyInfo("password",null);
386
 
         pinfo[2].required = true;
 
397
         pr = new DriverPropertyInfo("password",null);
 
398
         pr.required = true;
 
399
         pinfo.add(pr);
387
400
      }
388
401
      if(info.get("database") == null)
389
402
      {
390
 
         pinfo[3] = new DriverPropertyInfo("database",null);
391
 
         pinfo[3].required = false;
 
403
         pr = new DriverPropertyInfo("database",null);
 
404
         pr.required = false;
 
405
         pinfo.add(pr);
 
406
      }
 
407
      if(info.get("fbs") == null)
 
408
      {
 
409
         pr = new DriverPropertyInfo("fbs",null);
 
410
         pr.required = false;
 
411
         pinfo.add(pr);
 
412
      }
 
413
      if(info.get("sendbs") == null)
 
414
      {
 
415
         pr = new DriverPropertyInfo("sendbs",null);
 
416
         pr.required = false;
 
417
         pinfo.add(pr);
 
418
      }
 
419
      if(info.get("recvbs") == null)
 
420
      {
 
421
         pr = new DriverPropertyInfo("recvbs",null);
 
422
         pr.required = false;
 
423
         pinfo.add(pr);
 
424
      }
 
425
      if(info.get("roundrobin") == null)
 
426
      {
 
427
         pr = new DriverPropertyInfo("roundrobin",null);
 
428
         pr.required = false;
 
429
         pinfo.add(pr);
392
430
      }
393
431
#ifdef SSL
394
432
      if(info.get("certificate") == null)
395
433
      {
396
 
         pinfo[4] = new DriverPropertyInfo("certificate",null);
397
 
         pinfo[4].required = false;
 
434
         pr = new DriverPropertyInfo("certificate",null);
 
435
         pr.required = false;
 
436
         pinfo.add(pr);
398
437
      }
399
438
      if(info.get("keystorepass") == null)
400
439
      {
401
 
         pinfo[5] = new DriverPropertyInfo("keystorepass",null);
402
 
         pinfo[5].required = false;
 
440
         pr = new DriverPropertyInfo("keystorepass",null);
 
441
         pr.required = false;
 
442
         pinfo.add(pr);
403
443
      }
404
444
      if(info.get("keystorepath") == null)
405
445
      {
406
 
         pinfo[6] = new DriverPropertyInfo("keystorepath",null);
407
 
         pinfo[6].required = false;
 
446
         pr = new DriverPropertyInfo("keystorepath",null);
 
447
         pr.required = false;
 
448
         pinfo.add(pr);
408
449
      }
409
450
      if(info.get("provider") == null)
410
451
      {
411
 
         pinfo[7] = new DriverPropertyInfo("provider",null);
412
 
         pinfo[7].required = false;
 
452
         pr = new DriverPropertyInfo("provider",null);
 
453
         pr.required = false;
 
454
         pinfo.add(pr);
413
455
      }
414
456
#endif
415
 
      if(info.get("fbs") == null)
416
 
      {
417
 
         pinfo[3] = new DriverPropertyInfo("fbs",null);
418
 
         pinfo[3].required = false;
419
 
      }
420
 
      if(info.get("sendbs") == null)
421
 
      {
422
 
         pinfo[3] = new DriverPropertyInfo("sendbs",null);
423
 
         pinfo[3].required = false;
424
 
      }
425
 
      if(info.get("recvbs") == null)
426
 
      {
427
 
         pinfo[3] = new DriverPropertyInfo("recvbs",null);
428
 
         pinfo[3].required = false;
429
 
      }
430
 
      if(info.get("roundrobin") == null)
431
 
      {
432
 
         pinfo[3] = new DriverPropertyInfo("roundrobin",null);
433
 
         pinfo[3].required = false;
434
 
      }
435
457
 
436
458
#if JDK_VER >= 16
437
459
      if(info.get("usepstmtpool") == null)
438
460
      {
439
 
         pinfo[3] = new DriverPropertyInfo("usepstmtpool",null);
440
 
         pinfo[3].required = false;
 
461
         pr = new DriverPropertyInfo("usepstmtpool",null);
 
462
         pr.required = false;
 
463
         pinfo.add(pr);
441
464
      }
442
465
      if(info.get("pstmtpoolsize") == null)
443
466
      {
444
 
         pinfo[3] = new DriverPropertyInfo("pstmtpoolsize",null);
445
 
         pinfo[3].required = false;
 
467
         pr = new DriverPropertyInfo("pstmtpoolsize",null);
 
468
         pr.required = false;
 
469
         pinfo.add(pr);
446
470
      }
447
471
#endif
448
 
 
449
 
      return pinfo;
 
472
      DriverPropertyInfo drv_info[] = new DriverPropertyInfo[pinfo.size()];
 
473
      pinfo.copyInto(drv_info);
 
474
      return drv_info;
450
475
   }
451
476
 
452
477
   /**