public final DriverPropertyInfo[] getPropertyInfo(String url, Properties props) throws SQLException { Properties ps = this.getEffectiveProperties(url, props); // Create base driver properties List<DriverPropertyInfo> baseProps = new ArrayList<>(); // JDBC compatibility level DriverPropertyInfo jdbcCompatLevel = new DriverPropertyInfo(PARAM_JDBC_COMPATIBILITY, ps.getProperty( PARAM_JDBC_COMPATIBILITY, Integer.toString(JdbcCompatibility.DEFAULT))); jdbcCompatLevel.description = "Configures how compatible the driver will attempt to be with JDBC, primarily affects reported column types for result sets"; jdbcCompatLevel.required = false; String[] choices = new String[9]; for (int i = 0; i < choices.length; i++) { choices[i] = Integer.toString(i + 1); } jdbcCompatLevel.choices = choices; baseProps.add(jdbcCompatLevel); // Pre-processors DriverPropertyInfo preProcessor = new DriverPropertyInfo(PARAM_PRE_PROCESSOR, String.join(",", this.getValues(ps, PARAM_PRE_PROCESSOR))); preProcessor.description = "Configures pre-processors which are used to amend SPARQL text, queries or updates before these are passed to the underlying SPARQL engine, multiple fully qualified class names may be specified"; preProcessor.required = false; baseProps.add(preProcessor); // Logging config DriverPropertyInfo logging = new DriverPropertyInfo(PARAM_LOGGING, ps.getProperty(PARAM_LOGGING)); logging.description = "Sets the path to a log4j properties file for configuring logging, the file system is considered first and then the classpath. If not set defaults to log4j.properties"; logging.required = false; baseProps.add(logging); // Have the derived implementation create the final property information return this.getPropertyInfo(ps, baseProps); }
public final DriverPropertyInfo[] getPropertyInfo(String url, Properties props) throws SQLException { Properties ps = this.getEffectiveProperties(url, props); // Create base driver properties List<DriverPropertyInfo> baseProps = new ArrayList<>(); // JDBC compatibility level DriverPropertyInfo jdbcCompatLevel = new DriverPropertyInfo(PARAM_JDBC_COMPATIBILITY, ps.getProperty( PARAM_JDBC_COMPATIBILITY, Integer.toString(JdbcCompatibility.DEFAULT))); jdbcCompatLevel.description = "Configures how compatible the driver will attempt to be with JDBC, primarily affects reported column types for result sets"; jdbcCompatLevel.required = false; String[] choices = new String[9]; for (int i = 0; i < choices.length; i++) { choices[i] = Integer.toString(i + 1); } jdbcCompatLevel.choices = choices; baseProps.add(jdbcCompatLevel); // Pre-processors DriverPropertyInfo preProcessor = new DriverPropertyInfo(PARAM_PRE_PROCESSOR, String.join(",", this.getValues(ps, PARAM_PRE_PROCESSOR))); preProcessor.description = "Configures pre-processors which are used to amend SPARQL text, queries or updates before these are passed to the underlying SPARQL engine, multiple fully qualified class names may be specified"; preProcessor.required = false; baseProps.add(preProcessor); // Logging config DriverPropertyInfo logging = new DriverPropertyInfo(PARAM_LOGGING, ps.getProperty(PARAM_LOGGING)); logging.description = "Sets the path to a log4j properties file for configuring logging, the file system is considered first and then the classpath. If not set defaults to log4j.properties"; logging.required = false; baseProps.add(logging); // Have the derived implementation create the final property information return this.getPropertyInfo(ps, baseProps); }