org.odata4j.format.json
Class JsonCollectionFormatParser

java.lang.Object
  extended by org.odata4j.format.json.JsonFormatParser
      extended by org.odata4j.format.json.JsonCollectionFormatParser
All Implemented Interfaces:
FormatParser<OCollection<? extends OObject>>

public class JsonCollectionFormatParser
extends JsonFormatParser
implements FormatParser<OCollection<? extends OObject>>

Parses an OCollection in JSON format.

Collection types handled so far:
 - OComplexObject

 TODO:
 - all other types
 


Field Summary
 
Fields inherited from class org.odata4j.format.json.JsonFormatParser
COUNT_PROPERTY, DATA_PROPERTY, DEFERRED_PROPERTY, entityKey, entitySetName, ETAG_PROPERTY, isResponse, metadata, METADATA_PROPERTY, NEXT_PROPERTY, parseType, RESULTS_PROPERTY, TYPE_PROPERTY, URI_PROPERTY, version
 
Constructor Summary
JsonCollectionFormatParser(EdmCollectionType collectionType, EdmDataServices md)
           
JsonCollectionFormatParser(Settings s)
           
 
Method Summary
protected  FormatParser<? extends OObject> createItemParser(EdmType edmType)
           
protected  OCollection.Builder<OObject> newCollectionBuilder()
           
 OCollection<? extends OObject> parse(Reader reader)
           
protected  OCollection<? extends OObject> parseCollection(JsonStreamReaderFactory.JsonStreamReader jsr)
           
protected  void parseCollectionOfSimple(OCollection.Builder<OObject> builder, JsonStreamReaderFactory.JsonStreamReader jsr)
           
 
Methods inherited from class org.odata4j.format.json.JsonFormatParser
addProperty, ensureEndArray, ensureEndObject, ensureEndProperty, ensureNext, ensureStartArray, ensureStartObject, ensureStartProperty, ensureStartProperty, getValue, parseEntry, parseEntry, parseFeed, parseMetadata, resolveEntityType
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JsonCollectionFormatParser

public JsonCollectionFormatParser(EdmCollectionType collectionType,
                                  EdmDataServices md)

JsonCollectionFormatParser

public JsonCollectionFormatParser(Settings s)
Method Detail

createItemParser

protected FormatParser<? extends OObject> createItemParser(EdmType edmType)

newCollectionBuilder

protected OCollection.Builder<OObject> newCollectionBuilder()

parse

public OCollection<? extends OObject> parse(Reader reader)
Specified by:
parse in interface FormatParser<OCollection<? extends OObject>>

parseCollection

protected OCollection<? extends OObject> parseCollection(JsonStreamReaderFactory.JsonStreamReader jsr)

parseCollectionOfSimple

protected void parseCollectionOfSimple(OCollection.Builder<OObject> builder,
                                       JsonStreamReaderFactory.JsonStreamReader jsr)


http://odata4j.org