public class BasicEntityProvider extends Object
| Constructor and Description |
|---|
BasicEntityProvider() |
| Modifier and Type | Method and Description |
|---|---|
byte[] |
readBinary(InputStream content)
Reads binary data from an input stream.
|
Object |
readPropertyValue(EdmProperty edmProperty,
InputStream content,
Class<?> typeMapping)
Reads an unformatted value of an EDM property as binary or as content type
text/plain. |
String |
readText(InputStream content)
Reads text from an input stream.
|
ODataResponse |
writeBinary(String mimeType,
byte[] data)
Write binary content with content type header set to given
mime type parameter. |
ODataResponse |
writeMetadata(DataServices serviceMetadata,
Map<String,String> predefinedNamespaces)
Writes the metadata in XML format.
|
ODataResponse |
writeMetadata(List<Schema> schemas,
Map<String,String> predefinedNamespaces)
Writes the metadata in XML format.
|
ODataResponse |
writePropertyValue(EdmProperty edmProperty,
Object value)
Write property as binary or as content type
text/plain. |
ODataResponse |
writeText(String value)
Write text value as content type
text/plain with charset parameter set to . |
public byte[] readBinary(InputStream content) throws EntityProviderException
content - the content input streamEntityProviderExceptionpublic String readText(InputStream content) throws EntityProviderException
content - the content input streamInputStreamEntityProviderExceptionpublic Object readPropertyValue(EdmProperty edmProperty, InputStream content, Class<?> typeMapping) throws EntityProviderException
text/plain.edmProperty - the EDM propertycontent - the content input streamtypeMapping - EntityProviderExceptionpublic ODataResponse writePropertyValue(EdmProperty edmProperty, Object value) throws EntityProviderException
text/plain.edmProperty - the EDM propertyvalue - its valueODataResponse with written contentEntityProviderExceptionpublic ODataResponse writeText(String value) throws EntityProviderException
text/plain with charset parameter set to .value - the string that is written to ODataResponseODataResponse with written text contentEntityProviderExceptionpublic ODataResponse writeBinary(String mimeType, byte[] data) throws EntityProviderException
mime type parameter.mimeType - MIME type which is written and used as content type header informationdata - data is written to ODataResponseODataResponse with written binary contentEntityProviderExceptionpublic ODataResponse writeMetadata(List<Schema> schemas, Map<String,String> predefinedNamespaces) throws EntityProviderException
schemas - predefinedNamespaces - ODataResponse with written metadata contentEntityProviderExceptionpublic ODataResponse writeMetadata(DataServices serviceMetadata, Map<String,String> predefinedNamespaces) throws EntityProviderException
serviceMetadata - predefinedNamespaces - ODataResponse with written metadata contentEntityProviderExceptionCopyright © 2020. All rights reserved.