1
2
3
4
5
6
7
8
9
10
11
12
13 package com.eviware.soapui.impl.wadl.inference.support;
14
15 import javax.xml.namespace.QName;
16
17 import com.eviware.soapui.impl.wadl.inference.ConflictHandler;
18
19 /***
20 * ConflictHandler that allows any changes that need to be made to the schema in
21 * order to validate against given XML document.
22 *
23 * @author Dain Nilsson
24 */
25 public class AllowAll implements ConflictHandler
26 {
27 /***
28 * Constructs a new AllowAll instance.
29 */
30 public AllowAll()
31 {
32
33 }
34
35 public boolean callback( Event event, Type type, QName name, String path, String message )
36 {
37 StringBuilder s = new StringBuilder( message ).append( "\n" );
38 if( event == Event.CREATION )
39 s.append( "Create " );
40 else if( event == Event.MODIFICATION )
41 s.append( "Modify " );
42 if( type == Type.ELEMENT )
43 s.append( "element '" );
44 else if( type == Type.ATTRIBUTE )
45 s.append( "attribute '" );
46 else if( type == Type.TYPE )
47 s.append( "type '" );
48 s.append( name.getLocalPart() ).append( "' in namespace '" ).append( name.getNamespaceURI() ).append( "'" );
49 s.append( " at path " ).append( path ).append( "?" );
50 System.out.println( s.toString() );
51 return true;
52 }
53
54 }