private FeeCheckData.Command parseCommandNode(XMLDocument xmlDoc, String checkDataQueryPath)
     throws XPathExpressionException {
   final FeeCheckData.Command command =
       new FeeCheckData.Command(
           xmlDoc.getNodeValue(checkDataQueryPath + CHKDATA_DOMAIN_COMMAND_EXPR));
   command.setPhase(xmlDoc.getNodeValue(checkDataQueryPath + CHKDATA_DOMAIN_COMMAND_PHASE_EXPR));
   command.setSubphase(
       xmlDoc.getNodeValue(checkDataQueryPath + CHKDATA_DOMAIN_COMMAND_SUBPHASE_EXPR));
   return command;
 }
示例#2
0
  public static final DSData fromXML(final XMLDocument xmlDoc, final String dsDataXPath)
      throws Exception {
    final DSData result = new DSData();

    result.setKeyTag(
        Integer.parseInt(xmlDoc.getNodeValue(dsDataXPath + "/" + SEC_DNS_PREFIX + ":keyTag")));
    result.setAlg(
        Integer.parseInt(xmlDoc.getNodeValue(dsDataXPath + "/" + SEC_DNS_PREFIX + ":alg")));
    result.setDigestType(
        Integer.parseInt(xmlDoc.getNodeValue(dsDataXPath + "/" + SEC_DNS_PREFIX + ":digestType")));
    result.setDigest(xmlDoc.getNodeValue(dsDataXPath + "/" + SEC_DNS_PREFIX + ":digest"));
    setKeyDataInDSData(xmlDoc, dsDataXPath, result);

    return result;
  }
示例#3
0
 private static void setKeyDataInDSData(
     final XMLDocument xmlDoc, final String dsDataXPath, final DSData result) throws Exception {
   final Node tempNode = xmlDoc.getElement(dsDataXPath + "/" + SEC_DNS_PREFIX + ":keyData");
   if (tempNode != null) {
     result.setKeyData(KeyData.fromXML(xmlDoc, dsDataXPath + "/" + SEC_DNS_PREFIX + ":keyData"));
   }
 }
 @Override
 public void fromXML(XMLDocument xmlDoc) throws XPathExpressionException {
   int checkDataCount = xmlDoc.getNodeCount(CHKDATA_COUNT_EXPR);
   for (int checkDataIndex = 0; checkDataIndex < checkDataCount; checkDataIndex++) {
     parseFeeCheckDataNodes(xmlDoc, checkDataIndex);
   }
   initialised = checkDataCount > 0;
 }
 private void parseFeeNodes(
     XMLDocument xmlDoc, FeeCheckData feeCheckData, String feeNodesQueryPath)
     throws XPathExpressionException {
   NodeList feeNodes = xmlDoc.getElements(feeNodesQueryPath);
   if (feeNodes != null) {
     for (int feeNodeIndex = 0; feeNodeIndex < feeNodes.getLength(); feeNodeIndex++) {
       Node feeNode = feeNodes.item(feeNodeIndex);
       feeCheckData.addFee(parseFee(feeNode));
     }
   }
 }
示例#6
0
 public void fromXML(XMLDocument xmlDocument) {
   try {
     type = MarkContactType.valueOf(xmlDocument.getNodeValue(TYPE_EXPR));
     name = xmlDocument.getNodeValue(NAME_EXPR);
     org = xmlDocument.getNodeValue(ORG_EXPR);
     voice = xmlDocument.getNodeValue(VOICE_EXPR);
     voiceExt = xmlDocument.getNodeValue(VOICE_EXT_EXPR);
     fax = xmlDocument.getNodeValue(FAX_EXPR);
     faxExt = xmlDocument.getNodeValue(FAX_EXT_EXPR);
     email = xmlDocument.getNodeValue(EMAIL_EXPR);
     Node addressElement = xmlDocument.getElement(ADDRESS_EXPR);
     if (addressElement != null) {
       address = new MarkAddress();
       address.fromXML(new XMLDocument((Element) addressElement));
     }
   } catch (XPathExpressionException e) {
     maintLogger.warning(e.getMessage());
   }
 }
 private String parseTextValue(XMLDocument xmlDoc, String queryPath)
     throws XPathExpressionException {
   return xmlDoc.getNodeValue(queryPath);
 }
  /**
   * @see
   *     com.ausregistry.jtoolkit2.se.ResponseExtension#fromXML(com.ausregistry.jtoolkit2.xml.XMLDocument)
   */
  public void fromXML(final XMLDocument xmlDoc) throws XPathExpressionException {
    languageTag = xmlDoc.getNodeValue(replaceResponseType(LANGUAGE_EXPR, ResponseExtension.INFO));

    initialised = (languageTag != null);
  }
 @Override
 public void fromXML(XMLDocument xmlDoc) throws XPathExpressionException {
   id = xmlDoc.getNodeValue(replaceResponseType(ID, RESPONSE_TYPE));
   initialised = id != null;
 }