示例#1
0
 public static List getProfilesWhoseBaseIs(String baseName, FormatProfiles profilesroot) {
   List results = new ArrayList();
   EList profiles = profilesroot.getProfile();
   for (Iterator it = profiles.iterator(); it.hasNext(); ) {
     Profile profile = (Profile) it.next();
     String profileBase = profile.getBase();
     if (profileBase != null && profileBase.equals(baseName)) results.add(profile);
   }
   return results;
 }
示例#2
0
 /**
  * try to find the profile node within <egl:format_profiles>, whose name is profileName
  *
  * @param profileName
  * @param formatprofiles
  * @return - null if not found
  */
 public static Profile findProfileByName(String profileName, FormatProfiles formatprofiles) {
   EList profiles = formatprofiles.getProfile();
   for (Iterator it = profiles.iterator(); it.hasNext(); ) {
     Profile profile = (Profile) it.next();
     if (profileName.equals(profile.getName())) {
       return profile;
     }
   }
   return null;
 }
示例#3
0
 public static Setting getPreferenceSettingByID(
     Profile profile, String categoryId, String prefId) {
   EList settings = profile.getSetting();
   if (settings != null) {
     for (Iterator it = settings.iterator(); it.hasNext(); ) {
       Setting setting = (Setting) it.next();
       if (categoryId.equals(setting.getCategory()) && prefId.equals(setting.getPref()))
         return setting;
     }
   }
   return null;
 }