Class PluginListParser


  • public class PluginListParser
    extends java.lang.Object
    A parser for the plugin list provided by a JOSM Plugin Download Site. See https://josm.openstreetmap.de/plugin for a sample of the document. The format is a custom format, kind of mix of CSV and RFC822 style name/value-pairs.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      private static void addPluginInformation​(java.util.List<PluginInformation> ret, java.lang.String name, java.lang.String url, java.util.jar.Attributes manifest)  
      static PluginInformation createInfo​(java.lang.String name, java.lang.String url, java.util.jar.Attributes manifest)
      Creates the plugin information object
      java.util.List<PluginInformation> parse​(java.io.InputStream in)
      Parses a plugin information document and replies a list of plugin information objects.
      • Methods inherited from class java.lang.Object

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

      • createInfo

        public static PluginInformation createInfo​(java.lang.String name,
                                                   java.lang.String url,
                                                   java.util.jar.Attributes manifest)
                                            throws PluginListParseException
        Creates the plugin information object
        Parameters:
        name - the plugin name
        url - the plugin download url
        manifest - the plugin manifest attributes
        Returns:
        a plugin information object
        Throws:
        PluginListParseException - if plugin manifest cannot be parsed
      • parse

        public java.util.List<PluginInformationparse​(java.io.InputStream in)
                                                throws PluginListParseException
        Parses a plugin information document and replies a list of plugin information objects. See https://josm.openstreetmap.de/plugin for a sample of the document. The format is a custom format, kind of mix of CSV and RFC822 style name/value-pairs.
        Parameters:
        in - the input stream from which to parse
        Returns:
        the list of plugin information objects
        Throws:
        PluginListParseException - if something goes wrong while parsing
      • addPluginInformation

        private static void addPluginInformation​(java.util.List<PluginInformation> ret,
                                                 java.lang.String name,
                                                 java.lang.String url,
                                                 java.util.jar.Attributes manifest)