Package net.sf.saxon.resource
Class MetadataResource
java.lang.Object
net.sf.saxon.resource.MetadataResource
- All Implemented Interfaces:
Resource
Represents information about a resource, as well as a pointer to the resource itself
-
Constructor Summary
ConstructorsConstructorDescriptionMetadataResource
(String resourceURI, Resource content, Map<String, GroundedValue> properties, XPathContext context) -
Method Summary
Modifier and TypeMethodDescriptionGet the media type (MIME type) of the resource if knowngetItem()
Get an XDM Item holding the contents of this resource.Get a URI that identifies this resource
-
Constructor Details
-
MetadataResource
public MetadataResource(String resourceURI, Resource content, Map<String, GroundedValue> properties, XPathContext context)
-
-
Method Details
-
getContentType
Description copied from interface:Resource
Get the media type (MIME type) of the resource if known- Specified by:
getContentType
in interfaceResource
- Returns:
- the media type if known; otherwise null
-
getResourceURI
Description copied from interface:Resource
Get a URI that identifies this resource- Specified by:
getResourceURI
in interfaceResource
- Returns:
- a URI identifying this resource
-
getItem
Description copied from interface:Resource
Get an XDM Item holding the contents of this resource.- Specified by:
getItem
in interfaceResource
- Returns:
- an item holding the contents of the resource. The type of item will reflect the type of the resource: a document node for XML resources, a string for text resources, a map or array for JSON resources, a base64Binary value for binary resource. May also return null if the resource cannot be materialized and this is not to be treated as an error.
-