Logo Search packages:      
Sourcecode: icedtea-web version File versions  Download package

InformationDesc net::sourceforge::jnlp::Parser::getInformationDesc ( Node  node  )  throws ParseException [inline]

Returns the information element at the specified node.

node the information node
ParseException if the JNLP file is invalid

Definition at line 457 of file Parser.java.

References addInfo(), allowExtensions, base, file, getAssociation(), getAttribute(), net::sourceforge::jnlp::Node::getFirstChild(), getIcon(), getLocales(), net::sourceforge::jnlp::Node::getNextSibling(), net::sourceforge::jnlp::Node::getNodeName(), getRelatedContent(), getRequiredURL(), getShortcut(), getSpanText(), and strict.

Referenced by getInfo().

        List descriptionsUsed = new ArrayList();

        // locale
        Locale locales[] = getLocales(node);

        // create information
        InformationDesc info = new InformationDesc(file, locales);

        // step through the elements
        Node child = node.getFirstChild();
        while (child != null) {
            String name = child.getNodeName();

            if ("title".equals(name))
                addInfo(info, child, null, getSpanText(child));
            if ("vendor".equals(name))
                addInfo(info, child, null, getSpanText(child));
            if ("description".equals(name)) {
                String kind = getAttribute(child, "kind", "default");
                if (descriptionsUsed.contains(kind))
                    if (strict)
                        throw new ParseException(R("PTwoDescriptions", kind));

                addInfo(info, child, kind, getSpanText(child));
            if ("homepage".equals(name))
                addInfo(info, child, null, getRequiredURL(child, "href", base));
            if ("icon".equals(name))
                addInfo(info, child, getAttribute(child, "kind", "default"), getIcon(child));
            if ("offline-allowed".equals(name))
                addInfo(info, child, null, Boolean.TRUE);
            if ("sharing-allowed".equals(name)) {
                if (strict && !allowExtensions)
                    throw new ParseException(R("PSharing"));
                addInfo(info, child, null, Boolean.TRUE);
            if ("association".equals(name)) {
                addInfo(info, child, null, getAssociation(child));
            if ("shortcut".equals(name)) {
                addInfo(info, child, null, getShortcut(child));
            if ("related-content".equals(name)) {
                addInfo(info, child, null, getRelatedContent(child));

            child = child.getNextSibling();

        return info;

Generated by  Doxygen 1.6.0   Back to index