Interface IXmlInternalExporter


  • @OpenApiAll
    public interface IXmlInternalExporter
    An Interface for BPMN -> XML Exporters. Exporters are xsd schema based, and export Object trees created from compiled xjc classes. The bpmn model elements can be checked with the BPMN validation rules, if required. And of course the generated xml can be validated against the original schemas and then written to an OutputStream.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      boolean doValidateModel()
      the Exporter framework will call this method to test if the BPMN model elements should be validated.
      java.lang.Object getJAXBRootElement()
      Mapping model elements to JAXB objects.
      java.util.Set<Element> getMappedElements()
      The model elements that are to be validated with CBM internal rules
      javax.xml.bind.Marshaller getMarshaller()
      Creates the Marshaller used by this exporter
      java.lang.Class<?> getObjectFactoryClass()
      The particular JAXB Object factory needed for this exporter.
      java.util.Set<Element> getRefElements()
      The reference of model elements that are to be validated with CBM internal rules
      org.w3c.dom.ls.LSResourceResolver getResolver()
      if dependent schemas are jarred, a custom Resolver is needed to locate them at xml validation time.
      javax.xml.transform.stream.StreamSource[] getSchemaSources()
      The Schema sources needed to validate the resulting xml file This method can return null if xml validation is not needed.
      java.util.Collection<RuleViolationResult> getViolations()
      If the BPMN model elements were validated, this is where the results will be available.
      void setMarshallerProperties​(javax.xml.bind.Marshaller m)
      Sets special properties for the marshaller before actual export.
      void write()
      This method will serialize the JAXB object tree to an OutputStream silently exits if all goes well
    • Method Detail

      • getJAXBRootElement

        java.lang.Object getJAXBRootElement()
        Mapping model elements to JAXB objects. This must return the root of the JAXB object tree.
        Returns:
        the root of the mapped model, a JAXB object
      • doValidateModel

        boolean doValidateModel()
        the Exporter framework will call this method to test if the BPMN model elements should be validated.
        Returns:
        true if the model is to be validated
      • getMappedElements

        java.util.Set<Element> getMappedElements()
        The model elements that are to be validated with CBM internal rules
        Returns:
        the elements that have to be validated
      • getRefElements

        java.util.Set<Element> getRefElements()
        The reference of model elements that are to be validated with CBM internal rules
        Returns:
        the elements that have to be validated
      • getViolations

        java.util.Collection<RuleViolationResult> getViolations()
        If the BPMN model elements were validated, this is where the results will be available.
        Returns:
        the Validation Rule Violations
      • getObjectFactoryClass

        java.lang.Class<?> getObjectFactoryClass()
        The particular JAXB Object factory needed for this exporter.
        Returns:
        the JAXB ObjectFactory class
      • getSchemaSources

        javax.xml.transform.stream.StreamSource[] getSchemaSources()
        The Schema sources needed to validate the resulting xml file This method can return null if xml validation is not needed.
        Returns:
        all schemas needed for xml validation
      • setMarshallerProperties

        void setMarshallerProperties​(javax.xml.bind.Marshaller m)
                              throws javax.xml.bind.JAXBException
        Sets special properties for the marshaller before actual export.
        Parameters:
        m - the marshaller that can be customized
        Throws:
        javax.xml.bind.JAXBException
      • getMarshaller

        javax.xml.bind.Marshaller getMarshaller()
                                         throws javax.xml.bind.JAXBException
        Creates the Marshaller used by this exporter
        Returns:
        the Marshaller
        Throws:
        javax.xml.bind.JAXBException
      • write

        void write()
            throws javax.xml.bind.JAXBException,
                   org.xml.sax.SAXParseException
        This method will serialize the JAXB object tree to an OutputStream silently exits if all goes well
        Throws:
        javax.xml.bind.JAXBException
        org.xml.sax.SAXParseException
      • getResolver

        org.w3c.dom.ls.LSResourceResolver getResolver()
        if dependent schemas are jarred, a custom Resolver is needed to locate them at xml validation time.
        Returns:
        the custom Resource Resolver