Code example for QName

Methods: getLocalPart, getNamespaceURI

0
    public XPathFunction resolveFunction(QName functionName, int arity) {
        if (log.isDebugEnabled()) {
            log.debug("Resolving function: " + functionName);
        } 
 
        if (functionName.getNamespaceURI() == null) {
            throw new NullPointerException("Undeclared namespace for " + functionName);
        } else if (HTNameSpaces.HTD_NS.equals(functionName.getNamespaceURI())) {
            String localPart = functionName.getLocalPart();
            if (XPath2Constants.FUNCTION_GET_POTENTIAL_OWNERS.equals(localPart)) {
                return new GetPotentialOwners(); 
            } else { 
                String errMsg = "This operation is not currently supported in this version of WSO2 BPS.";
                if (XPath2Constants.FUNCTION_GET_ACTUAL_OWNER.equals(localPart)) {
                    throw new UnsupportedOperationException(errMsg);
 
                } else if (XPath2Constants.FUNCTION_GET_BUSINESS_ADMINISTRATORS.equals(localPart)) {
                    throw new UnsupportedOperationException(errMsg);
 
                } else if (XPath2Constants.FUNCTION_GET_EXCLUDED_OWNERS.equals(localPart)) {
                    throw new UnsupportedOperationException(errMsg);