Returns the skin variants

@param defaultSkin
the default skin
@param skinNames
the skin names
@param defaultLocaleName
the default locale name
@param localeVariants
the locale variants
@return the skin variants
496628
private Map<String, VariantSet> getVariants(String defaultSkin, Set<String> skinNames, String defaultLocaleName,
			Set<String> localeVariants) {

		Map<String, VariantSet> skinVariants = new HashMap<>();
		if (!skinNames.isEmpty()) {
			skinVariants.put(JawrConstant.SKIN_VARIANT_TYPE,
					new VariantSet(JawrConstant.SKIN_VARIANT_TYPE, defaultSkin, skinNames));
		}
		if (!localeVariants.isEmpty()) {

			skinVariants.put(JawrConstant.LOCALE_VARIANT_TYPE,
					new VariantSet(JawrConstant.LOCALE_VARIANT_TYPE, defaultLocaleName, localeVariants));
		}

		return skinVariants;
	}
814485
public static void getDefaultValues(Properties defaultValues) {
		defaultValues.put(NetworkConfig.SERIALIZER_CLASSNAME, DEFAULT_EVENT_SERIALIZER.getName());
		defaultValues.put(NetworkConfig.ENCRYPTER_CLASSNAME, DEFAULT_EVENT_ENCRYPTER.getName());
	}
1182453
function (general, beanType) {
            if (!general) {
                general = {};
            }
            var param = {
                json : general,
                beanName : "aria.widgets.AriaSkinBeans." + beanType
            };
            var normalizationResults = this._normalize(param);
            if (!normalizationResults.result) {
                this.$logWarn(this.GENERAL_NORMALIZATION_ERROR, [normalizationResults.message.replace(/\n/g, "\n ")]);
            }
            general['aria:skinNormalized'] = true;
            return param.json;
        }
273540
public static List<Map<String, String>> getAllVariants(Map<String, ? extends Collection<String>> variantSets) {

		List<Map<String, String>> variants = new ArrayList<>();
		if (variantSets != null) {
			for (Entry<String, Collection<String>> variantEntry : new TreeMap<>(variantSets).entrySet()) {
				String variantType = variantEntry.getKey();
				Collection<String> variantList = variantEntry.getValue();
				if (variants.isEmpty()) {
					variants = getVariants(null, variantType, variantList);
				} else {

					List<Map<String, String>> tmpResult = new ArrayList<>();
					for (Map<String, String> curVariant : variants) {
						tmpResult.addAll(getVariants(curVariant, variantType, variantList));
					}
					variants = tmpResult;
				}
			}
		}

		return variants;
	}
508104
static VcfSliceProtos.Fields buildDefaultFields(List<Variant> variants) {
        return buildDefaultFields(variants, null, null);
    }
780291
def normalizeDefaultLayerName(value, font):
    
    value = normalizeLayerName(value)
    if value not in font.layerOrder:
        raise ValueError("No layer with the name '%s' exists." % value)
    return unicode(value)
607025
@Override protected Skin createDefaultSkin() {
        switch(skinType) {
            case YOTA2     : return new ClockSkin(Clock.this);
            case LCD       : return new LcdClockSkin(Clock.this);
            case PEAR      : return new PearClockSkin(Clock.this);
            case PLAIN     : return new PlainClockSkin(Clock.this);
            case DB        : return new DBClockSkin(Clock.this);
            case FAT       : return new FatClockSkin(Clock.this);
            case ROUND_LCD : return new RoundLcdClockSkin(Clock.this);
            case SLIM      : return new SlimClockSkin(Clock.this);
            case MINIMAL   : return new MinimalClockSkin(Clock.this);
            case DIGITAL   : return new DigitalClockSkin(Clock.this);
            case TEXT      : return new TextClockSkin(Clock.this);
            case DESIGN    : return new DesignClockSkin(Clock.this);
            case INDUSTRIAL: return new IndustrialClockSkin(Clock.this);
            case TILE      : return new TileClockSkin(Clock.this);
            case DIGI      : return new DigitalClockSkin(Clock.this);
            case MORPHING  : return new MorphingClockSkin(Clock.this);
            case CLOCK     :
            default        : return new ClockSkin(Clock.this);
        }
    }
