Package org.openstreetmap.josm.plugins
Class PluginListParser
- java.lang.Object
-
- org.openstreetmap.josm.plugins.PluginListParser
-
public class PluginListParser extends 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.
-
-
Constructor Summary
Constructors Constructor Description PluginListParser()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private static void
addPluginInformation(List<PluginInformation> ret, String name, String url, Attributes manifest)
static PluginInformation
createInfo(String name, String url, Attributes manifest)
Creates the plugin information objectList<PluginInformation>
parse(InputStream in)
Parses a plugin information document and replies a list of plugin information objects.
-
-
-
Constructor Detail
-
PluginListParser
public PluginListParser()
-
-
Method Detail
-
createInfo
public static PluginInformation createInfo(String name, String url, Attributes manifest) throws PluginListParseException
Creates the plugin information object- Parameters:
name
- the plugin nameurl
- the plugin download urlmanifest
- the plugin manifest attributes- Returns:
- a plugin information object
- Throws:
PluginListParseException
- if plugin manifest cannot be parsed
-
parse
public List<PluginInformation> parse(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(List<PluginInformation> ret, String name, String url, Attributes manifest)
-
-