Package net.sf.saxon.resource
Class UnknownResource
- java.lang.Object
- 
- net.sf.saxon.resource.UnknownResource
 
- 
- All Implemented Interfaces:
- Resource
 
 public class UnknownResource extends java.lang.Object implements Resource The class is an implementation of the generic Resource object (typically an item in a collection) representing a resource whose type is not yet known - typically because it uses an unregistered file extension. We attempt to establish a type for the resource when it is opened, by "sniffing" the content.
- 
- 
Field SummaryFields Modifier and Type Field Description static ResourceFactoryFACTORY
 - 
Constructor SummaryConstructors Constructor Description UnknownResource(XPathContext context, AbstractResourceCollection.InputDetails details)
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetContentType()Get the media type (MIME type) of the resource if knownItemgetItem()Get an item representing the resource: in this case a document node for the XML document.java.lang.StringgetResourceURI()Get a URI that identifies this resource
 
- 
- 
- 
Field Detail- 
FACTORYpublic static final ResourceFactory FACTORY 
 
- 
 - 
Constructor Detail- 
UnknownResourcepublic UnknownResource(XPathContext context, AbstractResourceCollection.InputDetails details) 
 
- 
 - 
Method Detail- 
getResourceURIpublic java.lang.String getResourceURI() Description copied from interface:ResourceGet a URI that identifies this resource- Specified by:
- getResourceURIin interface- Resource
- Returns:
- a URI identifying this resource
 
 - 
getItempublic Item getItem() throws XPathException Get an item representing the resource: in this case a document node for the XML document.- Specified by:
- getItemin interface- Resource
- Returns:
- the document; or null if there is an error and the error is to be ignored
- Throws:
- XPathException- if (for example) XML parsing fails
 
 - 
getContentTypepublic java.lang.String getContentType() Get the media type (MIME type) of the resource if known- Specified by:
- getContentTypein interface- Resource
- Returns:
- the string "application/xml"
 
 
- 
 
-