Package org.xmlresolver.sources
Class ResolverLSInput
- java.lang.Object
-
- org.xmlresolver.sources.ResolverLSInput
-
- All Implemented Interfaces:
org.w3c.dom.ls.LSInput
,ResolverResourceInfo
public class ResolverLSInput extends java.lang.Object implements org.w3c.dom.ls.LSInput, ResolverResourceInfo
AnLSInput
with aresolvedURI
.
-
-
Constructor Summary
Constructors Constructor Description ResolverLSInput(ResourceResponse resp, java.lang.String publicId)
Construct theLSInput
while preserving the local URI.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getBaseURI()
The LSInput API...java.io.InputStream
getByteStream()
The LSInput API...boolean
getCertifiedText()
The LSInput API...java.io.Reader
getCharacterStream()
The LSInput API...java.lang.String
getEncoding()
The LSInput API...java.lang.String
getHeader(java.lang.String headerName)
Get the value of a header field.java.util.Map<java.lang.String,java.util.List<java.lang.String>>
getHeaders()
Return the headers associated with this resource.java.lang.String
getPublicId()
The LSInput API...java.net.URI
getResolvedURI()
Returns the resolved URI associated with the request.ResourceResponse
getResponse()
Returns the underlying resolver response.int
getStatusCode()
Returns the status code associated with the request.java.lang.String
getStringData()
The LSInput API...java.lang.String
getSystemId()
The LSInput API...void
setBaseURI(java.lang.String string)
The LSInput API...void
setByteStream(java.io.InputStream inputStream)
The LSInput API...void
setCertifiedText(boolean b)
The LSInput API...void
setCharacterStream(java.io.Reader reader)
The LSInput API...void
setEncoding(java.lang.String string)
The LSInput API...void
setPublicId(java.lang.String string)
The LSInput API...void
setStringData(java.lang.String string)
The LSInput API...void
setSystemId(java.lang.String string)
The LSInput API...
-
-
-
Constructor Detail
-
ResolverLSInput
public ResolverLSInput(ResourceResponse resp, java.lang.String publicId)
Construct theLSInput
while preserving the local URI. If the resolved resource is available, we can get everything except the public identifier from that resolved resource.- Parameters:
resp
- The resource response.publicId
- The publicId.
-
-
Method Detail
-
getCharacterStream
public java.io.Reader getCharacterStream()
The LSInput API...- Specified by:
getCharacterStream
in interfaceorg.w3c.dom.ls.LSInput
-
setCharacterStream
public void setCharacterStream(java.io.Reader reader)
The LSInput API... This method always throws anUnsupportedOperationException
.- Specified by:
setCharacterStream
in interfaceorg.w3c.dom.ls.LSInput
-
getByteStream
public java.io.InputStream getByteStream()
The LSInput API...- Specified by:
getByteStream
in interfaceorg.w3c.dom.ls.LSInput
-
setByteStream
public void setByteStream(java.io.InputStream inputStream)
The LSInput API... This method always throws anUnsupportedOperationException
.- Specified by:
setByteStream
in interfaceorg.w3c.dom.ls.LSInput
-
getStringData
public java.lang.String getStringData()
The LSInput API...- Specified by:
getStringData
in interfaceorg.w3c.dom.ls.LSInput
-
setStringData
public void setStringData(java.lang.String string)
The LSInput API... This method always throws anUnsupportedOperationException
.- Specified by:
setStringData
in interfaceorg.w3c.dom.ls.LSInput
-
getSystemId
public java.lang.String getSystemId()
The LSInput API...- Specified by:
getSystemId
in interfaceorg.w3c.dom.ls.LSInput
-
setSystemId
public void setSystemId(java.lang.String string)
The LSInput API... This method always throws anUnsupportedOperationException
.- Specified by:
setSystemId
in interfaceorg.w3c.dom.ls.LSInput
-
getPublicId
public java.lang.String getPublicId()
The LSInput API...- Specified by:
getPublicId
in interfaceorg.w3c.dom.ls.LSInput
-
setPublicId
public void setPublicId(java.lang.String string)
The LSInput API... This method always throws anUnsupportedOperationException
.- Specified by:
setPublicId
in interfaceorg.w3c.dom.ls.LSInput
-
getBaseURI
public java.lang.String getBaseURI()
The LSInput API...- Specified by:
getBaseURI
in interfaceorg.w3c.dom.ls.LSInput
-
setBaseURI
public void setBaseURI(java.lang.String string)
The LSInput API... This method always throws anUnsupportedOperationException
.- Specified by:
setBaseURI
in interfaceorg.w3c.dom.ls.LSInput
-
getEncoding
public java.lang.String getEncoding()
The LSInput API...- Specified by:
getEncoding
in interfaceorg.w3c.dom.ls.LSInput
-
setEncoding
public void setEncoding(java.lang.String string)
The LSInput API... This method always throws anUnsupportedOperationException
.- Specified by:
setEncoding
in interfaceorg.w3c.dom.ls.LSInput
-
getCertifiedText
public boolean getCertifiedText()
The LSInput API...- Specified by:
getCertifiedText
in interfaceorg.w3c.dom.ls.LSInput
-
setCertifiedText
public void setCertifiedText(boolean b)
The LSInput API... This method always throws anUnsupportedOperationException
.- Specified by:
setCertifiedText
in interfaceorg.w3c.dom.ls.LSInput
-
getResponse
public ResourceResponse getResponse()
Description copied from interface:ResolverResourceInfo
Returns the underlying resolver response.- Specified by:
getResponse
in interfaceResolverResourceInfo
- Returns:
- The response.
-
getResolvedURI
public java.net.URI getResolvedURI()
Description copied from interface:ResolverResourceInfo
Returns the resolved URI associated with the request.- Specified by:
getResolvedURI
in interfaceResolverResourceInfo
- Returns:
- the resolved URI.
-
getStatusCode
public int getStatusCode()
Description copied from interface:ResolverResourceInfo
Returns the status code associated with the request.If the response included a status code, that value will be returned. For protocols that don't have a status code (such as file:), 200 is returned for convenience.
- Specified by:
getStatusCode
in interfaceResolverResourceInfo
- Returns:
- the status code
-
getHeaders
public java.util.Map<java.lang.String,java.util.List<java.lang.String>> getHeaders()
Description copied from interface:ResolverResourceInfo
Return the headers associated with this resource.Returns the headers, if any, associated with this resource. For example, an HTTP resource might include the headers returned by the server.
- Specified by:
getHeaders
in interfaceResolverResourceInfo
- Returns:
- the headers
-
getHeader
public java.lang.String getHeader(java.lang.String headerName)
Description copied from interface:ResolverResourceInfo
Get the value of a header field.Returns the first value of a header witht he specified name. This is a convenience method because header names have to be compared without case sensitivity. If the header has more than one value, only the first is returned.
- Specified by:
getHeader
in interfaceResolverResourceInfo
- Parameters:
headerName
- the name of the header whose value should be returned.- Returns:
- the (first value) of the named header.
-
-