Class PluginUtil

java.lang.Object
org.somda.sdc.biceps.model.plugins.PluginUtil

public class PluginUtil extends Object
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static boolean
    customIsEqualNode(Node left, Node right)
    The code is based on the isEqualNode methods of the classes com.sun.org.apache.xerces.internal.dom.NodeImpl, com.sun.org.apache.xerces.internal.dom.ParentNode and com.sun.org.apache.xerces.internal.dom.ElementImpl, but it will not consider the namespace prefix when comparing two nodes.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • PluginUtil

      public PluginUtil()
  • Method Details

    • customIsEqualNode

      public static boolean customIsEqualNode(Node left, Node right)
      The code is based on the isEqualNode methods of the classes com.sun.org.apache.xerces.internal.dom.NodeImpl, com.sun.org.apache.xerces.internal.dom.ParentNode and com.sun.org.apache.xerces.internal.dom.ElementImpl, but it will not consider the namespace prefix when comparing two nodes.

      Tests whether two nodes are equal.
      This method tests for equality of nodes, not sameness (i.e., whether the two nodes are references to the same object) which can be tested with Node.isSameNode(). All nodes that are the same will also be equal, though the reverse may not be true.
      Two nodes are equal if and only if the following conditions are satisfied:

      • The two nodes are of the same type.
      • The following string attributes are equal: localName, namespaceURI, nodeValue. This is: they are both null, or they have the same length and are character for character identical.
      • The attributes NamedNodeMaps are equal. This is: they are both null, or they have the same length and for each node that exists in one map there is a node that exists in the other map with the same nodeValue and namespaceURI, although not necessarily at the same index.
      • The childNodes NodeLists are equal. This is: they are both null, or they have the same length and contain equal nodes at the same index. Note that normalization can affect equality; to avoid this, nodes should be normalized before being compared.

      On the other hand, the following do not affect equality: the ownerDocument, baseURI, and parentNode attributes, the specified attribute for Attr nodes, the schemaTypeInfo attribute for Attr and Element nodes, the Text.isElementContentWhitespace attribute for Text nodes, as well as any user data or event listeners registered on the nodes.

      Note: As a general rule, anything not mentioned in the description above is not significant in consideration of equality checking.

      Parameters:
      left - node to compare equality with.
      right - node to compare equality with.
      Returns:
      Returns true if the nodes are equal, false otherwise.