Ejemplo n.º 1
0
 @Override
 public boolean match(final Request request) {
   try {
     Document requestDocument = extractDocument(request, extractor);
     Document resourceDocument = getResourceDocument(request, this.resource);
     return requestDocument.isEqualNode(resourceDocument);
   } catch (SAXException e) {
     return false;
   }
 }
 @Override
 public int compare(Document o1, Document o2) {
   o1.normalize();
   o2.normalize();
   return o1.isEqualNode(o2) ? 0 : 1;
 }