Package net.sf.saxon.resource
Class FailedResource
- java.lang.Object
-
- net.sf.saxon.resource.FailedResource
-
-
Constructor Summary
Constructors Constructor Description FailedResource(java.lang.String uri, XPathException error)
Create a FailedResource
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getContentType()
Get the media type (MIME type) of the resource if knownXPathException
getError()
Get the underlying errorItem
getItem(XPathContext context)
Get an XDM Item holding the contents of this resource.java.lang.String
getResourceURI()
Get a URI that identifies this resource
-
-
-
Constructor Detail
-
FailedResource
public FailedResource(java.lang.String uri, XPathException error)
Create a FailedResource- Parameters:
uri
- the URI of the resourceerror
- the error that occurred when attempting to process the resource
-
-
Method Detail
-
getContentType
public java.lang.String getContentType()
Get the media type (MIME type) of the resource if known- Specified by:
getContentType
in interfaceResource
- Returns:
- always null for this kind of resource
-
getResourceURI
public java.lang.String getResourceURI()
Get a URI that identifies this resource- Specified by:
getResourceURI
in interfaceResource
- Returns:
- a URI identifying this resource
-
getItem
public Item getItem(XPathContext context) throws XPathException
Get an XDM Item holding the contents of this resource. This method always throws the error associated with the resource.- Specified by:
getItem
in interfaceResource
- Parameters:
context
- the XPath evaluation context- Returns:
- an item holding the contents of the resource. This version of the method never returns an item; it always throws an error
- Throws:
XPathException
- if a failure occurs materializing the resource
-
getError
public XPathException getError()
Get the underlying error
-
-