Package org.apache.commons.configuration

Examples of org.apache.commons.configuration.BaseConfiguration.addProperty()


        String[] values = { "test1", "test2\\,test3", "test4\\,test5" };
        String listKey = "test.list";

        BaseConfiguration config = new BaseConfiguration();
        config.setListDelimiter('\0');
        config.addProperty(listKey, values);

        assertEquals("Wrong number of list elements", values.length, config.getList(listKey).size());

        Configuration c = createConfiguration(config);
        List<?> v = c.getList(listKey);
View Full Code Here


        c = new Criteria();
        Criteria.Criterion cc =
            c.getNewCriterion("TABLE.COLUMN", Boolean.TRUE, Criteria.EQUAL);

        Configuration conf = new BaseConfiguration();
        conf.addProperty("driver", "org.postgresql.Driver");
        try
        {
            cc.setDB(DBFactory.create("org.postgresql.Driver"));
        }
        catch (Exception e)
View Full Code Here

    /**
     * Creates a RexsterClient instance with default settings for the factory using 8184 for the port.
     */
    public static RexsterClient open(final String host) throws Exception {
        final BaseConfiguration specificConfiguration = new BaseConfiguration();
        specificConfiguration.addProperty(RexsterClientTokens.CONFIG_HOSTNAME, host);

        return open(specificConfiguration);
    }

    /**
 
View Full Code Here

    /**
     * Creates a RexsterClient instance allowing override of host and port.
     */
    public static RexsterClient open(final String host, final int port) throws Exception {
        final BaseConfiguration specificConfiguration = new BaseConfiguration();
        specificConfiguration.addProperty(RexsterClientTokens.CONFIG_HOSTNAME, host);
        specificConfiguration.addProperty(RexsterClientTokens.CONFIG_PORT, port);

        return open(specificConfiguration);
    }

View Full Code Here

     * Creates a RexsterClient instance allowing override of host and port.
     */
    public static RexsterClient open(final String host, final int port) throws Exception {
        final BaseConfiguration specificConfiguration = new BaseConfiguration();
        specificConfiguration.addProperty(RexsterClientTokens.CONFIG_HOSTNAME, host);
        specificConfiguration.addProperty(RexsterClientTokens.CONFIG_PORT, port);

        return open(specificConfiguration);
    }

    /**
 
View Full Code Here

     * name of the graph to connect to.  Passing a value other than null will automatically establish a binding
     * variable called "g" for the graph name specified.
     */
    public static RexsterClient open(final String host, final String graphName) throws Exception {
        final BaseConfiguration specificConfiguration = new BaseConfiguration();
        specificConfiguration.addProperty(RexsterClientTokens.CONFIG_HOSTNAME, host);
        specificConfiguration.addProperty(RexsterClientTokens.CONFIG_GRAPH_NAME, graphName);

        return open(specificConfiguration);
    }

View Full Code Here

     * variable called "g" for the graph name specified.
     */
    public static RexsterClient open(final String host, final String graphName) throws Exception {
        final BaseConfiguration specificConfiguration = new BaseConfiguration();
        specificConfiguration.addProperty(RexsterClientTokens.CONFIG_HOSTNAME, host);
        specificConfiguration.addProperty(RexsterClientTokens.CONFIG_GRAPH_NAME, graphName);

        return open(specificConfiguration);
    }

    /**
 
View Full Code Here

     * Passing a value other than null will automatically establish a binding variable called "g" for the graph
     * name specified.
     */
    public static RexsterClient open(final String host, final int port, final String graphName) throws Exception {
        final BaseConfiguration specificConfiguration = new BaseConfiguration();
        specificConfiguration.addProperty(RexsterClientTokens.CONFIG_HOSTNAME, host);
        specificConfiguration.addProperty(RexsterClientTokens.CONFIG_PORT, port);
        specificConfiguration.addProperty(RexsterClientTokens.CONFIG_GRAPH_NAME, graphName);

        return open(specificConfiguration);
    }
View Full Code Here

     * name specified.
     */
    public static RexsterClient open(final String host, final int port, final String graphName) throws Exception {
        final BaseConfiguration specificConfiguration = new BaseConfiguration();
        specificConfiguration.addProperty(RexsterClientTokens.CONFIG_HOSTNAME, host);
        specificConfiguration.addProperty(RexsterClientTokens.CONFIG_PORT, port);
        specificConfiguration.addProperty(RexsterClientTokens.CONFIG_GRAPH_NAME, graphName);

        return open(specificConfiguration);
    }

View Full Code Here

     */
    public static RexsterClient open(final String host, final int port, final String graphName) throws Exception {
        final BaseConfiguration specificConfiguration = new BaseConfiguration();
        specificConfiguration.addProperty(RexsterClientTokens.CONFIG_HOSTNAME, host);
        specificConfiguration.addProperty(RexsterClientTokens.CONFIG_PORT, port);
        specificConfiguration.addProperty(RexsterClientTokens.CONFIG_GRAPH_NAME, graphName);

        return open(specificConfiguration);
    }

    /**
 
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.