30 import java.text.MessageFormat;
31
32 import javax.xml.bind.ValidationEventLocator;
33 import org.w3c.dom.Node;
34 import org.xml.sax.Locator;
35 import org.xml.sax.SAXParseException;
36
37 /**
38 * Default implementation of the ValidationEventLocator interface.
39 *
40 * <p>
41 * JAXB providers are allowed to use whatever class that implements
42 * the ValidationEventLocator interface. This class is just provided for a
43 * convenience.
44 *
45 * @author <ul><li>Kohsuke Kawaguchi, Sun Microsystems, Inc.</li></ul>
46 * @see javax.xml.bind.Validator
47 * @see javax.xml.bind.ValidationEventHandler
48 * @see javax.xml.bind.ValidationEvent
49 * @see javax.xml.bind.ValidationEventLocator
50 * @since JAXB1.0
51 */
52 public class ValidationEventLocatorImpl implements ValidationEventLocator
53 {
54 /**
55 * Creates an object with all fields unavailable.
56 */
57 public ValidationEventLocatorImpl() {
58 }
59
60 /**
61 * Constructs an object from an org.xml.sax.Locator.
62 *
63 * The object's ColumnNumber, LineNumber, and URL become available from the
64 * values returned by the locator's getColumnNumber(), getLineNumber(), and
65 * getSystemId() methods respectively. Node, Object, and Offset are not
66 * available.
67 *
68 * @param loc the SAX Locator object that will be used to populate this
69 * event locator.
70 * @throws IllegalArgumentException if the Locator is null
|
30 import java.text.MessageFormat;
31
32 import javax.xml.bind.ValidationEventLocator;
33 import org.w3c.dom.Node;
34 import org.xml.sax.Locator;
35 import org.xml.sax.SAXParseException;
36
37 /**
38 * Default implementation of the ValidationEventLocator interface.
39 *
40 * <p>
41 * JAXB providers are allowed to use whatever class that implements
42 * the ValidationEventLocator interface. This class is just provided for a
43 * convenience.
44 *
45 * @author <ul><li>Kohsuke Kawaguchi, Sun Microsystems, Inc.</li></ul>
46 * @see javax.xml.bind.Validator
47 * @see javax.xml.bind.ValidationEventHandler
48 * @see javax.xml.bind.ValidationEvent
49 * @see javax.xml.bind.ValidationEventLocator
50 * @since 1.6, JAXB 1.0
51 */
52 public class ValidationEventLocatorImpl implements ValidationEventLocator
53 {
54 /**
55 * Creates an object with all fields unavailable.
56 */
57 public ValidationEventLocatorImpl() {
58 }
59
60 /**
61 * Constructs an object from an org.xml.sax.Locator.
62 *
63 * The object's ColumnNumber, LineNumber, and URL become available from the
64 * values returned by the locator's getColumnNumber(), getLineNumber(), and
65 * getSystemId() methods respectively. Node, Object, and Offset are not
66 * available.
67 *
68 * @param loc the SAX Locator object that will be used to populate this
69 * event locator.
70 * @throws IllegalArgumentException if the Locator is null
|