public class UnparsedTextResource extends java.lang.Object implements Resource
| Modifier and Type | Field and Description |
|---|---|
static ResourceFactory |
FACTORY |
| Constructor and Description |
|---|
UnparsedTextResource(AbstractResourceCollection.InputDetails details)
Create an UnparsedTextResource
|
UnparsedTextResource(java.lang.String uri,
java.lang.String content) |
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getContent() |
java.lang.String |
getContentType()
Get the media type (MIME type) of the resource if known
|
java.lang.String |
getEncoding() |
Item |
getItem()
Get an XDM Item holding the contents of this resource.
|
java.lang.String |
getResourceURI()
Get a URI that identifies this resource
|
public static final ResourceFactory FACTORY
public UnparsedTextResource(AbstractResourceCollection.InputDetails details) throws XPathException
details - information about the inputXPathException - for an unsupported encodingpublic UnparsedTextResource(java.lang.String uri,
java.lang.String content)
public java.lang.String getResourceURI()
ResourcegetResourceURI in interface Resourcepublic java.lang.String getEncoding()
public java.lang.String getContent()
throws XPathException
XPathExceptionpublic Item getItem() throws XPathException
ResourcegetItem in interface ResourceXPathException - if a failure occurs materializing the resource, and errors
are to be treated as fatalpublic java.lang.String getContentType()
getContentType in interface ResourceCopyright (c) 2004-2022 Saxonica Limited. All rights reserved.