private void parseElement(Element element) throws SAML2Exception {
  AssertionFactory assertionFactory=AssertionFactory.getInstance();
  ProtocolFactory protoFactory=ProtocolFactory.getInstance();
  requestId=element.getAttribute(SAML2Constants.ID);
  validateID(requestId);
  version=element.getAttribute(SAML2Constants.VERSION);
  validateVersion(version);
  String issueInstantStr=element.getAttribute(SAML2Constants.ISSUE_INSTANT);
  validateIssueInstant(issueInstantStr);
  destinationURI=element.getAttribute(SAML2Constants.DESTINATION);
  consent=element.getAttribute(SAML2Constants.CONSENT);
  String notOnOrAfterStr=element.getAttribute(SAML2Constants.NOTONORAFTER);
  validateNotOnOrAfterStr(notOnOrAfterStr);
  reason=element.getAttribute(SAML2Constants.REASON);
  String sessionIndexStr=null;
  NodeList nList=element.getChildNodes();
  if ((nList != null) && (nList.getLength() > 0)) {
    for (int i=0; i < nList.getLength(); i++) {
      Node childNode=nList.item(i);
      String cName=childNode.getLocalName();
      if (cName != null) {
        if (cName.equals(SAML2Constants.ISSUER)) {
          nameID=assertionFactory.createIssuer((Element)childNode);
        }
 else         if (cName.equals(SAML2Constants.SIGNATURE)) {
          signatureString=XMLUtils.print((Element)childNode);
          isSigned=true;
        }
 else         if (cName.equals(SAML2Constants.EXTENSIONS)) {
          extensions=protoFactory.createExtensions((Element)childNode);
        }
 else         if (cName.equals(SAML2Constants.BASEID)) {
          baseId=assertionFactory.createBaseID((Element)childNode);
        }
 else         if (cName.equals(SAML2Constants.NAMEID)) {
          nameId=assertionFactory.createNameID((Element)childNode);
        }
 else         if (cName.equals(SAML2Constants.ENCRYPTEDID)) {
          encryptedId=assertionFactory.createEncryptedID((Element)childNode);
        }
 else         if (cName.equals(SAML2Constants.SESSION_INDEX)) {
          if ((sessionIndexList == null) || (sessionIndexList.isEmpty())) {
            sessionIndexList=new ArrayList();
          }
          sessionIndexStr=XMLUtils.getElementString((Element)childNode);
          sessionIndexList.add(sessionIndexStr);
        }
      }
    }
    validateBaseIDorNameIDorEncryptedID();
    if ((sessionIndexList != null) && (!sessionIndexList.isEmpty())) {
      sessionIndexList=Collections.unmodifiableList(sessionIndexList);
    }
  }
}

private void parseElement ( Element element ) throws SAML2Exception { AssertionFactory assertionFactory = AssertionFactory . getInstance ( ) ; ProtocolFactory protoFactory = ProtocolFactory . getInstance ( ) ; requestId = element . getAttribute ( SAML2Constants . ID ) ; validateID ( requestId ) ; version = element . getAttribute ( SAML2Constants . VERSION ) ; validateVersion ( version ) ; String issueInstantStr = element . getAttribute ( SAML2Constants . ISSUE_INSTANT ) ; validateIssueInstant ( issueInstantStr ) ; destinationURI = element . getAttribute ( SAML2Constants . DESTINATION ) ; consent = element . getAttribute ( SAML2Constants . CONSENT ) ; String notOnOrAfterStr = element . getAttribute ( SAML2Constants . NOTONORAFTER ) ; validateNotOnOrAfterStr ( notOnOrAfterStr ) ; reason = element . getAttribute ( SAML2Constants . REASON ) ; String sessionIndexStr = null ; NodeList nList = element . getChildNodes ( ) ; if ( ( nList != null ) && ( nList . getLength ( ) > 0 ) ) { for ( int i = 0 ; i < nList . getLength ( ) ; i ++ ) { Node childNode = nList . item ( i ) ; String cName = childNode . getLocalName ( ) ; if ( cName != null ) { if ( cName . equals ( SAML2Constants . ISSUER ) ) { nameID = assertionFactory . createIssuer ( ( Element ) childNode ) ; } else if ( cName . equals ( SAML2Constants . SIGNATURE ) ) { signatureString = XMLUtils . print ( ( Element ) childNode ) ; isSigned = true ; } else if ( cName . equals ( SAML2Constants . EXTENSIONS ) ) { extensions = protoFactory . createExtensions ( ( Element ) childNode ) ; } else if ( cName . equals ( SAML2Constants . BASEID ) ) { baseId = assertionFactory . createBaseID ( ( Element ) childNode ) ; } else if ( cName . equals ( SAML2Constants . NAMEID ) ) { nameId = assertionFactory . createNameID ( ( Element ) childNode ) ; } else if ( cName . equals ( SAML2Constants . ENCRYPTEDID ) ) { encryptedId = assertionFactory . createEncryptedID ( ( Element ) childNode ) ; } else if ( cName . equals ( SAML2Constants . SESSION_INDEX ) ) { if ( ( sessionIndexList == null ) || ( sessionIndexList . isEmpty ( ) ) ) { sessionIndexList = new ArrayList ( ) ; } sessionIndexStr = XMLUtils . getElementString ( ( Element ) childNode ) ; sessionIndexList . add ( sessionIndexStr ) ; } } } validateBaseIDorNameIDorEncryptedID ( ) ; if ( ( sessionIndexList != null ) && ( ! sessionIndexList . isEmpty ( ) ) ) { sessionIndexList = Collections . unmodifiableList ( sessionIndexList ) ; } } }
parses the docuemnt element for this object .
