Package org.opensaml.samlext.saml2mdui

Examples of org.opensaml.samlext.saml2mdui.Keywords


    /**
     * {@inheritDoc}
     */
    protected void marshallAttributes(XMLObject samlObject, Element domElement) throws MarshallingException {
        Keywords words = (Keywords) samlObject;

        if (words.getXMLLang() != null) {
            Attr attribute = XMLHelper.constructAttribute(domElement.getOwnerDocument(), SAMLConstants.XML_NS,
                    LangBearing.XML_LANG_ATTR_LOCAL_NAME, SAMLConstants.XML_PREFIX);
            attribute.setValue(words.getXMLLang());
            domElement.setAttributeNodeNS(attribute);
        }
    }
View Full Code Here


        }
    }

    /** {@inheritDoc} */
    protected void marshallElementContent(XMLObject samlObject, Element domElement) throws MarshallingException {
        Keywords words = (Keywords) samlObject;

        if (words.getKeywords() != null) {
            StringBuilder sb = new StringBuilder();
            for (String s : words.getKeywords()) {
                sb.append(s);
                sb.append(' ');
            }
            XMLHelper.appendTextContent(domElement, sb.toString());
        }
View Full Code Here

     * {@inheritDoc}
     */
    protected void processAttribute(XMLObject samlObject, Attr attribute) throws UnmarshallingException {
        if (attribute.getLocalName().equals(LangBearing.XML_LANG_ATTR_LOCAL_NAME)
                && SAMLConstants.XML_NS.equals(attribute.getNamespaceURI())) {
            Keywords keywords = (Keywords) samlObject;

            keywords.setXMLLang(attribute.getValue());
        }
    }
View Full Code Here

        }
    }

    /** {@inheritDoc} */
    protected void processElementContent(XMLObject samlObject, String elementContent) {
        Keywords keywords = (Keywords) samlObject;
        String[] words = elementContent.split("\\s+");
        ArrayList<String> wordlist = new ArrayList<String>(words.length);
       
        for (String s : words) {
            wordlist.add(s);
        }

        keywords.setKeywords(wordlist);
    }
View Full Code Here

TOP

Related Classes of org.opensaml.samlext.saml2mdui.Keywords

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.