예제 #1
0
 /**
  * @param pm the prefix manager to copy
  * @param c comparator to sort prefixes
  */
 public DefaultPrefixManager(PrefixManager pm, Comparator<String> c) {
   this(c);
   for (String prefixName : pm.getPrefixNames()) {
     String prefix = pm.getPrefix(prefixName);
     if (prefix != null) {
       prefix2NamespaceMap.put(prefixName, prefix);
     }
   }
 }
 public void copyPrefixesFrom(PrefixManager prefixManager) {
   for (String prefixName : prefixManager.getPrefixNames()) {
     String prefix = prefixManager.getPrefix(prefixName);
     nsm.setPrefix(prefixName, prefix);
   }
 }