Package java.util

Examples of java.util.Properties.entrySet()


      provider.setUrl(urlReadHandler.getResult());
    }
    if (propertiesReadHandler != null)
    {
      final Properties p = (Properties) propertiesReadHandler.getObject();
      final Iterator it = p.entrySet().iterator();
      while (it.hasNext())
      {
        final Map.Entry entry = (Map.Entry) it.next();
        provider.setProperty((String) entry.getKey(), (String) entry.getValue());
      }
View Full Code Here


                return xpathFactory;
            }

            // read system property and see if there is a factory set
            Properties properties = System.getProperties();
            for (Map.Entry prop : properties.entrySet()) {
                String key = (String) prop.getKey();
                if (key.startsWith(XPathFactory.DEFAULT_PROPERTY_NAME)) {
                    String uri = after(key, ":");
                    if (uri != null) {
                      logger.info("Using system property " + key + " with value: " + prop.getValue() + " when creating XPathFactory");
View Full Code Here

      logger.error("read error model.properties");
    }

    if (!props.isEmpty()) {
      logger.info("Using model.properties initialize Entity Context.");
      for (Map.Entry<Object, Object> entry : props.entrySet()) {
        String key = (String) entry.getKey();
        String value = (String) entry.getValue();
        EntityType entityType = new EntityType();
        entityType.setEntityName(key);
        try {
View Full Code Here

        actionElement.setAttribute(Attributes.ID.get(), actionId);

        /* Action Data as Properties */
        if (action.getData() instanceof Properties) {
          Properties data = (Properties) action.getData();
          Set<Entry<Object, Object>> entries = data.entrySet();
          for (Entry<Object, Object> entry : entries) {
            String key = entry.getKey().toString();
            String value = entry.getValue().toString();

            Element actionProperty = new Element(Tag.ACTION_PROPERTY.get(), RSSOWL_NS);
View Full Code Here

    List<String> allBundles = I18nModule.getBundleNamesContainingI18nFiles();
    Map<String, String> tempKeyMap = new HashMap<String, String>();
   
    for (String bundleName : allBundles) {
      Properties properties = i18nMgr.getPropertiesWithoutResolvingRecursively(refLocale, bundleName);
      for (Iterator<Entry<Object, Object>> keyIter = properties.entrySet().iterator(); keyIter.hasNext();) {
        Entry<Object, Object> keyEntry = keyIter.next();
        String keyName = (String)keyEntry.getKey();
        String keyValue = (String)keyEntry.getValue();
        if (tempKeyMap.containsKey(keyName)){
          List<I18nItem> tmpItem = i18nMgr.findI18nItemsByKeySearch(keyName, refLocale, refLocale, bundleName, false);
View Full Code Here

    List<String> allBundles = I18nModule.getBundleNamesContainingI18nFiles();
    Map<String, String> tempKeyMap = new HashMap<String, String>();
   
    for (String bundleName : allBundles) {
      Properties properties = i18nMgr.getPropertiesWithoutResolvingRecursively(refLocale, bundleName);
      for (Iterator<Entry<Object, Object>> keyIter = properties.entrySet().iterator(); keyIter.hasNext();) {
        Entry<Object, Object> keyEntry = keyIter.next();
        String keyName = (String)keyEntry.getKey();
        String keyValue = (String)keyEntry.getValue();
        if (tempKeyMap.containsKey(keyName)){
          List<I18nItem> tmpItem = i18nMgr.findI18nItemsByValueSearch(keyValue, refLocale, refLocale, bundleName, false);
View Full Code Here

                prg.setIndeterminate(false);
                prg.setFraction(0);
            }

            final Set<PluginGoalContainer> plugins = new HashSet<PluginGoalContainer>(30);
            final Set<Map.Entry<Object, Object>> entries = props.entrySet();

            final int pluginCount = entries.size();

            for (Map.Entry<Object, Object> entry : entries) {
                final String pluginName = entry.getValue().toString();
View Full Code Here

                p.load(fileIn);       
            } catch(final IOException e) {} finally {
                if (fileIn != null) try { fileIn.close(); fileIn = null; } catch (final Exception e) {}
            }
            profile = new HashMap<String, String>();
            for (Map.Entry<Object, Object> e: p.entrySet()) profile.put((String) e.getKey(), (String) e.getValue());
            prop.put("success", "3"); // everything ok
            prop.put("localremotepeer", "0");
            prop.putHTML("success_peername", sb.peers.mySeed().getName());
            prop.put("success_peerhash", sb.peers.mySeed().hash);
        } else {
View Full Code Here

      driverDataSourceProvider.setDriver(driverClass);
      driverDataSourceProvider.setUrl(connectionString);
      if (propertiesReadHandler != null)
      {
        final Properties p = propertiesReadHandler.getResult();
        final Iterator it = p.entrySet().iterator();
        while (it.hasNext())
        {
          final Map.Entry entry = (Map.Entry) it.next();
          driverDataSourceProvider.setProperty((String) entry.getKey(), (String) entry.getValue());
        }
View Full Code Here

        try {
            p.load(new ByteArrayInputStream(graph.getBytes()));
        } catch (Exception e) {
            fail();
        }
        Iterator<Map.Entry<Object,Object>> i = p.entrySet().iterator();
        while (i.hasNext()) {
            Map.Entry<Object,Object> entry = i.next();
            String key = (String) entry.getKey();
            String value = (String) entry.getValue();
            StringTokenizer st = new StringTokenizer(value, ",");
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.