org.openstreetmap.josm.plugins
Class PluginListParser

java.lang.Object
  extended by org.openstreetmap.josm.plugins.PluginListParser

public class PluginListParser
extends java.lang.Object

A parser for the plugin list provided by a JOSM Plugin Download Site. See http://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.


Constructor Summary
PluginListParser()
           
 
Method Summary
private static void addPluginInformation(java.util.List<PluginInformation> ret, java.lang.String name, java.lang.String url, java.lang.String manifest)
           
protected static PluginInformation createInfo(java.lang.String name, java.lang.String url, java.lang.String 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
 

Constructor Detail

PluginListParser

public PluginListParser()
Method Detail

createInfo

protected static PluginInformation createInfo(java.lang.String name,
                                              java.lang.String url,
                                              java.lang.String manifest)
                                       throws PluginListParseException
Creates the plugin information object

Parameters:
name - the plugin name
url - the plugin download url
manifest - the plugin manifest
Returns:
a plugin information object
Throws:
PluginListParseException

parse

public java.util.List<PluginInformation> parse(java.io.InputStream in)
                                        throws PluginListParseException
Parses a plugin information document and replies a list of plugin information objects. See http://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 - thrown 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.lang.String manifest)


JOSM