681354
static String defaultPattern(Locale locale) {
        return ((SimpleDateFormat) DateFormat.getDateTimeInstance(DateFormat.SHORT, DateFormat.MEDIUM, locale)).toPattern().replace("ss", "ss.SSS");
    }
7161
@Override
    public SortedSet<String> getSkinNames(PortletRequest request) {
        // Context to access the filesystem
        PortletContext ctx = request.getPortletSession().getPortletContext();

        // Determine the full path to the skins directory
        String skinsFilepath = ctx.getRealPath(localRelativeRootPath + "/skinList.xml");

        // Create File object to access the filesystem
        File skinList = new File(skinsFilepath);

        TreeSet<String> skins = new TreeSet<>();
        try {
            DocumentBuilderFactory dbFactory = DocumentBuilderFactory.newInstance();
            DocumentBuilder dBuilder = dbFactory.newDocumentBuilder();
            Document doc = dBuilder.parse(skinList);
            doc.getDocumentElement().normalize();

            NodeList nList = doc.getElementsByTagName("skin-key");
            for (int temp = 0; temp < nList.getLength(); temp++) {
                org.w3c.dom.Element element = (org.w3c.dom.Element) nList.item(temp);
                String skinName = element.getTextContent();
                logger.debug("Found skin-key value {}", skinName);
                skins.add(skinName);
            }
        } catch (SAXException | ParserConfigurationException | IOException e) {
            logger.error("Error processing skinsFilepath {}", skinsFilepath, e);
        }

        return skins;
    }
1249935
@Override protected Skin createDefaultSkin() {
        switch (skinType) {
            case SMOOTHED_CHART   : return new SmoothedChartTileSkin(Tile.this);
            case BAR_CHART        : return new BarChartTileSkin(Tile.this);
            case CLOCK            : return new ClockTileSkin(Tile.this);
            case GAUGE            : return new GaugeTileSkin(Tile.this);
            case HIGH_LOW         : return new HighLowTileSkin(Tile.this);
            case PERCENTAGE       : return new PercentageTileSkin(Tile.this);
            case PLUS_MINUS       : return new PlusMinusTileSkin(Tile.this);
            case SLIDER           : return new SliderTileSkin(Tile.this);
            case SPARK_LINE       : return new SparkLineTileSkin(Tile.this);
            case SWITCH           : return new SwitchTileSkin(Tile.this);
            case WORLDMAP         : return new WorldMapTileSkin(Tile.this);
            case TIMER_CONTROL    : return new TimerControlTileSkin(Tile.this);
            case NUMBER           : return new NumberTileSkin(Tile.this);
            case TEXT             : return new TextTileSkin(Tile.this);
            case WEATHER          : return new WeatherTileSkin(Tile.this);
            case TIME             : return new TimeTileSkin(Tile.this);
            case CUSTOM           : return new CustomTileSkin(Tile.this);
            case LEADER_BOARD     : return new LeaderBoardTileSkin(Tile.this);
            case MAP              : return new MapTileSkin(Tile.this);
            case RADIAL_CHART     : return new RadialChartTileSkin(Tile.this);
            case DONUT_CHART      : return new DonutChartTileSkin(Tile.this);
            case CIRCULAR_PROGRESS: return new CircularProgressTileSkin(Tile.this);
            case STOCK            : return new StockTileSkin(Tile.this);
            case GAUGE_SPARK_LINE : return new GaugeSparkLineTileSkin(Tile.this);
            case SMOOTH_AREA_CHART: return new SmoothAreaChartTileSkin(Tile.this);
            case RADAR_CHART      : return new RadarChartTileSkin(Tile.this);
            case COUNTRY          : return new CountryTileSkin(Tile.this);
            case EPHEMERIS        : return new EphemerisTileSkin(Tile.this);
            case CHARACTER        : return new CharacterTileSkin(Tile.this);
            case FLIP             : return new FlipTileSkin(Tile.this);
            case SWITCH_SLIDER    : return new SwitchSliderTileSkin(Tile.this);
            case DATE             : return new DateTileSkin(Tile.this);
            case CALENDAR         : return new CalendarTileSkin(Tile.this);
            case SUNBURST         : return new SunburstChartTileSkin(Tile.this);
            case MATRIX           : return new MatrixTileSkin(Tile.this);
            case RADIAL_PERCENTAGE: return new RadialPercentageTileSkin(Tile.this);
            case STATUS           : return new StatusTileSkin(Tile.this);
            case BAR_GAUGE        : return new BarGaugeTileSkin(Tile.this);
            case IMAGE            : return new ImageTileSkin(Tile.this);
            default               : return new TileSkin(Tile.this);
        }
    }
