Package org.openstreetmap.josm.plugins
Class PluginListParser
java.lang.Object
org.openstreetmap.josm.plugins.PluginListParser
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 -
Method Summary
Modifier and TypeMethodDescriptionprivate static voidaddPluginInformation(List<PluginInformation> ret, String name, String url, Attributes manifest) static PluginInformationcreateInfo(String name, String url, Attributes manifest) Creates the plugin information objectparse(InputStream in) Parses a plugin information document and replies a list of plugin information objects.
-
Constructor Details
-
PluginListParser
public PluginListParser()
-
-
Method Details
-
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
Parses a plugin information document and replies a list of plugin information objects. See https://josm.openstreetmap.de/pluginicons 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)
-