Modifier and Type | Field and Description |
---|---|
static ResourceFactory |
FACTORY |
Constructor and Description |
---|
JSONResource(XPathContext context,
AbstractResourceCollection.InputDetails details)
Create the resource
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getContentType()
Get the media type (MIME type) of the resource if known
|
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 JSONResource(XPathContext context, AbstractResourceCollection.InputDetails details)
context
- XPath dynamic contextdetails
- the input stream holding the JSON content plus details of encoding etcpublic java.lang.String getResourceURI()
Resource
getResourceURI
in interface Resource
public Item getItem() throws XPathException
Resource
getItem
in interface Resource
XPathException
- if a failure occurs materializing the resource, and errors
are to be treated as fatalpublic java.lang.String getContentType()
getContentType
in interface Resource
Copyright (c) 2004-2022 Saxonica Limited. All rights reserved.