- All Implemented Interfaces:
- ValidationEventLocator
Jakarta XML Binding providers are allowed to use whatever class that implements the ValidationEventLocator interface. This class is just provided for a convenience.
- Author:
- Kohsuke Kawaguchi, Sun Microsystems, Inc.
 
- See Also:
- 
Constructor SummaryConstructorsConstructorDescriptionCreates an object with all fields unavailable.ValidationEventLocatorImpl(Object _object) Constructs an object that points to a Jakarta XML Binding content object.ValidationEventLocatorImpl(Node _node) Constructs an object that points to a DOM Node.Constructs an object from an org.xml.sax.Locator.Constructs an object from the location information of a SAXParseException.
- 
Method SummaryModifier and TypeMethodDescriptionintReturn the column number if availableintReturn the line number if availablegetNode()Return a reference to the DOM Node if availableReturn a reference to the object in the Java content tree if availableintReturn the byte offset if availablegetURL()Return the name of the XML source as a URL if availablevoidsetColumnNumber(int _columnNumber) Set the columnNumber field on this event locator.voidsetLineNumber(int _lineNumber) Set the lineNumber field on this event locator.voidSet the Node field on this event locator.voidSet the Object field on this event locator.voidsetOffset(int _offset) Set the offset field on this event locator.voidSet the URL field on this event locator.toString()Returns a string representation of this object in a format helpful to debugging.
- 
Constructor Details- 
ValidationEventLocatorImplpublic ValidationEventLocatorImpl()Creates an object with all fields unavailable.
- 
ValidationEventLocatorImplConstructs an object from an org.xml.sax.Locator.The object's ColumnNumber, LineNumber, and URL become available from the values returned by the locator's getColumnNumber(), getLineNumber(), and getSystemId() methods respectively. Node, Object, and Offset are not available. - Parameters:
- loc- the SAX Locator object that will be used to populate this event locator.
- Throws:
- IllegalArgumentException- if the Locator is null
 
- 
ValidationEventLocatorImplConstructs an object from the location information of a SAXParseException.The object's ColumnNumber, LineNumber, and URL become available from the values returned by the locator's getColumnNumber(), getLineNumber(), and getSystemId() methods respectively. Node, Object, and Offset are not available. - Parameters:
- e- the SAXParseException object that will be used to populate this event locator.
- Throws:
- IllegalArgumentException- if the SAXParseException is null
 
- 
ValidationEventLocatorImplConstructs an object that points to a DOM Node.The object's Node becomes available. ColumnNumber, LineNumber, Object, Offset, and URL are not available. - Parameters:
- _node- the DOM Node object that will be used to populate this event locator.
- Throws:
- IllegalArgumentException- if the Node is null
 
- 
ValidationEventLocatorImplConstructs an object that points to a Jakarta XML Binding content object.The object's Object becomes available. ColumnNumber, LineNumber, Node, Offset, and URL are not available. - Parameters:
- _object- the Object that will be used to populate this event locator.
- Throws:
- IllegalArgumentException- if the Object is null
 
 
- 
- 
Method Details- 
getURLDescription copied from interface:ValidationEventLocatorReturn the name of the XML source as a URL if available- Specified by:
- getURLin interface- ValidationEventLocator
- Returns:
- the name of the XML source as a URL or null if unavailable
- See Also:
 
- 
setURLSet the URL field on this event locator. Null values are allowed.- Parameters:
- _url- the url
 
- 
getOffsetpublic int getOffset()Description copied from interface:ValidationEventLocatorReturn the byte offset if available- Specified by:
- getOffsetin interface- ValidationEventLocator
- Returns:
- the byte offset into the input source or -1 if unavailable
- See Also:
 
- 
setOffsetpublic void setOffset(int _offset) Set the offset field on this event locator.- Parameters:
- _offset- the offset
 
- 
getLineNumberpublic int getLineNumber()Description copied from interface:ValidationEventLocatorReturn the line number if available- Specified by:
- getLineNumberin interface- ValidationEventLocator
- Returns:
- the line number or -1 if unavailable
- See Also:
 
- 
setLineNumberpublic void setLineNumber(int _lineNumber) Set the lineNumber field on this event locator.- Parameters:
- _lineNumber- the line number
 
- 
getColumnNumberpublic int getColumnNumber()Description copied from interface:ValidationEventLocatorReturn the column number if available- Specified by:
- getColumnNumberin interface- ValidationEventLocator
- Returns:
- the column number or -1 if unavailable
- See Also:
 
- 
setColumnNumberpublic void setColumnNumber(int _columnNumber) Set the columnNumber field on this event locator.- Parameters:
- _columnNumber- the column number
 
- 
getObjectDescription copied from interface:ValidationEventLocatorReturn a reference to the object in the Java content tree if available- Specified by:
- getObjectin interface- ValidationEventLocator
- Returns:
- a reference to the object in the Java content tree or null if unavailable
- See Also:
 
- 
setObjectSet the Object field on this event locator. Null values are allowed.- Parameters:
- _object- the java content object
 
- 
getNodeDescription copied from interface:ValidationEventLocatorReturn a reference to the DOM Node if available- Specified by:
- getNodein interface- ValidationEventLocator
- Returns:
- a reference to the DOM Node or null if unavailable
- See Also:
 
- 
setNodeSet the Node field on this event locator. Null values are allowed.- Parameters:
- _node- the Node
 
- 
toStringReturns a string representation of this object in a format helpful to debugging.
 
-