Class XJmfParser


public class XJmfParser extends AbstractXmlParser<XJMF>
Parsing logic for building a XML Document from XJMF DOM-Tree and the way around.
  • Constructor Details

    • XJmfParser

      public XJmfParser() throws javax.xml.bind.JAXBException
      Default constructor.
      Throws:
      javax.xml.bind.JAXBException - Thrown in case a JAXBException occurs.
  • Method Details

    • parseXJmf

      public final void parseXJmf(XJMF xjmf, OutputStream os) throws javax.xml.bind.JAXBException
      Parse a XJMF Object Tree to a binary output stream.
      Parameters:
      xjmf - XJMF Object Tree for parsing.
      os - Target OutputStream where XJMF is being parsed.
      Throws:
      javax.xml.bind.JAXBException - Is thrown in case any error while un-/marshalling occurs.
    • parseXJmf

      public final void parseXJmf(XJMF xjmf, OutputStream os, boolean skipValidation) throws javax.xml.bind.JAXBException
      Parse a XJMF Object Tree to a binary output stream.
      Parameters:
      xjmf - XJMF Object Tree for parsing.
      os - Target OutputStream where XJMF is being parsed.
      skipValidation - Skip validation.
      Throws:
      javax.xml.bind.JAXBException
    • parseXJmf

      public final byte[] parseXJmf(XJMF xjmf) throws IOException, javax.xml.bind.JAXBException
      Parse a XJMF Object Tree to a byte array.
      Parameters:
      xjmf - XJMF Object Tree for parsing.
      Returns:
      XJMF as byte array.
      Throws:
      IOException - Is thrown in case any IO error occurs.
      javax.xml.bind.JAXBException
    • parseXJmf

      public final byte[] parseXJmf(XJMF xjmf, boolean skipValidation) throws javax.xml.bind.JAXBException, IOException
      Parse a XJMF Object Tree to a byte array.
      Parameters:
      xjmf - XJMF Object Tree for parsing.
      skipValidation - Skip validation.
      Returns:
      XJMF as byte array.
      Throws:
      javax.xml.bind.JAXBException - Is thrown in case any error while un-/marshalling occurs.
      IOException - Is thrown in case any IO error occurs.
    • getNamespacePrefixMapper

      protected final com.sun.xml.bind.marshaller.NamespacePrefixMapper getNamespacePrefixMapper()
      Description copied from class: AbstractXmlParser
      Returns a new specific NamespacePrefixMapper implementation.
      Specified by:
      getNamespacePrefixMapper in class AbstractXmlParser<XJMF>
      Returns:
      New specific NamespacePrefixMapper implementation.
    • getXmlHeader

      protected String getXmlHeader()
      Description copied from class: AbstractXmlParser
      Returns the XML Header for marshaling.
      Specified by:
      getXmlHeader in class AbstractXmlParser<XJMF>
      Returns:
      XML Header as String
    • createValidator

      protected final AbstractXmlValidator createValidator()
      Description copied from class: AbstractXmlParser
      Create validator for validating documents.
      Specified by:
      createValidator in class AbstractXmlParser<XJMF>
      Returns:
      Validator