public abstract class XmlParserBase extends ParserBase implements IParser
| Modifier and Type | Class and Description |
|---|---|
static class |
XmlParserBase.XmlVersion |
IParser.OutputStyle| Modifier and Type | Field and Description |
|---|---|
protected List<String> |
comments |
protected boolean |
htmlPretty |
protected org.hl7.fhir.utilities.xml.IXMLWriter |
xml |
allowComments, allowUnknownContent, handleComments, idMap, style, xhtmlMessageFHIR_NS, ID_REGEX, NS_XSI, XHTML_NS| Constructor and Description |
|---|
XmlParserBase() |
XmlParserBase(XmlParserBase.XmlVersion ver) |
| Modifier and Type | Method and Description |
|---|---|
void |
compose(org.hl7.fhir.utilities.xml.IXMLWriter writer,
Resource resource,
boolean htmlPretty) |
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,
Resource resource,
boolean htmlPretty)
Compose a resource to a stream, possibly using pretty presentation for a human reader, and maybe a different choice in the xhtml narrative (used in the spec in one place, but should not be used in production)
|
void |
compose(OutputStream stream,
String rootName,
Type type)
Compose a type to a stream (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 res) |
protected void |
composeElementAttributes(Element element) |
protected void |
composeElementClose(Base base) |
protected abstract void |
composeResource(Resource resource) |
protected abstract void |
composeResource(String name,
Resource res) |
protected void |
composeString(String name,
org.hl7.fhir.instance.model.api.IIdType value) |
protected abstract void |
composeString(String name,
StringType value) |
protected abstract void |
composeType(String prefix,
Type type) |
protected void |
composeTypeAttributes(Type type) |
protected void |
composeXhtml(String name,
org.hl7.fhir.utilities.xhtml.XhtmlNode html) |
ParserType |
getType()
check what kind of parser this is
|
protected org.xmlpull.v1.XmlPullParser |
loadXml(InputStream stream) |
protected org.xmlpull.v1.XmlPullParser |
loadXml(String source) |
protected int |
next(org.xmlpull.v1.XmlPullParser xpp) |
protected int |
nextNoWhitespace(org.xmlpull.v1.XmlPullParser xpp) |
Resource |
parse(InputStream input)
Parse content that is known to be a resource
|
Resource |
parse(org.xmlpull.v1.XmlPullParser xpp)
parse xml that is known to be a resource, and that is already being read by an XML Pull Parser
This is if a resource is in a bigger piece of XML.
|
Type |
parseAnyType(InputStream input,
String knownType) |
protected abstract Type |
parseAnyType(org.xmlpull.v1.XmlPullParser xml,
String type) |
protected void |
parseBackboneAttributes(org.xmlpull.v1.XmlPullParser xpp,
Element e) |
protected DomainResource |
parseDomainResourceContained(org.xmlpull.v1.XmlPullParser xpp) |
protected void |
parseElementAttributes(org.xmlpull.v1.XmlPullParser xpp,
Element e) |
protected void |
parseElementClose(Base e) |
protected abstract Resource |
parseResource(org.xmlpull.v1.XmlPullParser xpp) |
protected Resource |
parseResourceContained(org.xmlpull.v1.XmlPullParser xpp) |
Type |
parseType(InputStream input,
String knownType)
This is used to parse a type - a fragment of a resource.
|
protected abstract Type |
parseType(org.xmlpull.v1.XmlPullParser xml,
String type) |
protected void |
parseTypeAttributes(org.xmlpull.v1.XmlPullParser xpp,
Type t) |
protected org.hl7.fhir.utilities.xhtml.XhtmlNode |
parseXhtml(org.xmlpull.v1.XmlPullParser xpp) |
protected void |
skipElementWithContent(org.xmlpull.v1.XmlPullParser xpp) |
protected void |
skipEmptyElement(org.xmlpull.v1.XmlPullParser xpp) |
protected void |
unknownContent(org.xmlpull.v1.XmlPullParser xpp) |
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 org.hl7.fhir.utilities.xml.IXMLWriter xml
protected boolean htmlPretty
public XmlParserBase(XmlParserBase.XmlVersion ver)
public XmlParserBase()
public ParserType getType()
IParserprotected abstract Resource parseResource(org.xmlpull.v1.XmlPullParser xpp) throws org.xmlpull.v1.XmlPullParserException, IOException, org.hl7.fhir.exceptions.FHIRFormatError
org.xmlpull.v1.XmlPullParserExceptionIOExceptionorg.hl7.fhir.exceptions.FHIRFormatErrorprotected abstract Type parseType(org.xmlpull.v1.XmlPullParser xml, String type) throws org.xmlpull.v1.XmlPullParserException, IOException, org.hl7.fhir.exceptions.FHIRFormatError
org.xmlpull.v1.XmlPullParserExceptionIOExceptionorg.hl7.fhir.exceptions.FHIRFormatErrorprotected abstract Type parseAnyType(org.xmlpull.v1.XmlPullParser xml, String type) throws org.xmlpull.v1.XmlPullParserException, IOException, org.hl7.fhir.exceptions.FHIRFormatError
org.xmlpull.v1.XmlPullParserExceptionIOExceptionorg.hl7.fhir.exceptions.FHIRFormatErrorprotected abstract void composeType(String prefix, Type type) throws IOException
IOExceptionpublic Resource parse(InputStream input) throws IOException, org.hl7.fhir.exceptions.FHIRFormatError
parse in interface IParserIOExceptionorg.hl7.fhir.exceptions.FHIRFormatErrorpublic Resource parse(org.xmlpull.v1.XmlPullParser xpp) throws IOException, org.hl7.fhir.exceptions.FHIRFormatError, org.xmlpull.v1.XmlPullParserException
IOExceptionorg.hl7.fhir.exceptions.FHIRFormatErrororg.xmlpull.v1.XmlPullParserExceptionpublic Type parseType(InputStream input, String knownType) throws IOException, org.hl7.fhir.exceptions.FHIRFormatError
IParserparseType in interface IParserIOExceptionorg.hl7.fhir.exceptions.FHIRFormatErrorpublic Type parseAnyType(InputStream input, String knownType) throws IOException, org.hl7.fhir.exceptions.FHIRFormatError
parseAnyType in interface IParserIOExceptionorg.hl7.fhir.exceptions.FHIRFormatErrorpublic void compose(OutputStream stream, Resource resource) throws IOException
compose in interface IParserIOExceptionpublic void compose(OutputStream stream, Resource resource, boolean htmlPretty) throws IOException
IOExceptionpublic void compose(OutputStream stream, String rootName, Type type) throws IOException
IOExceptionpublic void compose(OutputStream stream, Type type, String rootName) throws IOException
IParsercompose in interface IParserIOExceptionprotected org.xmlpull.v1.XmlPullParser loadXml(String source) throws UnsupportedEncodingException, org.xmlpull.v1.XmlPullParserException, IOException
UnsupportedEncodingExceptionorg.xmlpull.v1.XmlPullParserExceptionIOExceptionprotected org.xmlpull.v1.XmlPullParser loadXml(InputStream stream) throws org.xmlpull.v1.XmlPullParserException, IOException
org.xmlpull.v1.XmlPullParserExceptionIOExceptionprotected int next(org.xmlpull.v1.XmlPullParser xpp) throws org.xmlpull.v1.XmlPullParserException, IOException
org.xmlpull.v1.XmlPullParserExceptionIOExceptionprotected int nextNoWhitespace(org.xmlpull.v1.XmlPullParser xpp) throws org.xmlpull.v1.XmlPullParserException, IOException
org.xmlpull.v1.XmlPullParserExceptionIOExceptionprotected void skipElementWithContent(org.xmlpull.v1.XmlPullParser xpp) throws org.xmlpull.v1.XmlPullParserException, IOException
org.xmlpull.v1.XmlPullParserExceptionIOExceptionprotected void skipEmptyElement(org.xmlpull.v1.XmlPullParser xpp) throws org.xmlpull.v1.XmlPullParserException, IOException
org.xmlpull.v1.XmlPullParserExceptionIOExceptionprotected void parseTypeAttributes(org.xmlpull.v1.XmlPullParser xpp, Type t)
protected void parseElementAttributes(org.xmlpull.v1.XmlPullParser xpp, Element e)
protected void parseElementClose(Base e)
protected void parseBackboneAttributes(org.xmlpull.v1.XmlPullParser xpp, Element e)
protected void unknownContent(org.xmlpull.v1.XmlPullParser xpp) throws org.hl7.fhir.exceptions.FHIRFormatError, org.xmlpull.v1.XmlPullParserException, IOException
org.hl7.fhir.exceptions.FHIRFormatErrororg.xmlpull.v1.XmlPullParserExceptionIOExceptionprotected org.hl7.fhir.utilities.xhtml.XhtmlNode parseXhtml(org.xmlpull.v1.XmlPullParser xpp) throws org.xmlpull.v1.XmlPullParserException, IOException, org.hl7.fhir.exceptions.FHIRFormatError
org.xmlpull.v1.XmlPullParserExceptionIOExceptionorg.hl7.fhir.exceptions.FHIRFormatErrorprotected DomainResource parseDomainResourceContained(org.xmlpull.v1.XmlPullParser xpp) throws IOException, org.hl7.fhir.exceptions.FHIRFormatError, org.xmlpull.v1.XmlPullParserException
IOExceptionorg.hl7.fhir.exceptions.FHIRFormatErrororg.xmlpull.v1.XmlPullParserExceptionprotected Resource parseResourceContained(org.xmlpull.v1.XmlPullParser xpp) throws IOException, org.hl7.fhir.exceptions.FHIRFormatError, org.xmlpull.v1.XmlPullParserException
IOExceptionorg.hl7.fhir.exceptions.FHIRFormatErrororg.xmlpull.v1.XmlPullParserExceptionpublic void compose(org.hl7.fhir.utilities.xml.IXMLWriter writer, Resource resource, boolean htmlPretty) throws IOException
IOExceptionprotected abstract void composeResource(Resource resource) throws IOException
IOExceptionprotected void composeElementAttributes(Element element) throws IOException
IOExceptionprotected void composeElementClose(Base base) throws IOException
IOExceptionprotected void composeTypeAttributes(Type type) throws IOException
IOExceptionprotected void composeXhtml(String name, org.hl7.fhir.utilities.xhtml.XhtmlNode html) throws IOException
IOExceptionprotected abstract void composeString(String name, StringType value) throws IOException
IOExceptionprotected void composeString(String name, org.hl7.fhir.instance.model.api.IIdType value) throws IOException
IOExceptionprotected void composeDomainResource(String name, DomainResource res) throws IOException
IOExceptionprotected abstract void composeResource(String name, Resource res) throws IOException
IOExceptionCopyright © 2014–2021 Health Level 7. All rights reserved.