Package de.danet.an.util

Examples of de.danet.an.util.SegmentedMap.keySet()


 
  ResourceBundle bundle
      = ResourceBundle.getBundle("util.I18nTest", Locale.GERMANY);
  ResourceBundleAsMap rbm = new ResourceBundleAsMap(bundle);
  SegmentedMap segmap = new SegmentedMap(rbm);
  Set myKeySet = segmap.keySet("danet.oss");
  int i = 0;
  assertTrue(myKeySet.containsAll(resultList));
  i = myKeySet.size();
  // Verfiy that all entries have been found
  assertTrue(i==resultKeys.length);
View Full Code Here


  ResourceBundle bundle
      = ResourceBundle.getBundle("util.I18nTest", Locale.GERMANY);
  ResourceBundleAsMap rbm = new ResourceBundleAsMap(bundle);
  SegmentedMap segmap = new SegmentedMap(rbm);
  int i = 0;
  Set myKeySet = segmap.keySet("danet.oss.an");
  assertTrue(myKeySet.containsAll(resultList));
  i = myKeySet.size();
  // Verfiy that all entries have been found
  assertTrue(i==resultKeys.length);
    }
View Full Code Here

  ResourceBundle bundle
      = ResourceBundle.getBundle("util.I18nTest", Locale.GERMANY);
  ResourceBundleAsMap rbm = new ResourceBundleAsMap(bundle);
  SegmentedMap segmap = new SegmentedMap(rbm);
  int i = 0;
  Set myKeySet = segmap.keySet("telekom");
  assertTrue(myKeySet.containsAll(resultList));
  i = myKeySet.size();
  // Verfiy that all entries have been found
  assertTrue(i==resultKeys.length);
    }
View Full Code Here

  ResourceBundle bundle
      = ResourceBundle.getBundle("util.I18nTest", Locale.GERMANY);
  ResourceBundleAsMap rbm = new ResourceBundleAsMap(bundle);
  SegmentedMap segmap = new SegmentedMap(rbm);
  int i = 0;
  Set myKeySet = segmap.keySet();
  i = myKeySet.size();
  // Verfiy that all entries have been found
  assertTrue(i==21);
    }
View Full Code Here

    public void testKeyListCache() throws Exception {
  ResourceBundle bundle
      = ResourceBundle.getBundle("util.I18nTest", Locale.GERMANY);
  ResourceBundleAsMap rbm = new ResourceBundleAsMap(bundle);
  SegmentedMap segmap = new SegmentedMap(rbm);
  Set keyList1 = segmap.keySet("telekom");
  Set keyList2 = segmap.keySet("telekom");
  Set keyList3 = segmap.keySet("danet");
  Set keyList4 = segmap.keySet("telekom.t-data");
  // Verfiy that keylist1 matches keylist2
  assertTrue(keyList1.equals(keyList2));
View Full Code Here

  ResourceBundle bundle
      = ResourceBundle.getBundle("util.I18nTest", Locale.GERMANY);
  ResourceBundleAsMap rbm = new ResourceBundleAsMap(bundle);
  SegmentedMap segmap = new SegmentedMap(rbm);
  Set keyList1 = segmap.keySet("telekom");
  Set keyList2 = segmap.keySet("telekom");
  Set keyList3 = segmap.keySet("danet");
  Set keyList4 = segmap.keySet("telekom.t-data");
  // Verfiy that keylist1 matches keylist2
  assertTrue(keyList1.equals(keyList2));
  // Verfiy that keylist1 doesn't match keylist3
View Full Code Here

      = ResourceBundle.getBundle("util.I18nTest", Locale.GERMANY);
  ResourceBundleAsMap rbm = new ResourceBundleAsMap(bundle);
  SegmentedMap segmap = new SegmentedMap(rbm);
  Set keyList1 = segmap.keySet("telekom");
  Set keyList2 = segmap.keySet("telekom");
  Set keyList3 = segmap.keySet("danet");
  Set keyList4 = segmap.keySet("telekom.t-data");
  // Verfiy that keylist1 matches keylist2
  assertTrue(keyList1.equals(keyList2));
  // Verfiy that keylist1 doesn't match keylist3
  assertTrue(!(keyList1.equals(keyList3)));
View Full Code Here

  ResourceBundleAsMap rbm = new ResourceBundleAsMap(bundle);
  SegmentedMap segmap = new SegmentedMap(rbm);
  Set keyList1 = segmap.keySet("telekom");
  Set keyList2 = segmap.keySet("telekom");
  Set keyList3 = segmap.keySet("danet");
  Set keyList4 = segmap.keySet("telekom.t-data");
  // Verfiy that keylist1 matches keylist2
  assertTrue(keyList1.equals(keyList2));
  // Verfiy that keylist1 doesn't match keylist3
  assertTrue(!(keyList1.equals(keyList3)));
  // Verfiy that keylist1 doesn't match keylist4
View Full Code Here

  // Get new document fragment
  DocumentFragment frag = doc.createDocumentFragment();

  // Create mapping entries
  SegmentedMap map = getMap (baseName, Locale.getDefault());
  for (Iterator i = map.keySet (segment).iterator(); i.hasNext();) {
      String key = (String)i.next();
      Element mapping = doc.createElement("mapping");
      // Remove segment name + "." from path
      mapping.setAttribute("key", key.substring(segment.length()+1) );
      mapping.appendChild(doc.createTextNode ((String)map.get(key)));
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.