Class CDAR2Parser

java.lang.Object
org.openehealth.ipf.modules.cda.CDAR2Parser
All Implemented Interfaces:
Parser<org.openhealthtools.mdht.uml.cda.ClinicalDocument>

public class CDAR2Parser extends Object implements Parser<org.openhealthtools.mdht.uml.cda.ClinicalDocument>
Author:
Stefan Ivanov
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    org.openhealthtools.mdht.uml.cda.ClinicalDocument
    parse(InputStream is, Object... options)
    Parses a ClinicalDocument from an InputStream.
    org.openhealthtools.mdht.uml.cda.ClinicalDocument
    parse(Reader reader, Object... options)
    Parses a message and returns an internal representation of the information.
    org.openhealthtools.mdht.uml.cda.ClinicalDocument
    parse(String s, Object... options)
    Parses a message and returns an internal representation of the information.
    org.openhealthtools.mdht.uml.cda.ClinicalDocument
    parse(Source source, Object... options)
    Parses a message and returns an internal representation of the information.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • CDAR2Parser

      public CDAR2Parser()
  • Method Details

    • parse

      public org.openhealthtools.mdht.uml.cda.ClinicalDocument parse(String s, Object... options)
      Description copied from interface: Parser
      Parses a message and returns an internal representation of the information.
      Specified by:
      parse in interface Parser<org.openhealthtools.mdht.uml.cda.ClinicalDocument>
      Returns:
      the parsed message
    • parse

      public org.openhealthtools.mdht.uml.cda.ClinicalDocument parse(InputStream is, Object... options)
      Parses a ClinicalDocument from an InputStream. This parser is not vulnerable to XXE injections. Parsing an XML document with a Doctype will throw a ParseException and all <include xmlns="http://www.w3.org/2001/XInclude"/gt; tags will be striped.

      The MDHT parser is unsafe, so the clinical document is parsed to a Document here before being passed to MDHT.

      Specified by:
      parse in interface Parser<org.openhealthtools.mdht.uml.cda.ClinicalDocument>
      Returns:
      the parsed message
      See Also:
    • parse

      public org.openhealthtools.mdht.uml.cda.ClinicalDocument parse(Source source, Object... options)
      Description copied from interface: Parser
      Parses a message and returns an internal representation of the information.
      Specified by:
      parse in interface Parser<org.openhealthtools.mdht.uml.cda.ClinicalDocument>
      Returns:
      the parsed message
    • parse

      public org.openhealthtools.mdht.uml.cda.ClinicalDocument parse(Reader reader, Object... options)
      Description copied from interface: Parser
      Parses a message and returns an internal representation of the information.
      Specified by:
      parse in interface Parser<org.openhealthtools.mdht.uml.cda.ClinicalDocument>
      Returns:
      the parsed message