Examples of Driver


Examples of org.castor.jdo.conf.Driver

                throw new MappingException(msg, e);
            }
        }
       
        try {
            Driver driver = dbChoice.getDriver();
            if (DriverManager.getDriver(driver.getUrl()) == null) {
                String msg = Messages.format("jdo.missingDriver", driver.getUrl());
                LOG.error(msg);
                throw new MappingException(msg);
            }
        } catch (SQLException ex) {
            throw new MappingException(ex);
View Full Code Here

Examples of org.drools.examples.carinsurance.domain.Driver

    @Test
    public void approvePolicyRequest() throws IOException {
        SimulationFluent simulationFluent = new DefaultSimulationFluent();

        Driver john = new Driver("John", "Smith", new LocalDate(1970, 1, 1));
        Car mini = new Car("MINI-01", CarType.SMALL, false, new BigDecimal("10000.00"));
        PolicyRequest johnMiniPolicyRequest = new PolicyRequest(john, mini);
        johnMiniPolicyRequest.addCoverageRequest(new CoverageRequest(CoverageType.COLLISION));
        johnMiniPolicyRequest.addCoverageRequest(new CoverageRequest(CoverageType.COMPREHENSIVE));
View Full Code Here

Examples of org.drools.examples.decisiontable.Driver

        // typical decision tables are used statelessly
        StatelessKnowledgeSession ksession = kbase.newStatelessKnowledgeSession();

        //now create some test data
        Driver driver = new Driver();
        Policy policy = new Policy();

        ksession.execute( Arrays.asList( new Object[]{driver, policy} ) );

        System.out.println( "BASE PRICE IS: " + policy.getBasePrice() );
View Full Code Here

Examples of org.exolab.castor.jdo.conf.Driver

   * @param password password for the DB login
   * @return JDO driver configuration
   */
  public static Driver createJdoDriverConf(String driver_name, String db_url, String username, String password)
  {
    Driver driverConf = new Driver();

    driverConf.setClassName(driver_name);
    driverConf.setUrl(db_url);
    driverConf.addParam(createJdoConfParam("user", username));
    driverConf.addParam(createJdoConfParam("password", password));

    return driverConf;
  }
View Full Code Here

Examples of org.gdal.gdal.Driver

                if (!GDALUtilities.isDriverAvailable(supportedFormat)) {
                    continue;
                }

                // check GDAL Driver
                Driver getDriverByName = gdal.GetDriverByName(supportedFormat);
                if (getDriverByName != null) {
                    String dmdExtension = getDriverByName
                            .GetMetadataItem(GDAL_METADATA_DMD_EXTENSION);
                    if (dmdExtension != null && dmdExtension.length() > 0) {
                        extensions.add(dmdExtension.trim().toLowerCase());
                    }
                }
View Full Code Here

Examples of org.gdal.ogr.Driver

      /* -------------------------------------------------------------------- */
      /*      If that failed, find the driver so we can create the tile index.*/
      /* -------------------------------------------------------------------- */
      if( poDstDS == null )
      {       
         Driver poDriver = null;

         for( int iDriver = 0; iDriver < ogr.GetDriverCount() && poDriver == null; iDriver++ )
         {
            poDriver = ogr.GetDriverByName(pszFormat);
         }

         if( poDriver == null )
         {
            System.err.print("Unable to find driver '"+pszFormat+"'.\n");
            System.err.print("The following drivers are available:\n" );

            for( int iDriver = 0; iDriver < ogr.GetDriverCount(); iDriver++ )
            {
               System.err.print("  . '"+ogr.GetDriver(iDriver).GetName()+"'\n");
            }
            return;
         }

         if( !poDriver.TestCapability( ogr.ODrCCreateDataSource ) )
         {
            System.err.print(pszFormat + " driver does not support data source creation.\n");                 
            return;
         }

         /* -------------------------------------------------------------------- */
         /*      Now create it.                                                  */
         /* -------------------------------------------------------------------- */

         poDstDS = poDriver.CreateDataSource( pszOutputName );
         if( poDstDS == null )
         {
            System.err.print(pszFormat + " driver failed to create "+pszOutputName+"\n");
            return;
         }
View Full Code Here

Examples of org.geotools.coverage.io.Driver

        // get all Driver implementations
        scanForPlugins();
        final Iterator<Driver> it = getServiceRegistry().getServiceProviders(Driver.class, false);
        final Set<Driver> drivers = new HashSet<Driver>();
        while (it.hasNext()) {
            final Driver spi = (Driver) it.next();
            if (spi.isAvailable())
                drivers.add(spi);
        }
        return Collections.unmodifiableSet(drivers);
    }
View Full Code Here

Examples of org.geotools.coverage.io.driver.Driver

          DefaultServiceInfo info = new DefaultServiceInfo();
          info.setTitle(reader.getCoverageName());

          StringBuffer description = new StringBuffer();
         
          Driver driver = getDriver();
          description.append( "Name: ");
          description.append( reader.getCoverageName() );
          description.append( "\nDriver: ");
          description.append( driver.getName() );
          description.append( "/" );
          description.append( getDriver().getTitle() );
          description.append( "\nSize is ");
          GridEnvelope size = reader.getOriginalGridRange();
          description.append(size.getSpan(0));
View Full Code Here

Examples of org.h2.Driver

        assertEquals(1234, rs.getInt(2));
        conn.close();
    }

    private void testDriverObject() throws Exception {
        Driver instance = Driver.load();
        assertTrue(DriverManager.getDriver("jdbc:h2:~/test") == instance);
        Driver.unload();
        try {
            java.sql.Driver d = DriverManager.getDriver("jdbc:h2:~/test");
            fail(d.toString());
View Full Code Here

Examples of org.jboss.jca.common.api.metadata.ds.Driver

                  case DRIVERS : {
                     driversMatched = true;
                     break;
                  }
                  case DRIVER : {
                     Driver driver = parseDriver(reader);
                     drivers.put(driver.getName(), driver);
                     break;
                  }
                  default :
                     throw new ParserException(bundle.unexpectedElement(reader.getLocalName()));
               }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.