Returns the set of skins to use. This implementation parses the skinList.xml file and returns
the set of skin-key element values. If there is an error parsing the XML file, return an
empty set.
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;
    }
567182
def load_xml_attrs(self):
        

        attrs_list = list()

        if hasattr(self, 'xml_element'):
            xml_attrs = self.xml_element.attrib

            for variable, value in iter(xml_attrs.items()):
                uri, tag = Element.get_namespace_and_tag(variable)
                tag = tag.replace('-', '_')
                attrs_list.append(tag)
                setattr(self, tag, value)

            self.attrs = attrs_list

        return self.attrs
940031
public List<IconFace> getAllIcons() throws IOException {
        List<IconPath> iconPaths = getIconPaths();
        if (iconPaths.isEmpty()) {
            return Collections.emptyList();
        }
        List<IconFace> iconFaces = new ArrayList<>(iconPaths.size());
        for (IconPath iconPath : iconPaths) {
            String filePath = iconPath.getPath();
            if (filePath.endsWith(".xml")) {
                // adaptive icon?
                byte[] data = getFileData(filePath);
                if (data == null) {
                    continue;
                }
                parseResourceTable();

                AdaptiveIconParser iconParser = new AdaptiveIconParser();
                transBinaryXml(data, iconParser);
                Icon backgroundIcon = null;
                if (iconParser.getBackground() != null) {
                    backgroundIcon = newFileIcon(iconParser.getBackground(), iconPath.getDensity());
                }
                Icon foregroundIcon = null;
                if (iconParser.getForeground() != null) {
                    foregroundIcon = newFileIcon(iconParser.getForeground(), iconPath.getDensity());
                }
                AdaptiveIcon icon = new AdaptiveIcon(foregroundIcon, backgroundIcon);
                iconFaces.add(icon);
            } else {
                Icon icon = newFileIcon(filePath, iconPath.getDensity());
                iconFaces.add(icon);
            }
        }
        return iconFaces;
    }
120343
function() {

            var info = this.moduleInfo, name, i, j;

            // Create skin modules
            for (name in info) {

                if (lang.hasOwnProperty(info, name)) {
                    var m = info[name];
                    if (m && m.skinnable) {
                        // Y.log("skinning: " + name);
                        var o=this.skin.overrides, smod;
                        if (o && o[name]) {
                            for (i=0; i<o[name].length; i=i+1) {
                                smod = this._addSkin(o[name][i], name);
                            }
                        } else {
                            smod = this._addSkin(this.skin.defaultSkin, name);
                        }

                        m.requires.push(smod);
                    }
                }

            }

            var l = lang.merge(this.inserted); // shallow clone
            
            if (!this._sandbox) {
                l = lang.merge(l, env.modules);
            }

            // Y.log("Already loaded stuff: " + lang.dump(l, 0));

            // add the ignore list to the list of loaded packages
            if (this.ignore) {
                YUI.ObjectUtil.appendArray(l, this.ignore);
            }

            // remove modules on the force list from the loaded list
            if (this.force) {
                for (i=0; i<this.force.length; i=i+1) {
                    if (this.force[i] in l) {
                        delete l[this.force[i]];
                    }
                }
            }

            // expand the list to include superseded modules
            for (j in l) {
                // Y.log("expanding: " + j);
                if (lang.hasOwnProperty(l, j)) {
                    lang.augmentObject(l, this.getProvides(j));
                }
            }

            // Y.log("loaded expanded: " + lang.dump(l, 0));

            this.loaded = l;

        }
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);
        }
    }
114521
function (elem)
    {
        var nsMatch;
        var from = null;

        if (this.options.matchBare) {
            from = Strophe.getBareJidFromJid(elem.getAttribute('from'));
        } else {
            from = elem.getAttribute('from');
        }

        nsMatch = false;
        if (!this.ns) {
            nsMatch = true;
        } else {
            var that = this;
            Strophe.forEachChild(elem, null, function (elem) {
                if (elem.getAttribute("xmlns") == that.ns) {
                    nsMatch = true;
                }
            });

            nsMatch = nsMatch || elem.getAttribute("xmlns") == this.ns;
        }

        var elem_type = elem.getAttribute("type");
        if (nsMatch &&
            (!this.name || Strophe.isTagEqual(elem, this.name)) &&
            (!this.type || (Array.isArray(this.type) ? this.type.indexOf(elem_type) != -1 : elem_type == this.type)) &&
            (!this.id || elem.getAttribute("id") == this.id) &&
            (!this.from || from == this.from)) {
                return true;
        }

        return false;
    }
