Package org.apache.ws.policy

Examples of org.apache.ws.policy.PrimitiveAssertion


    return new PolicyReference(attribute.getAttributeValue());
  }

  private PrimitiveAssertion readPrimitiveAssertion(OMElement element) {
    QName qname = element.getQName();
    PrimitiveAssertion result = new PrimitiveAssertion(qname);

    result.setAttributes(getAttributes(element));

    String isOptional = result.getAttribute(new QName(
        PolicyConstants.WS_POLICY_NAMESPACE_URI, "Optional"));
    result.setOptional(new Boolean(isOptional).booleanValue());

    // setting the text value ..
    String strValue = element.getText();

    if (strValue != null && strValue.length() != 0) {
      result.setStrValue(strValue.trim());
    }

    //CHECK ME
    Iterator childElements = element.getChildElements();

    while (childElements.hasNext()) {
      OMElement childElement = (OMElement) childElements.next();

      if (childElement.getNamespace().getName().equals(
          PolicyConstants.WS_POLICY_NAMESPACE_URI)
          && childElement.getLocalName().equals(
              PolicyConstants.WS_POLICY)) {
        Policy policy = readPolicy(childElement);
        result.addTerm(policy);

      } else {
        PrimitiveAssertion pa = readPrimitiveAssertion(childElement);
        result.addTerm(pa);
      }
    }
    return result;
  }
View Full Code Here


        0);

    for (Iterator iterator = AND.getTerms().iterator(); iterator.hasNext();) {

      AndCompositeAssertion nAND = new AndCompositeAssertion();
      PrimitiveAssertion pa = (PrimitiveAssertion) iterator.next();

      String namespace = pa.getName().getNamespaceURI();
      nAND.addTerm(pa);

      while (iterator.hasNext()) {
        pa = (PrimitiveAssertion) iterator.next();

        if (namespace.equals(pa.getName().getNamespaceURI())) {
          nAND.addTerm(pa);
        }
      }

      map.put(namespace, nAND);
View Full Code Here

TOP

Related Classes of org.apache.ws.policy.PrimitiveAssertion

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.