Package org.openstreetmap.josm.plugins
Class PluginListParser
- java.lang.Object
-
- 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 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 voidaddPluginInformation(java.util.List<PluginInformation> ret, java.lang.String name, java.lang.String url, java.util.jar.Attributes manifest)static PluginInformationcreateInfo(java.lang.String name, java.lang.String url, java.util.jar.Attributes manifest)Creates the plugin information objectjava.util.List<PluginInformation>parse(java.io.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(java.lang.String name, java.lang.String url, java.util.jar.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 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 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)
-
-