Class Daffodil

java.lang.Object
org.apache.daffodil.api.Daffodil

public class Daffodil extends Object
Factory object to create a Compiler
  • Method Details

    • compiler

      public static Compiler compiler()
      Create a new object used to compile DFDL schemas
      Returns:
      new object to compile DFDL schemas
    • newScalaXMLInfosetOutputter

      public static ScalaXMLInfosetOutputter newScalaXMLInfosetOutputter()
      InfosetOutputter to build an infoset represented as a scala.xml.Node
      Returns:
      InfosetOutputter
    • newXMLTextInfosetOutputter

      public static InfosetOutputter newXMLTextInfosetOutputter(OutputStream os, boolean pretty)
      InfosetOutputter to build an infoset represented as XML written to a java.io.OutputStream

      Output the infoset as XML Text, written to a java.io.OutputStream

      Parameters:
      os - the java.io.OutputStream to write the XML text to
      pretty - enable or disable pretty printing. Pretty printing will only insert indentation and newlines where it will not affect the content of the XML.
      Returns:
      InfosetOutputter
    • newXMLTextInfosetOutputter

      public static InfosetOutputter newXMLTextInfosetOutputter(OutputStream os, boolean pretty, XMLTextEscapeStyle xmlTextEscapeStyle)
      InfosetOutputter to build an infoset represented as XML written to a java.io.OutputStream

      Output the infoset as XML Text, written to a java.io.OutputStream

      Parameters:
      os - the java.io.OutputStream to write the XML text to
      pretty - enable or disable pretty printing. Pretty printing will only insert indentation and newlines where it will not affect the content of the XML.
      xmlTextEscapeStyle - determine whether to wrap values of elements of type xs:string in CDATA tags in order to preserve whitespace.
      Returns:
      InfosetOutputter
    • newJsonInfosetOutputter

      public static InfosetOutputter newJsonInfosetOutputter(OutputStream os, boolean pretty)
      InfosetOutputter to build an infoset represented as JSON written to a java.io.OutputStream Output the infoset as json text, written to a java.io.OutputStream
      Parameters:
      os - the java.io.OutputStream to write the json text to
      pretty - enable or disable pretty printing. Pretty printing will only insert indentation and newlines where it will not affect the content of the json.
      Returns:
      InfosetOutputter
    • newJDOMInfosetOutputter

      public static JDOMInfosetOutputter newJDOMInfosetOutputter()
      InfosetOutputter to build an infoset represented as an org.jdom2.Document
      Returns:
      InfosetOutputter
    • newW3CDOMInfosetOutputter

      public static W3CDOMInfosetOutputter newW3CDOMInfosetOutputter()
      InfosetOutputter to build an infoset represented as an org.w3c.dom.Document
      Returns:
      InfosetOutputter
    • newNullInfosetOutputter

      public static InfosetOutputter newNullInfosetOutputter()
      InfosetOutputter that does not build an infoset representation, ignoring all InfosetOutputter events
      Returns:
      InfosetOutputter
    • newScalaXMLInfosetInputter

      public static InfosetInputter newScalaXMLInfosetInputter(scala.xml.Node node)
      InfosetInputter to read an infoset represented as a scala.xml.Node
      Parameters:
      node - the scala.xml.Node infoset
      Returns:
      InfosetInputter
    • newXMLTextInfosetInputter

      public static InfosetInputter newXMLTextInfosetInputter(InputStream is)
      InfosetInputter to read an infoset represented as XML from a java.io.InputStream

      Read in an infoset in the form of XML text from a java.io.InputStream

      Parameters:
      is - the java.io.InputStream to read the XML text from
      Returns:
      InfosetInputter
    • newJsonInfosetInputter

      public static InfosetInputter newJsonInfosetInputter(InputStream is)
      InfosetInputter to read an infoset represented as JSON from a java.io.InputStream

      Read in an infoset in the form of json text from a java.io.InputStream

      Parameters:
      is - the java.io.InputStream to read the json text from
      Returns:
      InfosetInputter
    • newJDOMInfosetInputter

      public static InfosetInputter newJDOMInfosetInputter(org.jdom2.Document document)
      InfosetInputter to read an infoset represented as an org.jdom2.Document
      Parameters:
      document - the org.jdom2.Document infoset
      Returns:
      InfosetInputter
    • newW3CDOMInfosetInputter

      public static InfosetInputter newW3CDOMInfosetInputter(Document document)
      InfosetInputter to read an infoset represented as an org.w3c.dom.Document
      Parameters:
      document - the org.w3c.dom.Document infoset. Note that w3c Documents are not guaranteed to be thread-safe, even if all users only read/traverse it. It is up to the user to ensure that the Document passed into the W3CDOMInfosetInputter is not read or written by other threads while the W3CDOMInfosetInputter has access to it.
      Returns:
      InfosetInputter
    • newInputSourceDataInputStream

      public static InputSourceDataInputStream newInputSourceDataInputStream(InputStream is)
      Create an InputSourceDataInputStream from a java.io.InputStream
      Parameters:
      is - input stream to create from
      Returns:
      InputSourceDataInputStream from a java.io.InputStream
    • newInputSourceDataInputStream

      public static InputSourceDataInputStream newInputSourceDataInputStream(ByteBuffer bb)
      Create an InputSourceDataInputStream from a java.nio.ByteBuffer
      Parameters:
      bb - byte buffer to create from
      Returns:
      InputSourceDataInputStream from a java.nio.ByteBuffer
    • newInputSourceDataInputStream

      public static InputSourceDataInputStream newInputSourceDataInputStream(byte[] arr)
      Create an InputSourceDataInputStream from a byte array
      Parameters:
      arr - byte array to create from
      Returns:
      InputSourceDataInputStream from a byte array
    • newDaffodilDebugger

      public static Debugger newDaffodilDebugger(DaffodilDebuggerRunner dr)
      Factory method to get a Debugger that is controlled by a DaffodilDebuggerRunner.
      Parameters:
      dr - debugger runner
      Returns:
      a Debugger that is controlled by a DaffodilDebuggerRunner
    • newTraceDebugger

      public static Debugger newTraceDebugger(PrintStream out)
      Factory method to get a debugger that provides verbose trace output to a PrintStream
      Parameters:
      out - stream to print trace to
      Returns:
      a debugger that provides verbose trace output to a PrintStream