Examples of containsKey()


Examples of org.apache.commons.configuration.PropertiesConfiguration.containsKey()

    compositeConfig.addConfiguration(propConfig);
   
   
    Properties properties = new Properties();
    if ("Hibernate".equals(propConfig.getString(Property.PERSISTENCE_PROVIDER))) {
      if (propConfig.containsKey(Property.DATASOURCE))
        properties.put("hibernate.connection.datasource",propConfig.getString(Property.DATASOURCE));
      if (propConfig.containsKey(Property.HBM_DDL_AUTO))
        properties.put("hibernate.hbm2ddl.auto",propConfig.getString(Property.HBM_DDL_AUTO));
      if (propConfig.containsKey(Property.DEFAULT_SCHEMA))
        properties.put("hibernate.default_schema",propConfig.getString(Property.DEFAULT_SCHEMA));
View Full Code Here

Examples of org.apache.commons.configuration.XMLConfiguration.containsKey()

            mp.setInputFile(cmd.getOptionValue("if"), Charset.forName((String) config.getProperty( "config.input-file-encoding" )));
            mp.setOutputFile(cmd.getOptionValue("of"), Charset.forName((String) config.getProperty( "config.output-file-encoding" )));

            // Set additional options
            if( config.containsKey("config.input-id-prefix") ) mp.setInputIDPrefix((String) config.getProperty("config.input-id-prefix"));
            if( config.containsKey("config.count-threshold") ) mp.setCountThreshold(Integer.valueOf((String) config.getProperty("config.count-threshold")) );

            if( cmd.hasOption( "v" ) ) System.out.println("Converting Mappings-Hash & Preparing Processors");

            try {
View Full Code Here

Examples of org.apache.commons.configuration2.BaseHierarchicalConfiguration.containsKey()

        BaseHierarchicalConfiguration config = createCombinedConfiguration();
        assertEquals("Wrong number of services", 0, config
                .getMaxIndex("net.service.url"));
        assertEquals("Wrong service", "http://service1.org", config
                .getString("net.service.url"));
        assertFalse("Type attribute available", config
                .containsKey("net.service.url[@type]"));
    }

    /**
     * Tests if a list from the second structure is added if it is not defined
View Full Code Here

Examples of org.apache.commons.configuration2.CombinedConfiguration.containsKey()

        File systemFile =
                ConfigurationAssert.getTestFile("testCCSystemProperties.xml");
        builder.configure(createParameters()
                .setFile(systemFile));
        CombinedConfiguration cc = builder.getConfiguration();
        assertTrue("System property not found", cc.containsKey("user.name"));
        assertEquals("Properties not added", "value1",
                System.getProperty("key1"));
    }

    /**
 
View Full Code Here

Examples of org.apache.commons.configuration2.Configuration.containsKey()

        if (subset == null)
        {
            throw new IllegalArgumentException("Mapped property '" + name + "' does not exist.");
        }

        return subset.containsKey(key);
    }

    @Override
    public Object get(String name, int index)
    {
View Full Code Here

Examples of org.apache.commons.math.util.OpenIntToDoubleHashMap.containsKey()

        Iterator iter = copyThis ? v.entries.iterator() : entries.iterator();
        OpenIntToDoubleHashMap randomAccess = copyThis ? entries : v.entries;
        while (iter.hasNext()) {
            iter.advance();
            int key = iter.key();
            if (randomAccess.containsKey(key)) {
                res.setEntry(key, randomAccess.get(key) + iter.value());
            } else {
                res.setEntry(key, iter.value());
            }
        }
View Full Code Here

Examples of org.apache.commons.math3.util.OpenIntToDoubleHashMap.containsKey()

        Iterator iter = copyThis ? v.entries.iterator() : entries.iterator();
        OpenIntToDoubleHashMap randomAccess = copyThis ? entries : v.entries;
        while (iter.hasNext()) {
            iter.advance();
            int key = iter.key();
            if (randomAccess.containsKey(key)) {
                res.setEntry(key, randomAccess.get(key) + iter.value());
            } else {
                res.setEntry(key, iter.value());
            }
        }
View Full Code Here

Examples of org.apache.cxf.jaxws.context.WrappedMessageContext.containsKey()

    @Override
    public void handleMessage(SoapMessage message) throws Fault {
        if (ContextUtils.isOutbound(message)) {
            AddressingProperties maps = ContextUtils.retrieveMAPs(message, false, true, false);
            WrappedMessageContext soapContext = new WrappedMessageContext(message, Scope.APPLICATION);
            if (soapContext.containsKey(SOAPUtil.SWITCHYARD_CONTEXT)) {
                Context context = (Context)soapContext.get(SOAPUtil.SWITCHYARD_CONTEXT);

                String property = (String)context.getPropertyValue(SOAPUtil.WSA_ACTION_STR);
                AttributedURIType uri = null;
                EndpointReferenceType ref = null;
View Full Code Here

Examples of org.apache.cxf.message.Message.containsKey()

                }
            }
        }
        if (exchange.getOutMessage() != null) {
            Message out = exchange.getOutMessage();
            if (out.containsKey(Message.PROTOCOL_HEADERS)) {
                Map<String, List<String>> heads = CastUtils
                    .cast((Map<?, ?>)exchange.getOutMessage().get(Message.PROTOCOL_HEADERS));
                if (heads.containsKey("Content-Type")) {
                    List<String> ct = heads.get("Content-Type");
                    exchange.getOutMessage().put(Message.CONTENT_TYPE, ct.get(0));
View Full Code Here

Examples of org.apache.cxf.tools.common.ToolContext.containsKey()

                env.setParameters(getParametersMap(getArrayKeys()));
                if (env.get(ToolConstants.CFG_OUTPUTDIR) == null) {
                    env.put(ToolConstants.CFG_OUTPUTDIR, ".");
                }

                if (env.containsKey(ToolConstants.CFG_ANT)) {
                    setAntProperties(env);
                    setLibraryReferences(env);
                }

                if (isVerboseOn()) {
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.