Class ProcessDiagramLayoutFactory

    • Constructor Detail

      • ProcessDiagramLayoutFactory

        public ProcessDiagramLayoutFactory()
    • Method Detail

      • getProcessDiagramLayout

        public DiagramLayout getProcessDiagramLayout​(java.io.InputStream bpmnXmlStream,
                                                     java.io.InputStream imageStream)
        Provides positions and dimensions of elements in a process diagram as provided by RepositoryService.getProcessDiagram(String). Currently, it only supports BPMN 2.0 models.
        Parameters:
        bpmnXmlStream - BPMN 2.0 XML file
        imageStream - BPMN 2.0 diagram in PNG format (JPEG and other formats supported by ImageIO may also work)
        Returns:
        Layout of the process diagram
      • getBpmnProcessDiagramLayout

        public DiagramLayout getBpmnProcessDiagramLayout​(org.w3c.dom.Document bpmnModel,
                                                         java.io.InputStream imageStream)
        Provides positions and dimensions of elements in a BPMN process diagram as provided by RepositoryService.getProcessDiagram(String).
        Parameters:
        bpmnModel - BPMN 2.0 XML document
        imageStream - BPMN 2.0 diagram in PNG format (JPEG and other formats supported by ImageIO may also work)
        Returns:
        Layout of the process diagram
      • parseXml

        protected org.w3c.dom.Document parseXml​(java.io.InputStream bpmnXmlStream)
      • getDiagramBoundsFromBpmnDi

        protected DiagramNode getDiagramBoundsFromBpmnDi​(org.w3c.dom.Document bpmnModel)
      • getDiagramBoundsFromImage

        protected DiagramNode getDiagramBoundsFromImage​(java.io.InputStream imageStream)
      • getDiagramBoundsFromImage

        protected DiagramNode getDiagramBoundsFromImage​(java.io.InputStream imageStream,
                                                        int offsetTop,
                                                        int offsetBottom)
      • getDiagramBoundsFromImage

        protected DiagramNode getDiagramBoundsFromImage​(java.awt.image.BufferedImage image,
                                                        int offsetTop,
                                                        int offsetBottom)
      • getElementBoundsFromBpmnDi

        protected java.util.Map<java.lang.String,​DiagramNode> getElementBoundsFromBpmnDi​(org.w3c.dom.Document bpmnModel)
      • parseBounds

        protected DiagramNode parseBounds​(org.w3c.dom.Element boundsElement)
      • transformBoundsForImage

        protected java.util.Map<java.lang.String,​DiagramElement> transformBoundsForImage​(DiagramNode diagramBoundsImage,
                                                                                               DiagramNode diagramBoundsXml,
                                                                                               java.util.Map<java.lang.String,​DiagramNode> listOfBounds)
      • fixFlowNodePositionsIfModelFromAdonis

        protected java.util.Map<java.lang.String,​DiagramNode> fixFlowNodePositionsIfModelFromAdonis​(org.w3c.dom.Document bpmnModel,
                                                                                                          java.util.Map<java.lang.String,​DiagramNode> elementBoundsFromBpmnDi)
      • isExportedFromAdonis50

        protected boolean isExportedFromAdonis50​(org.w3c.dom.Document bpmnModel)
      • getConfiguredDocumentBuilderFactory

        protected javax.xml.parsers.DocumentBuilderFactory getConfiguredDocumentBuilderFactory()