Examples of NodeDetail


Examples of org.apache.juddi.api_v3.NodeDetail

    node.setClientName("defaultClient");
    SaveNode saveNode = new SaveNode();
    saveNode.setAuthInfo(authInfoJoe);
    saveNode.getNode().add(node);
   
    NodeDetail nodeDetail = publisher.saveNode(saveNode);
                Assert.fail();
   
   
  }
View Full Code Here

Examples of org.apache.juddi.api_v3.NodeDetail

 
      UddiEntityPublisher publisher = this.getEntityPublisher(em, body.getAuthInfo());
     
      new ValidateNode(publisher).validateSaveNode(em, body);
     
      NodeDetail result = new NodeDetail();
 
      List<org.apache.juddi.api_v3.Node> apiNodeList = body.getNode();;
      for (org.apache.juddi.api_v3.Node apiNode : apiNodeList) {
       
        org.apache.juddi.model.Node modelNode = new org.apache.juddi.model.Node();
       
        MappingApiToModel.mapNode(apiNode, modelNode);
       
        Object existingUddiEntity = em.find(modelNode.getClass(), modelNode.getName());
        if (existingUddiEntity != null) {
          em.merge(modelNode);
        } else {
            em.persist(modelNode);
        }
       
        result.getNode().add(apiNode);
      }
 
      tx.commit();
      return result;
    } finally {
View Full Code Here

Examples of org.custommonkey.xmlunit.NodeDetail

            // ignore field "updated" since it contains current time
            return RETURN_IGNORE_DIFFERENCE_NODES_IDENTICAL;
        }

        // compare the times if possible
        NodeDetail testDetail = difference.getTestNodeDetail();

        if (testDetail.getNode().getParentNode() != null) {
            String testNodeName = testDetail.getNode().getParentNode().getNodeName();
            if (timeNodeNameSet.contains(testNodeName)) {
                String testDateStr = testDetail.getValue();
                String controlDateStr = difference.getControlNodeDetail().getValue();
                DatatypeFactory datatypeFactory;
                try {
                    datatypeFactory = DatatypeFactory.newInstance();
                } catch (DatatypeConfigurationException e) {
View Full Code Here

Examples of org.custommonkey.xmlunit.NodeDetail

            if (xpath.equals("/feed[1]/entry[2]/expires[1]/text()[1]")) {
                // ignore field "expires" since it contains current time
                return RETURN_IGNORE_DIFFERENCE_NODES_IDENTICAL;
            }
            // compare the times if possible
            NodeDetail testDetail = difference.getTestNodeDetail();
            String testNodeName = testDetail.getNode().getParentNode().getNodeName();
            if (timeNodeNameSet.contains(testNodeName)) {
                String testDateStr = testDetail.getValue();
                String controlDateStr = difference.getControlNodeDetail().getValue();
                XMLGregorianCalendar gDateBuilderTest =
                    datatypeFactory.newXMLGregorianCalendar(testDateStr);
                XMLGregorianCalendar gDateBuilderControl =
                    datatypeFactory.newXMLGregorianCalendar(controlDateStr);
View Full Code Here

Examples of org.custommonkey.xmlunit.NodeDetail

            if (xpath.equals("/feed[1]/entry[2]/expires[1]/text()[1]")) {
                // ignore field "expires" since it contains current time
                return RETURN_IGNORE_DIFFERENCE_NODES_IDENTICAL;
            }
            // compare the times if possible
            NodeDetail testDetail = difference.getTestNodeDetail();
            String testNodeName = testDetail.getNode().getParentNode().getNodeName();
            if (timeNodeNameSet.contains(testNodeName)) {
                String testDateStr = testDetail.getValue();
                String controlDateStr = difference.getControlNodeDetail().getValue();
                XMLGregorianCalendar gDateBuilderTest =
                    datatypeFactory.newXMLGregorianCalendar(testDateStr);
                XMLGregorianCalendar gDateBuilderControl =
                    datatypeFactory.newXMLGregorianCalendar(controlDateStr);
View Full Code Here

Examples of org.custommonkey.xmlunit.NodeDetail

        List<Difference> exceptions = new ArrayList<Difference>();
    for (Difference diffItem : allDifferences) {
          if (diffItem.isRecoverable()) {
            // Similar but not identical - ignore
          } else {
            NodeDetail actualNodeDetail = diffItem.getTestNodeDetail();
            NodeDetail expectedNodeDetail = diffItem.getControlNodeDetail();

            // If we want any exceptions to the strict comparisons done by XMLUnit we can add them here
            /*if ((expectedNodeDetail.getValue().startsWith("{urn:hl7-org:v3}")) &&
              (actualNodeDetail.getValue().startsWith("{null}"))) {
              exceptions.add(diffItem);
View Full Code Here

Examples of org.custommonkey.xmlunit.NodeDetail

  private int skippedComparisons = 0;

  @Override
  public int differenceFound(Difference difference)
  {
    NodeDetail expectedNode = difference.getControlNodeDetail();
    NodeDetail actualNode = difference.getTestNodeDetail();
    String expectedXPath = expectedNode.getXpathLocation();
    String actualXPath = actualNode.getXpathLocation();
    if (!expectedXPath.equals(actualXPath))
    {
      return DifferenceListener.RETURN_ACCEPT_DIFFERENCE;
    }
    String expectedValue = expectedNode.getValue();
    expectedValue = expectedValue.replaceAll("\\s+", " ").trim();
    String actualValue = actualNode.getValue();
    actualValue = actualValue.replaceAll("\\s+", " ").trim();
    if (expectedValue.equals(actualValue))
    {
      return DifferenceListener.RETURN_IGNORE_DIFFERENCE_NODES_SIMILAR;
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.