Examples of Jdbc


Examples of br.com.objectos.rio.Jdbc

        .actionDescription("Applying objectos settings to your Eclipse workspace.");
  }

  @Override
  protected void execute0(DotsOptions options) {
    Jdbc jdbc = etcs.read(Jdbc.class);
    Map<String, Object> ctx = ImmutableMap.<String, Object> of("jdbc", jdbc);
    Directory dir = dirs.eclipseUserCoreRuntime();

    WayEtc.resourcesAt("/kdo/dots/eclipse")
        .addFromListAt("/kdo/dots/eclipse.list")
View Full Code Here

Examples of br.com.objectos.rio.Jdbc

        .actionDescription("Applying objectos settings to your ~/.m2/settings.xml file.");
  }

  @Override
  protected void execute0(DotsOptions options) {
    Jdbc jdbc = etcs.read(Jdbc.class);
    Map<String, Object> ctx = ImmutableMap.<String, Object> of("jdbc", jdbc);
    Directory m2 = dirs.mavenSettings();

    WayEtc.resourcesAt("/kdo/dots/maven")
        .add("settings.xml")
View Full Code Here

Examples of br.com.objectos.rio.Jdbc

  @Override
  void execute() {
    info("maven");
    infoAction("Applying objectos settings to your ~/.m2/settings.xml file.");

    Jdbc jdbc = etcs().read(Jdbc.class);
    GDrive gdrive = etcs().read(GDrive.class);
    Map<String, Object> ctx = ImmutableMap.<String, Object> of("jdbc", jdbc, "gdrive", gdrive);
    Directory m2 = dirs().mavenSettings();

    resourcesAt("/kdo/dots/maven")
View Full Code Here

Examples of br.com.objectos.rio.Jdbc

  @Override
  void execute() {
    info("eclipse");
    infoAction("Applying objectos settings to your Eclipse workspace.");

    Jdbc jdbc = etcs().read(Jdbc.class);
    Map<String, Object> ctx = ImmutableMap.<String, Object> of("jdbc", jdbc);
    Directory dir = dirs().eclipseUserCoreRuntime();

    resourcesAt("/kdo/dots/eclipse")
        .addFromListAt("/kdo/dots/eclipse.list")
View Full Code Here

Examples of br.com.objectos.rio.Jdbc

        .actionDescription("Applying objectos settings to your ~/.m2/settings.xml file.");
  }

  @Override
  protected void execute0(KdoDotsOptions options) {
    Jdbc jdbc = etcs.read(Jdbc.class);
    Map<String, Object> ctx = ImmutableMap.<String, Object> of("jdbc", jdbc);
    Directory m2 = dirs.mavenSettings();

    WayEtc.resourcesAt("/kdo/dots/maven")
        .add("settings.xml")
View Full Code Here

Examples of br.com.objectos.rio.Jdbc

        .actionDescription("Applying objectos settings to your Eclipse workspace.");
  }

  @Override
  protected void execute0(KdoDotsOptions options) {
    Jdbc jdbc = etcs.read(Jdbc.class);
    Map<String, Object> ctx = ImmutableMap.<String, Object> of("jdbc", jdbc);
    Directory dir = dirs.eclipseUserCoreRuntime();

    WayEtc.resourcesAt("/kdo/dots/eclipse")
        .addFromListAt("/kdo/dots/eclipse.list")
View Full Code Here

Examples of co.ohba.autumn.AutumnConfig.Jdbc

    val dsType = atmnCnf.getDataStoreType();
   
    Map<String, String> properties = Maps.newHashMap();

    if(dsType == DataStoreType.JDBC) {
      Jdbc jdbc = atmnCnf.getJdbc();
      properties.put(PersistenceUnitProperties.JDBC_DRIVER, jdbc.getDriver());
      properties.put(PersistenceUnitProperties.JDBC_URL, jdbc.getUrl());
      properties.put(PersistenceUnitProperties.JDBC_USER, jdbc.getUser());
      properties.put(PersistenceUnitProperties.JDBC_PASSWORD, jdbc.getPassword());
     
      properties.put(PersistenceUnitProperties.DDL_GENERATION, PersistenceUnitProperties.CREATE_OR_EXTEND);
      properties.put(PersistenceUnitProperties.DDL_GENERATION_MODE, PersistenceUnitProperties.DDL_DATABASE_GENERATION);

    } else if (dsType == DataStoreType.MONGO) {
View Full Code Here

Examples of org.dbpedia.downloader.connection.JDBC

        String sparul = "INSERT IN GRAPH <" + Global.options.get("graphURI") + "> { \n  " + pattern + "}";
//            String sparul = "INSERT IN GRAPH <http://dbpedia.org> \n" +
//                    "\n" +
//                    "{ <http://dbpedia.org/resource/Johann_Gottfried_Galle> <http://dbpedia.org/property/wikilink> \"Hello\" } ";

        JDBC jdbc = JDBC.getDefaultConnection();

        String virtuosoPl = "sparql " + sparul + "";

        //jdbc.exec(virtuosoPl);
        PreparedStatement stmt = jdbc.prepare(virtuosoPl);
        return jdbc.executeStatement(stmt, new String[]{});
    }
View Full Code Here

Examples of org.dbpedia.downloader.connection.JDBC

//            String sparul = "INSERT IN GRAPH <" + Global.options.get("graphURI") + "> { \n  " + pattern + "}";
//            String sparul = "INSERT IN GRAPH <http://dbpedia.org> \n" +
//                    "\n" +
//                    "{ <http://dbpedia.org/resource/Johann_Gottfried_Galle> <http://dbpedia.org/property/wikilink> \"Hello\" } ";

        JDBC jdbc = JDBC.getDefaultConnection();

        String virtuosoPl = "sparql " + sparul + "";

        PreparedStatement stmt = jdbc.prepare(virtuosoPl);
        return jdbc.executeStatement(stmt, new String[]{});
    }
View Full Code Here

Examples of org.jooq.util.jaxb.Jdbc

        new GenerationTool().run(configuration);
    }

    @SuppressWarnings("unchecked")
    public void run(Configuration configuration) throws Exception {
        Jdbc j = configuration.getJdbc();
        org.jooq.util.jaxb.Generator g = configuration.getGenerator();
        errorIfNull(g, "The <generator/> tag is mandatory.");

        // Some default values for optional elements to avoid NPE's
        if (g.getStrategy() == null)
            g.setStrategy(new Strategy());
        if (g.getTarget() == null)
            g.setTarget(new Target());

        try {

            // Initialise connection
            // ---------------------
            if (connection == null && j != null) {
                Class<? extends Driver> driver = (Class<? extends Driver>) loadClass(driverClass(j));

                Properties properties = properties(j.getProperties());
                if (!properties.containsKey("user"))
                    properties.put("user", defaultString(j.getUser()));
                if (!properties.containsKey("password"))
                    properties.put("password", defaultString(j.getPassword()));

                connection = driver.newInstance().connect(defaultString(j.getUrl()), properties);
                close = true;
            }
            else {
                j = defaultIfNull(j, new Jdbc());
            }


            // Initialise generator
            // --------------------
            Class<Generator> generatorClass = (Class<Generator>) (!isBlank(g.getName())
                ? loadClass(trim(g.getName()))
                : JavaGenerator.class);
            Generator generator = generatorClass.newInstance();

            GeneratorStrategy strategy;

            Matchers matchers = g.getStrategy().getMatchers();
            if (matchers != null) {
                strategy = new MatcherStrategy(matchers);

                if (g.getStrategy().getName() != null) {
                    log.warn("WARNING: Matchers take precedence over custom strategy. Strategy ignored: " +
                        g.getStrategy().getName());
                }
            }
            else {
                Class<GeneratorStrategy> strategyClass = (Class<GeneratorStrategy>) (!isBlank(g.getStrategy().getName())
                    ? loadClass(trim(g.getStrategy().getName()))
                    : DefaultGeneratorStrategy.class);
                strategy = strategyClass.newInstance();
            }

            generator.setStrategy(strategy);

            org.jooq.util.jaxb.Database d = defaultIfNull(g.getDatabase(), new org.jooq.util.jaxb.Database());
            String databaseName = trim(d.getName());
            Class<? extends Database> databaseClass = isBlank(databaseName)
                ? databaseClass(j)
                : (Class<? extends Database>) loadClass(databaseName);
            Database database = databaseClass.newInstance();
            database.setProperties(properties(d.getProperties()));

            List<Schema> schemata = d.getSchemata();

            // For convenience and backwards-compatibility, the schema configuration can be set also directly
            // in the <database/> element
            if (schemata.isEmpty()) {
                Schema schema = new Schema();
                schema.setInputSchema(trim(d.getInputSchema()));
                schema.setOutputSchema(trim(d.getOutputSchema()));
                schema.setOutputSchemaToDefault(d.isOutputSchemaToDefault());
                schemata.add(schema);
            }
            else {
                if (!StringUtils.isBlank(d.getInputSchema())) {
                    log.warn("WARNING: Cannot combine configuration properties /configuration/generator/database/inputSchema and /configuration/generator/database/schemata");
                }
                if (!StringUtils.isBlank(d.getOutputSchema())) {
                    log.warn("WARNING: Cannot combine configuration properties /configuration/generator/database/outputSchema and /configuration/generator/database/schemata");
                }
            }

            for (Schema schema : schemata) {
                if (StringUtils.isBlank(schema.getInputSchema())) {
                    if (!StringUtils.isBlank(j.getSchema())) {
                        log.warn("WARNING: The configuration property jdbc.Schema is deprecated and will be removed in the future. Use /configuration/generator/database/inputSchema instead");
                    }

                    schema.setInputSchema(trim(j.getSchema()));
                }

                // [#3018] Prior to <outputSchemaToDefault/>, empty <outputSchema/> elements meant that
                // the outputSchema should be the default schema. This is a bit too clever, and doesn't
                // work when Maven parses the XML configurations.
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.