|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.saxon.expr.ExpressionLocation
public class ExpressionLocation
Class to hold details of the location of an expression, of an error in a source file, etc.
Constructor Summary | |
---|---|
ExpressionLocation()
Create an ExpressionLocation |
|
ExpressionLocation(LocationProvider provider,
long locationId)
Create an ExpressionLocation, taking the data from a supplied locationId along with a LocationProvider to interpret its meaning |
|
ExpressionLocation(SourceLocator loc)
Create an ExpressionLocation, taking the data from a supplied JAXP SourceLocator |
|
ExpressionLocation(String systemId,
int lineNumber,
int columnNumber)
Create an ExpressionLocation corresponding to a given module, line number, and column number |
Method Summary | |
---|---|
int |
getColumnNumber()
Get the column number |
int |
getColumnNumber(long locationId)
Get the column number within the document, entity, or module containing a particular location |
int |
getLineNumber()
Get the line number |
int |
getLineNumber(long locationId)
Get the line number corresponding to a given location Id |
String |
getPublicId()
Get the Public ID |
static SaxonLocator |
getSourceLocator(long locationId,
LocationProvider locationProvider)
Construct an object holding location information for a validation error message |
String |
getSystemId()
Get the system ID (the module URI) |
String |
getSystemId(long locationId)
Get the system Id corresponding to a given location Id |
static ExpressionLocation |
makeFromSax(Locator loc)
Create an ExpressionLocation, taking the data from a supplied SAX Locator |
void |
setColumnNumber(int columnNumber)
Set the column number |
void |
setLineNumber(int lineNumber)
Set the line number |
void |
setSystemId(String systemId)
Set the systemId (the module URI) |
static String |
truncateURI(String uri)
Truncate a URI to its last component |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ExpressionLocation()
public ExpressionLocation(SourceLocator loc)
loc
- the JAXP SourceLocatorpublic ExpressionLocation(LocationProvider provider, long locationId)
provider
- the LocationProviderlocationId
- the locationIdpublic ExpressionLocation(String systemId, int lineNumber, int columnNumber)
systemId
- the module URIlineNumber
- the line numbercolumnNumber
- the column numberMethod Detail |
---|
public static ExpressionLocation makeFromSax(Locator loc)
loc
- the SAX Locatorpublic String getSystemId()
getSystemId
in interface SourceLocator
getSystemId
in interface Locator
public String getPublicId()
getPublicId
in interface SourceLocator
getPublicId
in interface Locator
public int getLineNumber()
getLineNumber
in interface SourceLocator
getLineNumber
in interface Locator
public int getColumnNumber()
getColumnNumber
in interface SourceLocator
getColumnNumber
in interface Locator
public void setSystemId(String systemId)
systemId
- the systemIdpublic void setLineNumber(int lineNumber)
lineNumber
- the line number within the modulepublic void setColumnNumber(int columnNumber)
columnNumber
- the column numberpublic String getSystemId(long locationId)
getSystemId
in interface LocationProvider
locationId
- the location Id
public int getLineNumber(long locationId)
getLineNumber
in interface LocationProvider
locationId
- the location Id
public int getColumnNumber(long locationId)
LocationProvider
getColumnNumber
in interface LocationProvider
locationId
- identifier of the location in question (as passed down the Receiver pipeline)
public static SaxonLocator getSourceLocator(long locationId, LocationProvider locationProvider)
locationId
- The locationId as supplied with an event such as startElement or attributelocationProvider
- The object that understands how to interpret the locationId
public static String truncateURI(String uri)
uri
- the URI to be truncated
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |