Class JsonLinkConsumer
java.lang.Object
org.apache.olingo.odata2.core.ep.consumer.JsonLinkConsumer
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionreadLink(com.google.gson.stream.JsonReader reader, EdmEntitySet entitySet) Reads single link with format{"d":{"uri":"http://somelink"}}or{"uri":"http://somelink"}.readLinks(com.google.gson.stream.JsonReader reader, EdmEntitySet entitySet) Reads a collection of links, optionally wrapped in a "d" object, and optionally wrapped in an "results" object, where an additional "__count" object could appear on the same level as the "results".
-
Constructor Details
-
JsonLinkConsumer
public JsonLinkConsumer()
-
-
Method Details
-
readLink
public String readLink(com.google.gson.stream.JsonReader reader, EdmEntitySet entitySet) throws EntityProviderException Reads single link with format{"d":{"uri":"http://somelink"}}or{"uri":"http://somelink"}.- Parameters:
reader-entitySet-- Returns:
- link as string object
- Throws:
EntityProviderException
-
readLinks
public List<String> readLinks(com.google.gson.stream.JsonReader reader, EdmEntitySet entitySet) throws EntityProviderException Reads a collection of links, optionally wrapped in a "d" object, and optionally wrapped in an "results" object, where an additional "__count" object could appear on the same level as the "results".- Parameters:
reader-entitySet-- Returns:
- links as List of Strings
- Throws:
EntityProviderException
-