Package javax.json.stream

Examples of javax.json.stream.JsonGenerator.writeEnd()


      linkStarted = false;
      linkStarted = writeAtomLink(eventWriter, "self", nextEntry.getLinkSelf(), linkStarted);
      linkStarted = writeAtomLink(eventWriter, "alternate", nextEntry.getLinkAlternate(), linkStarted);
      linkStarted = writeAtomLink(eventWriter, "search", nextEntry.getLinkSearch(), linkStarted);
      if (linkStarted) {
        eventWriter.writeEnd();
      }

      writeOptionalTagWithTextNode(eventWriter, "updated", nextEntry.getUpdated());
      writeOptionalTagWithTextNode(eventWriter, "published", nextEntry.getPublished());
View Full Code Here


      if (resource != null && !resource.isEmpty() && !deleted) {
        RuntimeResourceDefinition resDef = myContext.getResourceDefinition(resource);
        encodeResourceToJsonStreamWriter(resDef, resource, eventWriter, "content", false);
      }

      eventWriter.writeEnd(); // entry object
    }
    eventWriter.writeEnd(); // entry array

    eventWriter.writeEnd();
    eventWriter.flush();
View Full Code Here

        encodeResourceToJsonStreamWriter(resDef, resource, eventWriter, "content", false);
      }

      eventWriter.writeEnd(); // entry object
    }
    eventWriter.writeEnd(); // entry array

    eventWriter.writeEnd();
    eventWriter.flush();
  }
View Full Code Here

      eventWriter.writeEnd(); // entry object
    }
    eventWriter.writeEnd(); // entry array

    eventWriter.writeEnd();
    eventWriter.flush();
  }

  private void writeCategories(JsonGenerator eventWriter, TagList categories) {
    if (categories != null && categories.size() > 0) {
View Full Code Here

      }
      if (isNotBlank(next.getScheme())) {
        eventWriter.write(Tag.ATTR_SCHEME, next.getScheme());
      }

      eventWriter.writeEnd();
    }
    eventWriter.writeEnd();

    eventWriter.writeEnd();
    eventWriter.flush();
View Full Code Here

        eventWriter.write(Tag.ATTR_SCHEME, next.getScheme());
      }

      eventWriter.writeEnd();
    }
    eventWriter.writeEnd();

    eventWriter.writeEnd();
    eventWriter.flush();
  }
View Full Code Here

      eventWriter.writeEnd();
    }
    eventWriter.writeEnd();

    eventWriter.writeEnd();
    eventWriter.flush();
  }

  /**
   * This is useful only for the two cases where extensions are encoded as direct children (e.g. not in some object called _name): resource extensions, and extension extensions
View Full Code Here

    writeAtomLink(eventWriter, "first", theBundle.getLinkFirst());
    writeAtomLink(eventWriter, "previous", theBundle.getLinkPrevious());
    writeAtomLink(eventWriter, "next", theBundle.getLinkNext());
    writeAtomLink(eventWriter, "last", theBundle.getLinkLast());
    writeAtomLink(eventWriter, "fhir-base", theBundle.getLinkBase());
    eventWriter.writeEnd();

    writeOptionalTagWithTextNode(eventWriter, "totalResults", theBundle.getTotalResults());

    writeAuthor(theBundle, eventWriter);
View Full Code Here

      writeTagWithTextNode(eventWriter, "title", nextEntry.getTitle());
      writeTagWithTextNode(eventWriter, "id", nextEntry.getId());

      eventWriter.writeStartArray("link");
      writeAtomLink(eventWriter, "self", nextEntry.getLinkSelf());
      eventWriter.writeEnd();

      writeOptionalTagWithTextNode(eventWriter, "updated", nextEntry.getUpdated());
      writeOptionalTagWithTextNode(eventWriter, "published", nextEntry.getPublished());

      if (nextEntry.getCategories() != null) {
View Full Code Here

        for (Tag next : nextEntry.getCategories()) {
          eventWriter.writeStartObject();
          eventWriter.write("term", defaultString(next.getTerm()));
          eventWriter.write("label", defaultString(next.getLabel()));
          eventWriter.write("scheme", defaultString(next.getScheme()));
          eventWriter.writeEnd();
        }
        eventWriter.writeEnd();
      }

      writeAuthor(nextEntry, eventWriter);
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.