public abstract class JsonParserBase extends ParserBase implements IParser
IParser.OutputStyle| Modifier and Type | Field and Description |
|---|---|
protected JsonCreator |
json |
allowComments, allowUnknownContent, handleComments, idMap, style, xhtmlMessageFHIR_NS, ID_REGEX, NS_XSI, XHTML_NS| Constructor and Description |
|---|
JsonParserBase() |
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
anyHasExtras(List<? extends Element> list) |
protected void |
close() |
protected void |
closeArray() |
protected void |
closeObject() |
void |
compose(JsonCreator writer,
Resource resource)
Compose a resource using a pre-existing JsonWriter
|
void |
compose(OutputStream stream,
Resource resource)
Compose a resource to a stream, possibly using pretty presentation for a human reader (used in the spec, for example, but not normally in production)
|
void |
compose(OutputStream stream,
Type type,
String rootName)
Compose a type to a stream, possibly using pretty presentation for a human reader (used in the spec, for example, but not normally in production)
Not supported by all implementations.
|
protected void |
composeDomainResource(String name,
DomainResource e) |
protected abstract void |
composeResource(Resource resource) |
protected void |
composeStringCore(String name,
org.hl7.fhir.instance.model.api.IIdType value,
boolean inArray) |
protected void |
composeStringExtras(String name,
org.hl7.fhir.instance.model.api.IIdType value,
boolean inArray) |
protected abstract void |
composeType(String prefix,
Type type) |
protected abstract void |
composeTypeInner(Type type) |
protected void |
composeXhtml(String name,
org.hl7.fhir.utilities.xhtml.XhtmlNode html) |
protected com.google.gson.JsonObject |
getJObject(com.google.gson.JsonObject parent,
String name) |
ParserType |
getType()
check what kind of parser this is
|
protected abstract boolean |
hasTypeName(com.google.gson.JsonObject json,
String prefix) |
protected boolean |
makeComments(Element element) |
protected void |
open(String name) |
protected void |
openArray(String name) |
protected void |
openObject(String name) |
Resource |
parse(InputStream input)
parse content that is known to be a resource
|
Resource |
parse(com.google.gson.JsonObject json)
parse xml that is known to be a resource, and that has already been read into a JSON object
|
Type |
parseAnyType(InputStream input,
String type) |
protected abstract Type |
parseAnyType(com.google.gson.JsonObject json,
String type) |
protected DomainResource |
parseDomainResource(com.google.gson.JsonObject json) |
protected void |
parseElementProperties(com.google.gson.JsonObject json,
Element e) |
protected void |
parseElementProperties(com.google.gson.JsonObject theAsJsonObject,
IdType theReferenceElement) |
protected void |
parseElementProperties(com.google.gson.JsonObject theAsJsonObject,
org.hl7.fhir.instance.model.api.IIdType theReferenceElement) |
protected abstract Resource |
parseResource(com.google.gson.JsonObject json) |
Type |
parseType(InputStream input,
String type)
This is used to parse a type - a fragment of a resource.
|
protected abstract Type |
parseType(com.google.gson.JsonObject json,
String type) |
protected abstract Type |
parseType(String prefix,
com.google.gson.JsonObject json) |
protected org.hl7.fhir.utilities.xhtml.XhtmlNode |
parseXhtml(String value) |
protected void |
prop(String name,
BigDecimal value) |
protected void |
prop(String name,
Boolean value) |
protected void |
prop(String name,
Integer value) |
protected void |
prop(String name,
String value) |
protected void |
propNum(String name,
String value) |
protected void |
writeNull(String name) |
composeBytes, composeBytes, composeString, composeString, getHandleComments, getOutputStyle, isAllowComments, isAllowUnknownContent, parse, parse, parseAnyType, parseAnyType, parseBase64BinaryPrimitive, parseBooleanPrimitive, parseBooleanPrimitive, parseCodePrimitive, parseDecimalPrimitive, parseDecimalPrimitive, parseIdPrimitive, parseIntegerPrimitive, parseIntegerPrimitive, parseOidPrimitive, parseStringPrimitive, parseTimePrimitive, parseType, parseType, parseUriPrimitive, parseUuidPrimitive, setAllowComments, setAllowUnknownContent, setHandleComments, setOutputStyle, setSuppressXhtmldetermineFormat, determineFormat, isValidId, loadFile, loadFile, makeId, makeParser, makeParser, toString, toString, toString, toString, toString, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcomposeBytes, composeBytes, composeString, composeString, getHandleComments, getOutputStyle, isAllowUnknownContent, parse, parse, parseType, parseType, setAllowUnknownContent, setHandleComments, setOutputStyle, setSuppressXhtmlprotected JsonCreator json
public JsonParserBase()
public ParserType getType()
IParserprotected abstract Resource parseResource(com.google.gson.JsonObject json) throws IOException, org.hl7.fhir.exceptions.FHIRFormatError
IOExceptionorg.hl7.fhir.exceptions.FHIRFormatErrorprotected abstract Type parseType(com.google.gson.JsonObject json, String type) throws IOException, org.hl7.fhir.exceptions.FHIRFormatError
IOExceptionorg.hl7.fhir.exceptions.FHIRFormatErrorprotected abstract Type parseAnyType(com.google.gson.JsonObject json, String type) throws IOException, org.hl7.fhir.exceptions.FHIRFormatError
IOExceptionorg.hl7.fhir.exceptions.FHIRFormatErrorprotected abstract Type parseType(String prefix, com.google.gson.JsonObject json) throws IOException, org.hl7.fhir.exceptions.FHIRFormatError
IOExceptionorg.hl7.fhir.exceptions.FHIRFormatErrorprotected abstract boolean hasTypeName(com.google.gson.JsonObject json, String prefix)
protected abstract void composeResource(Resource resource) throws IOException
IOExceptionprotected abstract void composeTypeInner(Type type) throws IOException
IOExceptionpublic Resource parse(InputStream input) throws IOException, org.hl7.fhir.exceptions.FHIRFormatError
IParserparse in interface IParserorg.hl7.fhir.exceptions.FHIRFormatError - Parse content that is known to be a resourceIOExceptionpublic Resource parse(com.google.gson.JsonObject json) throws org.hl7.fhir.exceptions.FHIRFormatError, IOException
IOExceptionorg.hl7.fhir.exceptions.FHIRFormatErrorpublic Type parseType(InputStream input, String type) throws IOException, org.hl7.fhir.exceptions.FHIRFormatError
IParserparseType in interface IParserIOExceptionorg.hl7.fhir.exceptions.FHIRFormatErrorpublic Type parseAnyType(InputStream input, String type) throws IOException, org.hl7.fhir.exceptions.FHIRFormatError
parseAnyType in interface IParserIOExceptionorg.hl7.fhir.exceptions.FHIRFormatErrorprotected com.google.gson.JsonObject getJObject(com.google.gson.JsonObject parent, String name) throws IOException
IOExceptionpublic void compose(OutputStream stream, Resource resource) throws IOException
compose in interface IParserIOExceptionpublic void compose(JsonCreator writer, Resource resource) throws IOException
IOExceptionpublic void compose(OutputStream stream, Type type, String rootName) throws IOException
IParsercompose in interface IParserIOExceptionprotected void parseElementProperties(com.google.gson.JsonObject json, Element e) throws IOException, org.hl7.fhir.exceptions.FHIRFormatError
IOExceptionorg.hl7.fhir.exceptions.FHIRFormatErrorprotected org.hl7.fhir.utilities.xhtml.XhtmlNode parseXhtml(String value) throws IOException, org.hl7.fhir.exceptions.FHIRFormatError
IOExceptionorg.hl7.fhir.exceptions.FHIRFormatErrorprotected DomainResource parseDomainResource(com.google.gson.JsonObject json) throws org.hl7.fhir.exceptions.FHIRFormatError, IOException
org.hl7.fhir.exceptions.FHIRFormatErrorIOExceptionprotected void writeNull(String name) throws IOException
IOExceptionprotected void prop(String name, String value) throws IOException
IOExceptionprotected void prop(String name, Boolean value) throws IOException
IOExceptionprotected void prop(String name, BigDecimal value) throws IOException
IOExceptionprotected void propNum(String name, String value) throws IOException
IOExceptionprotected void prop(String name, Integer value) throws IOException
IOExceptionprotected void composeXhtml(String name, org.hl7.fhir.utilities.xhtml.XhtmlNode html) throws IOException
IOExceptionprotected void open(String name) throws IOException
IOExceptionprotected void close() throws IOException
IOExceptionprotected void openArray(String name) throws IOException
IOExceptionprotected void closeArray() throws IOException
IOExceptionprotected void openObject(String name) throws IOException
IOExceptionprotected void closeObject() throws IOException
IOExceptionprotected boolean anyHasExtras(List<? extends Element> list)
protected boolean makeComments(Element element)
protected void composeDomainResource(String name, DomainResource e) throws IOException
IOExceptionprotected abstract void composeType(String prefix, Type type) throws IOException
IOExceptionprotected void composeStringCore(String name, org.hl7.fhir.instance.model.api.IIdType value, boolean inArray) throws IOException
IOExceptionprotected void composeStringExtras(String name, org.hl7.fhir.instance.model.api.IIdType value, boolean inArray) throws IOException
IOExceptionprotected void parseElementProperties(com.google.gson.JsonObject theAsJsonObject, org.hl7.fhir.instance.model.api.IIdType theReferenceElement) throws org.hl7.fhir.exceptions.FHIRFormatError, IOException
org.hl7.fhir.exceptions.FHIRFormatErrorIOExceptionprotected void parseElementProperties(com.google.gson.JsonObject theAsJsonObject, IdType theReferenceElement) throws org.hl7.fhir.exceptions.FHIRFormatError, IOException
org.hl7.fhir.exceptions.FHIRFormatErrorIOExceptionCopyright © 2014–2021 Health Level 7. All rights reserved.