494369
@Override
	public void setVariants(Map<String, VariantSet> variantSets) {

		if (variantSets != null) {
			this.variants = new TreeMap<>(variantSets);
			variantKeys = VariantUtils.getAllVariantKeys(this.variants);
		}
	}
1322058
public String getAttributeNS(String namespaceURI, String localName)
  {

    error(XMLErrorResources.ER_FUNCTION_NOT_SUPPORTED);  //"getAttributeNS not supported!");

    return null;
  }
1366945
public static Locale toLocale(String localeString)
    {
        if ((localeString == null) || (localeString.length() == 0))
        {
            Locale locale = Locale.getDefault();
            if(log.isLoggable(Level.WARNING))
            {
                log.warning("Locale name in faces-config.xml null or empty, setting locale to default locale : "
                        + locale.toString());
            }
            return locale;
        }

        int separatorCountry = localeString.indexOf('_');
        char separator;
        if (separatorCountry >= 0)
        {
            separator = '_';
        }
        else
        {
            separatorCountry = localeString.indexOf('-');
            separator = '-';
        }

        String language;
        String country;
        String variant;
        if (separatorCountry < 0)
        {
            language = localeString;
            country = "";
            variant = "";
        }
        else
        {
            language = localeString.substring(0, separatorCountry);

            int separatorVariant = localeString.indexOf(separator, separatorCountry + 1);
            if (separatorVariant < 0)
            {
                country = localeString.substring(separatorCountry + 1);
                variant = "";
            }
            else
            {
                country = localeString.substring(separatorCountry + 1, separatorVariant);
                variant = localeString.substring(separatorVariant + 1);
            }
        }

        return new Locale(language, country, variant);
    }
56366
protected function lookupLocale(array $locales, string $locale, string $defaultLocale): string
    {
        // for some odd reason locale_lookup returns empty string but not default locale if input locales are empty
        return empty($locales) === true ? $defaultLocale : locale_lookup($locales, $locale, false, $defaultLocale);
    }
665467
@Override
	public void afterPropertiesSet() {

		this.urlRewriter = new CssImageUrlRewriter(config);
		cssSkinResolver = (AbstractCssSkinVariantResolver) config.getGeneratorRegistry()
				.getVariantResolver(JawrConstant.SKIN_VARIANT_TYPE);
		if (cssSkinResolver == null) {
			cssSkinResolver = new CssSkinVariantResolver();
			config.getGeneratorRegistry().registerVariantResolver(cssSkinResolver);
		}

		// Init skin mapping
		String cfgSkinMappingType = config.getProperty(JawrConstant.SKIN_TYPE_MAPPING_CONFIG_PARAM);
		if (StringUtils.isNotEmpty(cfgSkinMappingType)) {
			if (cfgSkinMappingType.equals(JawrConstant.SKIN_TYPE_MAPPING_LOCALE_SKIN)
					|| cfgSkinMappingType.equals(JawrConstant.SKIN_TYPE_MAPPING_SKIN_LOCALE)) {
				this.skinMappingType = cfgSkinMappingType;
			} else {
				throw new IllegalArgumentException(
						"The value for the '" + JawrConstant.SKIN_TYPE_MAPPING_LOCALE_SKIN + "' " + "property ["
								+ cfgSkinMappingType + "] is invalid. " + "Please check the docs for valid values ");
			}
		}
		this.skinMapping = getSkinMapping(rsBrowser, config);
		resourceProviderStrategyClass = CssSkinVariantResourceProviderStrategy.class;

	}
