Package org.apache.olingo.odata2.core.ep.util

Examples of org.apache.olingo.odata2.core.ep.util.JsonStreamWriter.separator()


    BufferedWriter writer = new BufferedWriter(new OutputStreamWriter(csb.getOutputStream(), "UTF-8"));
    JsonStreamWriter jsonStreamWriter = new JsonStreamWriter(writer);
    jsonStreamWriter.beginObject()
        .name(parts.get(0).getName().toLowerCase(Locale.ROOT));
    parts.get(0).appendJson(jsonStreamWriter);
    jsonStreamWriter.separator()
        .name(parts.get(1).getName().toLowerCase(Locale.ROOT));
    parts.get(1).appendJson(jsonStreamWriter);
    jsonStreamWriter.separator()
        .name("server")
        .beginObject()
View Full Code Here


        .name(parts.get(0).getName().toLowerCase(Locale.ROOT));
    parts.get(0).appendJson(jsonStreamWriter);
    jsonStreamWriter.separator()
        .name(parts.get(1).getName().toLowerCase(Locale.ROOT));
    parts.get(1).appendJson(jsonStreamWriter);
    jsonStreamWriter.separator()
        .name("server")
        .beginObject()
        .namedStringValueRaw("version", ODataDebugResponseWrapper.class.getPackage().getImplementationVersion());
    for (final DebugInfo part : parts.subList(2, parts.size())) {
      jsonStreamWriter.separator()
View Full Code Here

    jsonStreamWriter.separator()
        .name("server")
        .beginObject()
        .namedStringValueRaw("version", ODataDebugResponseWrapper.class.getPackage().getImplementationVersion());
    for (final DebugInfo part : parts.subList(2, parts.size())) {
      jsonStreamWriter.separator()
          .name(part.getName().toLowerCase(Locale.ROOT));
      part.appendJson(jsonStreamWriter);
    }
    jsonStreamWriter.endObject()
        .endObject();
View Full Code Here

      boolean first = true;
      for (EdmEntitySetInfo info : serviceMetadata.getEntitySetInfos()) {
        if (first) {
          first = false;
        } else {
          jsonStreamWriter.separator();
        }
        jsonStreamWriter.stringValue(info.getEntitySetUri().toASCIIString());
      }

      jsonStreamWriter.endArray()
View Full Code Here

      boolean first = true;
      for (final Map<String, Object> entryData : data) {
        if (first) {
          first = false;
        } else {
          jsonStreamWriter.separator();
        }
        JsonLinkEntityProducer.appendUri(jsonStreamWriter,
            (serviceRoot == null ? "" : serviceRoot)
                + AtomEntryEntityProducer.createSelfLink(entityInfo, entryData, null));
      }
View Full Code Here

      final List<Map<String, Object>> deletedEntries)
      throws EntityProviderException {
    JsonStreamWriter jsonStreamWriter = new JsonStreamWriter(writer);
    try {
      if (deletedEntries.size() > 0) {
        jsonStreamWriter.separator();
        int counter = 0;
        for (Map<String, Object> deletedEntry : deletedEntries) {
          jsonStreamWriter.beginObject();

          String odataContextValue = JsonUtils.createODataContextValueForTombstone(entityInfo.getEntitySetName());
View Full Code Here

          String odataContextValue = JsonUtils.createODataContextValueForTombstone(entityInfo.getEntitySetName());
          String selfLink = AtomEntryEntityProducer.createSelfLink(entityInfo, deletedEntry, null);
          String idValue = properties.getServiceRoot().toASCIIString() + selfLink;

          jsonStreamWriter.namedStringValue(FormatJson.ODATA_CONTEXT, odataContextValue);
          jsonStreamWriter.separator();
          jsonStreamWriter.namedStringValue(FormatJson.ID, idValue);
          jsonStreamWriter.endObject();

          if (counter < deletedEntries.size() - 1) {
            jsonStreamWriter.separator();
View Full Code Here

          jsonStreamWriter.separator();
          jsonStreamWriter.namedStringValue(FormatJson.ID, idValue);
          jsonStreamWriter.endObject();

          if (counter < deletedEntries.size() - 1) {
            jsonStreamWriter.separator();
          }

          counter++;
        }
      }
View Full Code Here

                    + (locale.getCountry() == null || locale.getCountry().isEmpty() ? "" : ("-" + locale.getCountry())))
        .separator()
        .namedStringValue(FormatJson.VALUE, message)
        .endObject();
    if (innerError != null) {
      jsonStreamWriter.separator()
          .namedStringValue(FormatJson.INNER_ERROR, innerError);
    }
    jsonStreamWriter.endObject()
        .endObject();
  }
View Full Code Here

      boolean first = true;
      for (final Object item : data) {
        if (first) {
          first = false;
        } else {
          jsonStreamWriter.separator();
        }
        JsonPropertyEntityProducer.appendPropertyValue(jsonStreamWriter, propertyInfo, item);
      }
      jsonStreamWriter.endArray();
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.