コード例 #1
0
  private void updateSubject(Node rootNode, String transactionNumber) throws Exception {
    IdentificationTransaction identificationTransaction =
        rapbackDAO.getIdentificationTransaction(transactionNumber);

    Subject subject = identificationTransaction.getSubject();

    String fbiId =
        XmlUtils.xPathStringSearch(
            rootNode,
            "jxdm50:Subject/nc30:RoleOfPerson/jxdm50:PersonAugmentation/jxdm50:PersonFBIIdentification/nc30:IdentificationID");
    if (StringUtils.isNotBlank(fbiId)) {
      subject.setUcn(fbiId);
    }

    String civilSid =
        XmlUtils.xPathStringSearch(
            rootNode,
            "jxdm50:Subject/nc30:RoleOfPerson/jxdm50:PersonAugmentation/jxdm50:PersonStateFingerprintIdentification[ident-ext:FingerprintIdentificationIssuedForCivilPurposeIndicator='true']/nc30:IdentificationID");
    if (StringUtils.isNotBlank(civilSid)) {
      subject.setCivilSid(civilSid);
    }

    String criminalSid =
        XmlUtils.xPathStringSearch(
            rootNode,
            "jxdm50:Subject/nc30:RoleOfPerson/jxdm50:PersonAugmentation/jxdm50:PersonStateFingerprintIdentification[ident-ext:FingerprintIdentificationIssuedForCriminalPurposeIndicator='true']/nc30:IdentificationID");
    if (StringUtils.isNotBlank(criminalSid)) {
      subject.setCriminalSid(criminalSid);
    }

    rapbackDAO.updateSubject(subject);
  }
コード例 #2
0
  @Test
  public void subscribeMessageTest() throws Exception {

    Subscription subscription = getSampleSubscriptionPojo();

    Document generatedSubscriptinDoc =
        RequestMessageBuilderUtilities.createSubscriptionRequest(subscription);

    String subQualId =
        XmlUtils.xPathStringSearch(
            generatedSubscriptinDoc,
            "//submsg-ext:SubscriptionQualifierIdentification/nc:IdentificationID");

    String sGeneratedSubscriptionDoc = XmlUtils.getStringFromNode(generatedSubscriptinDoc);

    String sExpectedXmlSubDoc =
        XmlUtils.getRootNodeAsString(
            "src/test/resources/xml/subscriptionRequest/Arrest_Subscription_Document.xml");
    sExpectedXmlSubDoc = sExpectedXmlSubDoc.replace("@SUB_QUAL_ID@", subQualId);

    Diff diff = new Diff(sExpectedXmlSubDoc, sGeneratedSubscriptionDoc);
    DetailedDiff detailDiff = new DetailedDiff(diff);
    List<Difference> diffList = detailDiff.getAllDifferences();
    int diffCount = diffList.size();

    Assert.assertEquals(detailDiff.toString(), 0, diffCount);
  }
コード例 #3
0
 private String getTransactionNumber(Node rootNode) throws Exception {
   String transactionNumber =
       XmlUtils.xPathStringSearch(
           rootNode, "ident-ext:TransactionIdentification/nc30:IdentificationID");
   return transactionNumber;
 }
コード例 #4
0
 private String getPersonRace(Node personNode, String jxdmPrefix) throws Exception {
   String personRace = XmlUtils.xPathStringSearch(personNode, jxdmPrefix + ":PersonRaceCode");
   return StringUtils.trimToNull(personRace);
 }