Class XmlConverterPlugin

    • Field Summary

      Fields 
      Modifier and Type Field Description
      private javax.xml.parsers.DocumentBuilder _db  
      private static java.lang.String[] _ext  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.Object extract​(java.io.InputStream input)
      Extract data from the input stream into a DTO representation.
      java.lang.String[] getHandledExtensions()
      Get the set of file extension names corresponding to the format that this plugin can handle.
      private void initAndPut​(java.util.Map<java.lang.String,​java.util.List<java.lang.Object>> map, java.lang.String key, java.lang.Object value)  
      private java.lang.Object toDto​(org.w3c.dom.Element node)  
      • Methods inherited from class java.lang.Object

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

      • _ext

        private static final java.lang.String[] _ext
      • _db

        private final javax.xml.parsers.DocumentBuilder _db
    • Constructor Detail

      • XmlConverterPlugin

        public XmlConverterPlugin()
    • Method Detail

      • getHandledExtensions

        public java.lang.String[] getHandledExtensions()
        Description copied from interface: ResourceConverterPlugin
        Get the set of file extension names corresponding to the format that this plugin can handle.
        Specified by:
        getHandledExtensions in interface ResourceConverterPlugin
        Returns:
        one or multiple extensions name, never null
      • extract

        public java.lang.Object extract​(java.io.InputStream input)
                                 throws java.lang.Exception
        Description copied from interface: ResourceConverterPlugin
        Extract data from the input stream into a DTO representation.
        Specified by:
        extract in interface ResourceConverterPlugin
        Parameters:
        input - the stream to extract, must not be null
        Returns:
        a DTO representation of the input stream content or null if the stream is empty
        Throws:
        java.lang.Exception - if any errors occur during the extraction process
      • toDto

        private java.lang.Object toDto​(org.w3c.dom.Element node)
      • initAndPut

        private void initAndPut​(java.util.Map<java.lang.String,​java.util.List<java.lang.Object>> map,
                                java.lang.String key,
                                java.lang.Object value)