Package com.sun.xacml.attr

Examples of com.sun.xacml.attr.AttributeFactory


        }

        // there was at least one match, so try to generate the values
        try {
            ArrayList<AttributeValue> list = new ArrayList<AttributeValue>();
            AttributeFactory attrFactory = AttributeFactory.getInstance();

            for (int i = 0; i < matches.getLength(); i++) {
                String text = null;
                Node node = matches.item(i);
                short nodeType = node.getNodeType();

                // see if this is straight text, or a node with data under
                // it and then get the values accordingly

                AttributeValue attrValue = null;

                if ((nodeType == Node.CDATA_SECTION_NODE) || (nodeType == Node.COMMENT_NODE)
                        || (nodeType == Node.TEXT_NODE) || (nodeType == Node.ATTRIBUTE_NODE)) {
                    // there is no child to this node
                    text = node.getNodeValue();
                    attrValue = attrFactory.createValue(type, text);
                } else if (nodeType == Node.DOCUMENT_NODE || nodeType == Node.ELEMENT_NODE) {
                    attrValue = attrFactory.createValue(node, type);
                } else {
                    // the data is in a child node
                    text = node.getFirstChild().getNodeValue();
                    attrValue = attrFactory.createValue(type, text);
                }

                list.add(attrValue);
            }
View Full Code Here

TOP

Related Classes of com.sun.xacml.attr.AttributeFactory

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.