/** {@inheritDoc} */
  protected void processAttribute(XMLObject xmlObject, Attr attribute)
      throws UnmarshallingException {

    AttributeDesignatorType attributeDesignatorType = (AttributeDesignatorType) xmlObject;

    if (attribute.getLocalName().equals(AttributeDesignatorType.ATTRIBUTE_ID_ATTRIB_NAME)) {
      attributeDesignatorType.setAttribtueId(
          DatatypeHelper.safeTrimOrNullString(attribute.getValue()));
    } else if (attribute.getLocalName().equals(AttributeDesignatorType.DATA_TYPE_ATTRIB_NAME)) {
      attributeDesignatorType.setDataType(
          DatatypeHelper.safeTrimOrNullString(attribute.getValue()));
    } else if (attribute.getLocalName().equals(AttributeDesignatorType.ISSUER_ATTRIB_NAME)) {
      attributeDesignatorType.setIssuer(DatatypeHelper.safeTrimOrNullString(attribute.getValue()));
    } else if (attribute
        .getLocalName()
        .equals(AttributeDesignatorType.MUST_BE_PRESENT_ATTRIB_NAME)) {
      if (attribute.getValue().equals("True") || attribute.getValue().equals("true")) {
        attributeDesignatorType.setMustBePresentXSBoolean(XSBooleanValue.valueOf("1"));
      } else {
        attributeDesignatorType.setMustBePresentXSBoolean(XSBooleanValue.valueOf("0"));
      }
    } else {
      super.processAttribute(xmlObject, attribute);
    }
  }
 /** {@inheritDoc} */
 protected void processAttribute(XMLObject xmlObject, Attr attribute)
     throws UnmarshallingException {
   ResultType result = (ResultType) xmlObject;
   if (attribute.getLocalName().equals(ResultType.RESOURCE_ID_ATTTRIB_NAME)) {
     result.setResourceId(attribute.getValue());
   } else {
     super.processAttribute(xmlObject, attribute);
   }
 }
 /** {@inheritDoc} */
 @Override
 protected void processAttribute(XMLObject xmlObject, Attr attribute)
     throws UnmarshallingException {
   if (attribute.getLocalName().equals(ActionMatchType.MATCH_ID_ATTRIB_NAME)) {
     ActionMatchType matchType = (ActionMatchType) xmlObject;
     matchType.setMatchId(StringSupport.trimOrNull(attribute.getValue()));
   } else {
     super.processAttribute(xmlObject, attribute);
   }
 }
  /** {@inheritDoc} */
  protected void processAttribute(XMLObject xmlObject, Attr attribute)
      throws UnmarshallingException {
    PolicyType policy = (PolicyType) xmlObject;

    if (attribute.getLocalName().equals(PolicyType.POLICY_ID_ATTRIB_NAME)) {
      policy.setPolicyId(attribute.getValue());
    } else if (attribute.getLocalName().equals(PolicyType.VERSION_ATTRIB_NAME)) {
      policy.setVersion(attribute.getValue());
    } else if (attribute.getLocalName().equals(PolicyType.RULE_COMBINING_ALG_ID_ATTRIB_NAME)) {
      policy.setRuleCombiningAlgoId(attribute.getValue());
    } else {
      super.processAttribute(xmlObject, attribute);
    }
  }
  /** {@inheritDoc} */
  protected void processChildElement(XMLObject parentObject, XMLObject childObject)
      throws UnmarshallingException {
    ResultType result = (ResultType) parentObject;

    if (childObject instanceof ObligationsType) {
      result.setObligations((ObligationsType) childObject);
    } else if (childObject instanceof StatusType) {
      result.setStatus((StatusType) childObject);
    } else if (childObject instanceof DecisionType) {
      result.setDecision((DecisionType) childObject);
    } else {
      super.processChildElement(parentObject, childObject);
    }
  }
  /** {@inheritDoc} */
  @Override
  protected void processChildElement(XMLObject parentXMLObject, XMLObject childXMLObject)
      throws UnmarshallingException {
    ActionMatchType matchType = (ActionMatchType) parentXMLObject;

    if (childXMLObject instanceof AttributeValueType) {
      matchType.setAttributeValue((AttributeValueType) childXMLObject);
    } else if (childXMLObject instanceof AttributeDesignatorType) {
      matchType.setActionAttributeDesignator((AttributeDesignatorType) childXMLObject);
    } else if (childXMLObject instanceof AttributeSelectorType) {
      matchType.setAttributeSelector((AttributeSelectorType) childXMLObject);
    } else {
      super.processChildElement(parentXMLObject, childXMLObject);
    }
  }
  /** {@inheritDoc} */
  protected void processChildElement(XMLObject parentXMLObject, XMLObject childXMLObject)
      throws UnmarshallingException {
    RequestType request = (RequestType) parentXMLObject;

    if (childXMLObject instanceof ActionType) {
      request.setAction((ActionType) childXMLObject);
    } else if (childXMLObject instanceof EnvironmentType) {
      request.setEnvironment((EnvironmentType) childXMLObject);
    } else if (childXMLObject instanceof SubjectType) {
      request.getSubjects().add((SubjectType) childXMLObject);
    } else if (childXMLObject instanceof ResourceType) {
      request.getResources().add((ResourceType) childXMLObject);
    } else {
      super.processChildElement(parentXMLObject, childXMLObject);
    }
  }
  /** {@inheritDoc} */
  protected void processChildElement(XMLObject parentXMLObject, XMLObject childXMLObject)
      throws UnmarshallingException {
    PolicyType policy = (PolicyType) parentXMLObject;

    if (childXMLObject instanceof DescriptionType) {
      policy.setDescription((DescriptionType) childXMLObject);
    } else if (childXMLObject.getElementQName().equals(DefaultsType.POLICY_DEFAULTS_ELEMENT_NAME)) {
      policy.setPolicyDefaults((DefaultsType) childXMLObject);
    } else if (childXMLObject instanceof TargetType) {
      policy.setTarget((TargetType) childXMLObject);
    } else if (childXMLObject instanceof CombinerParametersType) {
      policy.getCombinerParameters().add((CombinerParametersType) childXMLObject);
    } else if (childXMLObject instanceof RuleCombinerParametersType) {
      policy.getRuleCombinerParameters().add((RuleCombinerParametersType) childXMLObject);
    } else if (childXMLObject instanceof VariableDefinitionType) {
      policy.getVariableDefinitions().add((VariableDefinitionType) childXMLObject);
    } else if (childXMLObject instanceof RuleType) {
      policy.getRules().add((RuleType) childXMLObject);
    } else if (childXMLObject instanceof ObligationsType) {
      policy.setObligations((ObligationsType) childXMLObject);
    } else {
      super.processChildElement(parentXMLObject, childXMLObject);
    }
  }