Class ODataReaderImpl
java.lang.Object
org.apache.olingo.client.core.serialization.ODataReaderImpl
- All Implemented Interfaces:
ODataReader
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final ODataClientprotected static final org.slf4j.LoggerLogger. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<T> ResWrap<T>read(InputStream src, String format, Class<T> reference) Parses a stream into the object type specified by the given reference.readEntity(InputStream input, ContentType contentType) Parses a stream taking care to de-serializes the first OData entity found.readEntitySet(InputStream input, ContentType contentType) De-Serializes a stream into an OData entity set.readError(InputStream inputStream, ContentType contentType) Parses a stream into an OData error.readMetadata(InputStream input) Parses a stream into metadata representation.readMetadata(InputStream input, List<InputStream> termDefinitions) Parses a stream into metadata representation.readMetadata(Map<String, CsdlSchema> xmlSchemas) Parses a stream into metadata representation, including referenced metadata documents.readMetadata(Map<String, CsdlSchema> xmlSchemas, List<CsdlSchema> termDefinitionSchema) Parses metadata document along with the document which includes term definitionsreadMetadata(XMLMetadata metadata, List<InputStream> termDefinitions) Fetches schema from metadata document and parses the document which includes term definitionsreadProperty(InputStream input, ContentType contentType) Parses a stream taking care to de-serialize the first OData entity property found.readServiceDocument(InputStream input, ContentType contentType) Parses an OData service document.
-
Field Details
-
LOG
protected static final org.slf4j.Logger LOGLogger. -
client
-
-
Constructor Details
-
ODataReaderImpl
-
-
Method Details
-
readMetadata
Description copied from interface:ODataReaderParses a stream into metadata representation.- Specified by:
readMetadatain interfaceODataReader- Parameters:
input- stream to de-serialize.- Returns:
- metadata representation.
-
readMetadata
Description copied from interface:ODataReaderParses a stream into metadata representation, including referenced metadata documents.- Specified by:
readMetadatain interfaceODataReader- Parameters:
xmlSchemas- XML representation of the requested metadata document + any other referenced (via <edmx:Reference/>) metadata document- Returns:
- metadata representation.
-
readServiceDocument
public ClientServiceDocument readServiceDocument(InputStream input, ContentType contentType) throws ODataDeserializerException Description copied from interface:ODataReaderParses an OData service document.- Specified by:
readServiceDocumentin interfaceODataReader- Parameters:
input- stream to de-serialize.contentType- de-serialize as XML or JSON- Returns:
- List of URIs.
- Throws:
ODataDeserializerException
-
readError
public ODataError readError(InputStream inputStream, ContentType contentType) throws ODataDeserializerException Description copied from interface:ODataReaderParses a stream into an OData error.- Specified by:
readErrorin interfaceODataReader- Parameters:
inputStream- stream to de-serialize.contentType- format- Returns:
- OData error.
- Throws:
ODataDeserializerException
-
read
public <T> ResWrap<T> read(InputStream src, String format, Class<T> reference) throws ODataDeserializerException Description copied from interface:ODataReaderParses a stream into the object type specified by the given reference.- Specified by:
readin interfaceODataReader- Type Parameters:
T- expected object type.- Parameters:
src- input stream.format- formatreference- reference.- Returns:
- read object.
- Throws:
ODataDeserializerException
-
readEntitySet
public ClientEntitySet readEntitySet(InputStream input, ContentType contentType) throws ODataDeserializerException Description copied from interface:ODataReaderDe-Serializes a stream into an OData entity set.- Specified by:
readEntitySetin interfaceODataReader- Parameters:
input- stream to de-serialize.contentType- de-serialize format- Returns:
- de-serialized entity set.
- Throws:
ODataDeserializerException
-
readEntity
public ClientEntity readEntity(InputStream input, ContentType contentType) throws ODataDeserializerException Description copied from interface:ODataReaderParses a stream taking care to de-serializes the first OData entity found.- Specified by:
readEntityin interfaceODataReader- Parameters:
input- stream to de-serialize.contentType- de-serialize format- Returns:
- entity de-serialized.
- Throws:
ODataDeserializerException
-
readProperty
public ClientProperty readProperty(InputStream input, ContentType contentType) throws ODataDeserializerException Description copied from interface:ODataReaderParses a stream taking care to de-serialize the first OData entity property found.- Specified by:
readPropertyin interfaceODataReader- Parameters:
input- stream to de-serialize.contentType- de-serialize as XML or JSON- Returns:
- OData entity property de-serialized.
- Throws:
ODataDeserializerException
-
readMetadata
Description copied from interface:ODataReaderParses a stream into metadata representation. Also parses a term definition stream into Term representation.- Specified by:
readMetadatain interfaceODataReader- Returns:
-
readMetadata
Description copied from interface:ODataReaderParses metadata document along with the document which includes term definitions- Specified by:
readMetadatain interfaceODataReader- Returns:
-
readMetadata
Description copied from interface:ODataReaderFetches schema from metadata document and parses the document which includes term definitions- Specified by:
readMetadatain interfaceODataReader- Returns:
-