945560
def xml(self, operator='set', indent = ""):
        """"""
        xml = indent + "<meta id=\"" + self.key + "\""
        if operator != 'set':
            xml += " operator=\"" + operator + "\""
        if not self.value:
            xml += " />"
        else:
            xml += ">" + self.value + "</meta>"
        return xml
1296934
public static function getSkin($context, &$skin){

    //there's probably a better way to check for this...
    if(!isset($_GET['useskin'])){
      $key = $GLOBALS['wgDefaultSkin'];
      if( self::$pageSkin ){
        $key = new self::$pageSkin;
      }

      $key = \Skin::normalizeKey( $key );

      $skinNames = \Skin::getSkinNames();
      $skinName = $skinNames[$key];

      $className = "\Skin{$skinName}";
      if (class_exists($className)) {
        $skin = new $className();
        if (isset(self::$skinLayout) && method_exists($skin, 'setLayout')) {
          $skin->setLayout(self::$skinLayout);
        }
      }
    }
    self::$skin = $skin;

    return true;
  }
408526
def get_scanner_params_xml(self):
        
        scanner_params = Element('scanner_params')
        for param_id, param in self.scanner_params.items():
            param_xml = SubElement(scanner_params, 'scanner_param')
            for name, value in [('id', param_id),
                                ('type', param['type'])]:
                param_xml.set(name, value)
            for name, value in [('name', param['name']),
                                ('description', param['description']),
                                ('default', param['default']),
                                ('mandatory', param['mandatory'])]:
                elem = SubElement(param_xml, name)
                elem.text = str(value)
        return scanner_params
898068
public Set<ElementDescriptor<?>> getProperties()
	{
		return mProp == null ? null : Collections.unmodifiableSet(mProp.keySet());
	}
1015840
def get_contents(self, element):
        
        return [Response(self.trigger, child, self.file_path)
                for child in element if child.tag in ['response', 'template']]
615517
@Override
    public Set<Class<?>> getComponents() {
        Set<Class<?>> set = new HashSet<>();
        ClassLoader cl = Thread.currentThread().getContextClassLoader();

        Consumer<JsonArray> reader = array -> {
            if (array != null && array.size() > 0) {
                for (int i = 0; i < array.size(); i++) {
                    try {
                        set.add(cl.loadClass(array.getString(i)));
                    } catch (ClassNotFoundException e) {
                        throw new RuntimeException(e);
                    }
                }
            }
        };

        JsonArray features = config.getJsonArray(CONFIG_FEATURES, null);
        JsonArray components = config.getJsonArray(CONFIG_COMPONENTS, null);

        reader.accept(features);
        reader.accept(components);

        return set;
    }
1053986
def xml_values(target)
      lazy_load_strings
      @lazy_load_strings.select { |_key, value| value.downcase.include? target.downcase }
    end
242024
def get_attributes(element)
      attribute_hash = {}
      attributes = element.attributes
      for i in 0...attributes.length
         attribute_hash[attributes.item(i).name] =  attributes.item(i).value
       end
      attribute_hash
    end
15194
public IGeneratorSet getGeneratorSet()
    {
    SAXParser parser;
    try
      {
      parser = SAXParserFactory.newInstance().newSAXParser();
      }
    catch( Exception e)
      {
      throw new RuntimeException( "Can't create SAXParser", e);
      }

    try
      {
      parser.parse( getInputStream(), this);
      }
    catch( SAXParseException spe)
      {
      throw
        new RuntimeException
        ( "Error in document at line=" + spe.getLineNumber(),
          spe);
      }
    catch( Exception e)
      {
      throw new RuntimeException( "Can't read GeneratorSet", e);
      }

    return generatorSet_;
    }
979303
public List<FacesConfigFacetType<FacesConfigRendererType<T>>> getAllFacet()
   {
      List<FacesConfigFacetType<FacesConfigRendererType<T>>> list = new ArrayList<FacesConfigFacetType<FacesConfigRendererType<T>>>();
      List<Node> nodeList = childNode.get("facet");
      for(Node node: nodeList)
      {
         FacesConfigFacetType<FacesConfigRendererType<T>>  type = new FacesConfigFacetTypeImpl<FacesConfigRendererType<T>>(this, "facet", childNode, node);
         list.add(type);
      }
      return list;
   }
299663
def get_config_set(self, section, option):
		
		values = set()
		for cp, filename, fp in self.layers:
			filename = filename # pylint
			fp = fp # pylint
			if cp.has_option(section, option):
				values.add(cp.get(section, option))
		return values