javax.xml.bind.helpers
Class ValidationEventLocatorImpl

java.lang.Object
  extended by javax.xml.bind.helpers.ValidationEventLocatorImpl
All Implemented Interfaces:
ValidationEventLocator

public class ValidationEventLocatorImpl
extends java.lang.Object
implements ValidationEventLocator

Default implementation of a ValidationEventLocator.

Since:
JAXB1.0
Author:
JSR-31

Constructor Summary
ValidationEventLocatorImpl()
          Creates a new instance of ValidationEventLocatorImpl.
ValidationEventLocatorImpl(org.xml.sax.Locator pLocator)
          Creates a new instance of ValidationEventLocatorImpl by copying data from the given Locator.
ValidationEventLocatorImpl(org.w3c.dom.Node pNode)
          Creates a new instance of ValidationEventLocatorImpl by setting the node property.
ValidationEventLocatorImpl(java.lang.Object pObject)
          Creates a new instance of ValidationEventLocatorImpl by setting the object property.
ValidationEventLocatorImpl(org.xml.sax.SAXParseException pException)
          Creates a new instance of ValidationEventLocatorImpl by copying data from the given SAXParseException.
 
Method Summary
 int getColumnNumber()
          Returns a column number related to the validation event, if available.
 int getLineNumber()
          Returns a line number related to the validation event, if available.
 org.w3c.dom.Node getNode()
          Returns a DOM node related to the validation event.
 java.lang.Object getObject()
          Returns an object in the JAXB objects content tree related to the validation event.
 int getOffset()
          Returns a byte offset related to the validation event, if available.
 java.net.URL getURL()
          Returns a URL related to the validation event, if available.
 void setColumnNumber(int pColumnNumber)
          Sets the column number.
 void setLineNumber(int pLineNumber)
          Sets the line number.
 void setNode(org.w3c.dom.Node pNode)
          Sets the node.
 void setObject(java.lang.Object pObject)
          Sets the object.
 void setOffset(int pOffset)
          Sets the offset.
 void setURL(java.net.URL pURL)
          Sets the URL.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ValidationEventLocatorImpl

public ValidationEventLocatorImpl()

Creates a new instance of ValidationEventLocatorImpl.


ValidationEventLocatorImpl

public ValidationEventLocatorImpl(org.xml.sax.Locator pLocator)

Creates a new instance of ValidationEventLocatorImpl by copying data from the given Locator.

Parameters:
pLocator - The SAX locator where to copy from.

ValidationEventLocatorImpl

public ValidationEventLocatorImpl(org.w3c.dom.Node pNode)

Creates a new instance of ValidationEventLocatorImpl by setting the node property.

Parameters:
pNode - The node being referenced.

ValidationEventLocatorImpl

public ValidationEventLocatorImpl(java.lang.Object pObject)

Creates a new instance of ValidationEventLocatorImpl by setting the object property.

Parameters:
pObject - The object being referenced.

ValidationEventLocatorImpl

public ValidationEventLocatorImpl(org.xml.sax.SAXParseException pException)

Creates a new instance of ValidationEventLocatorImpl by copying data from the given SAXParseException.

Parameters:
pException - The SAX exception where to copy from.
Method Detail

setURL

public void setURL(java.net.URL pURL)

Sets the URL.


getURL

public java.net.URL getURL()
Description copied from interface: ValidationEventLocator

Returns a URL related to the validation event, if available. For example, when parsing an InputSource, this might be the URL given by InputSource.getSystemId().

Specified by:
getURL in interface ValidationEventLocator
Returns:
The validation event URL, if available, or null.

setOffset

public void setOffset(int pOffset)

Sets the offset.


getOffset

public int getOffset()
Description copied from interface: ValidationEventLocator

Returns a byte offset related to the validation event, if available. For example, when parsing an InputStream, this might be the position where the event occurred.

Specified by:
getOffset in interface ValidationEventLocator
Returns:
Byte offset, if available, or -1.

setLineNumber

public void setLineNumber(int pLineNumber)

Sets the line number.


getLineNumber

public int getLineNumber()
Description copied from interface: ValidationEventLocator

Returns a line number related to the validation event, if available. For example, when parsing an InputStream, this might be the line, in which the event occurred.

Specified by:
getLineNumber in interface ValidationEventLocator
Returns:
Line number, if available, or -1.

setColumnNumber

public void setColumnNumber(int pColumnNumber)

Sets the column number.


getColumnNumber

public int getColumnNumber()
Description copied from interface: ValidationEventLocator

Returns a column number related to the validation event, if available. For example, when parsing an InputStream, this might be the column, in which the event occurred.

Specified by:
getColumnNumber in interface ValidationEventLocator
Returns:
Column number, if available, or -1.

setObject

public void setObject(java.lang.Object pObject)

Sets the object.


getObject

public java.lang.Object getObject()
Description copied from interface: ValidationEventLocator

Returns an object in the JAXB objects content tree related to the validation event. Usually this is the invalid object or child object.

Specified by:
getObject in interface ValidationEventLocator
Returns:
Part of a JAXB object tree, if available, or null.

setNode

public void setNode(org.w3c.dom.Node pNode)

Sets the node.


getNode

public org.w3c.dom.Node getNode()
Description copied from interface: ValidationEventLocator

Returns a DOM node related to the validation event. For example, this might be an element node with a missing attribute. It might as well be an attribute node with an invalid value.

Specified by:
getNode in interface ValidationEventLocator
Returns:
Invalid node, if available, or null.