Modifier and Type | Field and Description |
---|---|
static ResourceFactory |
FACTORY |
Constructor and Description |
---|
JSONResource(java.lang.String href,
AbstractResourceCollection.InputDetails details)
Create the resource
|
JSONResource(java.lang.String href,
java.io.InputStream in)
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(XPathContext context)
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(java.lang.String href, AbstractResourceCollection.InputDetails details)
href
- the URI of the resourcedetails
- the inputstream holding the JSON content plus details of encoding etcpublic JSONResource(java.lang.String href, java.io.InputStream in)
href
- the URI of the resourcein
- the inputstream holding the JSON contentpublic java.lang.String getResourceURI()
Resource
getResourceURI
in interface Resource
public Item getItem(XPathContext context) throws XPathException
Resource
getItem
in interface Resource
context
- the XPath evaluation contextXPathException
- if a failure occurs materializing the resourcepublic java.lang.String getContentType()
getContentType
in interface Resource
Copyright (c) 2004-2018 Saxonica Limited. All rights reserved.