
Package org.hl7.fhir.r5.formats
Class RdfParserBase
java.lang.Object
org.hl7.fhir.r5.formats.FormatUtilities
org.hl7.fhir.r5.formats.ParserBase
org.hl7.fhir.r5.formats.RdfParserBase
- All Implemented Interfaces:
IParser
- Direct Known Subclasses:
RdfParser
-
Nested Class Summary
Nested classes/interfaces inherited from class org.hl7.fhir.r5.formats.ParserBase
ParserBase.IParserFactoryNested classes/interfaces inherited from interface org.hl7.fhir.r5.formats.IParser
IParser.OutputStyle -
Field Summary
Fields inherited from class org.hl7.fhir.r5.formats.ParserBase
allowComments, allowUnknownContent, customResourceHandlers, handleComments, idMap, style, xhtmlMessageFields inherited from class org.hl7.fhir.r5.formats.FormatUtilities
FHIR_NS, ID_REGEX, NS_XSI, XHTML_NS -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcompose(OutputStream stream, DataType 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. rootName is ignored in the JSON formatvoidcompose(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)protected voidcomposeBase(org.hl7.fhir.utilities.turtle.Turtle.Complex t, String parentType, String name, Base element, int index) protected abstract voidcomposeResource(org.hl7.fhir.utilities.turtle.Turtle.Complex complex, Resource resource) protected voidcomposeXhtmlNode(org.hl7.fhir.utilities.turtle.Turtle.Complex t, String string, String string2, org.hl7.fhir.utilities.xhtml.XhtmlNode div, int i) protected voiddecorateCode(org.hl7.fhir.utilities.turtle.Turtle.Complex t, CodeType value) protected voiddecorateCode(org.hl7.fhir.utilities.turtle.Turtle.Complex t, Enumeration<? extends Enum> value) protected voiddecorateCodeableConcept(org.hl7.fhir.utilities.turtle.Turtle.Complex t, CodeableConcept element) protected voiddecorateCoding(org.hl7.fhir.utilities.turtle.Turtle.Complex t, Coding element) getType()check what kind of parser this isparse(InputStream input) parse content that is known to be a resourceparseAnyType(InputStream input, String knownType) parseType(InputStream input, String knownType) This is used to parse a type - a fragment of a resource.protected StringttlLiteral(String value) Methods inherited from class org.hl7.fhir.r5.formats.ParserBase
composeBytes, composeBytes, composeString, composeString, getCustomResourceHandlers, getHandleComments, getOutputStyle, isAllowComments, isAllowUnknownContent, parse, parse, parseAndClose, parseAnyType, parseAnyType, parseBase64BinaryPrimitive, parseBooleanPrimitive, parseBooleanPrimitive, parseCodePrimitive, parseDecimalPrimitive, parseDecimalPrimitive, parseIdPrimitive, parseIntegerPrimitive, parseIntegerPrimitive, parseOidPrimitive, parseStringPrimitive, parseTimePrimitive, parseType, parseType, parseUriPrimitive, parseUuidPrimitive, setAllowComments, setAllowUnknownContent, setHandleComments, setOutputStyle, setSuppressXhtmlMethods inherited from class org.hl7.fhir.r5.formats.FormatUtilities
determineFormat, determineFormat, isValidId, loadFile, loadFile, loadFileTight, loadFileTight, makeId, makeParser, makeParser, toString, toString, toString, toString, toString, toStringMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.hl7.fhir.r5.formats.IParser
composeBytes, composeBytes, composeString, composeString, getHandleComments, getOutputStyle, isAllowUnknownContent, parse, parse, parseAndClose, parseType, parseType, setAllowUnknownContent, setHandleComments, setOutputStyle, setSuppressXhtml
-
Constructor Details
-
RdfParserBase
public RdfParserBase()
-
-
Method Details
-
composeResource
protected abstract void composeResource(org.hl7.fhir.utilities.turtle.Turtle.Complex complex, Resource resource) throws IOException - Throws:
IOException
-
getType
Description copied from interface:IParsercheck what kind of parser this is -
parse
public Resource parse(InputStream input) throws IOException, org.hl7.fhir.exceptions.FHIRFormatError Description copied from interface:IParserparse content that is known to be a resource- Specified by:
parsein interfaceIParser- Throws:
IOExceptionorg.hl7.fhir.exceptions.FHIRFormatError
-
parseType
public DataType parseType(InputStream input, String knownType) throws IOException, org.hl7.fhir.exceptions.FHIRFormatError Description copied from interface:IParserThis is used to parse a type - a fragment of a resource. There's no reason to use this in production - it's used in the build tools Not supported by all implementations- Specified by:
parseTypein interfaceIParser- Parameters:
input-knownType- . if this is blank, the parser may try to infer the type (xml only)- Returns:
- Throws:
IOExceptionorg.hl7.fhir.exceptions.FHIRFormatError
-
parseAnyType
public DataType parseAnyType(InputStream input, String knownType) throws IOException, org.hl7.fhir.exceptions.FHIRFormatError - Specified by:
parseAnyTypein interfaceIParser- Throws:
IOExceptionorg.hl7.fhir.exceptions.FHIRFormatError
-
compose
Description copied from interface:IParserCompose a resource to a stream, possibly using pretty presentation for a human reader (used in the spec, for example, but not normally in production)- Specified by:
composein interfaceIParser- Throws:
IOException
-
composeBase
protected void composeBase(org.hl7.fhir.utilities.turtle.Turtle.Complex t, String parentType, String name, Base element, int index) -
compose
Description copied from interface:IParserCompose 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. rootName is ignored in the JSON format- Specified by:
composein interfaceIParser- Throws:
IOException
-
ttlLiteral
-
composeXhtmlNode
protected void composeXhtmlNode(org.hl7.fhir.utilities.turtle.Turtle.Complex t, String string, String string2, org.hl7.fhir.utilities.xhtml.XhtmlNode div, int i) -
decorateCode
protected void decorateCode(org.hl7.fhir.utilities.turtle.Turtle.Complex t, Enumeration<? extends Enum> value) -
decorateCode
-
decorateCoding
-
decorateCodeableConcept
protected void decorateCodeableConcept(org.hl7.fhir.utilities.turtle.Turtle.Complex t, CodeableConcept element)
-