Package javax.json.stream

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


        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
View Full Code Here

    linkStarted = writeAtomLink(eventWriter, "previous", theBundle.getLinkPrevious(), linkStarted);
    linkStarted = writeAtomLink(eventWriter, "next", theBundle.getLinkNext(), linkStarted);
    linkStarted = writeAtomLink(eventWriter, "last", theBundle.getLinkLast(), linkStarted);
    linkStarted = writeAtomLink(eventWriter, "fhir-base", theBundle.getLinkBase(), linkStarted);
    if (linkStarted) {
      eventWriter.writeEnd();
    }

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

    writeAuthor(theBundle, eventWriter);
View Full Code Here

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

      writeOptionalTagWithTextNode(eventWriter, "updated", nextEntry.getUpdated());
      writeOptionalTagWithTextNode(eventWriter, "published", nextEntry.getPublished());
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

          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);

      IResource resource = nextEntry.getResource();
View Full Code Here

      if (resource != null && !resource.isEmpty()) {
        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 encodeChildElementToStreamWriter(RuntimeResourceDefinition theResDef, IResource theResource, JsonGenerator theWriter, IElement theValue, BaseRuntimeElementDefinition<?> theChildDef, String theChildName) throws IOException {
View Full Code Here

    linkStarted = writeAtomLink(eventWriter, "previous", theBundle.getLinkPrevious(), linkStarted);
    linkStarted = writeAtomLink(eventWriter, "next", theBundle.getLinkNext(), linkStarted);
    linkStarted = writeAtomLink(eventWriter, "last", theBundle.getLinkLast(), linkStarted);
    linkStarted = writeAtomLink(eventWriter, "fhir-base", theBundle.getLinkBase(), linkStarted);
    if (linkStarted) {
      eventWriter.writeEnd();
    }
   
    writeCategories(eventWriter, theBundle.getCategories());

    writeOptionalTagWithTextNode(eventWriter, "totalResults", theBundle.getTotalResults());
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.