public static boolean isOptional(Element e) { Attr at = findOptionalAttribute(e); if (at != null) { String v = at.getValue(); return "true".equalsIgnoreCase(v) || "1".equals(v); } return false; } public static Attr findOptionalAttribute(Element e) {
public static List<Element> findAllPolicyElementsOfLocalName(Element el, String localName) { List<Element> ret = new LinkedList<>(); findAllPolicyElementsOfLocalName(el, localName, ret); return ret; } public static void findAllPolicyElementsOfLocalName(Element el, String localName, List<Element> val) {
public static boolean isIgnorable(Element e) { Attr at = findIgnorableAttribute(e); if (at != null) { String v = at.getValue(); return "true".equalsIgnoreCase(v) || "1".equals(v); } return false; } public static Attr findIgnorableAttribute(Element e) {
public static boolean isOptional(Element e) { Attr at = findOptionalAttribute(e); if (at != null) { String v = at.getValue(); return "true".equalsIgnoreCase(v) || "1".equals(v); } return false; } public static Attr findOptionalAttribute(Element e) {
public static List<Element> findAllPolicyElementsOfLocalName(Element el, String localName) { List<Element> ret = new LinkedList<>(); findAllPolicyElementsOfLocalName(el, localName, ret); return ret; } public static void findAllPolicyElementsOfLocalName(Element el, String localName, List<Element> val) {
public static boolean isIgnorable(Element e) { Attr at = findIgnorableAttribute(e); if (at != null) { String v = at.getValue(); return "true".equalsIgnoreCase(v) || "1".equals(v); } return false; } public static Attr findIgnorableAttribute(Element e) {
public Assertion build(Element elem, AssertionBuilderFactory f) { String localName = elem.getLocalName(); QName qn = new QName(elem.getNamespaceURI(), localName); boolean optional = false; Attr attribute = PolicyConstants.findOptionalAttribute(elem); if (attribute != null) { optional = Boolean.valueOf(attribute.getValue()); } if (MetadataConstants.MTOM_ASSERTION_QNAME.equals(qn)) { return new PrimitiveAssertion(MetadataConstants.MTOM_ASSERTION_QNAME, optional); } return null; }
public static List<Element> findAllPolicyElementsOfLocalName(Document doc, String localName) { return findAllPolicyElementsOfLocalName(doc.getDocumentElement(), localName); } public static List<Element> findAllPolicyElementsOfLocalName(Element el, String localName) {
public Assertion build(Element elem, AssertionBuilderFactory f) { String localName = elem.getLocalName(); QName qn = new QName(elem.getNamespaceURI(), localName); boolean optional = false; Attr attribute = PolicyConstants.findOptionalAttribute(elem); if (attribute != null) { optional = Boolean.valueOf(attribute.getValue()); } if (MetadataConstants.MTOM_ASSERTION_QNAME.equals(qn)) { return new PrimitiveAssertion(MetadataConstants.MTOM_ASSERTION_QNAME, optional); } return null; }
public static List<Element> findAllPolicyElementsOfLocalName(Document doc, String localName) { return findAllPolicyElementsOfLocalName(doc.getDocumentElement(), localName); } public static List<Element> findAllPolicyElementsOfLocalName(Element el, String localName) {
Attr attribute = PolicyConstants.findOptionalAttribute(elem); if (attribute != null) { optional = Boolean.valueOf(attribute.getValue());
public static void findAllPolicyElementsOfLocalName(Element el, String localName, List<Element> val) { QName qn = DOMUtils.getElementQName(el); if (localName.equals(qn.getLocalPart()) && Constants.isInPolicyNS(qn)) { val.add(el); } el = DOMUtils.getFirstElement(el); while (el != null) { findAllPolicyElementsOfLocalName(el, localName, val); el = DOMUtils.getNextElement(el); } }
Attr attribute = PolicyConstants.findOptionalAttribute(elem); if (attribute != null) { optional = Boolean.valueOf(attribute.getValue());
public static void findAllPolicyElementsOfLocalName(Element el, String localName, List<Element> val) { QName qn = DOMUtils.getElementQName(el); if (localName.equals(qn.getLocalPart()) && Constants.isInPolicyNS(qn)) { val.add(el); } el = DOMUtils.getFirstElement(el); while (el != null) { findAllPolicyElementsOfLocalName(el, localName, val); el = DOMUtils.getNextElement(el); } }
.findAllPolicyElementsOfLocalName(doc, Constants.ELEM_POLICY)) {
.findAllPolicyElementsOfLocalName(doc, Constants.ELEM_POLICY)) {
.findAllPolicyElementsOfLocalName(doc, Constants.ELEM_POLICY_ATTACHMENT)) { PolicyAttachment attachment = new PolicyAttachment();
.findAllPolicyElementsOfLocalName(doc, Constants.ELEM_POLICY_ATTACHMENT)) { PolicyAttachment attachment = new PolicyAttachment();