Class JadiceXmlBuilder


  • public class JadiceXmlBuilder
    extends java.lang.Object
    Resolve INI Format into Jadice XML Annotation Format.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String ANNOTATION_LINE_SEPARATOR
      The string the "" part in Saperion annotations is replaced with.
      static java.lang.String DOUBLEBYTE_ENCODING
      Constant for double byte encoding.
      protected static com.saperion.common.logging.Logger LOGGER
      Logger.
      static java.lang.String XML_ENCODING
      The encoding of the resulting Xml.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      com.saperion.ngc.viewer.virtualviewer.jadice.xml.Annotations buildXml​(java.util.List<Section> parsedIniSections, java.lang.String ixosAnnotationsIni, int ixosPage)
      Builds the xml.
      static java.io.BufferedReader getBufferedReader​(java.lang.String iniData)
      Get The BufferedReader from a iniData String.
      java.util.Map<java.lang.String,​java.util.List<Section>> getSectionsByPage​(java.util.List<Section> components)
      Get the Annotations sorted by Page The Hashmap key is the PageNumber, The Hashmap value is a ArrayList of Sections.
      java.util.List<Section> parseIni​(java.lang.String iniContent)
      Parses the annotations defined by the specified ini-string and returns a list of parsed sections.
      void setDocumentImageSize​(Node aDocumentImageSize)  
      static byte[] writeDocumentToByteArray​(com.saperion.ngc.viewer.virtualviewer.jadice.xml.Annotations document)
      Write the given xml Snowbound Document to byte Array .
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • DOUBLEBYTE_ENCODING

        public static final java.lang.String DOUBLEBYTE_ENCODING
        Constant for double byte encoding.
        See Also:
        Constant Field Values
      • XML_ENCODING

        public static final java.lang.String XML_ENCODING
        The encoding of the resulting Xml.
        See Also:
        Constant Field Values
      • ANNOTATION_LINE_SEPARATOR

        public static final java.lang.String ANNOTATION_LINE_SEPARATOR
        The string the "" part in Saperion annotations is replaced with.
        See Also:
        Constant Field Values
      • LOGGER

        protected static final com.saperion.common.logging.Logger LOGGER
        Logger.
    • Constructor Detail

      • JadiceXmlBuilder

        public JadiceXmlBuilder()
    • Method Detail

      • parseIni

        public java.util.List<Section> parseIni​(java.lang.String iniContent)
        Parses the annotations defined by the specified ini-string and returns a list of parsed sections.
        Parameters:
        iniContent - content of the ini-file as string
        Returns:
        list of sections
      • buildXml

        public com.saperion.ngc.viewer.virtualviewer.jadice.xml.Annotations buildXml​(java.util.List<Section> parsedIniSections,
                                                                                     java.lang.String ixosAnnotationsIni,
                                                                                     int ixosPage)
        Builds the xml.
        Parameters:
        parsedIniSections - the parsed ini sections
        ixosAnnotationsIni - IXOS annotations
        ixosPage - IXOS Page
        Returns:
        the document
      • getSectionsByPage

        public java.util.Map<java.lang.String,​java.util.List<Section>> getSectionsByPage​(java.util.List<Section> components)
        Get the Annotations sorted by Page The Hashmap key is the PageNumber, The Hashmap value is a ArrayList of Sections.
        Parameters:
        components - components
        Returns:
        pageSections
      • getBufferedReader

        public static java.io.BufferedReader getBufferedReader​(java.lang.String iniData)
        Get The BufferedReader from a iniData String.
        Parameters:
        iniData - iniData
        Returns:
        br BufferedReader
      • writeDocumentToByteArray

        public static byte[] writeDocumentToByteArray​(com.saperion.ngc.viewer.virtualviewer.jadice.xml.Annotations document)
        Write the given xml Snowbound Document to byte Array .
        Parameters:
        document - document
        Returns:
        byteArrayOutputStream byteArrayOutputStream
      • setDocumentImageSize

        public void setDocumentImageSize​(Node aDocumentImageSize)
        Parameters:
        aDocumentImageSize - documentImageSize