442876
public static String getVariantBundleName(String bundleName, Map<String, String> variants,
			boolean isGeneratedResource) {

		String variantKey = getVariantKey(variants);
		return getVariantBundleName(bundleName, variantKey, isGeneratedResource);
	}
719254
protected void generateDefaultParameters(UseDefaultValues defValues){
      int count = defValues.optParamIndex().length;
      NativeType[] nt = defValues.nativeType();
      Variant.Type[] vt = defValues.variantType();
      String[] literal = defValues.literal();
      for (int i = 0; i < count; i++) {
        switch(nt[i]){
          case Bool:
          case VariantBool:
          case VariantBool_ByRef:
            defaultParameters[i] = Boolean.parseBoolean(literal[i]);
            break;
          case BSTR:
          case BSTR_ByRef:
          case CSTR:
          case Unicode:
            defaultParameters[i] = literal[i];
            break;
          case Double:
          case Double_ByRef:
            defaultParameters[i] = Double.parseDouble(literal[i]);
            break;
          case Float:
          case Float_ByRef:
            defaultParameters[i] = Float.parseFloat(literal[i]);
            break;
          case Int8:
          case Int8_ByRef:
            defaultParameters[i] = Byte.parseByte(literal[i]);
            break;
          case Int16:
          case Int16_ByRef:
            defaultParameters[i] = Short.parseShort(literal[i]);
            break;
          case Int32:
          case Int32_ByRef:
            defaultParameters[i] = Integer.parseInt(literal[i]);
            break;
          case Int64:
          case Int64_ByRef:
            defaultParameters[i] = Long.parseLong(literal[i]);
            break;
          case GUID:
            defaultParameters[i] = new GUID(literal[i]);
            break;
          case Currency:
          case Currency_ByRef:
            defaultParameters[i] = new BigDecimal(literal[i]);
            break;
          case VARIANT:
            Variant v = new Variant();
            switch(vt[i]){
              case VT_I1:
              case VT_UI1:
                v.set(Byte.parseByte(literal[i]));
                break;
              case VT_I2:
              case VT_UI2:
                v.set(Short.parseShort(literal[i]));
                break;
              case VT_I4:
              case VT_UI4:
              case VT_INT:
              case VT_UINT:
                v.set(Integer.parseInt(literal[i]));
                break;
              case VT_I8:
                v.set(Long.parseLong(literal[i]));
                break;
              case VT_R4:
                v.set(Float.parseFloat(literal[i]));
                break;
              case VT_R8:
                v.set(Double.parseDouble(literal[i]));
                break;
              case VT_BOOL:
                v.set(Boolean.parseBoolean(literal[i]));
                break;
              case VT_BSTR:
                v.set(literal[i]);
                break;
              case VT_EMPTY:
                v= new Variant();
                break;
              case VT_ERROR:
                v.makeError((int)Long.parseLong(literal[i], 16));
                break;
//              case VT_CY: ...
              default:
                throw new UnsupportedOperationException("Don't know how to parse literal " + literal[i] + " to an Java Object corresponding to Variant.Type." + vt[i].name());
            }
            v.setType(vt[i]);
            defaultParameters[i] = v;
            break;
          default:
            throw new UnsupportedOperationException("Don't know how to parse literal " + literal[i] + " to an Java Object corresponding to NativeType." + nt[i].name());
        }
      }
    }