Code example for Node

Methods: getNamespaceURI

     * @return <code>AbstractRequestCtx</code> object 
     * @throws org.wso2.balana.ParsingException  if the DOM node is invalid 
    public AbstractRequestCtx getRequestCtx(Node root) throws ParsingException {
        String requestCtxNs = root.getNamespaceURI();
        if(requestCtxNs != null){
                return RequestCtx.getInstance(root);
            } else if(XACMLConstants.REQUEST_CONTEXT_1_0_IDENTIFIER.equals(requestCtxNs.trim()) ||
                    XACMLConstants.REQUEST_CONTEXT_2_0_IDENTIFIER.equals(requestCtxNs.trim())) {
                return org.wso2.balana.ctx.xacml2.RequestCtx.getInstance(root);
            } else { 
                throw new ParsingException("Invalid namespace in XACML request"); 
        } else { 
            log.warn("No Namespace defined in XACML request and Assume as XACML 3.0");
            return RequestCtx.getInstance(root);
     *  Returns instance of <code>AbstractRequestCtx</code> based one the XACML version. 
Stop searching for code, let great code find you!  Add Codota to your java IDE