1
2
3
4
5
6
7
8
9
10
11
12
13 package com.eviware.soapui.impl.wadl.inference;
14
15 import javax.xml.namespace.QName;
16
17 /***
18 * Handles schedule conflicts while inferring Xml schema from Xml documents. Has
19 * a single callback method.
20 *
21 * @author Dain Nilsson
22 */
23 public interface ConflictHandler
24 {
25
26 /***
27 * Callback method for deciding whether given Xml document is valid or not,
28 * and if so, to expand the schema. The function should return true if the
29 * contents at the cursor is valid in respect to the message provided, false
30 * if not.
31 *
32 * @param event
33 * What type of event this is, creation or modification.
34 * @param type
35 * The type of particle that this is in regards to.
36 * @param name
37 * The QName for the particle that is being modified.
38 * @param path
39 * The path to the element that is being changed (or contains the
40 * attribute/has the type that is beng changed).
41 * @param message
42 * A short message describing the change.
43 * @return True to accept the schema modification and continue validation,
44 * false to trigger validation failure.
45 */
46 public boolean callback( Event event, Type type, QName name, String path, String message );
47
48 public enum Type
49 {
50 ELEMENT, ATTRIBUTE, TYPE
51 }
52
53 public enum Event
54 {
55 CREATION, MODIFICATION
56 }
57 }