Lines Matching full:bundle
32 …lass; // The name of the base class of the active resource bundle
71 …* This constructor creates an entirely blank RBManager and base Bundle. Only the base class name i…
82 Bundle mainBundle = new Bundle(""); in RBManager()
89 …is is the standard constructor for RBManager. It is constructed from the root of a resource bundle.
94 * translation is reversed when saving the resource bundle.
95 * @param mainFile The base class file of the resource bundle to be read
169 Bundle dict = new Bundle(encodings[0]); in RBManager()
262 Enumeration keys = ((Bundle)bundles.elementAt(0)).allItems.keys(); in RBManager()
280 dict = new Bundle(encodings[i]); in RBManager()
387 Bundle bundle = (Bundle)bundles.elementAt(i); in writeToFile() local
389 … ((bundle.encoding == null || bundle.encoding.equals("")) ? "" : "_" + bundle.encoding) + in writeToFile()
392 bundle.writeContents(fw); in writeToFile()
396 …// In case this is a newly created bundle or the location has changed recently, update the recent … in writeToFile()
402 …* Calling this method removes a resource from the resource bundle. This method does not permanently
405 * the bundle will have to be recreated. (This last point may change)
410 Bundle bundle = (Bundle)bundles.elementAt(i); in hideResource() local
411 if (bundle.encoding.equals(encoding)) { in hideResource()
412 bundles.removeElement(bundle); in hideResource()
425 Bundle bundle = (Bundle)bundles.elementAt(i); in eraseFile() local
426 if (!(bundle.encoding.equals(encoding))) continue; in eraseFile()
428 … ((bundle.encoding == null || bundle.encoding.equals("")) ? "" : "_" + bundle.encoding) + in eraseFile()
443 Bundle bundle = (Bundle)bundles.elementAt(i); in writeToFile() local
444 if (bundle.encoding.equals(encoding) || (i==0 && encoding.equals(""))) { in writeToFile()
446 … ((bundle.encoding == null || bundle.encoding.equals("")) ? "" : "_" + bundle.encoding) + in writeToFile()
449 bundle.writeContents(fw); in writeToFile()
455 …// In case this is a newly created bundle or the location has changed recently, update the recent … in writeToFile()
475 Bundle bundle = (Bundle)bundles.elementAt(i); in editItem() local
476 BundleItem oldItem = (BundleItem)bundle.allItems.get(oldName); in editItem()
481 bundle.allItems.remove(oldItem); in editItem()
482 bundle.allItems.put(oldItem.getKey(), oldItem); in editItem()
490 BundleGroup bg = bundle.getBundleGroup(groupName); in editItem()
491 if (bg == null) bg = bundle.getUngroupedGroup(); in editItem()
500 …o create a new item in each of the language files. The method first checks the base Resource Bundle
511 Bundle mainBundle = (Bundle)bundles.firstElement(); in createItem()
530 Bundle bundle = (Bundle)bundles.elementAt(i); in createItem() local
533 for (int j=0; j < bundle.getGroupCount(); j++) { in createItem()
534 BundleGroup bg = bundle.getBundleGroup(j); in createItem()
538 group = new BundleGroup(bundle, groupName); in createItem()
539 bundle.addBundleGroup(group); in createItem()
546 bundle.allItems.put(name, item); in createItem()
547 bundle.addUntranslatedItem(item); in createItem()
554 … create a new group in each of the language files. The method first checks the base Resource Bundle
564 Bundle mainBundle = (Bundle)bundles.firstElement(); in createGroup()
570 Bundle bundle = (Bundle)bundles.elementAt(i); in createGroup() local
571 BundleGroup bg = new BundleGroup(bundle, groupName); in createGroup()
574 bundle.addBundleGroup(bg); in createGroup()
591 Bundle bundle = (Bundle)bundles.elementAt(i); in deleteGroup() local
592 bundle.removeGroup(groupName); in deleteGroup()
608 Bundle bundle = (Bundle)bundles.elementAt(i); in deleteItem() local
609 bundle.removeUntranslatedItem(itemName); in deleteItem()
612 Enumeration items = bundle.allItems.elements(); in deleteItem()
616 bundle.allItems.remove(item); in deleteItem()
624 …* Looks through the resources contained in the bundle for a resource of the given encoding. Note t…
632 Bundle b = (Bundle)bundles.elementAt(i); in hasResource()
639 …reate a new resource file with the given encoding. The method first checks the base Resource Bundle
658 Bundle bundle = new Bundle(encoding); in createResource()
659 bundle.name = title; in createResource()
660 bundle.comment = comment; in createResource()
661 bundle.manager = manager; in createResource()
662 bundle.language = language; in createResource()
663 bundle.country = country; in createResource()
664 bundle.variant = variant; in createResource()
667 …bundle.addBundleGroup("Ungrouped Items", "These are resource items that have not been assigned a g… in createResource()
670 Bundle mainBundle = (Bundle)bundles.firstElement(); in createResource()
673 BundleGroup bg = new BundleGroup(bundle,mainGroup.getName()); in createResource()
675 bundle.addBundleGroup(bg); in createResource()
683 // TODO: This should be done in the Bundle class in createResource()
691 bundle.addUntranslatedItem(item); in createResource()
696 bundles.addElement(bundle); in createResource()
706 return ((Bundle)bundles.firstElement()).duplicates.size(); in getNumberDuplicates()
718 * Returns a Vector collection of duplicate BundleItems found in the bundle
722 return ((Bundle)bundles.firstElement()).duplicates; in getDuplicatesListingVector()
734 * Returns a vector collection of all of the BundleGroup items founds int the bundle.
739 Bundle bundle = (Bundle)bundles.firstElement(); in getGroupListingVector() local
740 for (int i=0; i < bundle.getGroupCount(); i++) { in getGroupListingVector()
741 String name = bundle.getBundleGroup(i).getName(); in getGroupListingVector()
771 Bundle dict = (Bundle)bundles.elementAt(i); in getLanguageListingVector()
776 …).equals("")) dictStr = (dict.encoding.trim().equals("") ? "Base Resource Bundle" : dict.encoding); in getLanguageListingVector()
792 * Returns the number of BundleGroups in the bundle.
796 return ((Bundle)bundles.firstElement()).getGroupCount(); in getNumberGroups()
816 * Sets the name of the base class associated with this resource bundle
824 * Sets the directory in the file system in which this resource bundle is to be
855 * Return a bundle from a locale
856 * @return The requested resource bundle
858 public Bundle getBundle(String locale) { in getBundle()
859 Bundle bundle = null; in getBundle() local
862 Bundle tempb = (Bundle)bundles.elementAt(i); in getBundle()
864 bundle = tempb; in getBundle()
869 return bundle; in getBundle()
873 * Returns the name of the file that is the base class file for the resource bundle.