Package org.opensaml.samlext.saml2mdui

Examples of org.opensaml.samlext.saml2mdui.LocalizedURI


     * {@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())) {
            LocalizedURI uri = (LocalizedURI) samlObject;

            LocalizedString uriStr = uri.getURI();
            if (uriStr == null) {
                uriStr = new LocalizedString();
            }

            uriStr.setLanguage(attribute.getValue());
            uri.setURI(uriStr);
        }
    }
View Full Code Here


        }
    }

    /** {@inheritDoc} */
    protected void processElementContent(XMLObject samlObject, String elementContent) {
        LocalizedURI uri = (LocalizedURI) samlObject;

        LocalizedString uriStr = uri.getURI();
        if (uriStr == null) {
            uriStr = new LocalizedString();
        }

        uriStr.setLocalizedString(elementContent);
        uri.setURI(uriStr);
    }
View Full Code Here

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

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

        }
    }

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

        if (name.getURI() != null) {
            XMLHelper.appendTextContent(domElement, name.getURI().getLocalString());
        }
    }
View Full Code Here

TOP

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

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.